summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-10-07 15:58:41 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-10-07 15:58:41 +0000
commit0f84655406a532085f61f8b398fe1c0e2cc7bcaa (patch)
tree3476c69d9ed0a83b6c73317eb1e2e72409c76086 /usr.bin/tmux
parentba9a6940923a3db29f287850f8c06df9b4c16d4b (diff)
Support J and K for scroll up and scroll down in copy mode with vi keys,
suggested by martynas.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/mode-key.c4
-rw-r--r--usr.bin/tmux/tmux.110
2 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c
index 13bb2399538..7259a03acbb 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.21 2009/10/06 07:09:00 nicm Exp $ */
+/* $OpenBSD: mode-key.c,v 1.22 2009/10/07 15:58:40 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -161,6 +161,8 @@ const struct mode_key_entry mode_key_vi_copy[] = {
{ '0', 0, MODEKEYCOPY_STARTOFLINE },
{ ':', 0, MODEKEYCOPY_GOTOLINE },
{ '?', 0, MODEKEYCOPY_SEARCHUP },
+ { 'J', 0, MODEKEYCOPY_SCROLLDOWN },
+ { 'K', 0, MODEKEYCOPY_SCROLLUP },
{ '\002' /* C-b */, 0, MODEKEYCOPY_PREVIOUSPAGE },
{ '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL },
{ '\004' /* C-d */, 0, MODEKEYCOPY_HALFPAGEDOWN },
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index e93ef418ef8..976f7b6f0ce 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.97 2009/10/06 07:19:32 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.98 2009/10/07 15:58:40 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 6 2009 $
+.Dd $Mdocdate: October 7 2009 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -490,7 +490,7 @@ The keys available depend on whether emacs or vi mode is selected
.Ic mode-keys
option).
The following keys are supported as appropriate for the mode:
-.Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXX" "emacs" -offset indent
+.Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXXXXX" "emacs" -offset indent
.It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
.It Li "Back to indentation" Ta "^" Ta "M-m"
.It Li "Clear selection" Ta "Escape" Ta "C-g"
@@ -509,8 +509,8 @@ The following keys are supported as appropriate for the mode:
.It Li "Previous page" Ta "C-u" Ta "Page up"
.It Li "Previous word" Ta "b" Ta "M-b"
.It Li "Quit mode" Ta "q" Ta "Escape"
-.It Li "Scroll down" Ta "C-Down" Ta "C-Down"
-.It Li "Scroll up" Ta "C-Up" Ta "C-Up"
+.It Li "Scroll down" Ta "C-Down or J" Ta "C-Down"
+.It Li "Scroll up" Ta "C-Up or K" Ta "C-Up"
.It Li "Search again" Ta "n" Ta "n"
.It Li "Search backward" Ta "?" Ta "C-r"
.It Li "Search forward" Ta "/" Ta "C-s"