How to use mouse_down method in AutoItDriverServer

Best Python code snippet using AutoItDriverServer_python

mouse.py

Source:mouse.py Github

copy

Full Screen

1import sys2from typing import TYPE_CHECKING, FrozenSet3from prompt_toolkit.data_structures import Point4from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent5from prompt_toolkit.keys import Keys6from prompt_toolkit.mouse_events import (7 MouseButton,8 MouseEvent,9 MouseEventType,10 MouseModifier,11)12from ..key_bindings import KeyBindings13if TYPE_CHECKING:14 from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone15__all__ = [16 "load_mouse_bindings",17]18E = KeyPressEvent19# fmt: off20# flake8: noqa E20121SCROLL_UP = MouseEventType.SCROLL_UP22SCROLL_DOWN = MouseEventType.SCROLL_DOWN23MOUSE_DOWN = MouseEventType.MOUSE_DOWN24MOUSE_MOVE = MouseEventType.MOUSE_MOVE25MOUSE_UP = MouseEventType.MOUSE_UP26NO_MODIFIER : FrozenSet[MouseModifier] = frozenset()27SHIFT : FrozenSet[MouseModifier] = frozenset({MouseModifier.SHIFT})28ALT : FrozenSet[MouseModifier] = frozenset({MouseModifier.ALT})29SHIFT_ALT : FrozenSet[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.ALT})30CONTROL : FrozenSet[MouseModifier] = frozenset({MouseModifier.CONTROL})31SHIFT_CONTROL : FrozenSet[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.CONTROL})32ALT_CONTROL : FrozenSet[MouseModifier] = frozenset({MouseModifier.ALT, MouseModifier.CONTROL})33SHIFT_ALT_CONTROL: FrozenSet[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.ALT, MouseModifier.CONTROL})34UNKNOWN_MODIFIER : FrozenSet[MouseModifier] = frozenset()35LEFT = MouseButton.LEFT36MIDDLE = MouseButton.MIDDLE37RIGHT = MouseButton.RIGHT38NO_BUTTON = MouseButton.NONE39UNKNOWN_BUTTON = MouseButton.UNKNOWN40xterm_sgr_mouse_events = {41 ( 0, 'm') : (LEFT, MOUSE_UP, NO_MODIFIER), # left_up 0+ + + =042 ( 4, 'm') : (LEFT, MOUSE_UP, SHIFT), # left_up Shift 0+4+ + =443 ( 8, 'm') : (LEFT, MOUSE_UP, ALT), # left_up Alt 0+ +8+ =844 (12, 'm') : (LEFT, MOUSE_UP, SHIFT_ALT), # left_up Shift Alt 0+4+8+ =1245 (16, 'm') : (LEFT, MOUSE_UP, CONTROL), # left_up Control 0+ + +16=1646 (20, 'm') : (LEFT, MOUSE_UP, SHIFT_CONTROL), # left_up Shift Control 0+4+ +16=2047 (24, 'm') : (LEFT, MOUSE_UP, ALT_CONTROL), # left_up Alt Control 0+ +8+16=2448 (28, 'm') : (LEFT, MOUSE_UP, SHIFT_ALT_CONTROL), # left_up Shift Alt Control 0+4+8+16=2849 ( 1, 'm') : (MIDDLE, MOUSE_UP, NO_MODIFIER), # middle_up 1+ + + =150 ( 5, 'm') : (MIDDLE, MOUSE_UP, SHIFT), # middle_up Shift 1+4+ + =551 ( 9, 'm') : (MIDDLE, MOUSE_UP, ALT), # middle_up Alt 1+ +8+ =952 (13, 'm') : (MIDDLE, MOUSE_UP, SHIFT_ALT), # middle_up Shift Alt 1+4+8+ =1353 (17, 'm') : (MIDDLE, MOUSE_UP, CONTROL), # middle_up Control 1+ + +16=1754 (21, 'm') : (MIDDLE, MOUSE_UP, SHIFT_CONTROL), # middle_up Shift Control 1+4+ +16=2155 (25, 'm') : (MIDDLE, MOUSE_UP, ALT_CONTROL), # middle_up Alt Control 1+ +8+16=2556 (29, 'm') : (MIDDLE, MOUSE_UP, SHIFT_ALT_CONTROL), # middle_up Shift Alt Control 1+4+8+16=2957 ( 2, 'm') : (RIGHT, MOUSE_UP, NO_MODIFIER), # right_up 2+ + + =258 ( 6, 'm') : (RIGHT, MOUSE_UP, SHIFT), # right_up Shift 2+4+ + =659 (10, 'm') : (RIGHT, MOUSE_UP, ALT), # right_up Alt 2+ +8+ =1060 (14, 'm') : (RIGHT, MOUSE_UP, SHIFT_ALT), # right_up Shift Alt 2+4+8+ =1461 (18, 'm') : (RIGHT, MOUSE_UP, CONTROL), # right_up Control 2+ + +16=1862 (22, 'm') : (RIGHT, MOUSE_UP, SHIFT_CONTROL), # right_up Shift Control 2+4+ +16=2263 (26, 'm') : (RIGHT, MOUSE_UP, ALT_CONTROL), # right_up Alt Control 2+ +8+16=2664 (30, 'm') : (RIGHT, MOUSE_UP, SHIFT_ALT_CONTROL), # right_up Shift Alt Control 2+4+8+16=3065 ( 0, 'M') : (LEFT, MOUSE_DOWN, NO_MODIFIER), # left_down 0+ + + =066 ( 4, 'M') : (LEFT, MOUSE_DOWN, SHIFT), # left_down Shift 0+4+ + =467 ( 8, 'M') : (LEFT, MOUSE_DOWN, ALT), # left_down Alt 0+ +8+ =868 (12, 'M') : (LEFT, MOUSE_DOWN, SHIFT_ALT), # left_down Shift Alt 0+4+8+ =1269 (16, 'M') : (LEFT, MOUSE_DOWN, CONTROL), # left_down Control 0+ + +16=1670 (20, 'M') : (LEFT, MOUSE_DOWN, SHIFT_CONTROL), # left_down Shift Control 0+4+ +16=2071 (24, 'M') : (LEFT, MOUSE_DOWN, ALT_CONTROL), # left_down Alt Control 0+ +8+16=2472 (28, 'M') : (LEFT, MOUSE_DOWN, SHIFT_ALT_CONTROL), # left_down Shift Alt Control 0+4+8+16=2873 ( 1, 'M') : (MIDDLE, MOUSE_DOWN, NO_MODIFIER), # middle_down 1+ + + =174 ( 5, 'M') : (MIDDLE, MOUSE_DOWN, SHIFT), # middle_down Shift 1+4+ + =575 ( 9, 'M') : (MIDDLE, MOUSE_DOWN, ALT), # middle_down Alt 1+ +8+ =976 (13, 'M') : (MIDDLE, MOUSE_DOWN, SHIFT_ALT), # middle_down Shift Alt 1+4+8+ =1377 (17, 'M') : (MIDDLE, MOUSE_DOWN, CONTROL), # middle_down Control 1+ + +16=1778 (21, 'M') : (MIDDLE, MOUSE_DOWN, SHIFT_CONTROL), # middle_down Shift Control 1+4+ +16=2179 (25, 'M') : (MIDDLE, MOUSE_DOWN, ALT_CONTROL), # middle_down Alt Control 1+ +8+16=2580 (29, 'M') : (MIDDLE, MOUSE_DOWN, SHIFT_ALT_CONTROL), # middle_down Shift Alt Control 1+4+8+16=2981 ( 2, 'M') : (RIGHT, MOUSE_DOWN, NO_MODIFIER), # right_down 2+ + + =282 ( 6, 'M') : (RIGHT, MOUSE_DOWN, SHIFT), # right_down Shift 2+4+ + =683 (10, 'M') : (RIGHT, MOUSE_DOWN, ALT), # right_down Alt 2+ +8+ =1084 (14, 'M') : (RIGHT, MOUSE_DOWN, SHIFT_ALT), # right_down Shift Alt 2+4+8+ =1485 (18, 'M') : (RIGHT, MOUSE_DOWN, CONTROL), # right_down Control 2+ + +16=1886 (22, 'M') : (RIGHT, MOUSE_DOWN, SHIFT_CONTROL), # right_down Shift Control 2+4+ +16=2287 (26, 'M') : (RIGHT, MOUSE_DOWN, ALT_CONTROL), # right_down Alt Control 2+ +8+16=2688 (30, 'M') : (RIGHT, MOUSE_DOWN, SHIFT_ALT_CONTROL), # right_down Shift Alt Control 2+4+8+16=3089 (32, 'M') : (LEFT, MOUSE_MOVE, NO_MODIFIER), # left_drag 32+ + + =3290 (36, 'M') : (LEFT, MOUSE_MOVE, SHIFT), # left_drag Shift 32+4+ + =3691 (40, 'M') : (LEFT, MOUSE_MOVE, ALT), # left_drag Alt 32+ +8+ =4092 (44, 'M') : (LEFT, MOUSE_MOVE, SHIFT_ALT), # left_drag Shift Alt 32+4+8+ =4493 (48, 'M') : (LEFT, MOUSE_MOVE, CONTROL), # left_drag Control 32+ + +16=4894 (52, 'M') : (LEFT, MOUSE_MOVE, SHIFT_CONTROL), # left_drag Shift Control 32+4+ +16=5295 (56, 'M') : (LEFT, MOUSE_MOVE, ALT_CONTROL), # left_drag Alt Control 32+ +8+16=5696 (60, 'M') : (LEFT, MOUSE_MOVE, SHIFT_ALT_CONTROL), # left_drag Shift Alt Control 32+4+8+16=6097 (33, 'M') : (MIDDLE, MOUSE_MOVE, NO_MODIFIER), # middle_drag 33+ + + =3398 (37, 'M') : (MIDDLE, MOUSE_MOVE, SHIFT), # middle_drag Shift 33+4+ + =3799 (41, 'M') : (MIDDLE, MOUSE_MOVE, ALT), # middle_drag Alt 33+ +8+ =41100 (45, 'M') : (MIDDLE, MOUSE_MOVE, SHIFT_ALT), # middle_drag Shift Alt 33+4+8+ =45101 (49, 'M') : (MIDDLE, MOUSE_MOVE, CONTROL), # middle_drag Control 33+ + +16=49102 (53, 'M') : (MIDDLE, MOUSE_MOVE, SHIFT_CONTROL), # middle_drag Shift Control 33+4+ +16=53103 (57, 'M') : (MIDDLE, MOUSE_MOVE, ALT_CONTROL), # middle_drag Alt Control 33+ +8+16=57104 (61, 'M') : (MIDDLE, MOUSE_MOVE, SHIFT_ALT_CONTROL), # middle_drag Shift Alt Control 33+4+8+16=61105 (34, 'M') : (RIGHT, MOUSE_MOVE, NO_MODIFIER), # right_drag 34+ + + =34106 (38, 'M') : (RIGHT, MOUSE_MOVE, SHIFT), # right_drag Shift 34+4+ + =38107 (42, 'M') : (RIGHT, MOUSE_MOVE, ALT), # right_drag Alt 34+ +8+ =42108 (46, 'M') : (RIGHT, MOUSE_MOVE, SHIFT_ALT), # right_drag Shift Alt 34+4+8+ =46109 (50, 'M') : (RIGHT, MOUSE_MOVE, CONTROL), # right_drag Control 34+ + +16=50110 (54, 'M') : (RIGHT, MOUSE_MOVE, SHIFT_CONTROL), # right_drag Shift Control 34+4+ +16=54111 (58, 'M') : (RIGHT, MOUSE_MOVE, ALT_CONTROL), # right_drag Alt Control 34+ +8+16=58112 (62, 'M') : (RIGHT, MOUSE_MOVE, SHIFT_ALT_CONTROL), # right_drag Shift Alt Control 34+4+8+16=62113 (35, 'M') : (NO_BUTTON, MOUSE_MOVE, NO_MODIFIER), # none_drag 35+ + + =35114 (39, 'M') : (NO_BUTTON, MOUSE_MOVE, SHIFT), # none_drag Shift 35+4+ + =39115 (43, 'M') : (NO_BUTTON, MOUSE_MOVE, ALT), # none_drag Alt 35+ +8+ =43116 (47, 'M') : (NO_BUTTON, MOUSE_MOVE, SHIFT_ALT), # none_drag Shift Alt 35+4+8+ =47117 (51, 'M') : (NO_BUTTON, MOUSE_MOVE, CONTROL), # none_drag Control 35+ + +16=51118 (55, 'M') : (NO_BUTTON, MOUSE_MOVE, SHIFT_CONTROL), # none_drag Shift Control 35+4+ +16=55119 (59, 'M') : (NO_BUTTON, MOUSE_MOVE, ALT_CONTROL), # none_drag Alt Control 35+ +8+16=59120 (63, 'M') : (NO_BUTTON, MOUSE_MOVE, SHIFT_ALT_CONTROL), # none_drag Shift Alt Control 35+4+8+16=63121 (64, 'M') : (NO_BUTTON, SCROLL_UP, NO_MODIFIER), # scroll_up 64+ + + =64122 (68, 'M') : (NO_BUTTON, SCROLL_UP, SHIFT), # scroll_up Shift 64+4+ + =68123 (72, 'M') : (NO_BUTTON, SCROLL_UP, ALT), # scroll_up Alt 64+ +8+ =72124 (76, 'M') : (NO_BUTTON, SCROLL_UP, SHIFT_ALT), # scroll_up Shift Alt 64+4+8+ =76125 (80, 'M') : (NO_BUTTON, SCROLL_UP, CONTROL), # scroll_up Control 64+ + +16=80126 (84, 'M') : (NO_BUTTON, SCROLL_UP, SHIFT_CONTROL), # scroll_up Shift Control 64+4+ +16=84127 (88, 'M') : (NO_BUTTON, SCROLL_UP, ALT_CONTROL), # scroll_up Alt Control 64+ +8+16=88128 (92, 'M') : (NO_BUTTON, SCROLL_UP, SHIFT_ALT_CONTROL), # scroll_up Shift Alt Control 64+4+8+16=92129 (65, 'M') : (NO_BUTTON, SCROLL_DOWN, NO_MODIFIER), # scroll_down 64+ + + =65130 (69, 'M') : (NO_BUTTON, SCROLL_DOWN, SHIFT), # scroll_down Shift 64+4+ + =69131 (73, 'M') : (NO_BUTTON, SCROLL_DOWN, ALT), # scroll_down Alt 64+ +8+ =73132 (77, 'M') : (NO_BUTTON, SCROLL_DOWN, SHIFT_ALT), # scroll_down Shift Alt 64+4+8+ =77133 (81, 'M') : (NO_BUTTON, SCROLL_DOWN, CONTROL), # scroll_down Control 64+ + +16=81134 (85, 'M') : (NO_BUTTON, SCROLL_DOWN, SHIFT_CONTROL), # scroll_down Shift Control 64+4+ +16=85135 (89, 'M') : (NO_BUTTON, SCROLL_DOWN, ALT_CONTROL), # scroll_down Alt Control 64+ +8+16=89136 (93, 'M') : (NO_BUTTON, SCROLL_DOWN, SHIFT_ALT_CONTROL), # scroll_down Shift Alt Control 64+4+8+16=93137}138typical_mouse_events = {139 32: (LEFT , MOUSE_DOWN , UNKNOWN_MODIFIER),140 33: (MIDDLE , MOUSE_DOWN , UNKNOWN_MODIFIER),141 34: (RIGHT , MOUSE_DOWN , UNKNOWN_MODIFIER),142 35: (UNKNOWN_BUTTON , MOUSE_UP , UNKNOWN_MODIFIER),143 64: (LEFT , MOUSE_MOVE , UNKNOWN_MODIFIER),144 65: (MIDDLE , MOUSE_MOVE , UNKNOWN_MODIFIER),145 66: (RIGHT , MOUSE_MOVE , UNKNOWN_MODIFIER),146 67: (NO_BUTTON , MOUSE_MOVE , UNKNOWN_MODIFIER),147 96: (NO_BUTTON , SCROLL_UP , UNKNOWN_MODIFIER),148 97: (NO_BUTTON , SCROLL_DOWN, UNKNOWN_MODIFIER),149}150urxvt_mouse_events={151 32: (UNKNOWN_BUTTON, MOUSE_DOWN , UNKNOWN_MODIFIER),152 35: (UNKNOWN_BUTTON, MOUSE_UP , UNKNOWN_MODIFIER),153 96: (NO_BUTTON , SCROLL_UP , UNKNOWN_MODIFIER),154 97: (NO_BUTTON , SCROLL_DOWN, UNKNOWN_MODIFIER),155}156# fmt:on157def load_mouse_bindings() -> KeyBindings:158 """159 Key bindings, required for mouse support.160 (Mouse events enter through the key binding system.)161 """162 key_bindings = KeyBindings()163 @key_bindings.add(Keys.Vt100MouseEvent)164 def _(event: E) -> "NotImplementedOrNone":165 """166 Handling of incoming mouse event.167 """168 # TypicaL: "eSC[MaB*"169 # Urxvt: "Esc[96;14;13M"170 # Xterm SGR: "Esc[<64;85;12M"171 # Parse incoming packet.172 if event.data[2] == "M":173 # Typical.174 mouse_event, x, y = map(ord, event.data[3:])175 # TODO: Is it possible to add modifiers here?176 mouse_button, mouse_event_type, mouse_modifiers = typical_mouse_events[177 mouse_event178 ]179 # Handle situations where `PosixStdinReader` used surrogateescapes.180 if x >= 0xDC00:181 x -= 0xDC00182 if y >= 0xDC00:183 y -= 0xDC00184 x -= 32185 y -= 32186 else:187 # Urxvt and Xterm SGR.188 # When the '<' is not present, we are not using the Xterm SGR mode,189 # but Urxvt instead.190 data = event.data[2:]191 if data[:1] == "<":192 sgr = True193 data = data[1:]194 else:195 sgr = False196 # Extract coordinates.197 mouse_event, x, y = map(int, data[:-1].split(";"))198 m = data[-1]199 # Parse event type.200 if sgr:201 try:202 (203 mouse_button,204 mouse_event_type,205 mouse_modifiers,206 ) = xterm_sgr_mouse_events[mouse_event, m]207 except KeyError:208 return NotImplemented209 else:210 # Some other terminals, like urxvt, Hyper terminal, ...211 (212 mouse_button,213 mouse_event_type,214 mouse_modifiers,215 ) = urxvt_mouse_events.get(216 mouse_event, (UNKNOWN_BUTTON, MOUSE_MOVE, UNKNOWN_MODIFIER)217 )218 x -= 1219 y -= 1220 # Only handle mouse events when we know the window height.221 if event.app.renderer.height_is_known and mouse_event_type is not None:222 # Take region above the layout into account. The reported223 # coordinates are absolute to the visible part of the terminal.224 from prompt_toolkit.renderer import HeightIsUnknownError225 try:226 y -= event.app.renderer.rows_above_layout227 except HeightIsUnknownError:228 return NotImplemented229 # Call the mouse handler from the renderer.230 # Note: This can return `NotImplemented` if no mouse handler was231 # found for this position, or if no repainting needs to232 # happen. this way, we avoid excessive repaints during mouse233 # movements.234 handler = event.app.renderer.mouse_handlers.mouse_handlers[y][x]235 return handler(236 MouseEvent(237 position=Point(x=x, y=y),238 event_type=mouse_event_type,239 button=mouse_button,240 modifiers=mouse_modifiers,241 )242 )243 return NotImplemented244 @key_bindings.add(Keys.ScrollUp)245 def _scroll_up(event: E) -> None:246 """247 Scroll up event without cursor position.248 """249 # We don't receive a cursor position, so we don't know which window to250 # scroll. Just send an 'up' key press instead.251 event.key_processor.feed(KeyPress(Keys.Up), first=True)252 @key_bindings.add(Keys.ScrollDown)253 def _scroll_down(event: E) -> None:254 """255 Scroll down event without cursor position.256 """257 event.key_processor.feed(KeyPress(Keys.Down), first=True)258 @key_bindings.add(Keys.WindowsMouseEvent)259 def _mouse(event: E) -> "NotImplementedOrNone":260 """261 Handling of mouse events for Windows.262 """263 # This key binding should only exist for Windows.264 if sys.platform == "win32":265 # Parse data.266 pieces = event.data.split(";")267 button = MouseButton(pieces[0])268 event_type = MouseEventType(pieces[1])269 x = int(pieces[2])270 y = int(pieces[3])271 # Make coordinates absolute to the visible part of the terminal.272 output = event.app.renderer.output273 from prompt_toolkit.output.win32 import Win32Output274 from prompt_toolkit.output.windows10 import Windows10_Output275 if isinstance(output, (Win32Output, Windows10_Output)):276 screen_buffer_info = output.get_win32_screen_buffer_info()277 rows_above_cursor = (278 screen_buffer_info.dwCursorPosition.Y279 - event.app.renderer._cursor_pos.y280 )281 y -= rows_above_cursor282 # Call the mouse event handler.283 # (Can return `NotImplemented`.)284 handler = event.app.renderer.mouse_handlers.mouse_handlers[y][x]285 return handler(286 MouseEvent(287 position=Point(x=x, y=y),288 event_type=event_type,289 button=button,290 modifiers=UNKNOWN_MODIFIER,291 )292 )293 # No mouse handler found. Return `NotImplemented` so that we don't294 # invalidate the UI.295 return NotImplemented...

Full Screen

Full Screen

mouse_bindings.py

Source:mouse_bindings.py Github

copy

Full Screen

1from ..events import Mods, MouseEventType, MouseButton2MOUSE_UP = MouseEventType.MOUSE_UP3MOUSE_DOWN = MouseEventType.MOUSE_DOWN4MOUSE_MOVE = MouseEventType.MOUSE_MOVE5SCROLL_UP = MouseEventType.SCROLL_UP6SCROLL_DOWN = MouseEventType.SCROLL_DOWN7LEFT = MouseButton.LEFT8MIDDLE = MouseButton.MIDDLE9RIGHT = MouseButton.RIGHT10NO_BUTTON = MouseButton.NO_BUTTON11UNKNOWN_BUTTON = MouseButton.UNKNOWN_BUTTON12NO_MODS = Mods.NO_MODS13ALT = Mods(True , False, False)14CONTROL = Mods(False, True , False)15SHIFT = Mods(False, False, True )16ALT_CONTROL = Mods(True , True , False)17ALT_SHIFT = Mods(True , False, True )18CONTROL_SHIFT = Mods(False, True , True )19ALT_CONTROL_SHIFT = Mods(True , True , True )20TERM_SGR = {21 ( 0, "m"): (MOUSE_UP, LEFT, NO_MODS),22 ( 4, "m"): (MOUSE_UP, LEFT, SHIFT),23 ( 8, "m"): (MOUSE_UP, LEFT, ALT),24 (12, "m"): (MOUSE_UP, LEFT, ALT_SHIFT),25 (16, "m"): (MOUSE_UP, LEFT, CONTROL),26 (20, "m"): (MOUSE_UP, LEFT, CONTROL_SHIFT),27 (24, "m"): (MOUSE_UP, LEFT, ALT_CONTROL),28 (28, "m"): (MOUSE_UP, LEFT, ALT_CONTROL_SHIFT),29 ( 1, "m"): (MOUSE_UP, MIDDLE, NO_MODS),30 ( 5, "m"): (MOUSE_UP, MIDDLE, SHIFT),31 ( 9, "m"): (MOUSE_UP, MIDDLE, ALT),32 (13, "m"): (MOUSE_UP, MIDDLE, ALT_SHIFT),33 (17, "m"): (MOUSE_UP, MIDDLE, CONTROL),34 (21, "m"): (MOUSE_UP, MIDDLE, CONTROL_SHIFT),35 (25, "m"): (MOUSE_UP, MIDDLE, ALT_CONTROL),36 (29, "m"): (MOUSE_UP, MIDDLE, ALT_CONTROL_SHIFT),37 ( 2, "m"): (MOUSE_UP, RIGHT, NO_MODS),38 ( 6, "m"): (MOUSE_UP, RIGHT, SHIFT),39 (10, "m"): (MOUSE_UP, RIGHT, ALT),40 (14, "m"): (MOUSE_UP, RIGHT, ALT_SHIFT),41 (18, "m"): (MOUSE_UP, RIGHT, CONTROL),42 (22, "m"): (MOUSE_UP, RIGHT, CONTROL_SHIFT),43 (26, "m"): (MOUSE_UP, RIGHT, ALT_CONTROL),44 (30, "m"): (MOUSE_UP, RIGHT, ALT_CONTROL_SHIFT),45 ( 0, "M"): (MOUSE_DOWN, LEFT, NO_MODS),46 ( 4, "M"): (MOUSE_DOWN, LEFT, SHIFT),47 ( 8, "M"): (MOUSE_DOWN, LEFT, ALT),48 (12, "M"): (MOUSE_DOWN, LEFT, ALT_SHIFT),49 (16, "M"): (MOUSE_DOWN, LEFT, CONTROL),50 (20, "M"): (MOUSE_DOWN, LEFT, CONTROL_SHIFT),51 (24, "M"): (MOUSE_DOWN, LEFT, ALT_CONTROL),52 (28, "M"): (MOUSE_DOWN, LEFT, ALT_CONTROL_SHIFT),53 ( 1, "M"): (MOUSE_DOWN, MIDDLE, NO_MODS),54 ( 5, "M"): (MOUSE_DOWN, MIDDLE, SHIFT),55 ( 9, "M"): (MOUSE_DOWN, MIDDLE, ALT),56 (13, "M"): (MOUSE_DOWN, MIDDLE, ALT_SHIFT),57 (17, "M"): (MOUSE_DOWN, MIDDLE, CONTROL),58 (21, "M"): (MOUSE_DOWN, MIDDLE, CONTROL_SHIFT),59 (25, "M"): (MOUSE_DOWN, MIDDLE, ALT_CONTROL),60 (29, "M"): (MOUSE_DOWN, MIDDLE, ALT_CONTROL_SHIFT),61 ( 2, "M"): (MOUSE_DOWN, RIGHT, NO_MODS),62 ( 6, "M"): (MOUSE_DOWN, RIGHT, SHIFT),63 (10, "M"): (MOUSE_DOWN, RIGHT, ALT),64 (14, "M"): (MOUSE_DOWN, RIGHT, ALT_SHIFT),65 (18, "M"): (MOUSE_DOWN, RIGHT, CONTROL),66 (22, "M"): (MOUSE_DOWN, RIGHT, CONTROL_SHIFT),67 (26, "M"): (MOUSE_DOWN, RIGHT, ALT_CONTROL),68 (30, "M"): (MOUSE_DOWN, RIGHT, ALT_CONTROL_SHIFT),69 (32, "M"): (MOUSE_MOVE, LEFT, NO_MODS),70 (36, "M"): (MOUSE_MOVE, LEFT, SHIFT),71 (40, "M"): (MOUSE_MOVE, LEFT, ALT),72 (44, "M"): (MOUSE_MOVE, LEFT, ALT_SHIFT),73 (48, "M"): (MOUSE_MOVE, LEFT, CONTROL),74 (52, "M"): (MOUSE_MOVE, LEFT, CONTROL_SHIFT),75 (56, "M"): (MOUSE_MOVE, LEFT, ALT_CONTROL),76 (60, "M"): (MOUSE_MOVE, LEFT, ALT_CONTROL_SHIFT),77 (33, "M"): (MOUSE_MOVE, MIDDLE, NO_MODS),78 (37, "M"): (MOUSE_MOVE, MIDDLE, SHIFT),79 (41, "M"): (MOUSE_MOVE, MIDDLE, ALT),80 (45, "M"): (MOUSE_MOVE, MIDDLE, ALT_SHIFT),81 (49, "M"): (MOUSE_MOVE, MIDDLE, CONTROL),82 (53, "M"): (MOUSE_MOVE, MIDDLE, CONTROL_SHIFT),83 (57, "M"): (MOUSE_MOVE, MIDDLE, ALT_CONTROL),84 (61, "M"): (MOUSE_MOVE, MIDDLE, ALT_CONTROL_SHIFT),85 (34, "M"): (MOUSE_MOVE, RIGHT, NO_MODS),86 (38, "M"): (MOUSE_MOVE, RIGHT, SHIFT),87 (42, "M"): (MOUSE_MOVE, RIGHT, ALT),88 (46, "M"): (MOUSE_MOVE, RIGHT, ALT_SHIFT),89 (50, "M"): (MOUSE_MOVE, RIGHT, CONTROL),90 (54, "M"): (MOUSE_MOVE, RIGHT, CONTROL_SHIFT),91 (58, "M"): (MOUSE_MOVE, RIGHT, ALT_CONTROL),92 (62, "M"): (MOUSE_MOVE, RIGHT, ALT_CONTROL_SHIFT),93 (35, "M"): (MOUSE_MOVE, NO_BUTTON, NO_MODS),94 (39, "M"): (MOUSE_MOVE, NO_BUTTON, SHIFT),95 (43, "M"): (MOUSE_MOVE, NO_BUTTON, ALT),96 (47, "M"): (MOUSE_MOVE, NO_BUTTON, ALT_SHIFT),97 (51, "M"): (MOUSE_MOVE, NO_BUTTON, CONTROL),98 (55, "M"): (MOUSE_MOVE, NO_BUTTON, CONTROL_SHIFT),99 (59, "M"): (MOUSE_MOVE, NO_BUTTON, ALT_CONTROL),100 (63, "M"): (MOUSE_MOVE, NO_BUTTON, ALT_CONTROL_SHIFT),101 # This is duplicated from the block above with lowercase "m" for WSL.102 (35, "m"): (MOUSE_MOVE, NO_BUTTON, NO_MODS),103 (39, "m"): (MOUSE_MOVE, NO_BUTTON, SHIFT),104 (43, "m"): (MOUSE_MOVE, NO_BUTTON, ALT),105 (47, "m"): (MOUSE_MOVE, NO_BUTTON, ALT_SHIFT),106 (51, "m"): (MOUSE_MOVE, NO_BUTTON, CONTROL),107 (55, "m"): (MOUSE_MOVE, NO_BUTTON, CONTROL_SHIFT),108 (59, "m"): (MOUSE_MOVE, NO_BUTTON, ALT_CONTROL),109 (63, "m"): (MOUSE_MOVE, NO_BUTTON, ALT_CONTROL_SHIFT),110 (64, "M"): (SCROLL_UP, NO_BUTTON, NO_MODS),111 (68, "M"): (SCROLL_UP, NO_BUTTON, SHIFT),112 (72, "M"): (SCROLL_UP, NO_BUTTON, ALT),113 (76, "M"): (SCROLL_UP, NO_BUTTON, ALT_SHIFT),114 (80, "M"): (SCROLL_UP, NO_BUTTON, CONTROL),115 (84, "M"): (SCROLL_UP, NO_BUTTON, CONTROL_SHIFT),116 (88, "M"): (SCROLL_UP, NO_BUTTON, ALT_CONTROL),117 (92, "M"): (SCROLL_UP, NO_BUTTON, ALT_CONTROL_SHIFT),118 (65, "M"): (SCROLL_DOWN, NO_BUTTON, NO_MODS),119 (69, "M"): (SCROLL_DOWN, NO_BUTTON, SHIFT),120 (73, "M"): (SCROLL_DOWN, NO_BUTTON, ALT),121 (77, "M"): (SCROLL_DOWN, NO_BUTTON, ALT_SHIFT),122 (81, "M"): (SCROLL_DOWN, NO_BUTTON, CONTROL),123 (85, "M"): (SCROLL_DOWN, NO_BUTTON, CONTROL_SHIFT),124 (89, "M"): (SCROLL_DOWN, NO_BUTTON, ALT_CONTROL),125 (93, "M"): (SCROLL_DOWN, NO_BUTTON, ALT_CONTROL_SHIFT),126}127TYPICAL = {128 32: (MOUSE_DOWN, LEFT, NO_MODS),129 33: (MOUSE_DOWN, MIDDLE, NO_MODS),130 34: (MOUSE_DOWN, RIGHT, NO_MODS),131 35: (MOUSE_UP, UNKNOWN_BUTTON, NO_MODS),132 64: (MOUSE_MOVE, LEFT, NO_MODS),133 65: (MOUSE_MOVE, MIDDLE, NO_MODS),134 66: (MOUSE_MOVE, RIGHT, NO_MODS),135 67: (MOUSE_MOVE, NO_BUTTON, NO_MODS),136 96: (SCROLL_UP, NO_BUTTON, NO_MODS),137 97: (SCROLL_DOWN, NO_BUTTON, NO_MODS),138}139URXVT = {140 32: (MOUSE_DOWN, UNKNOWN_BUTTON, NO_MODS),141 35: (MOUSE_UP, UNKNOWN_BUTTON, NO_MODS),142 96: (SCROLL_UP, NO_BUTTON, NO_MODS),143 97: (SCROLL_DOWN, NO_BUTTON, NO_MODS),...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run AutoItDriverServer automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful