dukecat0 / keypress

Simulates key press in Swift on macOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"),

About

Simulates key press in Swift on macOS.

License:MIT License


Languages

Language:Swift 100.0%