aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
Diffstat (limited to 'pugl')
-rw-r--r--pugl/pugl_osx.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 5ac2e30..2a534b3 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -186,8 +186,8 @@ getModifiers(unsigned modifierFlags)
- (void) keyDown:(NSEvent*)event
{
- if (view->keyboardFunc) {
- NSString* chars = [event characters];;
+ if (view->keyboardFunc && !(view->ignoreKeyRepeat && [event isARepeat])) {
+ NSString* chars = [event characters];
view->mods = getModifiers([event modifierFlags]);
view->keyboardFunc(view, true, [chars characterAtIndex:0]);
}
@@ -196,7 +196,7 @@ getModifiers(unsigned modifierFlags)
- (void) keyUp:(NSEvent*)event
{
if (view->keyboardFunc) {
- NSString* chars = [event characters];;
+ NSString* chars = [event characters];
view->mods = getModifiers([event modifierFlags]);
view->keyboardFunc(view, false, [chars characterAtIndex:0]);
}