i3lock-color icon indicating copy to clipboard operation
i3lock-color copied to clipboard

Controller inputs are not captured/blocked

Open Dareka826 opened this issue 3 years ago • 5 comments

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

  1. Launch steam
  2. Lock the screen
  3. 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)

Dareka826 avatar Dec 20 '21 16:12 Dareka826

What keycodes are the controller buttons sending? i3lock(-color) wasn't exactly designed to handle controllers...

Raymo111 avatar Dec 20 '21 16:12 Raymo111

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?

Dareka826 avatar Dec 20 '21 16:12 Dareka826

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)

Dareka826 avatar Dec 20 '21 16:12 Dareka826

Thanks for the additional info, I'll look into this soon.

Raymo111 avatar Dec 20 '21 16:12 Raymo111

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

Dareka826 avatar Dec 20 '21 16:12 Dareka826