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 2015-01-30 15:51:07 +0000

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-01-31 12:18:31 +0000

updated 2015-01-31 12:19:05 +0000

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!

edit flag offensive delete link more

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 ( 2015-02-02 10:37:24 +0000 )edit
1

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

Adaephon gravatar imageAdaephon ( 2015-02-17 12:24:32 +0000 )edit

Question Tools

Stats

Asked: 2015-01-30 15:51:07 +0000

Seen: 168 times

Last updated: Jan 31