summaryrefslogtreecommitdiffstats
path: root/generic/tkInt.decls
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-02-09 02:13:43 (GMT)
committerhobbs <hobbs@noemail.net>2000-02-09 02:13:43 (GMT)
commit0687daa1b47e0edfd6d967345fb93037c812569b (patch)
treeff6a4c8b0268173d5f2e3e61b6a03e90baae0ea8 /generic/tkInt.decls
parent6425b8563000a38896957048e230b624e7787221 (diff)
downloadtk-0687daa1b47e0edfd6d967345fb93037c812569b.zip
tk-0687daa1b47e0edfd6d967345fb93037c812569b.tar.gz
tk-0687daa1b47e0edfd6d967345fb93037c812569b.tar.bz2
* generic/tk.decls:
* generic/tkBind.c: * generic/tkInt.decls: * generic/tkIntDecls.h: * generic/tkStubInit.c: * mac/tkMacKeyboard.c: * unix/tkUnixKey.c: * win/tkWinKey.c: Fix for keyboard handling of "dead" keys and caps lock from Peter Spjuth. Split functions into platform specific files: Static functions GetKeySym(), SetKeycodeAndState() and InitKeymapInfo() from tkBind.c moved into platform files tkWinKey.c tkUnixKey.c and tkMacKeyboard.c. GetKeySym() and SetKeycodeAndState() renamed to Tkp* and made public (as private functions) in tkInt.decls. Step 2, fixes in tkWinKey.c New static function: KeycodeToKeysym(), based on XKeycodeToKeysym() but with different arguments, and a lot of improvements. TkpGetString() changed to use KeycodeToKeysym() + other fixes. TkpGetKeySym() changed to use KeycodeToKeysym() + other fixes. InitKeymapInfo() changed to use KeycodeToKeysym(). TkpSetKeycodeAndState() rewritten, mostly by copying code from XKeysymToKeycode(). XKeycodeToKeysym() rewritten. Preferably it should be removed. EXPLANATION: The main problem is ToAscii() which has a lot of side effects, and also that XKeycodeToKeysym() is not provided enough input to do a proper job. The changes' main goal is to avoid calling ToAscii() if not necessary, and to provide it with as correct information as possible when called. Also some attempts to clean up what ToAscii() did are done. See the code for details. BUGS FIXED: Typing shifted (and AltGr) dead keys did not work. Keyboard lock lamps did not work on Win98. Events regarding AltGr-keys behaved badly. Example: On a Swedish keyboard, $ is typed with AltGr-4. That keyboard event would get the keysym '4' not 'dollar'. Also, doing [event generete . <Key-dollar>] would send keysym '4'. Translation to ascii in TkpGetString did not handle return and tab correctly. I.e. [event generate . <Key-Return>] gave wrong %A FossilOrigin-Name: d02d3aa39ada2efb32afa0e92f136ec34d8646d6
Diffstat (limited to 'generic/tkInt.decls')
-rw-r--r--generic/tkInt.decls12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 2c7def8..6a34794 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -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: tkInt.decls,v 1.14 2000/01/12 11:45:03 hobbs Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.15 2000/02/09 02:13:50 hobbs Exp $
library tk
@@ -619,6 +619,16 @@ declare 136 generic {
void TkSetFocusWin (TkWindow *winPtr, int force)
}
+declare 137 generic {
+ void TkpSetKeycodeAndState (Tk_Window tkwin, KeySym keySym, \
+ XEvent *eventPtr)
+}
+
+declare 138 generic {
+ KeySym TkpGetKeySym (TkDisplay *dispPtr, XEvent *eventPtr)
+}
+
+
##############################################################################
# Define the platform specific internal Tcl interface. These functions are