Remapping keyboard/user vis awesome kbdmapping

vi_'s xkb setup

I use the english layout. All (useful) symbols have been added to the keyboard rendering the blue+ctrl menu redundant. I am a heavy xterm user and would feel crippled without this set-up.

Features include:

  • F1-F12 on blue+shift+top row
  • Tab on blue+return
  • escape on Shift+backspace (for some reason 3rd level delete will not work :( )
  • Page up/down & home end on arrows without destroying shift highlighting (in fact shift+end works as it should)
  • ? moved to fourth level, allowing full stop with fn locked (makes typing in IP addresses easy)
  • @ moved to fourth level, allowing use of space when fn locked.
  • Euro symbol replaced with tilde (swap to £ if you are euro)
  • Fourth level 'k' is '()'
  • Fourth level 'Z' and 'x' are '[]'
  • Fourth level '!' is '|'
  • All useful symbols are now on the fourth row, read the configuration below for details

Substitute the following parts into your rx-51 file. ALWAYS TEST to ensure you have done it right BEFORE rebooting or you WILL end up with an unbootable system.

partial hidden alphanumeric_keys xkb_symbols "english_base" {

   // 1. row
   key <AD01>  { [ q,      Q,      1,      F1      ] };
   key <AD02>  { [ w,      W,      2,      F2      ] };
   key <AD03>  { [ e,      E,      3,      F3      ] };
   key <AD04>  { [ r,      R,      4,      F4      ] };
   key <AD05>  { [ t,      T,      5,      F5      ] };
   key <AD06>  { [ y,      Y,      6,      F6      ] };
   key <AD07>  { [ u,      U,      7,      F7      ] };
   key <AD08>  { [ i,      I,      8,      F8      ] };
   key <AD09>  { [ o,      O,      9,      F9      ] };
   key <AD10>  { [ p,      P,      0,      F10     ] };
   key <AB08>  { [ comma,      semicolon,  equal,      F11     ] };
   key <BKSP>  { [     BackSpace,  Escape,     BackSpace,  F12     ] };

   // 2. row
   key <AC01>  { [ a,      A,      asterisk,   asciicircum ] };
   key <AC02>  { [ s,      S,      plus,       percent     ] };
   key <AC03>  { [ d,      D,      numbersign, numbersign  ] };
   key <AC04>  { [ f,      F,      minus,      minus       ] };
   key <AC05>  { [ g,      G,      underscore, underscore  ] };
   key <AC06>  { [ h,      H,      parenleft,  parenleft   ] };
   key <AC07>  { [ j,      J,      parenright, parenleft   ] };
   key <AC08>  { [ k,      K,      ampersand,  parenright  ] };
   key <AC09>  { [ l,      L,      exclam,     bar     ] };
   key <AB09>  { [ period,     colon,      period,     question    ] };

   // 3. row
   key <AB01>  { [ z,      Z,      sterling,   bracketleft ] };
   key <AB02>  { [ x,      X,      dollar,     bracketright    ] };
   key <AB03>  { [ c,      C,      asciitilde, asciitilde  ] };
   key <AB04>  { [ v,      V,      slash,      less        ] };
   key <AB05>  { [ b,      B,      backslash,  greater     ] };
   key <AB06>  { [ n,      N,      quotedbl,   braceleft   ] };
   key <AB07>  { [ m,      M,      apostrophe, braceright  ] };
   key <SPCE>  { [ space,      space,      space,      at      ] };


partial hidden alphanumeric_keys xkb_symbols "arrows_4btns" {

   // standard arrows mapping
   // normal 2nd level must not be enumerated to allow text selection with Shift key
   key <UP>    { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [    Up,     Prior   ] };
   key <LEFT>  { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [    Left,   Home    ] };
   key <DOWN>  { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [    Down,   Next    ] };
   key <RGHT>  { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [    Right,  End ] };

key <RTRN> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ KP_Enter, Tab ] };


xbindkeys!

The following allows:

  • fullscreen toggle of any application with ctrl+space
  • middle click with blue+stylus down
  • right click with shift+stylus down

Putthe following in your .xbindkeysrc and launch with:

xbindkeys -f /home/user.xbindkeysrc

NOTE! You also need to install xdotool and wmctrl.

"wmctrl -r :ACTIVE: -b toggle,fullscreen"
m:0x4 + c:65
Control + space
"xdotool click 2"
m:0x80 + b:1 + release
"xdotool click 3"
m:0x01 + b:1 + release