Open tecix opened 1 week ago
Base on the debug log, look like Kanata can remaps keys but cannot send output (for both bluetooth keyboard and mouse) without Chicony Thinkpad X1 Tablet Keyboard.
From the debug logs I see mouse movement actions being output because moved to a layer where arrow keys are mouse movements using caps and then pressed arrows. Are you saying these mouse movements didn't actually happen?
What happens if you press alphabet keys on the base layer?
From the debug logs I see mouse movement actions being output because moved to a layer where arrow keys are mouse movements using caps and then pressed arrows. Are you saying these mouse movements didn't actually happen?
Yes, the mouse movements didn't happen and also with any keyboard keys. Only Kanata see key inputs but it didn't give the OS any outputs.
What happens if you press alphabet keys on the base layer?
Kanata can receive, process all inputs but nothing happen other than the log showing.
Update: The bluetooth keyboard works well with Kmonad.
I think the problem could be because of the current way Kanata set output file with udev.
Header lines of my Kmonad configruration:
(defcfg
input (device-file "/dev/input/k68_keyboard")
output (uinput-sink "KMonad K68")
)
Update: The bluetooth keyboard works well with Kmonad. I think the problem could be because of the current way Kanata set output file with udev.
Header lines of my Kmonad configruration:
(defcfg input (device-file "/dev/input/k68_keyboard") output (uinput-sink "KMonad K68") )
The uinput-sink configuration doesn't appear to do anything special other than name the device file. Do you have xkb configs (or other desktop system configs) that refer to "KMonad K68" in some way to get it to work correctly?
I have only defined a udev rule to create a symlink for the K68 Bluetooth Keyboard in /dev/input/:
~ ❯ cat /etc/udev/rules.d/99-k68-bluetooth-keyboard.rules
SUBSYSTEM=="input", ATTRS{name}=="K68 BT5.0 Keyboard", ATTRS{id/vendor}=="9aea", ATTRS{id/product}=="1029", SYMLINK+="input/k68_keyboard"
Beyond this, I don't believe I have any specific xkb configurations on my system. Could you guide me on how to check for additional xkb configuration details related to this issue?
~ ❯ setxkbmap -query
WARNING: Running setxkbmap against an Xwayland server
rules: evdev
model: pc105
layout: us
options: compose:menu
Please note that this issue also affects my Bluetooth Mouse (unless excluded in the defcfg section). Could this indicate that the problem is not related to the XKB - X Keyboard Extension?
I've compared the output from uevent for Kanata and KMonad on my system. The key difference I've noticed is in the bus type:
My best guess is that KMonad's approach might allow it to work more directly with the Bluetooth keyboard, while Kanata's virtual device might require the presence of another physical keyboard to function properly.
@jtroo Could you confirm if this understanding is correct and how we I manually change the bus type for Kanata to have a try?
❯ cat /proc/bus/input/devices
I: Bus=0003 Vendor=1235 Product=5679 Version=0000
N: Name="KMonad"
P: Phys=
S: Sysfs=/devices/virtual/input/input59
U: Uniq=
H: Handlers=sysrq rfkill kbd event21
B: PROP=0
B: EV=3
B: KEY=ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffffffe
---
❯ cat /sys/devices/virtual/input/input59/uevent
PRODUCT=3/1235/5679/0
NAME="KMonad"
PROP=0
EV=3
KEY=ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffffffe
MODALIAS=input:b0003v1235p5679e0000-e0,1,k71,72,73,74,75,76,77,78,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8D,8E,8F,90,91,92,93,94,95,96,97,98,99,9A,9B,9C,9D,9E,9F,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,CA,CB,CC,CD,CE,CF,D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF,E0,E1,E2,E3,E4,E5,E6,E7,E8,E9,EA,EB,EC,ED,EE,EF,F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,FA,FB,FC,FD,FE,FF,ramlsfw
❯ cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=0001
N: Name="kanata"
P: Phys=
S: Sysfs=/devices/virtual/input/input58
U: Uniq=
H: Handlers=sysrq rfkill kbd mouse4 event21
B: PROP=0
B: EV=7
B: KEY=ffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffffffe
B: REL=1bff
---
❯ cat /sys/devices/virtual/input/input58/uevent
PRODUCT=11/1/1/1
NAME="kanata"
PROP=0
EV=7
KEY=ffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffffffe
REL=1bff
MODALIAS=input:b0011v0001p0001e0001-e0,1,2,k71,72,73,74,75,76,77,78,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8D,8E,8F,90,91,92,93,94,95,96,97,98,99,9A,9B,9C,9D,9E,9F,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,CA,CB,CC,CD,CE,CF,D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF,E0,E1,E2,E3,E4,E5,E6,E7,E8,E9,EA,EB,EC,ED,EE,EF,F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,FA,FB,FC,FD,FE,FF,100,101,102,103,104,105,106,107,108,109,10A,10B,10C,10D,10E,10F,110,111,112,113,114,115,116,117,118,119,11A,11B,11C,11D,11E,11F,120,121,122,123,124,125,126,127,128,129,12A,12B,12C,12D,12E,12F,130,131,132,133,134,135,136,137,138,139,13A,13B,13C,13D,13E,13F,140,141,142,143,144,145,146,147,148,149,14A,14B,14C,14D,14E,14F,150,151,152,153,154,155,156,157,158,159,15A,15B,15C,15D,15E,15F,160,161,162,163,164,165,166,167,168,169,16A,16B,16C,16D,16E,16F,170,171,172,173,174,175,176,177,178,179,17A,17B,17C,17D,17E,17F,180,181,182,183,184,185,186,187,188,189,18A,18B,18C,18D,18E,18F,190,191,192,193,194,195,196,197,198,199,19A,19B,19C,19D,19E,19F,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1AF,1B0,1B1,1B2,1B3,1B4,1B5,1B6,1B7,1B8,1B9,1BA,1BB,1BC,1BD,1BE,1BF,1C0,1C1,1C2,1C3,1C4,1C5,1C6,1C7,1C8,1C9,1CA,1CB,1CC,1CD,1CE,1CF,1D0,1D1,1D2,1D3,1D4,1D5,1D6,1D7,1D8,1D9,1DA,1DB,1DC,1DD,1DE,1DF,1E0,1E1,1E2,1E3,1E4,1E5,1E6,1E7,1E8,1E9,1EA,1EB,1EC,1ED,1EE,1EF,1F0,1F1,1F2,1F3,1F4,1F5,1F6,1F7,1F8,1F9,1FA,1FB,1FC,1FD,1FE,1FF,200,201,202,203,204,205,206,207,208,209,20A,20B,20C,20D,20E,20F,210,211,212,213,214,215,216,217,218,219,21A,21B,21C,21D,21E,21F,220,221,222,223,224,225,226,227,228,229,22A,22B,22C,22D,22E,22F,r0,1,2,3,4,5,6,7,8,9,B,C,amlsfw
You can try changing this back to BUS_USB and see if it works:
Looks like it was changed to fix a different bug though, so perhaps it will have to be made configurable
You can try changing this back to BUS_USB and see if it works:
Looks like it was changed to fix a different bug though, so perhaps it will have to be made configurable
I can confirm that modifying the bus type to BusType::BUS_USB
in resolves the issue.
Thank you for your help!
Requirements
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
To Reproduce
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
Operating system
Linux GNOME Wayland - Ubuntu 24.04
Additional context
Bluetooth keyboard event
Files in /dev/input/