Skip to content
Snippets Groups Projects
Commit 4d669128 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Enable raw input mode when prompting for backspace key

Since the user we're editing here is not a pointer to the current user,
changing the USER_SWAP_DELETE settings before this prompt doesn't prevent
the DEL->BS translation from happening. Raw input mode does.

Without this change, it would appear the user's backspace key would toggle
between sending either ^H or DEL for the backspace key (for terminals that
actually send DEL).
parent a910575e
No related branches found
No related tags found
No related merge requests found
......@@ -431,7 +431,9 @@ while(bbs.online && !js.terminated) {
&& !(thisuser.settings & (USER_PETSCII | USER_SWAP_DELETE))
&& bbs.online) {
console.putmsg(bbs.text(bbs.text.HitYourBackspaceKey));
console.status |= CON_RAW_IN;
var key = console.getkey(K_CTRLKEYS);
console.status &= ~CON_RAW_IN;
console.putmsg(format(bbs.text(bbs.text.CharacterReceivedFmt), ascii(key), ascii(key)));
if (key == '\b')
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment