hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/kernel/input.rv
diff options
context:
space:
mode:
authorlung <git@lung.fyi>2026-10-08 02:58:13 +0300
committerlung <git@lung.fyi>2026-10-08 02:58:14 +0300
commit2219f9b60fb3cd42991bece1fa55a503862d26a8 (patch)
treeca3830c0673bda6e458631fced2462214ad5e14d /kernel/input.rv
parent96aa6d3f0bfcc437d840cd338c92257ae58942f2 (diff)
/etc/profile and C-BS, start a little README.md handbook
Diffstat (limited to 'kernel/input.rv')
-rw-r--r--kernel/input.rv8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/input.rv b/kernel/input.rv
index ed0f4f7..139edf0 100644
--- a/kernel/input.rv
+++ b/kernel/input.rv
@@ -34,7 +34,13 @@ fn decode_key(code) do
if code == 0x9d do shell.ctrl = :false return :nil end # ctrl up
if code >= 128 return :nil # other releases
if code == 28 return "\n" # enter
- if code == 14 return "\x08" # backspace
+ if code == 14 do
+ if shell.ctrl do
+ return "\x7f"
+ end
+
+ return "\x08"
+ end # backspace (ctrl: word erase)
if code < 2 return :nil
if code >= KEYMAP:len() return :nil
const character = if shell.shift KEYMAP_SHIFT[code] else KEYMAP[code]