summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-12-14 14:40:58 +0100
committerarg@mig29 <unknown>2006-12-14 14:40:58 +0100
commit3dcdbe2a57a19bf727113eca6aa35b1c7cb0ef28 (patch)
tree34d62e961f4816f5716d7ce5c4cf0e48326a9d1e /main.c
parent5336608a86b2b85b769f654312f851796a4512b0 (diff)
added vi-like key-bindings for keyboards without cursor keys (they are undocumented features)
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/main.c b/main.c
index c10dfaa..06b2ca9 100644
--- a/main.c
+++ b/main.c
@@ -178,6 +178,29 @@ kpress(XKeyEvent * e) {
break;
}
}
+ if(e->state & Mod1Mask) {
+ switch(ksym) {
+ default: return;
+ case XK_h:
+ ksym = XK_Left;
+ break;
+ case XK_l:
+ ksym = XK_Right;
+ break;
+ case XK_j:
+ ksym = XK_Next;
+ break;
+ case XK_l:
+ ksym = XK_Prior;
+ break;
+ case XK_g:
+ ksym = XK_Home;
+ break;
+ case XK_G:
+ ksym = XK_End;
+ break;
+ }
+ }
switch(ksym) {
default:
if(num && !iscntrl((int) buf[0])) {