diff options
author | Devaev Maxim <[email protected]> | 2018-08-18 23:23:24 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-08-18 23:23:24 +0300 |
commit | 4ef978406f8cae5b0d0f9ae97d9c814d94bf272e (patch) | |
tree | b779d040a91d5edc9f26e23637c1bde167f43643 | |
parent | 765a86c47b6e8f1eb019b95cd94b7695e952c8e5 (diff) |
delay to avoid press hang
-rw-r--r-- | kvmd/kvmd/hid.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kvmd/kvmd/hid.py b/kvmd/kvmd/hid.py index 0f192fdf..570ef4dc 100644 --- a/kvmd/kvmd/hid.py +++ b/kvmd/kvmd/hid.py @@ -4,6 +4,7 @@ import multiprocessing.queues import queue import struct import pkgutil +import time from typing import Dict from typing import Set @@ -139,10 +140,12 @@ class Hid(multiprocessing.Process): else: if isinstance(event, _KeyEvent): self.__send_key_event(tty, event) + time.sleep(0.05) elif isinstance(event, _MouseMoveEvent): self.__send_mouse_move_event(tty, event) elif isinstance(event, _MouseButtonEvent): self.__send_mouse_button_event(tty, event) + time.sleep(0.05) elif isinstance(event, _MouseWheelEvent): self.__send_mouse_wheel_event(tty, event) if self.__stop_event.is_set() and self.__queue.qsize() == 0: |