在 Cocoa 中分配快捷键/热键
我正在尝试创建一个窗口,在其中使用我的 OSX 应用程序可以为该应用程序分配自己的热键。我见过 ShortcutRecorder 这似乎是一个不错的选择,但我觉得应该有一种更简单的方法,因为它是一个相对常见的场景!
创建热键分配视图的最佳方法是什么?
I'm trying to create a window where the use of my OSX application can assign their own hotkeys for the application. I've seen ShortcutRecorder which seems to be a decent bet but I get the feeling there should be a simpler way since its a relatively common scenario!
Whats the best way to go about creating a hotkey assignment view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
系统偏好设置 -> 键盘,然后是键盘快捷键。选择应用程序快捷方式,然后选择 + 添加任何应用程序。
它是操作系统键的一部分,可以在任何应用程序中分配,您无需为其编写任何代码
System Preferences->Keyboard then Keyboard Shortcuts. Choose Application Shortcuts and then choose + to add any app.
It is part of the OS keys can be assigned in any app you don't need to write any code for it