robot
robot copied to clipboard
Robot completely ignores keyboard layout
I'm using a Programmer's Dvorak keyboard layout and I quickly found out that tap _K
actually results in an output of v
(k
is where v
would physically be on QWERTY).
To me, this pretty much makes Robot unusable for anything but mouse movement.
I should also note that this makes just about any key useless. I can't input super and _Right_Alt (which I don't even have on my keyboard) outright throws Unknown keysym: 65514
What did you use to configure your keyboard layout? Robot asks the X server directly for the current mapping; if your mapping works at a higher level then it won't be picked up.
(which I don't even have on my keyboard)
Robot can only create key events for keys that exist in the current layout. This is a limitation of X11 itself, and I can't do anything about it.
I have a
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" "dvp"
Option "XkbOptions" "compose:caps,lv3:ralt_switch_multikey,kpdl:semi,keypad:atm"
Option "AutoRepeat" "100 50"
EndSection
section in my /etc/X11/xorg.conf
Okay, I pasted that into my own xorg.conf, rebooted, and ran some tests with Robot.
Logging in was awkward, trying to open GHCi even more so. But tap _O
, tap _E
and tap _C
all worked as expected. I even got the test program to terminate itself using hold _Ctrl (tap _C)
.
So there must be something strange happening on your end.
Any ideas? Maybe an old version of X.org or XHB? (It seems strange, but the last bug I had related to a typo in an outdated XHB)
Also: if you're using Xmonad and you've configured Super as the modifier key, you need to put a slight delay in the key presses, e.g.:
hold _Shift . hold _Super $ do sleep 0.1; tap _Enter
My xorg-server is version 1.14.0. I'm unsure what you're referring to by ‘XHB’.
I do use XMonad and have super as the modifier key and thanks for the note.
Attaching an image with a 4 line program that should output k
and outputs v
instead (v
is where Dvorak's k
is)
Not sure where to progress from here. Feel free to request more information.
This is a limitation of X11 itself, and I can't do anything about it.
You can, it's just a bit complicated:
- add a symbol you want to the layout
- press the key
- remove the symbol from the layout
That's what xdotool
and xvkbd
do.