summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyboard.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-04-27 01:28:18 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-04-27 01:28:18 (GMT)
commit9baf680ce5583741fa38bb80544776a38b263cee (patch)
treea30931a216633c9ea0a6a296b20fa17d9ce1dd36 /macosx/tkMacOSXKeyboard.c
parent3d5553c792d681627037b1c7fb47a5884e9fa55d (diff)
downloadtk-9baf680ce5583741fa38bb80544776a38b263cee.zip
tk-9baf680ce5583741fa38bb80544776a38b263cee.tar.gz
tk-9baf680ce5583741fa38bb80544776a38b263cee.tar.bz2
Deal with Apple's Backspace key.
Diffstat (limited to 'macosx/tkMacOSXKeyboard.c')
-rw-r--r--macosx/tkMacOSXKeyboard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index 0d023ff..9c0eb84 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -16,7 +16,9 @@
#include "tkMacOSXConstants.h"
#include "tkMacOSXKeysyms.h"
-#define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar < 0xF700))
+#define IS_PRINTABLE(keychar) ((keychar >= 0x20) && \
+ (keychar != 0x7f) && \
+ (keychar < 0xF700))
#define ON_KEYPAD(virtual) ((virtual >= 0x41) && (virtual <= 0x5C))
#define VIRTUAL_MAX 0x7F
#define MAC_KEYCHAR_MASK 0xFFFF