From acb8c05987c72ceca423acf2f5761a50f641d1f8 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 25 Aug 2019 13:12:27 -0300 Subject: Add key detection functions for control+arrow keys --- util/telchars.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util/telchars.js') diff --git a/util/telchars.js b/util/telchars.js index 68294bf..5425468 100644 --- a/util/telchars.js +++ b/util/telchars.js @@ -76,6 +76,11 @@ const telchars = { isShiftRight: buf => compareBufStr(buf, '\x1b[1;2C'), isShiftLeft: buf => compareBufStr(buf, '\x1b[1;2D'), + isControlUp: buf => compareBufStr(buf, '\x1b[1;5A'), + isControlDown: buf => compareBufStr(buf, '\x1b[1;5B'), + isControlRight: buf => compareBufStr(buf, '\x1b[1;5C'), + isControlLeft: buf => compareBufStr(buf, '\x1b[1;5D'), + isPageUp: buf => compareBufStr(buf, '\x1b[5~'), isPageDown: buf => compareBufStr(buf, '\x1b[6~'), -- cgit 1.3.0-6-gf8a5