This ended up rather large...
----
The goal is to fix a number of issues related to hotkeys:
- No way to set them inside the game
- Default hotkeys are good for English QWERTY keyboards but may fail on other keyboards.
Design wise, this adds a simple GUI page to set up hotkeys, similar to the Options page but kept separate since it wouldn't mesh too well.
The hotkey picker is a C++ Component to be able to hook into events. This required changing how many events were sent to the GUI. Seems OK.
My system waits for 1s of the same hotkey until the combination is registered, which requires adding a Tick() function to all GUI Objects. I don't think this is a dealbreaker, but refs D2638)
This also refactors Hotkey.h somewhat, as the comments were rather outdated. It cleans up the SDL include.
Another change is that we rely on SDL functions more for names. We can probably clean up our existing code more now that everybody is using SDL2.
----
The "default hotkeys" cleverness is by processing them as scancodes (which they are really), and converting to user-keys. This seems to work very well on my Mac French keyboard, so I'm assuming it'll work OK in general.
User hotkeys are saved properly and not interpreted as scancodes, so that the user can save his own hotkey as wanted.
----
This fixes a latent issue with how we converted std::string to JS strings. JS strings treated std::string as Latin-1, whereas we assume they are utF8. Further, FromJSVal wasn't handled correctly either. Basically, this fixes std::string.
----
Known issues:
- List does not like having text that contains "[" which isn't escaped. I need to find a way around that.
- It crashes if you select an item low on the list and you change tabs and the new tab doesn't have that many items
- No handling of multiple combinations for one hotkey.
- No warning about duplicate hotkeys, though that should be easy to add.
----
Fixes #2850, Fixes #2604, Refs #1810, might fix #1917 (unsure).
See D303 for earlier work on this.
----
Screenshots:
{F1433181}
{F1433182}