Mateusz Poszwa <[email protected]> writes: > On Sun, 07 Jul 2013 05:29:03 +0200 > lee <[email protected]> wrote: > >> Hi, >> >> what might be the reason for the following key bindings in the config to >> be ignored: >> >> >> bind $mod+periodcentered workspace next >> bind $mod+Shift+abovedot workspace prev >> >> >> $mod is AltGr, and I have >> >> >> keycode 61 = minus underscore minus underscore periodcentered abovedot >> periodcentered >> >> >> in my xmodmap. I can type these symbols just fine, as if i3 is totally >> ignoring these key bindings. > > I'd try with: > „ > bindsym $mod+minus workspace next > bindsym $mod+Shift+minus workspace prev > ” > in this case.
Oh thank you! That works perfectly! My understanding was that you need to use the actual key symbol (as used in xmodmap) that is being produced. For example, when you have bindsym $mod+Shift+J move left a capital 'J' is being produced. When you have the some binding without Shift, like bindsym $mod+j move left it's a small 'j' because Shift isn't pressed. This shows throughout the default configuration file. The documentation says: ,---- [ http://i3wm.org/docs/userguide.html#keybindings] | | A keysym (key symbol) is a description for a specific symbol, like "a" | or "b", but also more strange ones like "underscore" instead of | "_". These are the ones you use in Xmodmap to remap your keys. To get | the current mapping of your keys, use xmodmap -pke. To interactively | enter a key and see what keysym it is configured to, use xev. | `---- I have been using xev to verify that pressing 'AltGr+<Minus Key>' and 'AltGr+Shift+<Minus Key>' do yield 'periodcentered' and 'abovedot', respectively. (Those are now intercepted by i3.) Actually, 'Shift+<Minus Key>' produces an underscore. How come that 'AltGr+Shift+minus' even works? Shouldn't that rather be 'AltGr+Shift+underscore'?[1] Is the documentation misleading, or is there some inconsistency with how i3 perceives (some) keystrokes or key symbols? [1]: KeyRelease event, serial 27, synthetic NO, window 0x1e00001, root 0x2a5, subw 0x0, time 93058061, (280,163), root:(1152,655), state 0x10, keycode 61 (keysym 0x2d, minus), same_screen YES, XLookupString gives 1 bytes: (2d) "-" XFilterEvent returns: False keycode 61 = minus underscore minus underscore periodcentered abovedot periodcentered > As a side note, I don't think using AltGr as a modifier is a good idea… How come you think so? It works great and allows for some easy one-handed i3-operations. Since I have modified my xmodmap so that I can type braces and brackets without pressing AltGr, there are only four keys that come to mind for which I need AltGr: '@', '|', 'ß' and '\'. That leaves me pretty much all of the other 98 keys to bind i3 stuff to :) Do you know of any application which would be aware that there's such a thing as an AltGr key? (I'm using a Model M keyboard that doesn't have the obsolete keys newer ones have, so there aren't any keys around Space, Alt, AltGr and Ctrl that would get persistently in the way.) -- "Object-oriented programming languages aren't completely convinced that you should be allowed to do anything with functions." http://www.joelonsoftware.com/items/2006/08/01.html
