summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyboard.c
diff options
context:
space:
mode:
authorcc_benny <cc_benny>2004-01-24 18:16:09 (GMT)
committercc_benny <cc_benny>2004-01-24 18:16:09 (GMT)
commit9d2ef7a46c28f65d45756cfb6d68dd742cf011b3 (patch)
tree06e750a4a62cb81fcef390e2e82185f6fceb3f33 /macosx/tkMacOSXKeyboard.c
parent24d17495d4fc15564da6c171dd610ea1af238931 (diff)
downloadtk-9d2ef7a46c28f65d45756cfb6d68dd742cf011b3.zip
tk-9d2ef7a46c28f65d45756cfb6d68dd742cf011b3.tar.gz
tk-9d2ef7a46c28f65d45756cfb6d68dd742cf011b3.tar.bz2
* (TkpSetKeycodeAndState): Add setting of xkey.trans_chars.
Now event.test works except event-double-click-drag-1.1.
Diffstat (limited to 'macosx/tkMacOSXKeyboard.c')
-rw-r--r--macosx/tkMacOSXKeyboard.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index 7832fab..7cfa6fa 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.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: tkMacOSXKeyboard.c,v 1.12 2003/12/15 19:32:17 cc_benny Exp $
+ * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.13 2004/01/24 18:16:09 cc_benny Exp $
*/
#include "tkInt.h"
@@ -588,7 +588,8 @@ NB: Keep this commented code for a moment for reference.
* Results:
* Fills an XEvent, sets the member xkey.keycode with a keycode
* formatted the same as XKeysymToKeycode and the member xkey.state with
- * the modifiers implied by the keysym.
+ * the modifiers implied by the keysym. Also fills in xkey.trans_chars,
+ * so that the actual characters can be retrieved later.
*
* Side effects:
* None.
@@ -625,6 +626,13 @@ TkpSetKeycodeAndState(
if (optionKey & macKeycode) {
eventPtr->xkey.state |= OPTION_MASK;
}
+
+ if (keysym <= LATIN1_MAX) {
+ eventPtr->xkey.trans_chars[0] = keysym;
+ eventPtr->xkey.trans_chars[1] = 0;
+ } else {
+ eventPtr->xkey.trans_chars[0] = 0;
+ }
}
}