summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-02-14 12:35:59 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-02-14 12:35:59 +0000
commit7669c7aa396239d1a45901a27ba8d5d5575ec6cf (patch)
tree6a02e209566437b0a6d0331d738a40bfdd4f5911 /usr.bin/tmux
parentee4587ad4e99ad362fe5b3f6444cd62cb7420f9b (diff)
Make C-j the same as C-m, from Simon Nicolussi.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/mode-key.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c
index 6edcc157d3b..f5546031467 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.55 2013/10/23 11:31:03 nicm Exp $ */
+/* $OpenBSD: mode-key.c,v 1.56 2014/02/14 12:35:58 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -153,6 +153,7 @@ const struct mode_key_entry mode_key_vi_edit[] = {
{ '\025' /* C-u */, 0, MODEKEYEDIT_DELETELINE },
{ '\027' /* C-w */, 0, MODEKEYEDIT_DELETEWORD },
{ '\033' /* Escape */, 0, MODEKEYEDIT_SWITCHMODE },
+ { '\n', 0, MODEKEYEDIT_ENTER },
{ '\r', 0, MODEKEYEDIT_ENTER },
{ KEYC_BSPACE, 0, MODEKEYEDIT_BACKSPACE },
{ KEYC_DC, 0, MODEKEYEDIT_DELETE },
@@ -176,6 +177,7 @@ const struct mode_key_entry mode_key_vi_edit[] = {
{ 'X', 1, MODEKEYEDIT_BACKSPACE },
{ '\003' /* C-c */, 1, MODEKEYEDIT_CANCEL },
{ '\010' /* C-h */, 1, MODEKEYEDIT_BACKSPACE },
+ { '\n', 1, MODEKEYEDIT_ENTER },
{ '\r', 1, MODEKEYEDIT_ENTER },
{ '^', 1, MODEKEYEDIT_STARTOFLINE },
{ 'a', 1, MODEKEYEDIT_SWITCHMODEAPPEND },
@@ -219,6 +221,7 @@ const struct mode_key_entry mode_key_vi_choice[] = {
{ '\005' /* C-e */, 0, MODEKEYCHOICE_SCROLLDOWN },
{ '\006' /* C-f */, 0, MODEKEYCHOICE_PAGEDOWN },
{ '\031' /* C-y */, 0, MODEKEYCHOICE_SCROLLUP },
+ { '\n', 0, MODEKEYCHOICE_CHOOSE },
{ '\r', 0, MODEKEYCHOICE_CHOOSE },
{ 'j', 0, MODEKEYCHOICE_DOWN },
{ 'k', 0, MODEKEYCHOICE_UP },
@@ -281,6 +284,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
{ '\025' /* C-u */, 0, MODEKEYCOPY_HALFPAGEUP },
{ '\031' /* C-y */, 0, MODEKEYCOPY_SCROLLUP },
{ '\033' /* Escape */, 0, MODEKEYCOPY_CLEARSELECTION },
+ { '\n', 0, MODEKEYCOPY_COPYSELECTION },
{ '\r', 0, MODEKEYCOPY_COPYSELECTION },
{ '^', 0, MODEKEYCOPY_BACKTOINDENTATION },
{ 'b', 0, MODEKEYCOPY_PREVIOUSWORD },
@@ -329,6 +333,7 @@ const struct mode_key_entry mode_key_emacs_edit[] = {
{ '\027' /* C-w */, 0, MODEKEYEDIT_DELETEWORD },
{ '\031' /* C-y */, 0, MODEKEYEDIT_PASTE },
{ '\033' /* Escape */, 0, MODEKEYEDIT_CANCEL },
+ { '\n', 0, MODEKEYEDIT_ENTER },
{ '\r', 0, MODEKEYEDIT_ENTER },
{ 'b' | KEYC_ESCAPE, 0, MODEKEYEDIT_PREVIOUSWORD },
{ 'f' | KEYC_ESCAPE, 0, MODEKEYEDIT_NEXTWORDEND },
@@ -363,6 +368,7 @@ const struct mode_key_entry mode_key_emacs_choice[] = {
{ '\020' /* C-p */, 0, MODEKEYCHOICE_UP },
{ '\026' /* C-v */, 0, MODEKEYCHOICE_PAGEDOWN },
{ '\033' /* Escape */, 0, MODEKEYCHOICE_CANCEL },
+ { '\n', 0, MODEKEYCHOICE_CHOOSE },
{ '\r', 0, MODEKEYCHOICE_CHOOSE },
{ 'q', 0, MODEKEYCHOICE_CANCEL },
{ 'v' | KEYC_ESCAPE, 0, MODEKEYCHOICE_PAGEUP },