diff options
author | Thomas Menari <spaceinvader@chaotika.org> | 2009-06-07 20:49:36 +0200 |
---|---|---|
committer | Simon Rozet <simon@rozet.name> | 2009-06-07 21:27:08 +0200 |
commit | ffd50068b335bea02a3f477396e9cfe6f906e648 (patch) | |
tree | e40a847ae8de0282ce835e2490559946bc76af64 /surf.c | |
parent | 569d2767996f886f17bb0625f8e2c07d8ecc8364 (diff) | |
download | surf-ffd50068b335bea02a3f477396e9cfe6f906e648.tar.gz surf-ffd50068b335bea02a3f477396e9cfe6f906e648.tar.bz2 surf-ffd50068b335bea02a3f477396e9cfe6f906e648.zip |
vi-style scrolling
Diffstat (limited to 'surf.c')
-rw-r--r-- | surf.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -183,7 +183,7 @@ keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) { return FALSE; } } - if(ev->state == GDK_CONTROL_MASK || ev->state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) { + else if(ev->state == GDK_CONTROL_MASK || ev->state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) { switch(ev->keyval) { case GDK_r: case GDK_R: @@ -208,6 +208,16 @@ keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) { return TRUE; } } + else { + switch(ev->keyval) { + case GDK_k: + webkit_web_view_move_cursor(c->view, GTK_MOVEMENT_DISPLAY_LINES, -1); + return TRUE; + case GDK_j: + webkit_web_view_move_cursor(c->view, GTK_MOVEMENT_DISPLAY_LINES, 1); + return TRUE; + } + } return FALSE; } |