summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXPrivate.h
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-05-05 16:03:41 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-05-05 16:03:41 (GMT)
commit2ba6bd562b5ebdda1b68d6ea1e00defe7486801f (patch)
treee91e8e4bbf7f74308b7438dfca63d7074578e61c /macosx/tkMacOSXPrivate.h
parentc63f235278a78cc9b3f29c872814be8d1553fabf (diff)
downloadtk-2ba6bd562b5ebdda1b68d6ea1e00defe7486801f.zip
tk-2ba6bd562b5ebdda1b68d6ea1e00defe7486801f.tar.gz
tk-2ba6bd562b5ebdda1b68d6ea1e00defe7486801f.tar.bz2
More comment edits
Diffstat (limited to 'macosx/tkMacOSXPrivate.h')
-rw-r--r--macosx/tkMacOSXPrivate.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 7903c6a..384a0df 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -129,13 +129,16 @@
typedef struct keycode_v_t {
unsigned keychar: 22; /* UCS-32 character */
- unsigned o_s: 2; /* state of Option and Shift keys */
- unsigned virtual: 8; /* virtual keycode */
+ unsigned o_s: 2; /* State of Option and Shift keys. */
+ unsigned virtual: 8; /* 8-bit virtual keycode - identifies a key. */
} keycode_v;
typedef struct keycode_x_t {
unsigned keychar: 22; /* UCS-32 character */
- unsigned xvirtual: 10; /* lookup key for key maps */
+ unsigned xvirtual: 10; /* Combines o_s and virtual. This 10-bit integer
+ * is used as a key for looking up the character
+ * produced when pressing a key with a particular
+ * Shift and Option modifier state. */
} keycode_x;
typedef union MacKeycode_t {
@@ -150,7 +153,7 @@ typedef union MacKeycode_t {
*/
#define ON_KEYPAD(virtual) ((virtual >= 0x41) && (virtual <= 0x5C))
-#define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar != 0x7f) &&\
+#define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar != 0x7f) && \
((keychar < 0xF700) || keychar >= 0xF8FF))
/*
@@ -169,17 +172,17 @@ typedef union MacKeycode_t {
(state & Mod2Mask ? INDEX_OPTION : 0))
/*
- * Special values for the virtual bitfield.
+ * Special values for the virtual bitfield. Actual virtual keycodes are < 128.
*/
-#define NO_VIRTUAL 0xFF /* No virtual keycode could be deduced. */
+#define NO_VIRTUAL 0xFF /* Not generated by a key or the NSText"InputClient. */
#define REPLACEMENT_VIRTUAL 0x80 /* A BMP char sent by the NSTextInputClient. */
#define NON_BMP_VIRTUAL 0x81 /* A non-BMP char sent by the NSTextInputClient. */
/*
- * A special character used in the keycode for modifier KeyPress or KeyRelease
- * XEvents. It is near the end of the private-use range but different from the
- * UniChar 0xF8FF which Apple uses for their logo character.
+ * A special character is used in the keycode for simulated modifier KeyPress
+ * or KeyRelease XEvents. It is near the end of the private-use range but
+ * different from the UniChar 0xF8FF which Apple uses for their logo character.
*/
#define MOD_KEYCHAR 0xF8FE