Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unplugging and then plugging in a USB device causes the operating system to reset the keymap. To avoid Plover sending key presses for keys it had previously configured but which are not mapped after the reset it is necessary to reset the keyboard emulator when resetting the machine after reconnecting so that Plover assumes the default keymap and any unmapped symbols will be added again
  • Loading branch information
Cl4ryty committed Feb 18, 2024
1 parent 53c416f commit d668190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plover/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ def _update(self, config_update=None, full=False, reset_machine=False):
self._machine_params = machine_params
update_keymap = True
start_machine = True
# initialize keyboard emulation again to force update of keymap
self._keyboard_emulation.__init__()
elif self._machine is not None:
update_keymap = 'system_keymap' in config_update
if update_keymap:
Expand Down

0 comments on commit d668190

Please sign in to comment.