vnc does not support up/down mouse buttons

This commit is contained in:
Devaev Maxim 2020-08-19 08:40:55 +03:00
parent 6c35dd413d
commit e4393fe4b1
2 changed files with 1 additions and 3 deletions

View File

@ -400,8 +400,6 @@ class RfbClient(RfbClientStream): # pylint: disable=too-many-instance-attribute
"left": bool(buttons & 0x1),
"right": bool(buttons & 0x4),
"middle": bool(buttons & 0x2),
"up": bool(buttons & 0x8), # Back
"down": bool(buttons & 0x10), # Forward
},
wheel={
"x": (-4 if buttons & 0x40 else (4 if buttons & 0x20 else 0)),

View File

@ -114,7 +114,7 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
# Эти состояния шарить не обязательно - бекенд исключает дублирующиеся события.
# Все это нужно только чтобы не посылать лишние жсоны в сокет KVMD
self.__mouse_buttons: Dict[str, Optional[bool]] = dict.fromkeys(["left", "right", "middle", "up", "down"], None)
self.__mouse_buttons: Dict[str, Optional[bool]] = dict.fromkeys(["left", "right", "middle"], None)
self.__mouse_move = {"x": -1, "y": -1}
self.__lock = asyncio.Lock()