#
hs.eventtap
Tap into input events (mouse, keyboard, trackpad) for observation and possibly overriding them It also provides convenience wrappers for sending mouse and keyboard events. If you need to construct finely controlled mouse/keyboard events, see hs.eventtap.event
This module is based primarily on code from the previous incarnation of Mjolnir by Steven Degutis.
#
Submodules
#
API Overview
Functions - API calls offered directly by the extension
checkKeyboardModifiers checkMouseButtons doubleClickInterval isSecureInputEnabled keyRepeatDelay keyRepeatInterval keyStroke keyStrokes leftClick middleClick otherClick rightClick scrollWheel
Constructors - API calls which return an object, typically one that offers API methods
new
Methods - API calls which can only be made on an object returned by a constructor
isEnabled start stop
#
API Documentation
#
Functions
#
checkKeyboardModifiers
#
checkMouseButtons
#
doubleClickInterval
#
isSecureInputEnabled
#
keyRepeatDelay
#
keyRepeatInterval
#
keyStroke
#
keyStrokes
#
leftClick
#
middleClick
#
otherClick
#
rightClick
#
scrollWheel
| | |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| Signature | hs.eventtap.scrollWheel(offsets, modifiers, unit) -> event
|
| Type | Function |
| Description | Generates and emits a scroll wheel event |
| Parameters |
- offsets - A table containing the {horizontal, vertical} amount to scroll. Positive values scroll up or left, negative values scroll down or right.
- mods - A table containing zero or more of the following: cmd alt shift ctrl fn
- unit - An optional string containing the name of the unit for scrolling. Either "line" (the default) or "pixel"
- None