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

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

asked Jul 7 '14

brakende gravatar image

updated Jul 7 '14

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?

Comments

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

brakende gravatar imagebrakende (Jul 7 '14)edit

3 answers

Sort by » oldest newest most voted
1

answered Jul 7 '14

tigrezno gravatar image

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

1

answered Jul 7 '14

brakende gravatar image

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

Comments

http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap

brakende gravatar imagebrakende (Jul 7 '14)edit
0

answered Jul 14 '14

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.

Question Tools

Stats

Asked: Jul 7 '14

Seen: 338 times

Last updated: Jul 14 '14