mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-12 23:54:38 +02:00
* Separate out DEL vs backspace when possible for ANSI-BBS terminals. *nix terminals don't send us what we need, but deal with it.
* Handle delete in MultiLineTextEditView. More to come soon!
This commit is contained in:
parent
47551b1803
commit
e37409e9b5
2 changed files with 39 additions and 18 deletions
|
@ -306,7 +306,21 @@ function Client(input, output) {
|
|||
key.name = 'line feed';
|
||||
} else if('\t' === s) {
|
||||
key.name = 'tab';
|
||||
} else if ('\b' === s || '\x7f' === s || '\x1b\x7f' === s || '\x1b\b' === s) {
|
||||
} else if('\x7f' === s) {
|
||||
//
|
||||
// Backspace vs delete is a crazy thing, especially in *nix.
|
||||
// - ANSI-BBS uses 0x7f for DEL
|
||||
// - xterm et. al clients send 0x7f for backspace... ugg.
|
||||
//
|
||||
// See http://www.hypexr.org/linux_ruboff.php
|
||||
// And a great discussion @ https://lists.debian.org/debian-i18n/1998/04/msg00015.html
|
||||
//
|
||||
if(self.term.isNixTerm()) {
|
||||
key.name = 'backspace';
|
||||
} else {
|
||||
key.name = 'delete';
|
||||
}
|
||||
} else if ('\b' === s || '\x1b\x7f' === s || '\x1b\b' === s) {
|
||||
// backspace, CTRL-H
|
||||
key.name = 'backspace';
|
||||
key.meta = ('\x1b' === s.charAt(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue