2012-09-22 07:28:16 -07:00
2012-09-22 09:22:20 -04:00
2012-09-22 09:22:20 -04:00
2012-09-22 09:22:20 -04:00
2012-09-19 13:25:29 +03:00

Intro

Some time ago Cocoa developers used a brilliant framework ShortcutRecorder for managing keyboard shortcuts in application preferences. However, it became incompatible with a new plugin architecture of Xcode 4.

The project MASShortcut introduces modern API and user interface for recording, storing and using global keyboard shortcuts. All code is compatible with Xcode 4.3, Mac OS X 10.7 and the sandboxed environment.

Usage for the branch 32-bit

// Make a raw keyboard shortcut
MASShortcut *shortcut = [MASShortcut shortcutWithKeyCode:kVK_F1 modifierFlags:NSCommandKeyMask];

// Execute your block of code automatically when user triggers a shortcut
[MASShortcut addGlobalHotkeyMonitorWithShortcut:shortcut handler:^{
	
	// Let me know if you find a better or more convenient API.
}];

To set an example, I made a demo project: MASShortcutDemo. Enjoy!

Copyright

MASShortcut is licensed under the BSD license.

S
Description
Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
Readme BSD-2-Clause
857 KiB
Languages
Objective-C 94.2%
Ruby 3%
Swift 1.3%
C 1.2%
Makefile 0.3%