* fhandler_console.cc (handler_console::read): Use the tty's VERASE character
as the backspace keycode.
This commit is contained in:
parent
14c622c6e3
commit
37520977df
|
@ -1,3 +1,8 @@
|
||||||
|
2009-12-25 Andy Koppe <andy.koppe@gmail.com>
|
||||||
|
|
||||||
|
* fhandler_console.cc (handler_console::read): Use the tty's VERASE
|
||||||
|
character as the backspace keycode.
|
||||||
|
|
||||||
2009-12-24 Corinna Vinschen <corinna@vinschen.de>
|
2009-12-24 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* path.cc (symlink_info::check): Set fileattr to
|
* path.cc (symlink_info::check): Set fileattr to
|
||||||
|
|
|
@ -375,13 +375,20 @@ fhandler_console::read (void *pv, size_t& buflen)
|
||||||
if (control_key_state & LEFT_ALT_PRESSED)
|
if (control_key_state & LEFT_ALT_PRESSED)
|
||||||
dev_state->nModifiers |= 8;
|
dev_state->nModifiers |= 8;
|
||||||
|
|
||||||
/* Adopt the linux standard of translating the backspace key to DEL
|
/* Send the VERASE character from the terminal settings as backspace keycode. */
|
||||||
except when ALT is pressed. */
|
|
||||||
if (input_rec.Event.KeyEvent.wVirtualScanCode == 14)
|
if (input_rec.Event.KeyEvent.wVirtualScanCode == 14)
|
||||||
{
|
{
|
||||||
toadd = (control_key_state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))
|
char c = ti.c_cc[VERASE];
|
||||||
? (dev_state->metabit ? "\377" : "\033\177") : "\177";
|
nread = 0;
|
||||||
nread = strlen (toadd);
|
if (control_key_state & ALT_PRESSED) {
|
||||||
|
if (dev_state->metabit)
|
||||||
|
c |= 0x80;
|
||||||
|
else
|
||||||
|
tmp[nread++] = '\e';
|
||||||
|
}
|
||||||
|
tmp[nread++] = c;
|
||||||
|
tmp[nread] = 0;
|
||||||
|
toadd = tmp;
|
||||||
}
|
}
|
||||||
/* Allow Ctrl-Space to emit ^@ */
|
/* Allow Ctrl-Space to emit ^@ */
|
||||||
else if (input_rec.Event.KeyEvent.wVirtualKeyCode == VK_SPACE
|
else if (input_rec.Event.KeyEvent.wVirtualKeyCode == VK_SPACE
|
||||||
|
|
Loading…
Reference in New Issue