Can I send key‑codes instead of key‑symbols?

154 views
Skip to first unread message

Hibou57 (Yannick Duchêne)

unread,
Apr 4, 2013, 5:57:13 PM4/4/13
to xdotoo...@googlegroups.com
Hi people out there,

I'm encountering a funny issue with xdotool and i3wm.

Let me explain: if from within i3wm I do, in a console, `xdotool Super+2`, the result is the same as if I had typed `Super+Shift+2` on my keyboard. Trying to guess what's wrong, I ended with an hypothesis: may be that's because to input “2”, I have to press Shift+2 on my keyboard and may be that's why `xdotool Super+2` do what `xdotool Super+Shift+2`. Seems either xdotool or i3wm interprets “2” as “Shift+2” and not just the key which is “2”. Hence my question: how do one make xodotool to send a key‑code instead of a key‑symbol?

Some one has an idea?

Note I don't know if this behaviour comes from xdotool proper or from i3wm instead.

I tried to do `xdotool Super+KP_2` instead of `xdotool Super+2`, but it does not work and just seems to send something looking like `^[[1;2B` and i don't know what it exactly means. At least, `KP_2` does not work as the key‑code pour the “2” key at the top of my laptop keyboard.

Hibou57 (Yannick Duchêne)

unread,
Apr 5, 2013, 5:42:08 AM4/5/13
to xdotoo...@googlegroups.com
I could find something.

Let me first say my keyboard is on a laptop an use French layout.

If I do `xodotool Super+Eacute` I get what's intended. That's surely because “é” is the letter I get when I press the “2” key without pressing Shift.

That may look like a solution, but that's not a clean one, as this is keyboard layout dependent. Note the `--clearmodifiers` option does not help here.

Is there a keyboard layout independent way to achieve the same?
Reply all
Reply to author
Forward
0 new messages