You are not logged in.

#1 2021-10-09 20:51:53

vanek
Member
Registered: 2021-10-09
Posts: 5

Mapped keycodes not received by X

Hi,

I'm trying to remap capslock to escape as per the wiki.
The config file looks like this:

$ cat /etc/udev/hwdb.d/90-my-keyboard.hwdb
evdev:input:b0003v0B05p19B6*
  KEYBOARD_KEY_3a=esc	    # caps lock to escpape

I've executed

systemd-hwdb update && udevadm trigger

.. and even rebooted the laptop.

It gets into systemd-hwdb:

$ systemd-hwdb query evdev:input:b0003v0B05p19B6
KEYBOARD_KEY_3a=esc

showkeys output:

$ showkey --scancodes
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c
0x3a 0xba
0x1d
^Ccaught signal 2, cleaning up...

evtest output:

$ evtest /dev/input/event5
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xb05 product 0x19b6 version 0x110
Input device name: "Asus Keyboard"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    Event code 2 (KEY_1)
    Event code 3 (KEY_2)
    Event code 4 (KEY_3)
    Event code 5 (KEY_4)
    Event code 6 (KEY_5)
    Event code 7 (KEY_6)
    Event code 8 (KEY_7)
    Event code 9 (KEY_8)
    Event code 10 (KEY_9)
    Event code 11 (KEY_0)
    Event code 12 (KEY_MINUS)
    Event code 13 (KEY_EQUAL)
    Event code 14 (KEY_BACKSPACE)
    Event code 15 (KEY_TAB)
    Event code 16 (KEY_Q)
    Event code 17 (KEY_W)
    Event code 18 (KEY_E)
    Event code 19 (KEY_R)
    Event code 20 (KEY_T)
    Event code 21 (KEY_Y)
    Event code 22 (KEY_U)
    Event code 23 (KEY_I)
    Event code 24 (KEY_O)
    Event code 25 (KEY_P)
    Event code 26 (KEY_LEFTBRACE)
    Event code 27 (KEY_RIGHTBRACE)
    Event code 28 (KEY_ENTER)
    Event code 29 (KEY_LEFTCTRL)
    Event code 30 (KEY_A)
    Event code 31 (KEY_S)
    Event code 32 (KEY_D)
    Event code 33 (KEY_F)
    Event code 34 (KEY_G)
    Event code 35 (KEY_H)
    Event code 36 (KEY_J)
    Event code 37 (KEY_K)
    Event code 38 (KEY_L)
    Event code 39 (KEY_SEMICOLON)
    Event code 40 (KEY_APOSTROPHE)
    Event code 41 (KEY_GRAVE)
    Event code 42 (KEY_LEFTSHIFT)
    Event code 43 (KEY_BACKSLASH)
    Event code 44 (KEY_Z)
    Event code 45 (KEY_X)
    Event code 46 (KEY_C)
    Event code 47 (KEY_V)
    Event code 48 (KEY_B)
    Event code 49 (KEY_N)
    Event code 50 (KEY_M)
    Event code 51 (KEY_COMMA)
    Event code 52 (KEY_DOT)
    Event code 53 (KEY_SLASH)
    Event code 54 (KEY_RIGHTSHIFT)
    Event code 55 (KEY_KPASTERISK)
    Event code 56 (KEY_LEFTALT)
    Event code 57 (KEY_SPACE)
    Event code 58 (KEY_CAPSLOCK)
    Event code 59 (KEY_F1)
    Event code 60 (KEY_F2)
    Event code 61 (KEY_F3)
    Event code 62 (KEY_F4)
    Event code 63 (KEY_F5)
    Event code 64 (KEY_F6)
    Event code 65 (KEY_F7)
    Event code 66 (KEY_F8)
    Event code 67 (KEY_F9)
    Event code 68 (KEY_F10)
    Event code 69 (KEY_NUMLOCK)
    Event code 70 (KEY_SCROLLLOCK)
    Event code 71 (KEY_KP7)
    Event code 72 (KEY_KP8)
    Event code 73 (KEY_KP9)
    Event code 74 (KEY_KPMINUS)
    Event code 75 (KEY_KP4)
    Event code 76 (KEY_KP5)
    Event code 77 (KEY_KP6)
    Event code 78 (KEY_KPPLUS)
    Event code 79 (KEY_KP1)
    Event code 80 (KEY_KP2)
    Event code 81 (KEY_KP3)
    Event code 82 (KEY_KP0)
    Event code 83 (KEY_KPDOT)
    Event code 85 (KEY_ZENKAKUHANKAKU)
    Event code 86 (KEY_102ND)
    Event code 87 (KEY_F11)
    Event code 88 (KEY_F12)
    Event code 89 (KEY_RO)
    Event code 90 (KEY_KATAKANA)
    Event code 91 (KEY_HIRAGANA)
    Event code 92 (KEY_HENKAN)
    Event code 93 (KEY_KATAKANAHIRAGANA)
    Event code 94 (KEY_MUHENKAN)
    Event code 95 (KEY_KPJPCOMMA)
    Event code 96 (KEY_KPENTER)
    Event code 97 (KEY_RIGHTCTRL)
    Event code 98 (KEY_KPSLASH)
    Event code 99 (KEY_SYSRQ)
    Event code 100 (KEY_RIGHTALT)
    Event code 102 (KEY_HOME)
    Event code 103 (KEY_UP)
    Event code 104 (KEY_PAGEUP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 107 (KEY_END)
    Event code 108 (KEY_DOWN)
    Event code 109 (KEY_PAGEDOWN)
    Event code 110 (KEY_INSERT)
    Event code 111 (KEY_DELETE)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
    Event code 117 (KEY_KPEQUAL)
    Event code 119 (KEY_PAUSE)
    Event code 121 (KEY_KPCOMMA)
    Event code 122 (KEY_HANGUEL)
    Event code 123 (KEY_HANJA)
    Event code 124 (KEY_YEN)
    Event code 125 (KEY_LEFTMETA)
    Event code 126 (KEY_RIGHTMETA)
    Event code 127 (KEY_COMPOSE)
    Event code 128 (KEY_STOP)
    Event code 129 (KEY_AGAIN)
    Event code 130 (KEY_PROPS)
    Event code 131 (KEY_UNDO)
    Event code 132 (KEY_FRONT)
    Event code 133 (KEY_COPY)
    Event code 134 (KEY_OPEN)
    Event code 135 (KEY_PASTE)
    Event code 136 (KEY_FIND)
    Event code 137 (KEY_CUT)
    Event code 138 (KEY_HELP)
    Event code 140 (KEY_CALC)
    Event code 142 (KEY_SLEEP)
    Event code 150 (KEY_WWW)
    Event code 152 (KEY_SCREENLOCK)
    Event code 158 (KEY_BACK)
    Event code 159 (KEY_FORWARD)
    Event code 161 (KEY_EJECTCD)
    Event code 163 (KEY_NEXTSONG)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 165 (KEY_PREVIOUSSONG)
    Event code 166 (KEY_STOPCD)
    Event code 173 (KEY_REFRESH)
    Event code 176 (KEY_EDIT)
    Event code 177 (KEY_SCROLLUP)
    Event code 178 (KEY_SCROLLDOWN)
    Event code 179 (KEY_KPLEFTPAREN)
    Event code 180 (KEY_KPRIGHTPAREN)
    Event code 183 (KEY_F13)
    Event code 184 (KEY_F14)
    Event code 185 (KEY_F15)
    Event code 186 (KEY_F16)
    Event code 187 (KEY_F17)
    Event code 188 (KEY_F18)
    Event code 189 (KEY_F19)
    Event code 190 (KEY_F20)
    Event code 191 (KEY_F21)
    Event code 192 (KEY_F22)
    Event code 193 (KEY_F23)
    Event code 194 (KEY_F24)
    Event code 240 (KEY_UNKNOWN)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
  Event type 17 (EV_LED)
    Event code 0 (LED_NUML) state 0
    Event code 1 (LED_CAPSL) state 0
    Event code 2 (LED_SCROLLL) state 0
    Event code 3 (LED_COMPOSE) state 0
    Event code 4 (LED_KANA) state 0
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    250
    Repeat code 1 (REP_PERIOD)
      Value     33
Properties:
Testing ... (interrupt to exit)
Event: time 1633812262.629426, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1633812262.629426, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1633812262.629426, -------------- SYN_REPORT ------------
Event: time 1633812263.592788, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1633812263.592788, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 1
Event: time 1633812263.592788, -------------- SYN_REPORT ------------
Event: time 1633812263.593014, type 17 (EV_LED), code 1 (LED_CAPSL), value 1
Event: time 1633812263.593014, -------------- SYN_REPORT ------------
Event: time 1633812263.701547, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1633812263.701547, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
Event: time 1633812263.701547, -------------- SYN_REPORT ------------
Event: time 1633812264.380688, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1633812264.380688, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1633812264.380688, -------------- SYN_REPORT ------------
Event: time 1633812264.458658, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70006
Event: time 1633812264.458658, type 1 (EV_KEY), code 46 (KEY_C), value 1
Event: time 1633812264.458658, -------------- SYN_REPORT ------------

relevant xev outpout:

KeyPress event, serial 34, synthetic NO, window 0x2000001,
    root 0x23b, subw 0x0, time 1867599, (104,851), root:(212,1028),
    state 0x0, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2000001,
    root 0x23b, subw 0x0, time 1867676, (104,851), root:(212,1028),
    state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x2000001,
    root 0x23b, subw 0x0, time 1868329, (104,851), root:(212,1028),
    state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2000001,
    root 0x23b, subw 0x0, time 1868413, (104,851), root:(212,1028),
    state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: Fals

Installed packages:
xorg-server 1.20.13-2
systemd 249.4-2

Not sure how to troubleshoot this one further, but happy to provide additional information if needed.

Thanks!

Edit:

Opened up a console session, and it isn't remapped there either.

Last edited by vanek (2021-10-09 21:02:28)

Offline

#2 2021-10-10 07:22:59

seth
Member
Registered: 2012-09-03
Posts: 24,099

Re: Mapped keycodes not received by X

If you're only interested in the X11 mapping;

grep -r caps /usr/share/X11/xkb/rules/ | grep escape
setxkbmap -option "caps:escape"

https://wiki.archlinux.org/title/Xorg/K … tion_files

Offline

#3 2021-10-10 07:31:40

vanek
Member
Registered: 2021-10-09
Posts: 5

Re: Mapped keycodes not received by X

seth wrote:

If you're only interested in the X11 mapping;

grep -r caps /usr/share/X11/xkb/rules/ | grep escape
setxkbmap -option "caps:escape"

https://wiki.archlinux.org/title/Xorg/K … tion_files

Yeah, I could do this on an X11 level. That wouldn't take care of the mapping when running plain terminal - which isn't a mayor pain for me.
However as per the wiki (and my understanding as well) it should work via hwdb.

Offline

#4 2021-10-10 07:56:50

seth
Member
Registered: 2012-09-03
Posts: 24,099

Re: Mapped keycodes not received by X

Should…
Input device name: "Asus Keyboard" sounds suspiciously like an internal notebook keyboard?
Did you try to add a rule matching all atkbd's as well (on top of the evdev rule, I'd generally relax the pattern here as much as possible to see whether it principally works)

Offline

#5 2021-10-10 12:07:26

vanek
Member
Registered: 2021-10-09
Posts: 5

Re: Mapped keycodes not received by X

Edit: yes, this is a laptop keyboard on an asus G14.

I've created the udev rule based on evemu-describe's info.
I've got two Asus keyboards, /dev/input/event4 and /dev/input/event5

evemu-describe
Available devices:
/dev/input/event0:      Lid Switch
/dev/input/event1:      Power Button
/dev/input/event2:      Sleep Button
/dev/input/event3:      Video Bus
/dev/input/event4:      Asus Keyboard
/dev/input/event5:      Asus Keyboard
/dev/input/event6:      Asus Wireless Radio Control
/dev/input/event7:      PC Speaker
/dev/input/event8:      Asus WMI hotkeys
/dev/input/event9:      ELAN1201:00 04F3:3098 Mouse
/dev/input/event10:     ELAN1201:00 04F3:3098 Touchpad
/dev/input/event11:     HDA NVidia HDMI/DP,pcm=3
/dev/input/event12:     HDA NVidia HDMI/DP,pcm=7
/dev/input/event13:     HDA NVidia HDMI/DP,pcm=8
/dev/input/event14:     HDA NVidia HDMI/DP,pcm=9
/dev/input/event15:     HD-Audio Generic HDMI/DP,pcm=3
/dev/input/event16:     HD-Audio Generic Mic
/dev/input/event17:     HD-Audio Generic Headphone
Select the device event number [0-17]:

input4 is the ... I guess extra stuff?

 evemu-describe /dev/input/event4
# EVEMU 1.3
# Kernel: 5.14.9-arch2-g14-1
# DMI: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrGA401QM.408:bd05/13/2021:br5.19:efr3.5:svnASUSTeKCOMPUTERINC.:pnROGZephyrusG14GA401QM_GA401QM:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnGA401QM:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:sku:
# Input device name: "Asus Keyboard"
# Input device ID: bus 0x03 vendor 0xb05 product 0x19b6 version 0x110
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#     Event code 15 (SYN_MAX)
#   Event type 1 (EV_KEY)
#     Event code 1 (KEY_ESC)
#     Event code 28 (KEY_ENTER)
#     Event code 74 (KEY_KPMINUS)
#     Event code 78 (KEY_KPPLUS)
#     Event code 103 (KEY_UP)
#     Event code 105 (KEY_LEFT)
#     Event code 106 (KEY_RIGHT)
#     Event code 108 (KEY_DOWN)
#     Event code 113 (KEY_MUTE)
#     Event code 114 (KEY_VOLUMEDOWN)
#     Event code 115 (KEY_VOLUMEUP)
#     Event code 116 (KEY_POWER)
#     Event code 119 (KEY_PAUSE)
#     Event code 128 (KEY_STOP)
#     Event code 130 (KEY_PROPS)
#     Event code 131 (KEY_UNDO)
#     Event code 133 (KEY_COPY)
#     Event code 134 (KEY_OPEN)
#     Event code 135 (KEY_PASTE)
#     Event code 136 (KEY_FIND)
#     Event code 137 (KEY_CUT)
#     Event code 138 (KEY_HELP)
#     Event code 139 (KEY_MENU)
#     Event code 140 (KEY_CALC)
#     Event code 142 (KEY_SLEEP)
#     Event code 144 (KEY_FILE)
#     Event code 148 (KEY_PROG1)
#     Event code 149 (KEY_PROG2)
#     Event code 150 (KEY_WWW)
#     Event code 152 (KEY_COFFEE)
#     Event code 155 (KEY_MAIL)
#     Event code 156 (KEY_BOOKMARKS)
#     Event code 158 (KEY_BACK)
#     Event code 159 (KEY_FORWARD)
#     Event code 161 (KEY_EJECTCD)
#     Event code 163 (KEY_NEXTSONG)
#     Event code 164 (KEY_PLAYPAUSE)
#     Event code 165 (KEY_PREVIOUSSONG)
#     Event code 166 (KEY_STOPCD)
#     Event code 167 (KEY_RECORD)
#     Event code 168 (KEY_REWIND)
#     Event code 169 (KEY_PHONE)
#     Event code 171 (KEY_CONFIG)
#     Event code 172 (KEY_HOMEPAGE)
#     Event code 173 (KEY_REFRESH)
#     Event code 174 (KEY_EXIT)
#     Event code 177 (KEY_SCROLLUP)
#     Event code 178 (KEY_SCROLLDOWN)
#     Event code 181 (KEY_NEW)
#     Event code 191 (KEY_F21)
#     Event code 202 (KEY_PROG3)
#     Event code 203 (KEY_PROG4)
#     Event code 206 (KEY_CLOSE)
#     Event code 207 (KEY_PLAY)
#     Event code 208 (KEY_FASTFORWARD)
#     Event code 209 (KEY_BASSBOOST)
#     Event code 210 (KEY_PRINT)
#     Event code 212 (KEY_CAMERA)
#     Event code 216 (KEY_CHAT)
#     Event code 217 (KEY_SEARCH)
#     Event code 219 (KEY_FINANCE)
#     Event code 224 (KEY_BRIGHTNESSDOWN)
#     Event code 225 (KEY_BRIGHTNESSUP)
#     Event code 228 (KEY_KBDILLUMTOGGLE)
#     Event code 229 (KEY_KBDILLUMDOWN)
#     Event code 230 (KEY_KBDILLUMUP)
#     Event code 234 (KEY_SAVE)
#     Event code 235 (KEY_DOCUMENTS)
#     Event code 240 (KEY_UNKNOWN)
#     Event code 241 (KEY_VIDEO_NEXT)
#     Event code 244 (KEY_BRIGHTNESS_AUTO)
#     Event code 245 (KEY_DISPLAY_OFF)
#     Event code 247 (KEY_RFKILL)
#     Event code 248 (KEY_MICMUTE)
#     Event code 256 (BTN_0)
#     Event code 353 (KEY_SELECT)
#     Event code 354 (KEY_GOTO)
#     Event code 358 (KEY_INFO)
#     Event code 362 (KEY_PROGRAM)
#     Event code 366 (KEY_PVR)
#     Event code 370 (KEY_SUBTITLE)
#     Event code 372 (KEY_FULL_SCREEN)
#     Event code 374 (KEY_KEYBOARD)
#     Event code 375 (KEY_ASPECT_RATIO)
#     Event code 376 (KEY_PC)
#     Event code 377 (KEY_TV)
#     Event code 378 (KEY_TV2)
#     Event code 379 (KEY_VCR)
#     Event code 380 (KEY_VCR2)
#     Event code 381 (KEY_SAT)
#     Event code 383 (KEY_CD)
#     Event code 384 (KEY_TAPE)
#     Event code 386 (KEY_TUNER)
#     Event code 387 (KEY_PLAYER)
#     Event code 389 (KEY_DVD)
#     Event code 392 (KEY_AUDIO)
#     Event code 393 (KEY_VIDEO)
#     Event code 396 (KEY_MEMO)
#     Event code 397 (KEY_CALENDAR)
#     Event code 398 (KEY_RED)
#     Event code 399 (KEY_GREEN)
#     Event code 400 (KEY_YELLOW)
#     Event code 401 (KEY_BLUE)
#     Event code 402 (KEY_CHANNELUP)
#     Event code 403 (KEY_CHANNELDOWN)
#     Event code 405 (KEY_LAST)
#     Event code 407 (KEY_NEXT)
#     Event code 408 (KEY_RESTART)
#     Event code 409 (KEY_SLOW)
#     Event code 410 (KEY_SHUFFLE)
#     Event code 412 (KEY_PREVIOUS)
#     Event code 416 (KEY_VIDEOPHONE)
#     Event code 417 (KEY_GAMES)
#     Event code 418 (KEY_ZOOMIN)
#     Event code 419 (KEY_ZOOMOUT)
#     Event code 420 (KEY_ZOOMRESET)
#     Event code 421 (KEY_WORDPROCESSOR)
#     Event code 422 (KEY_EDITOR)
#     Event code 423 (KEY_SPREADSHEET)
#     Event code 424 (KEY_GRAPHICSEDITOR)
#     Event code 425 (KEY_PRESENTATION)
#     Event code 426 (KEY_DATABASE)
#     Event code 427 (KEY_NEWS)
#     Event code 428 (KEY_VOICEMAIL)
#     Event code 429 (KEY_ADDRESSBOOK)
#     Event code 430 (KEY_MESSENGER)
#     Event code 431 (KEY_DISPLAYTOGGLE)
#     Event code 432 (KEY_SPELLCHECK)
#     Event code 433 (KEY_LOGOFF)
#     Event code 439 (KEY_MEDIA_REPEAT)
#     Event code 442 (KEY_IMAGES)
#     Event code 576 (KEY_BUTTONCONFIG)
#     Event code 577 (KEY_TASKMANAGER)
#     Event code 578 (KEY_JOURNAL)
#     Event code 579 (KEY_CONTROLPANEL)
#     Event code 580 (KEY_APPSELECT)
#     Event code 581 (KEY_SCREENSAVER)
#     Event code 582 (KEY_VOICECOMMAND)
#     Event code 583 (KEY_ASSISTANT)
#     Event code 585 ((null))
#     Event code 592 (KEY_BRIGHTNESS_MIN)
#     Event code 593 (KEY_BRIGHTNESS_MAX)
#   Event type 2 (EV_REL)
#     Event code 6 (REL_HWHEEL)
#     Event code 12 (REL_HWHEEL_HI_RES)
#   Event type 3 (EV_ABS)
#     Event code 32 (ABS_VOLUME)
#       Value        0
#       Min          0
#       Max        572
#       Fuzz         0
#       Flat         0
#       Resolution   0
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
#   Event type 20 (EV_REP)
#     Event code 0 (REP_DELAY)
#     Event code 1 (REP_PERIOD)
# Properties:
N: Asus Keyboard
I: 0003 0b05 19b6 0110
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 02 00 00 10 00 00 00 00
B: 01 00 44 00 00 80 16 9e 00
B: 01 ed 5f 71 d9 fa 7b 26 80
B: 01 00 cc 17 0b 73 0c b3 01
B: 01 01 00 00 00 00 00 00 00
B: 01 00 00 00 00 46 44 d4 bf
B: 01 2d f3 af 17 ff ff 83 04
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 ff 02 03 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 40 10 00 00 00 00 00 00
B: 03 00 00 00 00 01 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 03 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
A: 20 0 572 0 0 0

while input5 is the base keyboard

 evemu-describe /dev/input/event5
# EVEMU 1.3
# Kernel: 5.14.9-arch2-g14-1
# DMI: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrGA401QM.408:bd05/13/2021:br5.19:efr3.5:svnASUSTeKCOMPUTERINC.:pnROGZephyrusG14GA401QM_GA401QM:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnGA401QM:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:sku:
# Input device name: "Asus Keyboard"
# Input device ID: bus 0x03 vendor 0xb05 product 0x19b6 version 0x110
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#     Event code 15 (SYN_MAX)
#   Event type 1 (EV_KEY)
#     Event code 1 (KEY_ESC)
#     Event code 2 (KEY_1)
#     Event code 3 (KEY_2)
#     Event code 4 (KEY_3)
#     Event code 5 (KEY_4)
#     Event code 6 (KEY_5)
#     Event code 7 (KEY_6)
#     Event code 8 (KEY_7)
#     Event code 9 (KEY_8)
#     Event code 10 (KEY_9)
#     Event code 11 (KEY_0)
#     Event code 12 (KEY_MINUS)
#     Event code 13 (KEY_EQUAL)
#     Event code 14 (KEY_BACKSPACE)
#     Event code 15 (KEY_TAB)
#     Event code 16 (KEY_Q)
#     Event code 17 (KEY_W)
#     Event code 18 (KEY_E)
#     Event code 19 (KEY_R)
#     Event code 20 (KEY_T)
#     Event code 21 (KEY_Y)
#     Event code 22 (KEY_U)
#     Event code 23 (KEY_I)
#     Event code 24 (KEY_O)
#     Event code 25 (KEY_P)
#     Event code 26 (KEY_LEFTBRACE)
#     Event code 27 (KEY_RIGHTBRACE)
#     Event code 28 (KEY_ENTER)
#     Event code 29 (KEY_LEFTCTRL)
#     Event code 30 (KEY_A)
#     Event code 31 (KEY_S)
#     Event code 32 (KEY_D)
#     Event code 33 (KEY_F)
#     Event code 34 (KEY_G)
#     Event code 35 (KEY_H)
#     Event code 36 (KEY_J)
#     Event code 37 (KEY_K)
#     Event code 38 (KEY_L)
#     Event code 39 (KEY_SEMICOLON)
#     Event code 40 (KEY_APOSTROPHE)
#     Event code 41 (KEY_GRAVE)
#     Event code 42 (KEY_LEFTSHIFT)
#     Event code 43 (KEY_BACKSLASH)
#     Event code 44 (KEY_Z)
#     Event code 45 (KEY_X)
#     Event code 46 (KEY_C)
#     Event code 47 (KEY_V)
#     Event code 48 (KEY_B)
#     Event code 49 (KEY_N)
#     Event code 50 (KEY_M)
#     Event code 51 (KEY_COMMA)
#     Event code 52 (KEY_DOT)
#     Event code 53 (KEY_SLASH)
#     Event code 54 (KEY_RIGHTSHIFT)
#     Event code 55 (KEY_KPASTERISK)
#     Event code 56 (KEY_LEFTALT)
#     Event code 57 (KEY_SPACE)
#     Event code 58 (KEY_CAPSLOCK)
#     Event code 59 (KEY_F1)
#     Event code 60 (KEY_F2)
#     Event code 61 (KEY_F3)
#     Event code 62 (KEY_F4)
#     Event code 63 (KEY_F5)
#     Event code 64 (KEY_F6)
#     Event code 65 (KEY_F7)
#     Event code 66 (KEY_F8)
#     Event code 67 (KEY_F9)
#     Event code 68 (KEY_F10)
#     Event code 69 (KEY_NUMLOCK)
#     Event code 70 (KEY_SCROLLLOCK)
#     Event code 71 (KEY_KP7)
#     Event code 72 (KEY_KP8)
#     Event code 73 (KEY_KP9)
#     Event code 74 (KEY_KPMINUS)
#     Event code 75 (KEY_KP4)
#     Event code 76 (KEY_KP5)
#     Event code 77 (KEY_KP6)
#     Event code 78 (KEY_KPPLUS)
#     Event code 79 (KEY_KP1)
#     Event code 80 (KEY_KP2)
#     Event code 81 (KEY_KP3)
#     Event code 82 (KEY_KP0)
#     Event code 83 (KEY_KPDOT)
#     Event code 85 (KEY_ZENKAKUHANKAKU)
#     Event code 86 (KEY_102ND)
#     Event code 87 (KEY_F11)
#     Event code 88 (KEY_F12)
#     Event code 89 (KEY_RO)
#     Event code 90 (KEY_KATAKANA)
#     Event code 91 (KEY_HIRAGANA)
#     Event code 92 (KEY_HENKAN)
#     Event code 93 (KEY_KATAKANAHIRAGANA)
#     Event code 94 (KEY_MUHENKAN)
#     Event code 95 (KEY_KPJPCOMMA)
#     Event code 96 (KEY_KPENTER)
#     Event code 97 (KEY_RIGHTCTRL)
#     Event code 98 (KEY_KPSLASH)
#     Event code 99 (KEY_SYSRQ)
#     Event code 100 (KEY_RIGHTALT)
#     Event code 102 (KEY_HOME)
#     Event code 103 (KEY_UP)
#     Event code 104 (KEY_PAGEUP)
#     Event code 105 (KEY_LEFT)
#     Event code 106 (KEY_RIGHT)
#     Event code 107 (KEY_END)
#     Event code 108 (KEY_DOWN)
#     Event code 109 (KEY_PAGEDOWN)
#     Event code 110 (KEY_INSERT)
#     Event code 111 (KEY_DELETE)
#     Event code 113 (KEY_MUTE)
#     Event code 114 (KEY_VOLUMEDOWN)
#     Event code 115 (KEY_VOLUMEUP)
#     Event code 116 (KEY_POWER)
#     Event code 117 (KEY_KPEQUAL)
#     Event code 119 (KEY_PAUSE)
#     Event code 121 (KEY_KPCOMMA)
#     Event code 122 (KEY_HANGEUL)
#     Event code 123 (KEY_HANJA)
#     Event code 124 (KEY_YEN)
#     Event code 125 (KEY_LEFTMETA)
#     Event code 126 (KEY_RIGHTMETA)
#     Event code 127 (KEY_COMPOSE)
#     Event code 128 (KEY_STOP)
#     Event code 129 (KEY_AGAIN)
#     Event code 130 (KEY_PROPS)
#     Event code 131 (KEY_UNDO)
#     Event code 132 (KEY_FRONT)
#     Event code 133 (KEY_COPY)
#     Event code 134 (KEY_OPEN)
#     Event code 135 (KEY_PASTE)
#     Event code 136 (KEY_FIND)
#     Event code 137 (KEY_CUT)
#     Event code 138 (KEY_HELP)
#     Event code 140 (KEY_CALC)
#     Event code 142 (KEY_SLEEP)
#     Event code 150 (KEY_WWW)
#     Event code 152 (KEY_COFFEE)
#     Event code 158 (KEY_BACK)
#     Event code 159 (KEY_FORWARD)
#     Event code 161 (KEY_EJECTCD)
#     Event code 163 (KEY_NEXTSONG)
#     Event code 164 (KEY_PLAYPAUSE)
#     Event code 165 (KEY_PREVIOUSSONG)
#     Event code 166 (KEY_STOPCD)
#     Event code 173 (KEY_REFRESH)
#     Event code 176 (KEY_EDIT)
#     Event code 177 (KEY_SCROLLUP)
#     Event code 178 (KEY_SCROLLDOWN)
#     Event code 179 (KEY_KPLEFTPAREN)
#     Event code 180 (KEY_KPRIGHTPAREN)
#     Event code 183 (KEY_F13)
#     Event code 184 (KEY_F14)
#     Event code 185 (KEY_F15)
#     Event code 186 (KEY_F16)
#     Event code 187 (KEY_F17)
#     Event code 188 (KEY_F18)
#     Event code 189 (KEY_F19)
#     Event code 190 (KEY_F20)
#     Event code 191 (KEY_F21)
#     Event code 192 (KEY_F22)
#     Event code 193 (KEY_F23)
#     Event code 194 (KEY_F24)
#     Event code 240 (KEY_UNKNOWN)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
#   Event type 17 (EV_LED)
#     Event code 0 (LED_NUML)
#        State 0
#     Event code 1 (LED_CAPSL)
#        State 0
#     Event code 2 (LED_SCROLLL)
#        State 0
#     Event code 3 (LED_COMPOSE)
#        State 0
#     Event code 4 (LED_KANA)
#        State 0
#   Event type 20 (EV_REP)
#     Event code 0 (REP_DELAY)
#     Event code 1 (REP_PERIOD)
# Properties:
N: Asus Keyboard
I: 0003 0b05 19b6 0110
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 fe ff ff ff ff ff ff ff
B: 01 ff ff ef ff df ff be fe
B: 01 ff 57 40 c1 7a 20 9f ff
B: 01 07 00 00 00 00 00 01 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 1f 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 03 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00

Edit2:

Tried extending it to all atkbd, no luck.

evdev:atkbd:*
  KEYBOARD_KEY_3a=esc       # caps lock to escpape

Edit3:

I'm running the G14 kernel, not sure if it affects things

5.14.9-arch2-g14-1

Last edited by vanek (2021-10-10 12:30:14)

Offline

#6 2021-10-10 13:01:10

vanek
Member
Registered: 2021-10-09
Posts: 5

Re: Mapped keycodes not received by X

This is getting weirder..

$ udevadm --debug test `udevadm info -q path -n /dev/input/by-id/usb-ASUSTeK_Computer_Inc._N-KEY_Device-if02-event-kbd`

...
event5: hwdb modalias key: "input:b0003v0B05p19B6e0110-e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,B2,B3,B4,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,3,4,sfw"
event5: No entry found from hwdb.
...

However when querying hwdb directly:

$ systemd-hwdb query evdev:input:b0003v0B05p19B6e0110-e0
KEYBOARD_KEY_3a=esc

Offline

#7 2021-10-10 19:37:56

vanek
Member
Registered: 2021-10-09
Posts: 5

Re: Mapped keycodes not received by X

solution found here: https://bbs.archlinux.org/viewtopic.php … 4#p1537794

$ cat 91-usb-keyboard.hwdb
evdev:input:b0003v0B05p19B6*
  KEYBOARD_KEY_70039=esc            # caps lock to escpape

for usb keyboards I need the code coming from evtest, not showkeys.

Offline

Board footer

Powered by FluxBB