How to use Mod4 with xdotool and i3wm?
Note: I don't know if my issue is finally with i3wm or with xdotool. If ever my question is wrong here, just tell and suggest another place to ask for it.
Sample case
I have a console opened in workspace #1. I have an application opened in workplace #2. If while in workspace #1, from the keyboard I do $mod+2
and $mod
for me is the Win‑key, I'm switching to workplace #2, as expected.
If while in workplace #1, from the console I do xdotool key Super+2
, instead of switching to workplace #2, the current window is moved to workplace #2 and I stay in workplace #1, like if I did shit+$mod+2
instead of $mod+2
.
I tried with Meta
instead of Super
, but it does not work neither, and displays an (arg: 2):
on the terminal, which I don't know what it is. I tried Mod4
, but xdotool complains it does not know what it is. I don't know any other name except Super or Meta or Mod4, for the Win‑key.
My question
Is this an issue with i3wm or an issue with xdotool? How do I properly use xdotool to send keystrokes involving the $mod
key which i3wm properly recognizes or properly receives?
What would you like to achieve? Very well possible that there is a better way...
Hi Joepd. I wanted to setup a Demu as an alternative and/or remainder of keystrokes used within i3wm.
Just an hypothesis: to input “2” on my keyboard, I have to press Shit; perhaps that the reason why `xdotool Super+2` is interpreted as `xdotool Super+Shift+2`. Now, I don't know if it's due to i3wm keyboard input interpretation of if it's due to xdotool.
Maybe you are right. I tried "xdotool key Super+2" and for me it is working, meaning it switches to workspace 2 and does not move the active window. But why do you have to press Shift to get a "2", anyway?
That's my keyboard which is like this (French layout on a laptop). I'v made some other tests, and if I do `xdotool key Super+Eacute`, I go to workplace #2, because “é” is the letter I get if I press the “2” key without pressing Shift. P.S. I posted something on the xdotool-users groups, and will report any useful answer here.