Windows 应用程序应使用哪些组合键以避免冲突?
我有一个在 Windows 操作系统后台运行的应用程序,我想添加热键或快捷方式来访问功能。由于应用程序将捕获系统范围内的按键,因此我不想干扰标准 Windows 快捷方式或标准应用程序特定快捷方式(例如 Ctrl+S、Alt+F4)。
是否有一组按键组合可供特定应用程序使用,或者只是找到未使用的组合并使用它们?对于这类事情有什么标准吗?
I have an application that runs in the background on a Windows OS, and I want to add HotKeys or shortcuts to access functionality. Since the application will capture system wide key presses, I don't want to interfere with standard Windows shortcuts or standard application specific shortcuts (e.g. Ctrl+S, Alt+F4).
Is there a group of key combinations set aside for application specific use, or is it just a matter of finding unused combinations and using them? Are there any standards when it comes to this type of thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道添加您自己的约定可以避免其他人创建的约定。来自 MSDN:
这样你就可以得到一个热键列表。尝试注册每一个,直到成功为止。更好的是:让用户选择。
I don't know of a convention for adding your own that would avoid those created by others. From MSDN:
So you could have a list of hot keys. Try to register each one until you succeed. Even better: let the user choose.
一个想法可能是选择一个标准开始来标记您的应用程序。也许您的应用程序的所有组合键都可以以 Ctrl-Keypad 0 开头,后跟命令字母。 Ctrl-键盘 0 非常不寻常,其他应用程序不太可能使用它,在该组合之后,您可以使用常用键:Ctrl-< kbd>键盘 0C 用于复制和 Ctrl-键盘0V 用于粘贴等。
One idea might be to pick a standard start to flag your application. Perhaps all your application's key combinations could start with Ctrl-Keypad 0 followed by a command letter. Ctrl-Keypad 0 is unusual enough that other applications are unlikely to use it, and after that combination you can use common keys: Ctrl-Keypad 0C for Copy and Ctrl-Keypad 0V for paste etc.