diff options
author | Connor Lane Smith <cls@lubutu.com> | 2012-01-01 20:32:40 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2012-01-01 20:32:40 +0100 |
commit | b95fb20269f55c9fe649d971c53efb8040d3ceea (patch) | |
tree | 2c8b6b8607896b6a314a1b269c421de31145323f /dmenu.c | |
parent | 6664e4233faa3d6b677a24196e9af4ac5b1920fd (diff) |
add Mod1Mask keybindings
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -243,11 +243,8 @@ keypress(XKeyEvent *ev) { len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status); if(status == XBufferOverflow) return; - if(ev->state & ControlMask) { - KeySym lower, upper; - - XConvertCase(ksym, &lower, &upper); - switch(lower) { + if(ev->state & ControlMask) + switch(ksym) { case XK_a: ksym = XK_Home; break; case XK_b: ksym = XK_Left; break; case XK_c: ksym = XK_Escape; break; @@ -281,7 +278,17 @@ keypress(XKeyEvent *ev) { default: return; } - } + else if(ev->state & Mod1Mask) + switch(ksym) { + case XK_g: ksym = XK_Home; break; + case XK_G: ksym = XK_End; break; + case XK_h: ksym = XK_Prior; break; + case XK_j: ksym = XK_Up; break; + case XK_k: ksym = XK_Down; break; + case XK_l: ksym = XK_Next; break; + default: + return; + } switch(ksym) { default: if(!iscntrl(*buf)) |