diff options
| author | Alan Third | 2017-12-22 12:27:05 +0000 |
|---|---|---|
| committer | Alan Third | 2018-01-01 13:32:49 +0000 |
| commit | 4e20c8f22031d6f19e70f0dfcb11c09606446d88 (patch) | |
| tree | 3fe63fabc1b40cf4841a29a24e193a70b1c74421 /src | |
| parent | 30d6c31301a348fa2d227af8e490ebe41616a242 (diff) | |
| download | emacs-4e20c8f22031d6f19e70f0dfcb11c09606446d88.tar.gz emacs-4e20c8f22031d6f19e70f0dfcb11c09606446d88.zip | |
Fix menu keyboard shortcuts on macOS (Bug#29595)
* src/nsmenu.m (addItemWithWidgetValue)[NS_IMPL_COCOA]: It looks like
macOS 10.13 no longer ignores long modifier strings, so explicitly use
an empty string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsmenu.m | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m index 20b4e58b479..604adcf40b5 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -643,14 +643,23 @@ x_activate_menubar (struct frame *f) | |||
| 643 | 643 | ||
| 644 | keyEq = [self parseKeyEquiv: wv->key]; | 644 | keyEq = [self parseKeyEquiv: wv->key]; |
| 645 | #ifdef NS_IMPL_COCOA | 645 | #ifdef NS_IMPL_COCOA |
| 646 | /* macOS just ignores modifier strings longer than one character */ | 646 | /* macOS mangles modifier strings longer than one character. */ |
| 647 | if (keyEquivModMask == 0) | 647 | if (keyEquivModMask == 0) |
| 648 | title = [title stringByAppendingFormat: @" (%@)", keyEq]; | 648 | { |
| 649 | title = [title stringByAppendingFormat: @" (%@)", keyEq]; | ||
| 650 | item = [self addItemWithTitle: (NSString *)title | ||
| 651 | action: @selector (menuDown:) | ||
| 652 | keyEquivalent: @""]; | ||
| 653 | } | ||
| 654 | else | ||
| 655 | { | ||
| 656 | #endif | ||
| 657 | item = [self addItemWithTitle: (NSString *)title | ||
| 658 | action: @selector (menuDown:) | ||
| 659 | keyEquivalent: keyEq]; | ||
| 660 | #ifdef NS_IMPL_COCOA | ||
| 661 | } | ||
| 649 | #endif | 662 | #endif |
| 650 | |||
| 651 | item = [self addItemWithTitle: (NSString *)title | ||
| 652 | action: @selector (menuDown:) | ||
| 653 | keyEquivalent: keyEq]; | ||
| 654 | [item setKeyEquivalentModifierMask: keyEquivModMask]; | 663 | [item setKeyEquivalentModifierMask: keyEquivModMask]; |
| 655 | 664 | ||
| 656 | [item setEnabled: wv->enabled]; | 665 | [item setEnabled: wv->enabled]; |