OSX键盘快捷方式后台应用程序,如何 [英] OSX keyboard shortcut background application, how to
问题描述
我希望OSX应用程序位于后台,并等待键盘快捷键生效.应该在首选项中类似于Growl进行配置,也可以在状态栏中将其作为Dropbox进行访问.
I want my OSX application to sit in the background and wait for a keyboard shortcut to go into action. It should be configurable similar to Growl in the preferences, or accessible as dropbox in the statusbar.
- 我必须使用哪种xcode模板?
- 如何全局捕获键盘快捷键?
推荐答案
看看Dave DeLong的 DDHotKey GitHub上的类.
Have a look at Dave DeLong's DDHotKey class on GitHub.
DDHotKey是易于使用的Cocoa类,用于注册应用程序以响应系统键事件或热键".
DDHotKey is an easy-to-use Cocoa class for registering an application to respond to system key events, or "hotkeys".
全局热键是始终执行特定操作的键组合,无论哪个应用程序位于最前面.例如,即使Finder不是最前面的应用程序,Mac OS X默认的命令空间"热键也会显示Spotlight搜索栏.
A global hotkey is a key combination that always executes a specific action, regardless of which app is frontmost. For example, the Mac OS X default hotkey of "command-space" shows the Spotlight search bar, even if Finder is not the frontmost application.
也有足够的许可.
这篇关于OSX键盘快捷方式后台应用程序,如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!