mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
webterm: send simple keystrokes simply
%txt should be reserved for chunks of pasted text and other non-keystroke text inputs. Perhaps at a later point in time we'll handle paste events explicitly, letting this be more accurate.
This commit is contained in:
parent
2d3e803704
commit
dc81adb735
@ -50,7 +50,7 @@ const readInput = (term: Terminal, e: string): Belt[] => {
|
||||
//
|
||||
if (c >= 32 && c !== 127) {
|
||||
strap += e[0];
|
||||
e = e.slice(1);
|
||||
e = e.slice(1); //TODO revisit wrt (list @c) & unicode characters
|
||||
continue;
|
||||
} else if ('' !== strap) {
|
||||
belts.push({ txt: strap.split('') });
|
||||
@ -115,7 +115,11 @@ const readInput = (term: Terminal, e: string): Belt[] => {
|
||||
e = e.slice(1);
|
||||
}
|
||||
if ('' !== strap) {
|
||||
belts.push({ txt: strap.split('') });
|
||||
if (1 === strap.length) {
|
||||
belts.push(strap);
|
||||
} else {
|
||||
belts.push({ txt: strap.split('') });
|
||||
}
|
||||
strap = '';
|
||||
}
|
||||
return belts;
|
||||
|
Loading…
Reference in New Issue
Block a user