I tried to investigate further, checking the keycodes and scancodes with an app called "KeyEvent Display". I tried everything with and without a Vendor_045e_Product_0719.kl Keylayout file for the Controller.
Pressing the power-button on the Remotecontrol returns this:
KeyDown action=0 code=0 repeat=0 meta=0 scancode=704 mFlags=8 label='' chars='null'
KeyUp action=1 code=0 repeat=0 meta=0 scancode=704 mFlags=552 label='' chars='null'
Pressing the DPAD_LEFT on the controller returns:
KeyDown action=0 code=21 repeat=0 meta=0 scancode=704 mFlags=8 label='' chars='null'
KeyUp action=1 code=21 repeat=0 meta=0 scancode=704 mFlags=40 label='' chars='null'
So the scancode for DPAD_LEFT on the xbox 360 controller is 704, which unfortunately is the same as the power (button).
I tried changing the Layouts Vendor_045e_Product_0719.kl (Controller) and Vendor_0001_Product_0001.kl (Remote), but this of course changes only what happens when pressing the power button on the remote, or pressing the left button on the controller (but the additional power command is issued nonetheless).
I tried removing "0x51 704" from remote.conf, this causes the power button on the remote to do nothing (makes sense), and also adding "key 407 1" to Vendor_0001_Product_0001.kl trying to override scancode 407 to just output "1", but DPAD_LEFT keeps calling the power/suspend.
I assume changing the scancode sent from the controller is not possible. Is there a configuration somewhere where you can change the reaction to a scancode for the system? Or disabling the suspend/shutdown popup (reaction) totally?
Any help or hint is greatly appreciated!
Comment