« get me outta code hell

Keyboard functions for Home, Insert, Delete, End - tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-09-15 18:37:50 -0300
committerFlorrie <towerofnix@gmail.com>2019-09-15 18:37:50 -0300
commit3b94a56ecad81980448cb1f7f78acd8e58ab0c67 (patch)
treee381e25f01ebf1e23cf9a6c3bc675a0b6ed6b069
parentf3974627bddb9f62132bf54bde3a66c87dbf7b23 (diff)
Keyboard functions for Home, Insert, Delete, End
-rw-r--r--util/telchars.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/telchars.js b/util/telchars.js
index 5425468..3ae07cb 100644
--- a/util/telchars.js
+++ b/util/telchars.js
@@ -81,6 +81,10 @@ const telchars = {
   isControlRight: buf => compareBufStr(buf, '\x1b[1;5C'),
   isControlLeft: buf => compareBufStr(buf, '\x1b[1;5D'),
 
+  isHome: buf => compareBufStr(buf, '\x1b[1~'),
+  isInsert: buf => compareBufStr(buf, '\x1b[2~'),
+  isDelete: buf => compareBufStr(buf, '\x1b[3~'),
+  isEnd: buf => compareBufStr(buf, '\x1b[4~'),
   isPageUp: buf => compareBufStr(buf, '\x1b[5~'),
   isPageDown: buf => compareBufStr(buf, '\x1b[6~'),