Add SDL_HINT_WINDOWS_DISABLE_MENU_MNEMONICS.
Add a new Windows-only hint, SDL_HINT_WINDOWS_DISABLE_MENU_MNEMONICS, to make it possible to select whether the behavior of pressing Alt+something is better suited for graphics-only applications or applications that also have UI elements.
See #6726.
The word "mnemonics" doesn't immediately convey the menu options to me. Is correct to use the word "shortcuts" instead?
I don't believe it would be correct to call them shortcuts, no. Shortcuts usually refer to the key chords used to activate a command independently of menus. For example in Notepad, the shortcut for the "Cut" command is Ctrl+X, but you can also pull up the Edit menu using its mnemonic Alt+E, and then press the mnemonic t for Cut.
Now it's true that not everyone calls them mnemonics, but from what I can tell, a majority do:
- WxWidgets: mnemonic
- IntelliJ guidelines: mnemonic
- Java Swing: mnemonic
- Windows Forms: mnemonic
- MFC: mnemonic or access key
- Old and New Microsoft Docs: access key
- Qt: accelerator key (but note that Win32 calls shortcuts like Ctrl+X accelerators!)
@slouken If there is anything I can do to get this unblocked, please let me know.
Since the default behavior is to disable them, let's rename the hint SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS and flip the logic?
Sure, done and done.