summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyboard.c
diff options
context:
space:
mode:
authorculler <culler>2020-04-26 03:07:31 (GMT)
committerculler <culler>2020-04-26 03:07:31 (GMT)
commit551859ab46ad0d92f0097687308150befab95217 (patch)
tree34bc5093e9d7fc6f8d02e9b5749ecb8da430bc9b /macosx/tkMacOSXKeyboard.c
parent1b713f4b0328104285771bb1ddd781feacebea38 (diff)
downloadtk-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/tkMacOSXKeyboard.c')
-rw-r--r--macosx/tkMacOSXKeyboard.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index a628953..00b8715 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -566,10 +566,12 @@ TkpSetKeycodeAndState(
* Set trans_chars for keychars outside of the private-use range.
*/
- if (keychar < 0xF700) {
+ if ((keychar >= 0x20) && (keychar < 0xF700)) {
length = TkUniCharToUtf(keychar, eventPtr->xkey.trans_chars);
+ eventPtr->xkey.trans_chars[length] = 0;
+ } else {
+ eventPtr->xkey.nbytes = 0;
}
- eventPtr->xkey.trans_chars[length] = 0;
}
}