mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Normalize shortcut to draw in Quick Actions bar (fix #1557)
This commit is contained in:
parent
61d8898ba5
commit
e261cac1fd
@ -6,6 +6,7 @@
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that last letters of some script name with a period could be wrongly interpreted as shortcut keys.
|
||||
- Fix an issue that the Quick Actions bar dropped to draw the Shift key in some shortcuts.
|
||||
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ private extension NSMenuItem {
|
||||
|
||||
} else if self.isEnabled, !self.isHidden, let action = self.action, !ActionCommand.unsupportedActions.contains(action) {
|
||||
return [ActionCommand(kind: (action == #selector(ScriptManager.launchScript)) ? .script : .command,
|
||||
title: self.actionTitle, paths: [], shortcut: self.shortcut, action: action, tag: self.tag,
|
||||
title: self.actionTitle, paths: [], shortcut: self.shortcut?.normalized, action: action, tag: self.tag,
|
||||
representedObject: self.representedObject)]
|
||||
|
||||
} else {
|
||||
|
@ -449,7 +449,7 @@ extension Shortcut: Equatable {
|
||||
/// Normalize Shortcut by preferring to use the Shift key rather than an upper key equivalent character.
|
||||
///
|
||||
/// According to the AppKit's specification, the Command-Shift-c and Command-C should be considered to be identical.
|
||||
private var normalized: Self {
|
||||
var normalized: Self {
|
||||
|
||||
let needsShift = self.keyEquivalent.last?.isUppercase == true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user