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

Can bindings have multiple keys?

asked 2013-09-22 06:17:09 +0000

alethiophile gravatar image

Is it possible to define multi-key bindings, a la screen's C-a <whatever> or emacs C-x <whatever>? The end result being that you type one key, release it, then type another, in order to execute an action.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-09-22 06:59:25 +0000

MeanEYE gravatar image

You can define custom modes and handle key bindings that way.

For example:

bind Ctrl+A mode "command"

mode "command" {
    bindsym t exec xterm; mode "default"
    bindsym Escape mode "default"
}

When you press Ctrl+A i3-bar will show "commmand" and then you can just press only t and that will execute Xterm and exit command mode.

edit flag offensive delete link more

Comments

This looks like it does what I want. Thanks a lot.

alethiophile gravatar imagealethiophile ( 2013-09-22 07:01:12 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-22 06:17:09 +0000

Seen: 225 times

Last updated: Sep 22 '13