summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/term.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/term.sh b/src/term.sh
index b96d555..b3108ae 100644
--- a/src/term.sh
+++ b/src/term.sh
@@ -283,21 +283,33 @@ _term_get_escseq()
'B') key=KEY_DOWN;;
'C') key=KEY_RIGHT;;
'D') key=KEY_LEFT;;
- 'H') key=KEY_HOME;;
- 'F') key=KEY_END;;
+ 'H') key=KEY_HOME;; # XTerm
+ 'F') key=KEY_END;; # XTerm
+ '1')
+ _term_get_byte
+ case "${term_byte}" in
+ '~') key=KEY_HOME;; # Linux
+ esac
+ ;;
'3')
_term_get_byte
case "${term_byte}" in
'~') key=KEY_DEL;;
esac
;;
+ '4')
+ _term_get_byte
+ case "${term_byte}" in
+ '~') key=KEY_END;; # Linux
+ esac
+ ;;
esac
;;
'O')
_term_get_byte
case "${term_byte}" in
- 'H') key=KEY_HOME;;
- 'F') key=KEY_END;;
+ 'H') key=KEY_HOME;; # VTE
+ 'F') key=KEY_END;; # VTE
esac
;;
esac