You are not logged in.
I want to simulate the pressing of F5 with ydotool.
I got the keycode of F5 with wev, which shows:
[14: wl_keyboard] key: serial: 2590; time: 844918; key: 71; state: 1 (pressed)
sym: F5 (65474), utf8: ''
[14: wl_keyboard] key: serial: 2591; time: 844998; key: 71; state: 0 (released)
sym: F5 (65474), utf8: ''
so looks like the keycode is 71.
But
ydotool key 71:1 71:0
doesn't do.
Instead, ydotool's man page says it is using the keycodes from `/usr/include/linux/input-event-codes.h`, and
❯ cat /usr/include/linux/input-event-codes.h | grep F5
#define KEY_F5 63
#define KEY_FN_F5 0x1d6
so the correct keycode is 63, and indeed
ydotool key 63:1 63:0
works as expected.
What is the difference between these two types of keycodes?
Last edited by hully (2022-11-22 14:24:06)
Offline
Anyone?
Maybe it is not fit for the newbie corner?
Offline
Don't do that: https://wiki.archlinux.org/title/Genera … es#Bumping
Xorg keycodes are generally 8 values larger than what's defined for the linux subsystem directly, likely for a few of the "fake" Xorg keys that allow manipulation/information of the xorg instance. since wev looks to emulate behavior of xev it will have taken this mapping into account.
Offline
oh ok. Thanks and sorry for the bump
Offline