Skip to content

dukecat0/keypress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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