The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

How do I use special characters as keys in the config file?

asked 2014-07-07 19:35:58 +0000

brakende gravatar image

updated 2014-07-07 20:02:52 +0000

As ø takes the place of ; on Norwegian keyboards, I want to use $mod+ø instead of $mod+; for the vimmish "focus right".

However, trying to use this command just prints "ø" in the shell.

How do I get this to work?


Found this out, but I still can't get - and | to work as special keys (I want them to split windows tmux-style). Any takers?

edit retag flag offensive close merge delete


I've changed the keys to the Norwegian layout using the setxkbmap in shell config file if that matters.

brakende gravatar imagebrakende ( 2014-07-07 19:38:28 +0000 )edit

3 answers

Sort by » oldest newest most voted

answered 2014-07-07 20:06:03 +0000

tigrezno gravatar image

You can use "xev" to see the name of the pressed key.

edit flag offensive delete link more

answered 2014-07-07 19:44:40 +0000

brakende gravatar image

The answer was setting it to $mod+oslash... embarrased

edit flag offensive delete link more


brakende gravatar imagebrakende ( 2014-07-07 19:45:40 +0000 )edit

answered 2014-07-14 20:32:12 +0000

schfkt gravatar image

Try to use bindcode command instead of bindsym. Here as an example from my config:

bindcode $mod+34 [class="Konsole"] scratchpad show
bindcode $mod+35 [class="Google-chrome|X-www-browser"] scratchpad show

These hotkeys work in different layouts (english and russian for me). To get the code of specific key use xev tool. Example output from xev tool for the "[" key:

KeyPress event, serial 32, synthetic NO, window 0x4200001,
    root 0x9e, subw 0x0, time 156960544, (621,116), root:(623,155),
    state 0x10, keycode 34 (keysym 0x5b, bracketleft), same_screen YES,
    XLookupString gives 1 bytes: (5b) "["
    XmbLookupString gives 1 bytes: (5b) "["
    XFilterEvent returns: False

As you can see on the third line keycode of this key is 34.

edit flag offensive delete link more

Question Tools


Asked: 2014-07-07 19:35:58 +0000

Seen: 338 times

Last updated: Jul 14 '14