Skip to content

Commit

Permalink
Update usr_share_X11_xkb_to_hwdb.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
diyism authored Jul 27, 2024
1 parent f0a31c5 commit b405cf6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions usr_share_X11_xkb_to_hwdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ finally, test it with "sudo evtest", and the key code has been changed from 106

scancode(700f4, or e04d) --> keycode(RGHT, Right, KEY_RIGHT, or 106) --> keysyms(RCTL, Control_R, KEY_RIGHTCTRL, or 97)

showkeys.py:
cat ./showkeys.sh:
#!/bin/bash

# 定义一个函数来清理进程
Expand Down Expand Up @@ -62,8 +62,18 @@ tail -f a.log | awk '
sub(/,/, "", keycode_name)
sub(/\(/, "", keycode_name)
sub(/\)/, "", keycode_name)
if ($11 == "1") {
action = "↓"
} else if ($11 == "0") {
action = "↑"
}

printf "scancode: %s, keycode: %s(%s), keysyms: %s\n", scancode, keycode, keycode_name, keysyms
printf "scancode: %s, keycode: %s(%s), keysyms: %s, action: %s\n", scancode, keycode, keycode_name, keysyms, action
keysyms=""
scancode=""
keycode=""
keycode_name=""
action=""
}
'

Expand Down

0 comments on commit b405cf6

Please sign in to comment.