i3lock-color
i3lock-color copied to clipboard
Controller inputs are not captured/blocked
This issue is a....
[ ] Bug [x] Other kind of issue (Please describe in detail)
Current Behavior
When the screen is locked and the "home" button on a connected controller is pressed, steam's big picture appears on top of the lockscreen.
Expected Behavior
The controller buttons should probably be captured just like keyboard keys or disabled.
Reproduction Instructions
- Launch steam
- Lock the screen
- Press the "home" button on the controller
Environment
Output of i3lock --version:
i3lock: version aur-9fc20b8 (2021-06-02) © 2010 Michael Stapelberg, © 2015 Cassandra Fox, © 2021 Raymond Li
Where'd you get i3lock-color from?
[x] AUR package (i3lock-color-git) [ ] Built from source yourself [ ] Other (Please describe in detail)
What keycodes are the controller buttons sending? i3lock(-color) wasn't exactly designed to handle controllers...
I know that it wasn't designed to handle controllers, but I think that being able to bypass the lockscreen into steam isn't a wanted behavior.
evtest reports that the keycode is 316
Event: time 1640016867.618800, type 1 (EV_KEY), code 316 (BTN_MODE), value 0
Isn't there a way to disable /dev/input/event* devices when the lockscreen is on?
More information from evtest:
$ sudo evtest --grab /dev/input/event29
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x54c product 0x9cc version 0x8111
Input device name: "Sony Interactive Entertainment Wireless Controller"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_SOUTH)
Event code 305 (BTN_EAST)
Event code 307 (BTN_NORTH)
Event code 308 (BTN_WEST)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 312 (BTN_TL2)
Event code 313 (BTN_TR2)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event code 317 (BTN_THUMBL)
Event code 318 (BTN_THUMBR)
Thanks for the additional info, I'll look into this soon.
The BTN_MODE 0x13c keycode is defined in /usr/include/linux/input-event-codes.h and evtest uses ioctl for its --grab option in the source code.
I hope this information is of use