diff options
author | arg@mig29 <unknown> | 2006-12-14 14:40:58 +0100 |
---|---|---|
committer | arg@mig29 <unknown> | 2006-12-14 14:40:58 +0100 |
commit | 3dcdbe2a57a19bf727113eca6aa35b1c7cb0ef28 (patch) | |
tree | 34d62e961f4816f5716d7ce5c4cf0e48326a9d1e | |
parent | 5336608a86b2b85b769f654312f851796a4512b0 (diff) |
added vi-like key-bindings for keyboards without cursor keys (they are undocumented features)
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | main.c | 23 |
2 files changed, 24 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | # dmenu version | 1 | # dmenu version |
2 | VERSION = 1.7.1 | 2 | VERSION = 1.8 |
3 | 3 | ||
4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
5 | 5 | ||
@@ -178,6 +178,29 @@ kpress(XKeyEvent * e) { | |||
178 | break; | 178 | break; |
179 | } | 179 | } |
180 | } | 180 | } |
181 | if(e->state & Mod1Mask) { | ||
182 | switch(ksym) { | ||
183 | default: return; | ||
184 | case XK_h: | ||
185 | ksym = XK_Left; | ||
186 | break; | ||
187 | case XK_l: | ||
188 | ksym = XK_Right; | ||
189 | break; | ||
190 | case XK_j: | ||
191 | ksym = XK_Next; | ||
192 | break; | ||
193 | case XK_l: | ||
194 | ksym = XK_Prior; | ||
195 | break; | ||
196 | case XK_g: | ||
197 | ksym = XK_Home; | ||
198 | break; | ||
199 | case XK_G: | ||
200 | ksym = XK_End; | ||
201 | break; | ||
202 | } | ||
203 | } | ||
181 | switch(ksym) { | 204 | switch(ksym) { |
182 | default: | 205 | default: |
183 | if(num && !iscntrl((int) buf[0])) { | 206 | if(num && !iscntrl((int) buf[0])) { |