Not only does it provide a cross-plattform way of grabbing key combos, but makes it also possible to store those (even in different profiles) in a plain text file via the wxFileConfig mechanism.
Possible structure (similar for settings file):
Code: Select all
nSelProfile=1
[keyprof0]
desc=Our primary keyprofile
name=Primary
action1=A dummy shortcut description|Ctrl+Shift+E
[keyprof1]
desc=Our primary keyprofile
name=Secondary
action1=A dummy shortcut description|Ctrl+h
Code: Select all
commandString = ( Config->Load("keyprof0/action1","|DefaultCombo") ).AfterLast("|")
- only minor editing of wxKeybinder codebase gives suitable editor
- engine would only need one settings handler
- no more registry fiddling
- true per-user settings on linux, win, mac
- settings profiles in SpringSettings would be trivial to implement
Possible issues:
- the Keybinder seemingly has problems some keys (# + - on a german keyb)
- numpad keys result in strange chars
- engine would either need its own parser for the file or (better imo) depend on (or include) the neccessary wxWidgest sources
Side note: the neccesary libs are already in the win installer because SpringsSettings depends on them
IMO this should at least be pursued for the keeping of engine settings, because storing them in the registry on win is very user unfriendly.
Comments?