Open Thulium-Drake opened 1 month ago
For whatever reason your usb keyboard may not be getting auto-detected.
You can try using the linux- device defcfg options to force kanata to find all desired devices.
Thanks for the help! Unfortunately it doesn't work, the init logs show the following, I've marked the keyboard that doesn't work but is included:
2024-10-02T08:30:24.16669862+02:00 [INFO] kanata v1.6.1 starting
2024-10-02T08:30:24.166937721+02:00 [INFO] process unmapped keys: false
2024-10-02T08:30:24.166982736+02:00 [INFO] NOTE: kanata was compiled to never allow cmd
2024-10-02T08:30:24.167191139+02:00 [INFO] config file is valid
2024-10-02T08:30:24.168546655+02:00 [INFO] Created device "/dev/input/event16"
2024-10-02T08:30:24.168689695+02:00 [INFO] Sleeping for 2s. Please release all keys and don't press additional ones. Run kanata with --help to see how understand more and how to disable this sleep.
2024-10-02T08:30:26.16878176+02:00 [INFO] entering the processing loop
2024-10-02T08:30:26.168868905+02:00 [INFO] entering the event loop
2024-10-02T08:30:26.168880086+02:00 [INFO] looking for devices in /dev/input
2024-10-02T08:30:26.168989763+02:00 [INFO] Init: catching only releases and sending immediately
2024-10-02T08:30:26.186102087+02:00 [INFO] device [/dev/input/event2:AT Translated Set 2 keyboard] is included
2024-10-02T08:30:26.186128126+02:00 [INFO] device [/dev/input/event3:Keyed Up Labs ES-87] is included <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This is the keyboard, but it doesn't map it's keys.
2024-10-02T08:30:26.212105521+02:00 [INFO] device [/dev/input/event6:FRMW0004:00 32AC:0006 Consumer Control] is ignored
2024-10-02T08:30:26.238098835+02:00 [INFO] device [/dev/input/event8:PIXA3854:00 093A:0274 Mouse] is ignored
2024-10-02T08:30:26.25509998+02:00 [INFO] device [/dev/input/event10:DP-2] is ignored
2024-10-02T08:30:26.371150625+02:00 [INFO] device [/dev/input/event15:Logitech MX Master 3S] is ignored
2024-10-02T08:30:26.39515053+02:00 [INFO] registering /dev/input/event2: "AT Translated Set 2 keyboard"
2024-10-02T08:30:26.435100798+02:00 [INFO] registering /dev/input/event3: "Keyed Up Labs ES-87" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024-10-02T08:30:26.698295292+02:00 [INFO] Starting kanata proper
2024-10-02T08:30:26.698313536+02:00 [INFO] You may forcefully exit kanata by pressing lctl+spc+esc at any time. These keys refer to defsrc input, meaning BEFORE kanata remaps keys.
I also checked with wev
to see if the caps
is mapped to a different ID or so, but that doesn't seem to be the case.
[14: wl_keyboard] key: serial: 43928; time: 78430507; key: 66; state: 1 (pressed)
sym: Caps_Lock (65509), utf8: ''
[14: wl_keyboard] modifiers: serial: 43929; group: 0
depressed: 00000002: Lock
latched: 00000000
locked: 00000002: Lock
[14: wl_keyboard] key: serial: 43930; time: 78430603; key: 66; state: 0 (released)
sym: Caps_Lock (65509), utf8: ''
[14: wl_keyboard] modifiers: serial: 43931; group: 0
depressed: 00000000
latched: 00000000
locked: 00000002: Lock
[14: wl_keyboard] key: serial: 43932; time: 78432466; key: 66; state: 1 (pressed)
sym: Caps_Lock (65509), utf8: ''
[14: wl_keyboard] modifiers: serial: 43933; group: 0
depressed: 00000002: Lock
latched: 00000000
locked: 00000002: Lock
[14: wl_keyboard] key: serial: 43934; time: 78432531; key: 66; state: 0 (released)
sym: Caps_Lock (65509), utf8: ''
[14: wl_keyboard] modifiers: serial: 43935; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000
I pressed caps
on both keyboards once, but there's no difference, except timing and the serial for the keypress itself.
It seems isolated to this one keyboard, at work I'm using a KeyCron, which remaps just fine :-)
How strange. Perhaps the outputs are actually coming from a different device that doesn't have the expected name? You can try using evtest
on every single input device, one at a time, while testing the non-functional keyboard's keys to see which device shows events.
I've added the output below! :-) and I've seen something really odd (for me, I don't know if it does make sense in keyboard world)
The non-functional keyboard seems to be split in 2 keyboards:
$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event10: Keyed Up Labs ES-87 Keyboard
/dev/input/event11: HD-Audio Generic HDMI/DP,pcm=3
/dev/input/event12: HD-Audio Generic HDMI/DP,pcm=7
/dev/input/event13: HD-Audio Generic HDMI/DP,pcm=8
/dev/input/event14: HD-Audio Generic Headphone
/dev/input/event15: Logitech MX Master 3S
/dev/input/event2: AT Translated Set 2 keyboard
/dev/input/event3: FRMW0004:00 32AC:0006 Wireless Radio Control
/dev/input/event4: FRMW0004:00 32AC:0006 Consumer Control
/dev/input/event5: Video Bus
/dev/input/event6: PIXA3854:00 093A:0274 Mouse
/dev/input/event7: PIXA3854:00 093A:0274 Touchpad
/dev/input/event8: DP-2
/dev/input/event9: Keyed Up Labs ES-87
Select the device event number [0-15]:
So it seems some of the keys are on input 10, see below for the ones evtest
detected (and what happens when I press capslock:
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x4d9 product 0xa0ce version 0x110
Input device name: "Keyed Up Labs ES-87 Keyboard"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 40 (KEY_APOSTROPHE)
Event code 41 (KEY_GRAVE)
Event code 51 (KEY_COMMA)
Event code 52 (KEY_DOT)
Event code 53 (KEY_SLASH)
Event code 55 (KEY_KPASTERISK)
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 87 (KEY_F11)
Event code 88 (KEY_F12)
Event code 96 (KEY_KPENTER)
Event code 98 (KEY_KPSLASH)
Event code 99 (KEY_SYSRQ)
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 127 (KEY_COMPOSE)
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 183 (KEY_F13)
Event code 184 (KEY_F14)
Event code 185 (KEY_F15)
Event code 186 (KEY_F16)
Event code 187 (KEY_F17)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
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 1728730090.577084, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1728730090.577084, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 1
Event: time 1728730090.577084, -------------- SYN_REPORT ------------
Event: time 1728730090.672453, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1728730090.672453, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
Event: time 1728730090.672453, -------------- SYN_REPORT ------------
Event: time 1728730094.296507, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1728730094.296507, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 1
Event: time 1728730094.296507, -------------- SYN_REPORT ------------
Event: time 1728730094.400509, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1728730094.400509, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
Event: time 1728730094.400509, -------------- SYN_REPORT ------------
And this is the same output for the other 'half' of the keyboard (device 9):
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x4d9 product 0xa0ce version 0x110
Input device name: "Keyed Up Labs ES-87"
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 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 54 (KEY_RIGHTSHIFT)
Event code 56 (KEY_LEFTALT)
Event code 57 (KEY_SPACE)
Event code 97 (KEY_RIGHTCTRL)
Event code 100 (KEY_RIGHTALT)
Event code 125 (KEY_LEFTMETA)
Event code 126 (KEY_RIGHTMETA)
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
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 1728730174.281204, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1728730174.281204, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1728730174.281204, -------------- SYN_REPORT ------------
Event: time 1728730176.386232, type 17 (EV_LED), code 1 (LED_CAPSL), value 1
Event: time 1728730176.386232, -------------- SYN_REPORT ------------
Event: time 1728730177.049230, type 17 (EV_LED), code 1 (LED_CAPSL), value 0
Event: time 1728730177.049230, -------------- SYN_REPORT ------------
Yea some keyboards are split into multiple input devices at the kernel level. If you tell Kanata to capture both Keyed Up Labs ES-87
and Keyed Up Labs ES-87 Keyboard
does the keyboard work as expected?
Requirements
Describe the bug
Hi there,
I've been using kanata for a while now and I seem to be hitting a snag using it with multiple keyboard. When I run it and use the laptop's keyboard, it works just fine, but the same config does not seem to apply to any USB connected external keyboards.
I tried validating my config in the simulator and it agrees with me that it should work..
Also, the keyboard itself works just fine, kanata detects it during startup, but there's no logging at all for this device (whereas my bluetooth mouse and laptop keyboard do generate output)
Relevant kanata config
To Reproduce
caps
on both keyboards, it should show you that you pressedescape
Expected behavior
I want
caps
to be remapped regardless of the keyboard that provides the keypress.Kanata version
kanata 1.6.1
Debug logs
Operating system
Fedora 40, running wayland
Additional context
No response