Make keybindings configurable

This commit is contained in:
loki
2021-08-03 15:24:04 +02:00
parent 6c11e9f27d
commit f08b6abc96
8 changed files with 125 additions and 24 deletions

View File

@@ -409,13 +409,9 @@ void repeat_key(short key_code) {
}
short map_keycode(short keycode) {
switch(keycode) {
case 0x10:
return 0xA0;
case 0x11:
return 0xA2;
case 0x12:
return 0xA4;
auto it = config::input.keybindings.find(keycode);
if(it != std::end(config::input.keybindings)) {
return it->second;
}
return keycode;