summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af62b66)
raw | patch | inline | side by side (parent: af62b66)
author | Pierre Habouzit <madcoder@debian.org> | |
Thu, 24 Jun 2010 15:24:23 +0000 (17:24 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 26 Jun 2010 00:41:06 +0000 (20:41 -0400) |
^N/^P for previous/next
^Y/^E for scroll_up/scroll_down
^D/^U for page_up/page_down
^L for redraw
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
^Y/^E for scroll_up/scroll_down
^D/^U for page_up/page_down
^L for redraw
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c | patch | blob | history |
index a501db044b3c718dac45dbffb4f8b30f02faccb9..90c2fc148b724677fe0ef8c7c14008cdc1f90f71 100644 (file)
--- a/tig.c
+++ b/tig.c
#define S_ISGITLINK(mode) (((mode) & S_IFMT) == 0160000)
/* Some ASCII-shorthands fitted into the ncurses namespace. */
+#define KEY_CTL(x) ((x) & 0x1f) /* KEY_CTL(A) == ^A == \1 */
#define KEY_TAB '\t'
#define KEY_RETURN '\r'
#define KEY_ESC 27
{ KEY_TAB, REQ_VIEW_NEXT },
{ KEY_RETURN, REQ_ENTER },
{ KEY_UP, REQ_PREVIOUS },
+ { KEY_CTL('P'), REQ_PREVIOUS },
{ KEY_DOWN, REQ_NEXT },
+ { KEY_CTL('N'), REQ_NEXT },
{ 'R', REQ_REFRESH },
{ KEY_F(5), REQ_REFRESH },
{ 'O', REQ_MAXIMIZE },
{ KEY_NPAGE, REQ_MOVE_PAGE_DOWN },
{ ' ', REQ_MOVE_PAGE_DOWN },
{ KEY_PPAGE, REQ_MOVE_PAGE_UP },
+ { KEY_CTL('U'), REQ_MOVE_PAGE_UP },
{ 'b', REQ_MOVE_PAGE_UP },
{ '-', REQ_MOVE_PAGE_UP },
{ KEY_LEFT, REQ_SCROLL_LEFT },
{ KEY_RIGHT, REQ_SCROLL_RIGHT },
{ KEY_IC, REQ_SCROLL_LINE_UP },
+ { KEY_CTL('Y'), REQ_SCROLL_LINE_UP },
{ KEY_DC, REQ_SCROLL_LINE_DOWN },
+ { KEY_CTL('E'), REQ_SCROLL_LINE_DOWN },
{ 'w', REQ_SCROLL_PAGE_UP },
{ 's', REQ_SCROLL_PAGE_DOWN },
{ 'z', REQ_STOP_LOADING },
{ 'v', REQ_SHOW_VERSION },
{ 'r', REQ_SCREEN_REDRAW },
+ { KEY_CTL('L'), REQ_SCREEN_REDRAW },
{ 'o', REQ_OPTIONS },
{ '.', REQ_TOGGLE_LINENO },
{ 'D', REQ_TOGGLE_DATE },