Home: https://github.com/asmagill/mjolnir_asm.eventtap.event
Functionality to inspect, modify, and create events for mjolnir_asm.eventtap
is provided by this module.
This module is based primarily on code from the previous incarnation of Mjolnir by Steven Degutis.
mjolnir._asm.eventtap.event.newkeyevent(mods, key, isdown) -> event
Creates a keyboard event.
hotkey
modulemjolnir._asm.eventtap.event.newmouseevent(type, point, button) -> event
Creates a new mouse event.
mjolnir._asm.eventtap.event.properties -> table
For use with mjolnir._asm.eventtap.event:{get,set}property; contains the following keys:
mjolnir._asm.eventtap.event.types -> table
Table for use with mjolnir._asm.eventtap.new
, with the following keys:
keydown, keyup,
leftmousedown, leftmouseup, leftmousedragged,
rightmousedown, rightmouseup, rightmousedragged,
middlemousedown, middlemouseup, middlemousedragged,
mousemoved, flagschanged, scrollwheel,
tabletpointer, tabletproximity,
nullevent, tapdisabledbytimeout, tapdisabledbyuserinput
mjolnir._asm.eventtap.event:getflags() -> table
Returns a table with any of the strings {"cmd", "alt", "shift", "ctrl", "fn"} as keys pointing to the value true
mjolnir._asm.eventtap.event:getkeycode() -> keycode
Gets the keycode for the given event; only applicable for key-related events. The keycode is a numeric value from the mjolnir.keycodes.map
table.
mjolnir._asm.eventtap.event:getproperty(prop) -> number
Gets the given property of the given event; prop is one of the values in the mjolnir._asm.eventtap.event.properties
table; return value is a number defined here: https://developer.apple.com/library/mac/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html#//apple_ref/c/tdef/CGEventField
mjolnir._asm.eventtap.event:gettype() -> number
Gets the type of the given event; return value will be one of the values in the mjolnir._asm.eventtap.event.types
table.
mjolnir._asm.eventtap.event:post(app = nil)
Posts the event to the system as if the user did it manually. If app is a valid application instance, posts this event only to that application (I think).
mjolnir._asm.eventtap.event:setflags(table)
The table may have any of the strings {"cmd", "alt", "shift", "ctrl", "fn"} as keys pointing to the value true
mjolnir._asm.eventtap.event:setkeycode(keycode)
Sets the keycode for the given event; only applicable for key-related events. The keycode is a numeric value from the mjolnir.keycodes.map
table.
mjolnir._asm.eventtap.event:setproperty(prop, value)