Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 504 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 504 Bytes

keypress

Simulates key press in Swift on macOS.

Usage

Pressing key A:

import keypress

keypress.press("A")

Simulating the typing of the following text:

keypress.write("Hello World")

Pressing hotkey Command+A:

keypress.hotkey("Command", "A")

Add to your project

Add the following line to the dependencies in Package.swift:

.package(url: "https://github.com/meowmeowmeowcat/keypress", from: "0.0.4"),