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.
Signature | hs.eventtap.checkKeyboardModifiers([raw]) -> table |
---|---|
Type | Function |
Description | Returns a table containing the current key modifiers being pressed or in effect *at this instant* for the keyboard most recently used. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.checkMouseButtons() -> table |
---|---|
Type | Function |
Description | Returns a table containing the current mouse buttons being pressed *at this instant*. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.doubleClickInterval() -> number |
---|---|
Type | Function |
Description | Returns the system-wide setting for the delay between two clicks, to register a double click event |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.isSecureInputEnabled() -> boolean |
---|---|
Type | Function |
Description | Checks if macOS is preventing keyboard events from being sent to event taps |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.keyRepeatDelay() -> number |
---|---|
Type | Function |
Description | Returns the system-wide setting for the delay before keyboard repeat events begin |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.keyRepeatInterval() -> number |
---|---|
Type | Function |
Description | Returns the system-wide setting for the interval between repeated keyboard events |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.keyStroke(modifiers, character[, delay, application]) |
---|---|
Type | Function |
Description | Generates and emits a single keystroke event pair for the supplied keyboard modifiers and character |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.keyStrokes(text[, application]) |
---|---|
Type | Function |
Description | Generates and emits keystroke events for the supplied text |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap.leftClick(point[, delay]) |
---|---|
Type | Function |
Description | Generates a left mouse click event at the specified point |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.middleClick(point[, delay]) |
---|---|
Type | Function |
Description | Generates a middle mouse click event at the specified point |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.otherClick(point[, delay][, button]) |
---|---|
Type | Function |
Description | Generates an "other" mouse click event at the specified point |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.rightClick(point[, delay]) |
---|---|
Type | Function |
Description | Generates a right mouse click event at the specified point |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.scrollWheel(offsets, modifiers, unit) -> event |
---|---|
Type | Function |
Description | Generates and emits a scroll wheel event |
Parameters |
|
Returns |
|
Source | extensions/eventtap/init.lua |
Signature | hs.eventtap.new(types, fn) -> eventtap |
---|---|
Type | Constructor |
Description | Create a new event tap object |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap:isEnabled() -> bool |
---|---|
Type | Method |
Description | Determine whether or not an event tap object is enabled. |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap:start() |
---|---|
Type | Method |
Description | Starts an event tap |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |
Signature | hs.eventtap:stop() |
---|---|
Type | Method |
Description | Stops an event tap |
Parameters |
|
Returns |
|
Source | extensions/eventtap/internal.m |