我该如何处理lsuielement应用程序中的角色调色键
我已经实现了可可键键盘键盘键盘键盘捷径无需编辑即菜单用于LSUIELEMENT应用程序。实际上,为了确保我不会错过一些我可能会忘记的标准键键,我只是抓住了标准的“编辑”菜单并将其从笔尖文件中加载,然后使用了我的nsapplication 子类的
sendevent:
调用其performekeyequevalent:
。这是我所期望的。
但是,字符调色板(或“表情符号拾取器”或“ emoji&符号”)在此菜单中没有明确,因此当我击中Hotkey(⌘⌃ space )时,什么也不会发生。检查对象,这就是我所期望的。但是,当我在A normal 应用程序中击中此热键时,我会看到编辑菜单闪光灯,好像是键的定义,即使不是。陌生人仍然,即使控制命令空间没有。
此键盘快捷键假定要处理?我不想在这里特别自定义,我只是想正确设置其他应用程序所获得的默认文本编辑行为。
I've implemented something like Cocoa Keyboard Shortcuts in Dialog without an Edit Menu for an LSUIElement application. In fact, to try to make sure I was not missing some obscure standard keybinding that I might forget to include, I just grabbed a standard "edit" menu and loaded it out of a nib file and then used my NSApplication
subclass's sendEvent:
to invoke its performKeyEquivalent:
. This works as I expect.
However, the character palette (or "emoji picker", or "Emoji & Symbols") is not explicitly in this menu, so when I hit the hotkey (⌘⌃Space) nothing happens. Examining the objects, this is what I expect. However, when I hit this hotkey in a normal application, I see the Edit menu flash as if that's where the key's defined, even if it isn't. Stranger still, ???? still works even though the control-command-space one doesn't.
Where is this keyboard shortcut supposed to be handled? I don't want to do anything particularly custom here, I'd just like to correctly set up the default text-editing behavior that other apps get.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论