mirror of
https://github.com/lowobservable/oec.git
synced 2026-03-07 11:39:38 +00:00
Implement keyboard clicker toggle
This commit is contained in:
@@ -70,6 +70,7 @@ class Terminal:
|
||||
self.keyboard = Keyboard(keymap)
|
||||
|
||||
self.alarm = False
|
||||
self.last_poll_keyboard_clicker = None
|
||||
|
||||
def sound_alarm(self):
|
||||
self.alarm = True
|
||||
@@ -80,4 +81,9 @@ class Terminal:
|
||||
|
||||
return PollAction.ALARM
|
||||
|
||||
if self.keyboard.clicker != self.last_poll_keyboard_clicker:
|
||||
self.last_poll_keyboard_clicker = self.keyboard.clicker
|
||||
|
||||
return PollAction.ENABLE_KEYBOARD_CLICKER if self.keyboard.clicker else PollAction.DISABLE_KEYBOARD_CLICKER
|
||||
|
||||
return PollAction.NONE
|
||||
|
||||
Reference in New Issue
Block a user