Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-07-29 23:07:15 +0400
committerChristopher Faylor <me@cgf.cx>2000-07-29 23:07:15 +0400
commit751669bbb0d859e9de871c6964c8ae8bab32f3d7 (patch)
tree822185f5a3cf19b3c1167d0090ae41d20ff6fa30 /winsup/cygwin/fhandler_console.cc
parentaf5153a036ede09a399ecd1a241bbba02b83d3e8 (diff)
* fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode if it
is not detected and it is less than ' '.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 7e266ab8d..5ee8e9a58 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1297,6 +1297,8 @@ static struct {
{VK_NUMPAD5, {"\033[G", NULL, NULL, NULL}},
{VK_CLEAR, {"\033[G", NULL, NULL, NULL}},
{'6', {NULL, NULL, "\036", NULL}},
+ /* FIXME: Should this be \033OQ? */
+ {VK_DIVIDE, {"/", "/", "/", "/"}},
{0, {"", NULL, NULL, NULL}}
};
@@ -1322,6 +1324,13 @@ get_nonascii_key (INPUT_RECORD& input_rec)
if (input_rec.Event.KeyEvent.wVirtualKeyCode == keytable[i].vk)
return keytable[i].val[modifier_index];
+ if (input_rec.Event.KeyEvent.wVirtualKeyCode < ' ')
+ {
+ /* FIXME: Probably not thread-safe */
+ static char buf[2];
+ buf[0] = input_rec.Event.KeyEvent.wVirtualKeyCode;
+ return buf;
+ }
return NULL;
}