robot icon indicating copy to clipboard operation
robot copied to clipboard

Robot completely ignores keyboard layout

Open Fuuzetsu opened this issue 11 years ago • 5 comments

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

Fuuzetsu avatar May 21 '13 20:05 Fuuzetsu

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.

lambda-fairy avatar May 22 '13 07:05 lambda-fairy

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

Fuuzetsu avatar May 22 '13 14:05 Fuuzetsu

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

lambda-fairy avatar May 24 '13 08:05 lambda-fairy

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. key

Fuuzetsu avatar May 26 '13 15:05 Fuuzetsu

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.

neongreen avatar Dec 18 '15 14:12 neongreen