(dispatch-key-event)
(dispatch-key-event {:as params
:keys [type modifiers timestamp text unmodified-text
key-identifier code key windows-virtual-key-code
native-virtual-key-code auto-repeat is-keypad
is-system-key]})
(dispatch-key-event connection
{:as params
:keys [type modifiers timestamp text unmodified-text
key-identifier code key windows-virtual-key-code
native-virtual-key-code auto-repeat is-keypad
is-system-key]})
Dispatches a key event to the page.
Parameters map keys:
Key | Description |
---|---|
:type | Type of the key event. |
:modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) |
:timestamp | Time at which the event occurred. (optional) |
:text | Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "") (optional) |
:unmodified-text | Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). (optional) |
:key-identifier | Unique key identifier (e.g., 'U+0041') (default: ""). (optional) |
:code | Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). (optional) |
:key | Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). (optional) |
:windows-virtual-key-code | Windows virtual key code (default: 0). (optional) |
:native-virtual-key-code | Native virtual key code (default: 0). (optional) |
:auto-repeat | Whether the event was generated from auto repeat (default: false). (optional) |
:is-keypad | Whether the event was generated from the keypad (default: false). (optional) |
:is-system-key | Whether the event was a system key event (default: false). (optional) |
Dispatches a key event to the page. Parameters map keys: Key | Description --------------------------|------------ :type | Type of the key event. :modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) :timestamp | Time at which the event occurred. (optional) :text | Text as generated by processing a virtual key code with a keyboard layout. Not needed for for `keyUp` and `rawKeyDown` events (default: "") (optional) :unmodified-text | Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). (optional) :key-identifier | Unique key identifier (e.g., 'U+0041') (default: ""). (optional) :code | Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). (optional) :key | Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). (optional) :windows-virtual-key-code | Windows virtual key code (default: 0). (optional) :native-virtual-key-code | Native virtual key code (default: 0). (optional) :auto-repeat | Whether the event was generated from auto repeat (default: false). (optional) :is-keypad | Whether the event was generated from the keypad (default: false). (optional) :is-system-key | Whether the event was a system key event (default: false). (optional)
(dispatch-mouse-event)
(dispatch-mouse-event {:as params
:keys [type x y modifiers timestamp button click-count
delta-x delta-y]})
(dispatch-mouse-event connection
{:as params
:keys [type x y modifiers timestamp button click-count
delta-x delta-y]})
Dispatches a mouse event to the page.
Parameters map keys:
Key | Description |
---|---|
:type | Type of the mouse event. |
:x | X coordinate of the event relative to the main frame's viewport in CSS pixels. |
:y | Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. |
:modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) |
:timestamp | Time at which the event occurred. (optional) |
:button | Mouse button (default: "none"). (optional) |
:click-count | Number of times the mouse button was clicked (default: 0). (optional) |
:delta-x | X delta in CSS pixels for mouse wheel event (default: 0). (optional) |
:delta-y | Y delta in CSS pixels for mouse wheel event (default: 0). (optional) |
Dispatches a mouse event to the page. Parameters map keys: Key | Description -------------|------------ :type | Type of the mouse event. :x | X coordinate of the event relative to the main frame's viewport in CSS pixels. :y | Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. :modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) :timestamp | Time at which the event occurred. (optional) :button | Mouse button (default: "none"). (optional) :click-count | Number of times the mouse button was clicked (default: 0). (optional) :delta-x | X delta in CSS pixels for mouse wheel event (default: 0). (optional) :delta-y | Y delta in CSS pixels for mouse wheel event (default: 0). (optional)
(dispatch-touch-event)
(dispatch-touch-event {:as params
:keys [type touch-points modifiers timestamp]})
(dispatch-touch-event connection
{:as params
:keys [type touch-points modifiers timestamp]})
Dispatches a touch event to the page.
Parameters map keys:
Key | Description |
---|---|
:type | Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one. |
:touch-points | Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one. |
:modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) |
:timestamp | Time at which the event occurred. (optional) |
Dispatches a touch event to the page. Parameters map keys: Key | Description --------------|------------ :type | Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one. :touch-points | Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one. :modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) :timestamp | Time at which the event occurred. (optional)
(emulate-touch-from-mouse-event)
(emulate-touch-from-mouse-event {:as params
:keys [type x y timestamp button delta-x
delta-y modifiers click-count]})
(emulate-touch-from-mouse-event connection
{:as params
:keys [type x y timestamp button delta-x
delta-y modifiers click-count]})
Emulates touch event from the mouse event parameters.
Parameters map keys:
Key | Description |
---|---|
:type | Type of the mouse event. |
:x | X coordinate of the mouse pointer in DIP. |
:y | Y coordinate of the mouse pointer in DIP. |
:timestamp | Time at which the event occurred. |
:button | Mouse button. |
:delta-x | X delta in DIP for mouse wheel event (default: 0). (optional) |
:delta-y | Y delta in DIP for mouse wheel event (default: 0). (optional) |
:modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) |
:click-count | Number of times the mouse button was clicked (default: 0). (optional) |
Emulates touch event from the mouse event parameters. Parameters map keys: Key | Description -------------|------------ :type | Type of the mouse event. :x | X coordinate of the mouse pointer in DIP. :y | Y coordinate of the mouse pointer in DIP. :timestamp | Time at which the event occurred. :button | Mouse button. :delta-x | X delta in DIP for mouse wheel event (default: 0). (optional) :delta-y | Y delta in DIP for mouse wheel event (default: 0). (optional) :modifiers | Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional) :click-count | Number of times the mouse button was clicked (default: 0). (optional)
(set-ignore-input-events)
(set-ignore-input-events {:as params :keys [ignore]})
(set-ignore-input-events connection {:as params :keys [ignore]})
Ignores input events (useful while auditing page).
Parameters map keys:
Key | Description |
---|---|
:ignore | Ignores input events processing when set to true. |
Ignores input events (useful while auditing page). Parameters map keys: Key | Description --------|------------ :ignore | Ignores input events processing when set to true.
(synthesize-pinch-gesture)
(synthesize-pinch-gesture
{:as params :keys [x y scale-factor relative-speed gesture-source-type]})
(synthesize-pinch-gesture
connection
{:as params :keys [x y scale-factor relative-speed gesture-source-type]})
Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
Parameters map keys:
Key | Description |
---|---|
:x | X coordinate of the start of the gesture in CSS pixels. |
:y | Y coordinate of the start of the gesture in CSS pixels. |
:scale-factor | Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). |
:relative-speed | Relative pointer speed in pixels per second (default: 800). (optional) |
:gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional) |
Synthesizes a pinch gesture over a time period by issuing appropriate touch events. Parameters map keys: Key | Description ---------------------|------------ :x | X coordinate of the start of the gesture in CSS pixels. :y | Y coordinate of the start of the gesture in CSS pixels. :scale-factor | Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). :relative-speed | Relative pointer speed in pixels per second (default: 800). (optional) :gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional)
(synthesize-scroll-gesture)
(synthesize-scroll-gesture {:as params
:keys [x y x-distance y-distance x-overscroll
y-overscroll prevent-fling speed
gesture-source-type repeat-count
repeat-delay-ms interaction-marker-name]})
(synthesize-scroll-gesture connection
{:as params
:keys [x y x-distance y-distance x-overscroll
y-overscroll prevent-fling speed
gesture-source-type repeat-count
repeat-delay-ms interaction-marker-name]})
Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
Parameters map keys:
Key | Description |
---|---|
:x | X coordinate of the start of the gesture in CSS pixels. |
:y | Y coordinate of the start of the gesture in CSS pixels. |
:x-distance | The distance to scroll along the X axis (positive to scroll left). (optional) |
:y-distance | The distance to scroll along the Y axis (positive to scroll up). (optional) |
:x-overscroll | The number of additional pixels to scroll back along the X axis, in addition to the given distance. (optional) |
:y-overscroll | The number of additional pixels to scroll back along the Y axis, in addition to the given distance. (optional) |
:prevent-fling | Prevent fling (default: true). (optional) |
:speed | Swipe speed in pixels per second (default: 800). (optional) |
:gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional) |
:repeat-count | The number of times to repeat the gesture (default: 0). (optional) |
:repeat-delay-ms | The number of milliseconds delay between each repeat. (default: 250). (optional) |
:interaction-marker-name | The name of the interaction markers to generate, if not empty (default: ""). (optional) |
Synthesizes a scroll gesture over a time period by issuing appropriate touch events. Parameters map keys: Key | Description -------------------------|------------ :x | X coordinate of the start of the gesture in CSS pixels. :y | Y coordinate of the start of the gesture in CSS pixels. :x-distance | The distance to scroll along the X axis (positive to scroll left). (optional) :y-distance | The distance to scroll along the Y axis (positive to scroll up). (optional) :x-overscroll | The number of additional pixels to scroll back along the X axis, in addition to the given distance. (optional) :y-overscroll | The number of additional pixels to scroll back along the Y axis, in addition to the given distance. (optional) :prevent-fling | Prevent fling (default: true). (optional) :speed | Swipe speed in pixels per second (default: 800). (optional) :gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional) :repeat-count | The number of times to repeat the gesture (default: 0). (optional) :repeat-delay-ms | The number of milliseconds delay between each repeat. (default: 250). (optional) :interaction-marker-name | The name of the interaction markers to generate, if not empty (default: ""). (optional)
(synthesize-tap-gesture)
(synthesize-tap-gesture {:as params
:keys [x y duration tap-count gesture-source-type]})
(synthesize-tap-gesture connection
{:as params
:keys [x y duration tap-count gesture-source-type]})
Synthesizes a tap gesture over a time period by issuing appropriate touch events.
Parameters map keys:
Key | Description |
---|---|
:x | X coordinate of the start of the gesture in CSS pixels. |
:y | Y coordinate of the start of the gesture in CSS pixels. |
:duration | Duration between touchdown and touchup events in ms (default: 50). (optional) |
:tap-count | Number of times to perform the tap (e.g. 2 for double tap, default: 1). (optional) |
:gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional) |
Synthesizes a tap gesture over a time period by issuing appropriate touch events. Parameters map keys: Key | Description ---------------------|------------ :x | X coordinate of the start of the gesture in CSS pixels. :y | Y coordinate of the start of the gesture in CSS pixels. :duration | Duration between touchdown and touchup events in ms (default: 50). (optional) :tap-count | Number of times to perform the tap (e.g. 2 for double tap, default: 1). (optional) :gesture-source-type | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close