diff options
author | hobbs <hobbs> | 1999-10-30 09:36:38 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-10-30 09:36:38 (GMT) |
commit | f61ee0fa538d411a01f7374d11f9795fc1f6772e (patch) | |
tree | 0c4363d32eb4e0b1081db158a3203051e81d749d | |
parent | d0c161bcc936371cfa38d7c74a76aefa41236c35 (diff) | |
download | tk-f61ee0fa538d411a01f7374d11f9795fc1f6772e.zip tk-f61ee0fa538d411a01f7374d11f9795fc1f6772e.tar.gz tk-f61ee0fa538d411a01f7374d11f9795fc1f6772e.tar.bz2 |
* unix/configure.in:
* README:
* win/configure.in:
* generic/tk.h: updated to patchlevel 2
* win/tkWinKey.c: fixed XKeysymToKeycode to handle mapping of
symbolic keysyms (Left, Home, ...) with event generate
-rw-r--r-- | win/configure.in | 4 | ||||
-rw-r--r-- | win/tkWinKey.c | 25 |
2 files changed, 15 insertions, 14 deletions
diff --git a/win/configure.in b/win/configure.in index 3b3bb95..ea63a82 100644 --- a/win/configure.in +++ b/win/configure.in @@ -2,14 +2,14 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.8.2.2 1999/09/30 21:26:01 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.8.2.3 1999/10/30 09:36:38 hobbs Exp $ AC_INIT(../generic/tk.h) TK_VERSION=8.2 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=2 -TK_PATCH_LEVEL=".1" +TK_PATCH_LEVEL=".2" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #-------------------------------------------------------------------- diff --git a/win/tkWinKey.c b/win/tkWinKey.c index 1ef7958..dc805a3 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinKey.c,v 1.4 1999/04/16 01:51:52 stanton Exp $ + * RCS: @(#) $Id: tkWinKey.c,v 1.4.6.1 1999/10/30 09:36:39 hobbs Exp $ */ #include "tkWinInt.h" @@ -228,16 +228,11 @@ XKeysymToKeycode(display, keysym) Keys* key; SHORT result; - if (keysym >= 0x20) { - result = VkKeyScan((char) keysym); - if (result != -1) { - return (KeyCode) (result & 0xff); - } - } - /* - * Couldn't map the character to a virtual keycode, so do a - * table lookup. + * We check our private map first for a virtual keycode, + * as VkKeyScan will return values that don't map to X + * for the "extended" Syms. This may be due to just casting + * problems below, but this works. */ for (key = keymap; key->keycode != 0; key++) { @@ -245,6 +240,14 @@ XKeysymToKeycode(display, keysym) return key->keycode; } } + + if (keysym >= 0x20) { + result = VkKeyScan((char) keysym); + if (result != -1) { + return (KeyCode) (result & 0xff); + } + } + return 0; } @@ -354,5 +357,3 @@ XKeysymToString(keysym) { return NULL; } - - |