Skip to content
Commit b08c0be8 authored by Jared Henderson's avatar Jared Henderson Committed by Siarhei Vishniakou
Browse files

Update Xbox BT controller mapping for new FW



The Xbox controller (product id 0x02fd) is going to have a new firmware
update this fall that sends a different keycode (316/BUTTON_MODE) for
the Xbox button.  The goal is to enable the Xbox button to make it to
apps on all Android versions -- with our without a controller-specific
key mapping file.

Unfortunately, the new Vendor_045e_Product_02fd.kl key mapping file
that was added to Android Q maps the pre-firmware-update
Xbox key code (172) to BUTTON_MODE, yet it makes no mention of key 316.
This results in apps getting a raw 316 scan code instead of
a BUTTON_MODE KeyEvent when using a controller with the latest firmware
on Android Q.

The fix is to add an additional key mapping for 316 that *also* maps to
BUTTON_MODE.  With both mappings in place, both pre and post
firmware-updated controllers will get the correct behavior for the
Xbox button on Android Q.

Test: AFAIK, no CTS tests exist for Xbox controller key mappings;
we'll need to add some at a later date.  I was unable to test this
change because I'm unable to write to the system directory on any
of my devices, but I know that mapping 316 to BUTTON_MODE will
fix the issue.

Signed-off-by: default avatarJared Henderson <jaredh.microsoft@gmail.com>

Bug: 139512030
Bug: 140808513

Merged-In: I8600ea79a0aa8557267d6ca712e5d56680e7a98b
Change-Id: I8600ea79a0aa8557267d6ca712e5d56680e7a98b
parent dd67a548
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment