我该如何处理lsuielement应用程序中的角色调色键

发布于 2025-01-28 15:02:43 字数 632 浏览 4 评论 0原文

我已经实现了可可键键盘键盘键盘键盘捷径无需编辑即菜单用于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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文