Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5685

Troubleshooting • Re: KEY_POWER not acting as expected

$
0
0
whenever i'm testing something like that, i use "evtest --grab"

the --grab flag means every keystroke on the selected device, goes only to evtest and nothing else
any special actions like the power button stop working, and evtest can just report the events without interruption
The thing is I want to see if simulating the KEY_POWER triggers the desired response from the OS and it seems not to.

Code:

Input driver version is 1.0.1Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1Input device name: "UINPUT_KB"Supported events:  Event type 0 (EV_SYN)  Event type 1 (EV_KEY)    Event code 116 (KEY_POWER)Properties:Testing ... (interrupt to exit)Event: time 1714435280.805221, type 1 (EV_KEY), code 116 (KEY_POWER), value 1Event: time 1714435280.805221, type 1 (EV_KEY), code 116 (KEY_POWER), value 0Event: time 1714435280.805221, -------------- SYN_REPORT ------------expected 24 bytes, got -1evtest: error reading: No such device
I seem to be sending the correct key, after the SYN_REPORT I close the device. Is there something wrong here? The expected 24 bytes I think is the device closing.

Maybe using uinput for this isn't going to work like I want. I want the shutdown options menu to display if I was running on the CLI then powering off is exactly what I want to happen it's half way there.

Statistics: Posted by DarkElvenAngel — Tue Apr 30, 2024 12:06 am



Viewing all articles
Browse latest Browse all 5685

Trending Articles