Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot completely ignores keyboard layout #1

Open
Fuuzetsu opened this issue May 21, 2013 · 5 comments
Open

Robot completely ignores keyboard layout #1

Fuuzetsu opened this issue May 21, 2013 · 5 comments

Comments

@Fuuzetsu
Copy link

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

@lambda-fairy
Copy link
Owner

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.

@Fuuzetsu
Copy link
Author

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

@lambda-fairy
Copy link
Owner

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

@Fuuzetsu
Copy link
Author

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

@neongreen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants