[Scummvm-tracker] [ScummVM :: Bugs] #11364: GUI: KEYMAPS: Command key incorrectly displayed as ‘Meta’ on MacOS.
ScummVM :: Bugs
trac at scummvm.org
Mon Feb 24 02:04:08 UTC 2020
#11364: GUI: KEYMAPS: Command key incorrectly displayed as ‘Meta’ on MacOS.
-------------------+--------------------
Reporter: macca8 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: GUI
Keywords: | Game:
-------------------+--------------------
Mac keyboards feature the Command key (Cmd), instead of keys displaying
the traditional META key name and/or symbol.
The Command key is the default modifier for virtually all macOS shortcuts,
so I’m surprised to see the key(s) omitted from the list of Keycodes &
Modifier Flags in common/keyboard.h.
Nevertheless, the current mapping of the Command key to the Meta key
binding works well enough as far as accessing the key is concerned…
providing the binding remains invisible to the user.
Now that users can access the Keymaps, where this breaks down is in NOT
displaying the key actually pressed, in this case, the Command key (Cmd).
The issue here is not with the binding, but rather the description
included in KBD_META’s definition in the defaultModifiers[] list of
keymapper/hardware-input.cpp.
May I suggest that the simplest solution would appear to be to add an
alternative KBD_META definition for macOS to the defaultModifiers[] list,
assuming it’s legal to do so, for example (formatted appropriately of
course):
If defined(MACOSX) then
{KBD_META, “M”, “Cmd+”}
else
{KBD_META, “M”, “Meta+”}
end if
The long term solution is probably to recognise the Command key in its own
right, by adding KEYCODE_LCMD & KEYCODE_RCMD as keys, and KBD_CMD as a
modifier flag, and making appropriate adjustments to the Keymapper and
elsewhere as needed, but that would seem to be overkill for this issue.
--
Ticket URL: <https://bugs.scummvm.org/ticket/11364>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list