summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/serial.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-06-06 13:19:30 +0300
committerDevaev Maxim <[email protected]>2020-06-06 13:19:30 +0300
commit04c3763e69a1e7d1705d56de0cd6b3e5e13f519d (patch)
tree09be3a85e221d07837bd1a474c8538b424251f66 /kvmd/plugins/hid/serial.py
parent1d7d4100a57b5d654c1434c91e97187fe25698ef (diff)
send_key_events()
Diffstat (limited to 'kvmd/plugins/hid/serial.py')
-rw-r--r--kvmd/plugins/hid/serial.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py
index c9705543..e9b65479 100644
--- a/kvmd/plugins/hid/serial.py
+++ b/kvmd/plugins/hid/serial.py
@@ -30,8 +30,10 @@ import struct
import errno
import time
+from typing import Tuple
from typing import List
from typing import Dict
+from typing import Iterable
from typing import AsyncGenerator
import serial
@@ -273,8 +275,9 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst
# =====
- def send_key_event(self, key: str, state: bool) -> None:
- self.__queue_event(_KeyEvent(key, state))
+ def send_key_events(self, keys: Iterable[Tuple[str, bool]]) -> None:
+ for (key, state) in keys:
+ self.__queue_event(_KeyEvent(key, state))
def send_mouse_button_event(self, button: str, state: bool) -> None:
self.__queue_event(_MouseButtonEvent(button, state))