The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

Why can't I `bindsym Mod1+Mod3' ?

asked Jan 30 '15

throstur gravatar image

I've tried to put the same command for bindsym Mod1+Mod4 and bindsym $mod+x and it seems that only the latter works. Why is this? How do I troubleshoot this issue?

1 answer

Sort by » oldest newest most voted
2

answered Jan 31 '15

updated Jan 31 '15

Instead of bindsym you need to use bindcode. For that to work you have to find out the keycode of your Mod1 and Mod4 keys. You can do that using the xkbevd command line tool. For me, Mod1(=Alt) has keycode 64 and Mod4(=Windows key) has keycode 133. So I would use

bindcode Mod1 + 133 exec <command>
bindcode Mod4 + 64  exec <command>

Note that you need both commands because bindcode is sensitive to the order in which the keys are pressed!

Comments

Thank you, mschaefer! It works exactly as expected. I also tried `64 + 133` instead of `Mod1 + 133` and learned why your way is correct (and why the order matters). I would love to give you an upvote here, but I sadly don't have enough reputation.

throstur gravatar imagethrostur (Feb 2 '15)edit
1

@throstur You do now. Have enough reputation, that is. :)

Adaephon gravatar imageAdaephon (Feb 17 '15)edit

Question Tools

Stats

Asked: Jan 30 '15

Seen: 168 times

Last updated: Jan 31