mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* fhandler.h (class dev_console): Add backspace_keycode member.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize backspace_keycode with CERASE. (fhandler_console::read): Return dev_state->backspace_keycode if the backspace key is pressed. (fhandler_console::char_command): Implement DECBKM escape sequence.
This commit is contained in:
parent
e4f6022e52
commit
0250709234
@ -1,3 +1,12 @@
|
|||||||
|
2010-04-11 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler.h (class dev_console): Add backspace_keycode member.
|
||||||
|
* fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
|
||||||
|
backspace_keycode with CERASE.
|
||||||
|
(fhandler_console::read): Return dev_state->backspace_keycode if the
|
||||||
|
backspace key is pressed.
|
||||||
|
(fhandler_console::char_command): Implement DECBKM escape sequence.
|
||||||
|
|
||||||
2010-04-10 Christopher Faylor <me+cygwin@cgf.cx>
|
2010-04-10 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* fhandler_console.cc (fhandler_console::read): Default to sending
|
* fhandler_console.cc (fhandler_console::read): Default to sending
|
||||||
|
@ -924,6 +924,7 @@ class dev_console
|
|||||||
bool iso_2022_G1;
|
bool iso_2022_G1;
|
||||||
bool alternate_charset_active;
|
bool alternate_charset_active;
|
||||||
bool metabit;
|
bool metabit;
|
||||||
|
char backspace_keycode;
|
||||||
|
|
||||||
char my_title_buf [TITLESIZE + 1];
|
char my_title_buf [TITLESIZE + 1];
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ fhandler_console::get_tty_stuff (int flags = 0)
|
|||||||
if (PRIMARYLANGID (LOWORD (GetKeyboardLayout (0))) == LANG_ENGLISH)
|
if (PRIMARYLANGID (LOWORD (GetKeyboardLayout (0))) == LANG_ENGLISH)
|
||||||
dev_state->meta_mask |= RIGHT_ALT_PRESSED;
|
dev_state->meta_mask |= RIGHT_ALT_PRESSED;
|
||||||
dev_state->set_default_attr ();
|
dev_state->set_default_attr ();
|
||||||
|
dev_state->backspace_keycode = CERASE;
|
||||||
shared_console_info->tty_min_state.sethwnd ((HWND) INVALID_HANDLE_VALUE);
|
shared_console_info->tty_min_state.sethwnd ((HWND) INVALID_HANDLE_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,10 +375,9 @@ 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;
|
||||||
|
|
||||||
/* Send the VERASE character from the terminal settings as backspace keycode. */
|
|
||||||
if (input_rec.Event.KeyEvent.wVirtualScanCode == 14)
|
if (input_rec.Event.KeyEvent.wVirtualScanCode == 14)
|
||||||
{
|
{
|
||||||
char c = ti.c_cc[VERASE] ?: CERASE;
|
char c = dev_state->backspace_keycode;
|
||||||
nread = 0;
|
nread = 0;
|
||||||
if (control_key_state & ALT_PRESSED) {
|
if (control_key_state & ALT_PRESSED) {
|
||||||
if (dev_state->metabit)
|
if (dev_state->metabit)
|
||||||
@ -1398,6 +1398,10 @@ fhandler_console::char_command (char c)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 67: /* DECBKM ("DEC Backarrow Key Mode") */
|
||||||
|
dev_state->backspace_keycode = (c == 'h' ? CTRL('H') : CERASE);
|
||||||
|
break;
|
||||||
|
|
||||||
case 1000: /* Mouse tracking */
|
case 1000: /* Mouse tracking */
|
||||||
dev_state->use_mouse = (c == 'h') ? 1 : 0;
|
dev_state->use_mouse = (c == 'h') ? 1 : 0;
|
||||||
syscall_printf ("mouse support set to mode %d", dev_state->use_mouse);
|
syscall_printf ("mouse support set to mode %d", dev_state->use_mouse);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user