Please sign in to comment.
Don't convert lua do_commands to keys and back (11095)
An actual command_type should be handled ok by anything on the other end of this, so converting to keys immediately is overkill. This was causing problems with keybindings in targeting mode that remapped numbers to the direction commands in unusual ways: the first call converted the commands to keys, and the keys got converted (incorrectly) to vikeys by `unmangle_direction_keys`; they then got converted back to commands, preserving the incorrect mapping. So the exact bug in 11095 is really that unmangle shouldn't be called on the output of command_to_key, since it isn't aware of keybindings. The bug required a somewhat unusual key mapping to surface; in this particular report 6 and 8 were (maybe by accident) swapped relative to their normal position on a keypad, and this is why unmangling went wrong. Only autofight even uses this lua call, so hopefully there are no other consequences to this simplification, but if tab starts acting weirdly, this commit was probably why.
- Loading branch information...