An open API service indexing awesome lists of open source software.

https://github.com/dukecat0/keypress

Simulates key press in Swift on macOS.
https://github.com/dukecat0/keypress

keyboard keypress macos swift swift-library

Last synced: 10 months ago
JSON representation

Simulates key press in Swift on macOS.

Awesome Lists containing this project

README

          

# keypress

Simulates key press in Swift on macOS.

## Usage

Pressing key A:
```swift
import keypress

keypress.press("A")
```

Simulating the typing of the following text:
```swift
keypress.write("Hello World")
```

Pressing hotkey Command+A:
```swift
keypress.hotkey("Command", "A")
```

## Add to your project

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

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