tbocek / dvorak

Wayland keyboard remapping with dvorak - make ctrl-c ctrl-c again :)
Apache License 2.0
68 stars 18 forks source link

possible to modify for use with Logitech wireless keyboard? #6

Closed briskt closed 5 years ago

briskt commented 5 years ago

I've been very pleased with this for a while now. Thank you!

When I got a Logitech wireless keyboard, I found that it wasn't remapping the modified keys. I see the following in syslog:

Jan  8 21:18:07 dell-M3800 /usr/lib/gdm3/gdm-x-session[2447]: (II) XINPUT: Adding extended input device "Logitech K360" (type: KEYBOARD, id 12)
Jan  8 21:18:07 dell-M3800 /usr/lib/gdm3/gdm-x-session[2447]: (**) Option "xkb_model" "pc105"
Jan  8 21:18:07 dell-M3800 /usr/lib/gdm3/gdm-x-session[2447]: (**) Option "xkb_layout" "us,us"
Jan  8 21:18:07 dell-M3800 /usr/lib/gdm3/gdm-x-session[2447]: (**) Option "xkb_variant" "dvorak,"
Jan  8 21:18:07 dell-M3800 /usr/lib/gdm3/gdm-x-session[2447]: (**) Option "xkb_options" "grp_led:scroll"
Jan  8 21:18:07 dell-M3800 systemd[1]: Started Dvorak Virtual Keyboard.
Jan  8 21:18:07 dell-M3800 dvorak[5595]: Not a matching device: [Logitech K360]

There are a lot more messages upon insertion of the Unifying Receiver, but I figured these were the most relevant. If it's not possible or highly difficult, no worries.

tbocek commented 5 years ago

In dvorak@.service, the binary is called with the argument "keyb", which will match the term "keyboard" in the device name. Since the logitech does not have the term keyboard in the device name this does not work. In order to make it work with your device, in dvorak@.service, you can call be the binary with

ExecStart=/usr/bin/dvorak /dev/input/%i keyb k360
briskt commented 5 years ago

Great, thank you!