fully automatic keymap generation

If a key is not listed in keymap.cfg but SDL provides a good enough name
for the corresponding scancode, a keymap entry is generated automatically.

If a key can't be found when adding a bind, it is checked, if SDL can
resolve the key name. The resolved keybind is then used to recreate the
keymap entry - and the bind can succeed.

Some SDL names for scancodes may not be usable as keymap names: if the
name contains (, ), $ or ", it will be rejected. Also, SDL does not
provide names for all scancodes. Scancode names provided by SDL can be
platform-dependant, therefore recreating the bind may fail on a different
platform.

However, the feature should work fine with most nonstandard keys - and the
information written to clientlog can be used to amend keymap.cfg
This commit is contained in:
ac-stef
2018-02-10 11:28:50 +01:00
committed by aurhat
parent e5077d0226
commit 135f9f4a90
2 changed files with 30 additions and 1 deletions
+1
View File
@@ -223,3 +223,4 @@ enum
#define FTXT__ZIPDESC (FTXT_NOWHITE | FTXT_ALLOWBLANKS | FTXT_TABTOBLANK | FTXT_NOCOLOR | FTXT_SAFECS)
#define FTXT__CERTFILENAME (FTXT_MAPNAME | FTXT_TOLOWER)
#define FTXT__CONSOLEPASTE (FTXT_TABTOBLANK)
#define FTXT__AUTOKEYMAPNAME (FTXT_SAFECS)