Skip to content

Commit

Permalink
add_hotkey remove hook() where set_index(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
prim authored and boppreh committed Feb 5, 2022
1 parent c82c5e8 commit 538ea91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keyboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ def remove_():
return remove_

state = _State()
state.remove_catch_misses = None
state.remove_catch_misses = lambda: None
state.remove_last_step = None
state.suppressed_events = []
state.last_update = float('-inf')
Expand Down Expand Up @@ -809,6 +809,7 @@ def set_index(new_index):
if new_index == 0:
# This is done for performance reasons, avoiding a global key hook
# that is always on.
state.remove_catch_misses()
state.remove_catch_misses = lambda: None
elif new_index == 1:
state.remove_catch_misses()
Expand Down

0 comments on commit 538ea91

Please sign in to comment.