diff options
author | culler <culler> | 2021-04-30 22:15:46 (GMT) |
---|---|---|
committer | culler <culler> | 2021-04-30 22:15:46 (GMT) |
commit | e62257d74672018ef6919a2993c67fc815ba9ab8 (patch) | |
tree | 80ed72b96540578cca5b70be7847a5d34a179c74 /macosx/tkMacOSXKeyEvent.c | |
parent | a723a9e97cc86c5cbee7c26aca2d344ad18c12a1 (diff) | |
download | tk-e62257d74672018ef6919a2993c67fc815ba9ab8.zip tk-e62257d74672018ef6919a2993c67fc815ba9ab8.tar.gz tk-e62257d74672018ef6919a2993c67fc815ba9ab8.tar.bz2 |
Fix [2ecb09d118]: Aqua ignores preferences setting to disable key repeats.
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index a46a646..cafc716 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -258,13 +258,15 @@ static NSUInteger textInputModifiers; /* * Finally we can queue the XEvent, inserting a KeyRelease before a - * repeated KeyPress. + * repeated KeyPress unless key repeats have been disabled in the + * system preferences. */ if (type == NSKeyDown && [theEvent isARepeat]) { - - xEvent.xany.type = KeyRelease; - Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL); + if ([NSEvent keyRepeatDelay] > 0) { + xEvent.xany.type = KeyRelease; + Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL); + } xEvent.xany.type = KeyPress; } Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL); |