diff options
author | culler <culler> | 2020-04-26 03:07:31 (GMT) |
---|---|---|
committer | culler <culler> | 2020-04-26 03:07:31 (GMT) |
commit | 551859ab46ad0d92f0097687308150befab95217 (patch) | |
tree | 34bc5093e9d7fc6f8d02e9b5749ecb8da430bc9b /macosx/tkMacOSXKeyEvent.c | |
parent | 1b713f4b0328104285771bb1ddd781feacebea38 (diff) | |
download | tk-551859ab46ad0d92f0097687308150befab95217.zip tk-551859ab46ad0d92f0097687308150befab95217.tar.gz tk-551859ab46ad0d92f0097687308150befab95217.tar.bz2 |
Figured out how to make empty trans_chars, and dealt with menu and control characters.
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 1b3d8a9..109c774 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -211,10 +211,12 @@ static void setXEventPoint(XEvent *xEvent, Tk_Window tkwin, NSWindow *w); */ setXEventPoint(&xEvent, tkwin, w); - if (keychar < 0xF700) { + if ((keychar >= 0x20) && (keychar < 0xF700)) { length = TkUniCharToUtf(keychar, xEvent.xkey.trans_chars); + xEvent.xkey.trans_chars[length] = 0; + } else { + xEvent.xkey.nbytes = 0; } - xEvent.xkey.trans_chars[length] = 0; /* * Finally we can queue the XEvent, inserting a KeyRelease before a |