summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_cocoa.mm')
-rw-r--r--src/Fl_cocoa.mm13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 282bc4ecc..5cdcb9087 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2577,10 +2577,8 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
}
NSUInteger mods = [theEvent modifierFlags];
NSString *pure = [theEvent charactersIgnoringModifiers];
- // detect Ctrl+Command+Space or Function+e to open character palette
- if ( (( (mods & NSEventModifierFlagControl) && (mods & NSEventModifierFlagCommand) &&
- !(mods & (NSEventModifierFlagShift|NSEventModifierFlagOption)) && [pure isEqualToString:@" "] ) ) ||
- ( (mods & NSEventModifierFlagFunction) && [pure isEqualToString:@"e"] ) ) {
+ // detect Function+e to open character palette
+ if ((mods & NSEventModifierFlagFunction) && [pure isEqualToString:@"e"] ) {
[NSApp orderFrontCharacterPalette:self];
return YES;
}
@@ -2596,6 +2594,13 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
[FLView prepareEtext:s];
Fl::compose_state = 0;
handled = Fl::handle(FL_KEYBOARD, w);
+ if (!handled) {
+ // detect Ctrl+Command+Space to open character palette, if not used before as shortcut
+ if ( (mods & NSEventModifierFlagControl) && (mods & NSEventModifierFlagCommand) &&
+ !(mods & (NSEventModifierFlagShift|NSEventModifierFlagOption)) && [pure isEqualToString:@" "] ) {
+ [NSApp orderFrontCharacterPalette:self];
+ }
+ }
}
else {
in_key_event = YES;