aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/macosx/native/sun/awt/AWTView.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/macosx/native/sun/awt/AWTView.m b/src/macosx/native/sun/awt/AWTView.m
index 71bbbfbd0c..e3b6d8ec0d 100644
--- a/src/macosx/native/sun/awt/AWTView.m
+++ b/src/macosx/native/sun/awt/AWTView.m
@@ -363,6 +363,8 @@ AWT_ASSERT_APPKIT_THREAD;
[self deliverJavaKeyEventHelper: newEvent];
}
+static const int COCOA_KEYCODE_US_BACKSLASH = 44;
+
- (BOOL) performKeyEquivalent: (NSEvent *) event {
// French keyboard layouts invoke the method several times
@@ -371,7 +373,7 @@ AWT_ASSERT_APPKIT_THREAD;
// Current keyboard layout status call could be quite expensive.
// We assume that where are no keyboards that actually use
// the improper combination
- if ([event keyCode] == 44 && [[event characters] isEqual:@"+"]) {
+ if ([event keyCode] == COCOA_KEYCODE_US_BACKSLASH && [[event characters] isEqual:@"+"]) {
return 0;
}