hammerspoon2-docs
    Preparing search index...

    Function makeKeyEventWithCode

    • Create a keyboard event using a raw key code

      If mods is given, the event carries exactly those modifiers, whatever modifier keys are held when it's created.

      Parameters

      • keyCode: number

        A numeric virtual key code

      • isDown: boolean

        true for key down, false for key up

      • Optionalmods: string[] | null

        An array of modifier names (e.g. ["cmd", "shift"]), as accepted by hs.eventtap.keyStroke().

      Returns HSEventTapEvent | null

      An HSEventTapEvent