From 63d7a01347184f23a6ffb5414abb0a7e98bafa66 Mon Sep 17 00:00:00 2001 From: Tianyu Geng Date: Mon, 5 Feb 2018 14:20:50 -0800 Subject: Support cursor jumping with Home and End keys --- src/tty_interface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tty_interface.c b/src/tty_interface.c index da9c5f1..3a063f9 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -279,6 +279,8 @@ static const keybinding_t keybindings[] = {{"\x7f", action_del_char}, /* DEL */ {"\x1b[D", action_left}, /* LEFT */ {"\x1bOC", action_right}, /* RIGHT */ {"\x1b[C", action_right}, /* RIGHT */ + {"\x1b[1~", action_beginning}, /* HOME */ + {"\x1b[4~", action_end}, /* END */ {"\x1b[A", action_prev}, /* UP */ {"\x1bOA", action_prev}, /* UP */ {"\x1b[B", action_next}, /* DOWN */ -- cgit v1.2.3 From 70d2f4007224a5d9da1929c6d662b65aa16af014 Mon Sep 17 00:00:00 2001 From: Tianyu Geng Date: Mon, 19 Mar 2018 20:53:28 -0700 Subject: Fix home/end support on Mac --- src/tty_interface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tty_interface.c b/src/tty_interface.c index 3a063f9..b4f6c61 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -280,7 +280,9 @@ static const keybinding_t keybindings[] = {{"\x7f", action_del_char}, /* DEL */ {"\x1bOC", action_right}, /* RIGHT */ {"\x1b[C", action_right}, /* RIGHT */ {"\x1b[1~", action_beginning}, /* HOME */ + {"\x1b[H", action_beginning}, /* HOME */ {"\x1b[4~", action_end}, /* END */ + {"\x1b[F", action_end}, /* END */ {"\x1b[A", action_prev}, /* UP */ {"\x1bOA", action_prev}, /* UP */ {"\x1b[B", action_next}, /* DOWN */ -- cgit v1.2.3