iberianpig / fusuma-plugin-sendkey

Fusuma plugin that sending virtual keyboard events
MIT License
72 stars 2 forks source link

LEFTCTRL is unsupported. #39

Closed Attacktive closed 4 weeks ago

Attacktive commented 1 month ago

I know it's very likely a hardware problem but here it is:

sendkey: LEFTCTRL is unsupported.

It DOES have the physical modifier keys such as CTRL, SHIFT, etc., but these are missing from the list.

$ ./fusuma-sendkey -l

sendkey: Keyboard: SONiX COX CA108 Keyboard
ESC
1
2
3
4
5
6
7
8
9
0
MINUS
EQUAL
BACKSPACE
TAB
Q
W
E
R
T
Y
U
I
O
P
LEFTBRACE
RIGHTBRACE
ENTER
A
S
D
F
G
H
J
K
L
SEMICOLON
APOSTROPHE
GRAVE
BACKSLASH
Z
X
C
V
B
N
M
COMMA
DOT
SLASH
KPASTERISK
SPACE
CAPSLOCK
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
NUMLOCK
SCROLLLOCK
KP7
KP8
KP9
KPMINUS
KP4
KP5
KP6
KPPLUS
KP1
KP2
KP3
KP0
KPDOT
102ND
F11
F12
KPENTER
KPSLASH
SYSRQ
HOME
UP
PAGEUP
LEFT
RIGHT
END
DOWN
PAGEDOWN
INSERT
DELETE
POWER
KPEQUAL
PAUSE
COMPOSE
PROPS
FRONT
OPEN
HELP
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24

It has some irregular keys instead. :disappointed: Is there any chance to work around?

iberianpig commented 1 month ago

Could you paste output of libinput list-devices ? I think that your keyboard has multiple event devices in /dev/input/*.

iberianpig commented 1 month ago

If your keyboard has multiple devices with same name in the results of the above command, you might want to try fusuma-plugin-remap. https://github.com/iberianpig/fusuma-plugin-remap

fusuma−plugin−remap creates virtual keyboard for sending key events from fusuma or sendkey.

Attacktive commented 1 month ago

Ah, that appears to make sense. I'll give it a go next week. Thank you so much, @iberianpig!

Attacktive commented 4 weeks ago

@iberianpig

Could you paste output of libinput list-devices ? I think that your keyboard has multiple event devices in /dev/input/*.

Right. I got five of them but those are of different name:

$ libinput list-devices
Device:           SONiX COX CA108
Kernel:           /dev/input/event10
Group:            6
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           SONiX COX CA108 Consumer Control
Kernel:           /dev/input/event13
Group:            6
Seat:             seat0, default
Capabilities:     keyboard pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           SONiX COX CA108 System Control
Kernel:           /dev/input/event14
Group:            6
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           SONiX COX CA108 Keyboard
Kernel:           /dev/input/event15
Group:            6
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           SONiX COX CA108 Mouse
Kernel:           /dev/input/event16
Group:            6
Seat:             seat0, default
Capabilities:     pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         0.0

I tried libinput debug-events and every stroke is logged as event10 which is 'SONiX COX CA108'. Do you think fusuma-plugin-remap may still help or I'm out of luck?

iberianpig commented 4 weeks ago

every stroke is logged as event10 which is 'SONiX COX CA108'.

Could you try following config?

plugin:
  executors:
    sendkey_executor:
      device_name: SONiX COX CA108

See https://github.com/iberianpig/fusuma-plugin-sendkey?tab=readme-ov-file#specify-keyboard-by-device-name

Do you think fusuma-plugin-remap may still help or I'm out of luck?

Yes, I believe that it also works well.

Attacktive commented 4 weeks ago

@iberianpig Yes! Specifying device_name did the trick. Thanks a lot. 🫡