Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller inputs are not captured/blocked #248

Open
Dareka826 opened this issue Dec 20, 2021 · 5 comments
Open

Controller inputs are not captured/blocked #248

Dareka826 opened this issue Dec 20, 2021 · 5 comments
Labels

Comments

@Dareka826
Copy link

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)
@Raymo111
Copy link
Owner

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

@Dareka826
Copy link
Author

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
Copy link
Author

Dareka826 commented Dec 20, 2021

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)

@Raymo111 Raymo111 changed the title Steam's Big Picture mode appears on top of the lockscreen (controller inputs are not blocked) Controller inputs are not captured/blocked Dec 20, 2021
@Raymo111 Raymo111 added the bug label Dec 20, 2021
@Raymo111
Copy link
Owner

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

@Dareka826
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants