summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/mode-key.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:36:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:36:44 +0000
commit8fe4c7041a496e8f3273ba22ebd417872f39af65 (patch)
tree391d20f40d1c1adc1e8c8e9d23773152e4c8d317 /usr.bin/tmux/mode-key.c
parent1558bb18ac1e137f5ec27d30be10af34eaabe353 (diff)
Add start-of-list, end-of-list, top-line and bottom-line in choice mode,
from madmaverick9 at roxxmail dot eu, similar diff a few days later from Marcel Partap.
Diffstat (limited to 'usr.bin/tmux/mode-key.c')
-rw-r--r--usr.bin/tmux/mode-key.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c
index f5546031467..4cf250a3891 100644
--- a/usr.bin/tmux/mode-key.c
+++ b/usr.bin/tmux/mode-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-key.c,v 1.56 2014/02/14 12:35:58 nicm Exp $ */
+/* $OpenBSD: mode-key.c,v 1.57 2014/03/31 21:36:43 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -76,14 +76,18 @@ const struct mode_key_cmdstr mode_key_cmdstr_edit[] = {
/* Choice keys command strings. */
const struct mode_key_cmdstr mode_key_cmdstr_choice[] = {
{ MODEKEYCHOICE_BACKSPACE, "backspace" },
+ { MODEKEYCHOICE_BOTTOMLINE, "bottom-line"},
{ MODEKEYCHOICE_CANCEL, "cancel" },
{ MODEKEYCHOICE_CHOOSE, "choose" },
{ MODEKEYCHOICE_DOWN, "down" },
+ { MODEKEYCHOICE_ENDOFLIST, "end-of-list"},
{ MODEKEYCHOICE_PAGEDOWN, "page-down" },
{ MODEKEYCHOICE_PAGEUP, "page-up" },
{ MODEKEYCHOICE_SCROLLDOWN, "scroll-down" },
{ MODEKEYCHOICE_SCROLLUP, "scroll-up" },
{ MODEKEYCHOICE_STARTNUMBERPREFIX, "start-number-prefix" },
+ { MODEKEYCHOICE_STARTOFLIST, "start-of-list"},
+ { MODEKEYCHOICE_TOPLINE, "top-line"},
{ MODEKEYCHOICE_TREE_COLLAPSE, "tree-collapse" },
{ MODEKEYCHOICE_TREE_COLLAPSE_ALL, "tree-collapse-all" },
{ MODEKEYCHOICE_TREE_EXPAND, "tree-expand" },
@@ -226,6 +230,12 @@ const struct mode_key_entry mode_key_vi_choice[] = {
{ 'j', 0, MODEKEYCHOICE_DOWN },
{ 'k', 0, MODEKEYCHOICE_UP },
{ 'q', 0, MODEKEYCHOICE_CANCEL },
+ { KEYC_HOME, 0, MODEKEYCHOICE_STARTOFLIST },
+ { 'g', 0, MODEKEYCHOICE_STARTOFLIST },
+ { 'H', 0, MODEKEYCHOICE_TOPLINE },
+ { 'L', 0, MODEKEYCHOICE_BOTTOMLINE },
+ { 'G', 0, MODEKEYCHOICE_ENDOFLIST },
+ { KEYC_END, 0, MODEKEYCHOICE_ENDOFLIST },
{ KEYC_BSPACE, 0, MODEKEYCHOICE_BACKSPACE },
{ KEYC_DOWN | KEYC_CTRL, 0, MODEKEYCHOICE_SCROLLDOWN },
{ KEYC_DOWN, 0, MODEKEYCHOICE_DOWN },
@@ -372,6 +382,11 @@ const struct mode_key_entry mode_key_emacs_choice[] = {
{ '\r', 0, MODEKEYCHOICE_CHOOSE },
{ 'q', 0, MODEKEYCHOICE_CANCEL },
{ 'v' | KEYC_ESCAPE, 0, MODEKEYCHOICE_PAGEUP },
+ { KEYC_HOME, 0, MODEKEYCHOICE_STARTOFLIST },
+ { '<' | KEYC_ESCAPE, 0, MODEKEYCHOICE_STARTOFLIST },
+ { 'R' | KEYC_ESCAPE, 0, MODEKEYCHOICE_TOPLINE },
+ { '>' | KEYC_ESCAPE, 0, MODEKEYCHOICE_ENDOFLIST },
+ { KEYC_END, 0, MODEKEYCHOICE_ENDOFLIST },
{ KEYC_BSPACE, 0, MODEKEYCHOICE_BACKSPACE },
{ KEYC_DOWN | KEYC_CTRL, 0, MODEKEYCHOICE_SCROLLDOWN },
{ KEYC_DOWN, 0, MODEKEYCHOICE_DOWN },