kanata
kanata copied to clipboard
Bluetooth keyboard cannot use without Chicony Keyboard attached on Thinkpad X1 Tablet Gen 3
Requirements
- [X] I've searched platform-specific issues, issues and discussions to see if this has been reported before.
Describe the bug
I am experiencing an issue where my new Bluetooth keyboard is unable to send any keystrokes unless the accessory keyboard (Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3) is attached to the machine while running Kanata.
It appears that the accessory keyboard may be interfering with the external Bluetooth keyboard and mouse when Kanata is active.
I would appreciate any insights or suggestions for resolving this issue. If anyone has experienced a similar problem or has any ideas on how to fix this, please point me in the right direction.
Relevant kanata config
(defcfg
linux-dev-names-exclude (
"BT5.0 Mouse"
)
)
(defsrc
esc 1 2 3 4 5 6 7 8 9 0 - = bspc home
tab q w e r t y u i o p [ ] del
caps a s d f g h j k l ; ' \ ret pgup
lsft z x c v b n m , . / rsft up pgdn
lctl lmet lalt spc ralt cmps rctl left down rght
)
(deflayer base
esc 1 2 3 4 5 6 7 8 9 0 - = bspc home
tab q w e r t y u i o p [ ] del
@hy1 a s d f g h j k l ; ' \ ret pgup
lsft z x c v b n m , . / rsft up pgdn
lctl lmet lalt spc ralt cmps rctl left down rght
)
(deflayer hyper1
` mute voldwn volu brdwn brup _ _ _ _ _ brdwn brup bspc _
@hy2 mlft mrgt mmid r t y u i o p [ ] _
esc @mwu @mwd _ _ _ left down up rght _ _ \ ret _
lsft _ _ _ _ _ C-bspc bspc _ _ / rsft @ms↑ _
lctl lmet lalt C-spc ralt cmps rctl @ms← @ms↓ @ms→
)
(deflayer hyper2
` _ _ _ _ _ 6 7 8 9 0 - = bspc _
_ mlft mrgt mmid r t y u i o p [ ] _
esc @mwu @mwd d f g C-S-left pgdn pgup C-S-rght ; ' \ ret _
lsft z x c v b n m , . / rsft @ma↑ _
lctl lmet lalt spc ralt cmps rctl @ma← @ma↓ @ma→
)
(defalias
hy1 (tap-hold-press 200 2000 esc (layer-while-held hyper1))
hy2 (layer-while-held hyper2)
mwu (mwheel-up 50 120)
mwd (mwheel-down 50 120)
mwl (mwheel-left 50 120)
mwr (mwheel-right 50 120)
ms↑ (movemouse-up 10 1)
ms← (movemouse-left 10 1)
ms↓ (movemouse-down 10 1)
ms→ (movemouse-right 10 1)
ma↑ (movemouse-accel-up 10 1000 1 5)
ma← (movemouse-accel-left 10 1000 1 5)
ma↓ (movemouse-accel-down 10 1000 1 5)
ma→ (movemouse-accel-right 10 1000 1 5)
sm (setmouse 32228 32228)
fst (movemouse-speed 200)
)
To Reproduce
- Connect bluetooh keyboard
- Detach the accessory keyboard Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3
- Run Kanata
Expected behavior
Bluetooth keyboard should be able to use but it cannot send any keys except Ctrl+Space+Esc to terminate kanata.
Kanata version
kanata 1.6.1
Debug logs
2024-06-29T15:02:36.921192958+07:00 [INFO] kanata v1.6.1 starting
2024-06-29T15:02:36.921606203+07:00 [INFO] process unmapped keys: false
2024-06-29T15:02:36.921724062+07:00 [INFO] NOTE: kanata was compiled to never allow cmd
2024-06-29T15:02:36.92173514+07:00 [DEBUG] (1) kanata_parser::cfg::alloc: freeing allocations of length 0
2024-06-29T15:02:36.922114695+07:00 [INFO] config file is valid
2024-06-29T15:02:36.92281495+07:00 [INFO] Created device "/dev/input/event24"
2024-06-29T15:02:36.922897415+07: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-06-29T15:02:38.923536354+07:00 [INFO] entering the processing loop
2024-06-29T15:02:38.923670223+07:00 [INFO] entering the event loop
2024-06-29T15:02:38.923691017+07:00 [INFO] looking for devices in /dev/input
2024-06-29T15:02:38.923746991+07:00 [INFO] Init: catching only releases and sending immediately
2024-06-29T15:02:38.935151399+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=AT Translated Set 2 keyboard physical_path=Some("isa0060/serio0/input0")
2024-06-29T15:02:39.057103036+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3 physical_path=Some("usb-0000:00:14.0-1/input0")
2024-06-29T15:02:39.057151061+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3 physical_path=Some("usb-0000:00:14.0-1/input1")
2024-06-29T15:02:39.057177907+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3 physical_path=Some("usb-0000:00:14.0-1/input0")
2024-06-29T15:02:39.057201358+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3 physical_path=Some("usb-0000:00:14.0-1/input0")
2024-06-29T15:02:39.057227008+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3 physical_path=Some("usb-0000:00:14.0-1/input1")
2024-06-29T15:02:39.062949159+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Mouse: name=BT5.0 Mouse physical_path=Some("a0:88:69:f7:31:0d")
2024-06-29T15:02:39.06297066+07:00 [INFO] device [/dev/input/event21:BT5.0 Mouse] is excluded
2024-06-29T15:02:39.074951632+07:00 [DEBUG] (1) kanata_state_machine::oskbd::linux: Detected Keyboard: name=K68 BT5.0 Keyboard physical_path=Some("a0:88:69:f7:31:0d")
2024-06-29T15:02:39.082142873+07:00 [INFO] registering /dev/input/event2: "AT Translated Set 2 keyboard"
2024-06-29T15:02:39.094088442+07:00 [INFO] registering /dev/input/event16: "Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3"
2024-06-29T15:02:39.105854904+07:00 [INFO] registering /dev/input/event17: "Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3"
2024-06-29T15:02:39.121911685+07:00 [INFO] registering /dev/input/event18: "Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3"
2024-06-29T15:02:39.135111714+07:00 [INFO] registering /dev/input/event19: "Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3"
2024-06-29T15:02:39.148913465+07:00 [INFO] registering /dev/input/event20: "Chicony ThinkPad X1 Tablet Thin Keyboard Gen 3"
2024-06-29T15:02:39.164057854+07:00 [INFO] registering /dev/input/event23: "K68 BT5.0 Keyboard"
2024-06-29T15:02:39.539899878+07:00 [INFO] Starting kanata proper
2024-06-29T15:02:39.539922797+07: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.
2024-06-29T15:02:44.970332045+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_CAPSLOCK, value: Press }
2024-06-29T15:02:45.150529286+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_DOWN, value: Press }
2024-06-29T15:02:45.150559131+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.150585011+07:00 [INFO] Entered layer:
(deflayer hyper1
` mute voldwn volu brdwn brup _ _ _ _ _ brdwn brup bspc _
@hy2 mlft mrgt mmid r t y u i o p [ ] _
esc @mwu @mwd _ _ _ left down up rght _ _ \ ret _
lsft _ _ _ _ _ C-bspc bspc _ _ / rsft @ms↑ _
lctl lmet lalt C-spc ralt cmps rctl @ms← @ms↓ @ms→
)
2024-06-29T15:02:45.161201248+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.170610805+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.181104893+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.191264329+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.20150935+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.210593363+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.221088056+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.231184619+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.240772333+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.251369621+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.260581438+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.271099905+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.281175849+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled vdistance: 1
2024-06-29T15:02:45.285892766+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_DOWN, value: Release }
2024-06-29T15:02:45.33050493+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_LEFT, value: Press }
2024-06-29T15:02:45.330529904+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.340151591+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.350558388+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.360071336+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.37075434+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.380810549+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.390728335+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.40008979+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.410455297+07:00 [DEBUG] (3) kanata_state_machine::kanata: handle_move_mouse: scaled hdistance: 1
2024-06-29T15:02:45.420275902+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_LEFT, value: Release }
2024-06-29T15:02:45.577556972+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_CAPSLOCK, value: Release }
2024-06-29T15:02:45.577587329+07:00 [INFO] Entered layer:
(deflayer base
esc 1 2 3 4 5 6 7 8 9 0 - = bspc home
tab q w e r t y u i o p [ ] del
@hy1 a s d f g h j k l ; ' \ ret pgup
lsft z x c v b n m , . / rsft up pgdn
lctl lmet lalt spc ralt cmps rctl left down rght
)
2024-06-29T15:02:49.200388474+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_LEFTCTRL, value: Press }
2024-06-29T15:02:49.200418975+07:00 [DEBUG] (3) kanata_state_machine::kanata: key press LCtrl
2024-06-29T15:02:49.200424849+07:00 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_LEFTCTRL), value: 1 }
2024-06-29T15:02:49.335529346+07:00 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_SPACE, value: Press }
2024-06-29T15:02:49.335553579+07:00 [DEBUG] (3) kanata_state_machine::kanata: key press Space
2024-06-29T15:02:49.335558125+07:00 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_SPACE), value: 1 }
2024-06-29T15:02:49.492419554+07:00 [INFO] pressed LControl+Space+Escape, exiting
zsh: terminated kanata -d -c ~/.config/kanata/k68-hyper.kbd
Operating system
Linux GNOME Wayland - Ubuntu 24.04
Additional context
Bluetooth keyboard event
~ ❯ sudo udevadm info --query=all --name=/dev/input/event23
P: /devices/virtual/misc/uhid/0005:9AEA:1029.0011/input/input61/event23
M: event23
R: 23
U: input
D: c 13:87
N: input/event23
L: 0
S: input/k68_keyboard
E: DEVPATH=/devices/virtual/misc/uhid/0005:9AEA:1029.0011/input/input61/event23
E: DEVNAME=/dev/input/event23
E: MAJOR=13
E: MINOR=87
E: SUBSYSTEM=input
E: USEC_INITIALIZED=11215971427
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_BUS=bluetooth
E: XKBMODEL=pc105
E: XKBLAYOUT=us
E: BACKSPACE=guess
E: LIBINPUT_DEVICE_GROUP=5/9aea/1029:a0:88:69:f7:31:0d
E: DEVLINKS=/dev/input/k68_keyboard
E: TAGS=:power-switch:
E: CURRENT_TAGS=:power-switch:
Files in /dev/input/
by-id/
by-id/usb-Chicony_ThinkPad_X1_Tablet_Thin_Keyboard_Gen_3-event-if01
by-id/usb-Chicony_ThinkPad_X1_Tablet_Thin_Keyboard_Gen_3-event-kbd
by-id/usb-Generic_ZR_USB_Audio_20210926172016-event-if03
by-path/
by-path/pci-0000:00:14.0-event
by-path/pci-0000:00:14.0-usb-0:1:1.0-event-kbd
by-path/pci-0000:00:14.0-usb-0:1:1.1-event
by-path/pci-0000:00:14.0-usb-0:6:1.3-event
by-path/pci-0000:00:14.0-usbv2-0:1:1.0-event-kbd
by-path/pci-0000:00:14.0-usbv2-0:1:1.1-event
by-path/pci-0000:00:14.0-usbv2-0:6:1.3-event
by-path/pci-0000:00:15.1-platform-i2c_designware.1-event
by-path/pci-0000:00:15.1-platform-i2c_designware.1-event-mouse
by-path/pci-0000:00:15.1-platform-i2c_designware.1-mouse
by-path/pci-0000:00:1f.0-platform-INT33D6:00-event
by-path/platform-INT33D5:00-event
by-path/platform-i8042-serio-0-event-kbd
by-path/platform-thinkpad_acpi-event
event0
event1
event10
event11
event12
event13
event14
event15
event16
event17
event18
event19
event2
event20
event21
event22
event23
event3
event4
event5
event6
event7
event8
event9
k68_keyboard
mice
mouse0
mouse1
mouse2