Merge "Fix some input device mapping bugs with certain drivers." into gingerbread