Open Rinzwind opened 1 year ago
With the following reimplementation of #setUpShortcutTipForMenuItem
in CmdCommandActivator (not intended as a fix, only as a demonstration):
setUpShortcutTipForMenuItem: aMenuItemMorph
CmdShortcutActivation
activeInstancesFor: command class inContext: context
do: [ :shortcut |
| keyText regex |
keyText := shortcut keyCombination acceptVisitor: OSPlatform current shortcutPrinter.
regex := '(⇧)?(⌘)?([A-Z])' asRegex.
(regex matches: keyText) ifTrue: [
keyText := String streamContents: [ :stream |
(regex subexpression: 2) ifNotNil: [ stream nextPutAll: 'shift+' ].
(regex subexpression: 3) ifNotNil: [ stream nextPutAll: 'cmd+' ].
stream nextPutAll: (regex subexpression: 4) ] ].
aMenuItemMorph keyText: keyText ]
Some of the menu items that previously showed the keyboard shortcut in lower case are changed to show it in upper case:
Yes send a fix :)
Can't we modify the menu implementation so that it's the UI that ensure everything is in uppercase?
Within the context menus in the System Browser, the keyboard shortcuts are shown in a mixture of upper and lower case:
Build information: Pharo-12.0.0+build.328.sha.34ebfbe1a25f4b5a6af46fdab9cf417763422de1 (64 Bit)