All Projects → soffes → Hotkey

soffes / Hotkey

Licence: mit
Simple global shortcuts in macOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Hotkey

Selectnextoccurrence
A Visual Studio Extension that selects the next occurrences of the current selection and adds multiple cursors for editing
Stars: ✭ 129 (-77.53%)
Mutual labels:  shortcut, keyboard
g910-gkey-macro-support
GKey support for Logitech G910 Keyboard on Linux
Stars: ✭ 85 (-85.19%)
Mutual labels:  keyboard, shortcut
metaKeyboard
turn a common keyboard into a 61-key keyboard for the keyboard shortcut fun like you, I'm a programer, I want to improve coding efficiency
Stars: ✭ 30 (-94.77%)
Mutual labels:  keyboard, shortcut
Slowquitapps
Add a global delay to Command-Q to stop accidental app quits.
Stars: ✭ 916 (+59.58%)
Mutual labels:  shortcut, keyboard
React Hotkeys
React component to listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts.
Stars: ✭ 279 (-51.39%)
Mutual labels:  shortcut, keyboard
Ng Keyboard Shortcuts
Dead Simple Keyboard Shortcuts Management for Angular
Stars: ✭ 121 (-78.92%)
Mutual labels:  shortcut, keyboard
NumPad
Number Pad (inspired by Square)
Stars: ✭ 81 (-85.89%)
Mutual labels:  keyboard, carthage
Globalhooks
Allows you to create global keyboard events
Stars: ✭ 74 (-87.11%)
Mutual labels:  shortcut, keyboard
TTInputVisibilityController
Lightweight controller to keep your inputs visible when the keyboard is presented.
Stars: ✭ 21 (-96.34%)
Mutual labels:  keyboard, carthage
ShortcutJS
Keyboard manager for javascript and typescript, made for humans 😎
Stars: ✭ 26 (-95.47%)
Mutual labels:  keyboard, shortcut
Capslock Plus
An efficiency tool that provides various functions by enhancing the Caps Lock key into a modifier key.
Stars: ✭ 650 (+13.24%)
Mutual labels:  shortcut, keyboard
Hotkeys
➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
Stars: ✭ 5,165 (+799.83%)
Mutual labels:  shortcut, keyboard
hotkey
⌨️ cross-platform hotkey package
Stars: ✭ 82 (-85.71%)
Mutual labels:  keyboard, shortcut
hotscript
HotScript - Revolutionizing how Windows works.
Stars: ✭ 29 (-94.95%)
Mutual labels:  keyboard, shortcut
Pretzel
Pretzel is Mac desktop app that shows and find keyboard shortcuts based on your current app.
Stars: ✭ 405 (-29.44%)
Mutual labels:  shortcut, keyboard
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (-24.04%)
Mutual labels:  keyboard, carthage
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (-9.41%)
Mutual labels:  keyboard
Ttgsnackbar
TTGSnackbar shows simple message and action button on the bottom or top of the screen with multi kinds of animation, which is written in Swift3 and inspired by Snackbar in Android. It also support showing custom view, icon image or multi action button.
Stars: ✭ 538 (-6.27%)
Mutual labels:  carthage
Anim
Swift animation library for iOS, tvOS and macOS.
Stars: ✭ 520 (-9.41%)
Mutual labels:  carthage
Logkeys
📝 ⌨️ A GNU/Linux keylogger that works!
Stars: ✭ 518 (-9.76%)
Mutual labels:  keyboard

HotKey

Version Build Status Swift Version Carthage compatible CocoaPods compatible

Simple global shortcuts in macOS. HotKey wraps the Carbon APIs for dealing with global hot keys to make it easy to use in Swift.

HotKey, along with Color, were created for use in Contrast, a macOS app for checking designs for accessible color combinations.

Installation

Carthage

For installation with Carthage, simply add the following to your Cartfile:

github "soffes/HotKey"

Swift Package Manager

For installation with Swift Package Manager, simply add the following to your Package.swift:

.package(url: "https://github.com/soffes/HotKey", from: "0.1.2")

CocoaPods

For installation with CocoaPods, simply add the following to your Podfile:

pod 'HotKey'

Usage

Simply initialize a HotKey with a key and modifiers:

// Setup hot key for ⌥⌘R
let hotKey = HotKey(key: .r, modifiers: [.command, .option])

This is a convenice initializer that creates a KeyCombo for you. You can also initialize with a Carbon key code and Carbon modifier flags if you’re feeling old school.

Now you can set the keyDownHandler and get callbacks for when your hot key is pressed:

hotKey.keyDownHandler = {
  print("Pressed at \(Date())")
}

You can also implement hotKey.keyUpHandler if you’d like.

You don’t need to think about when handlers are registered and unregistered. This all happens automatically based on the HotKey object’s lifecycle.

Thanks

HotKey was heavily inspired by PTHotKey.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].