可以让 Silverlight OOB 应用程序“监听”用于键盘快捷键?
我正在构建一个具有提升权限的 Silverlight Out Of Browswer 应用程序,并且需要能够基本上让应用程序侦听键盘快捷键,例如执行 Ctrl + F10 之类的操作将导致窗口获得屏幕焦点...我个人我反对窃取焦点,但觉得这是可以的,因为用户自己调用它。
更多背景信息...如果你们中有人熟悉 XFire 或 Steam 等应用程序...我希望能够在游戏中使用键盘快捷键并在所有其他应用程序(例如 Steam)上方打开一个窗口视窗。
如果 Silverlight 不能做到这一点,有人可以向我指出一种更好的语言,让我可以创建此类应用程序吗?
如果 Silverlight 可以做到这一点,有人可以指出我如何实现这一目标吗?
I'm building a Silverlight Out Of Browswer Application with Elevated Permissions and need the ability to basically have the application listen for a keyboard shortcut such as doing something like Ctrl + F10 will cause a window to take focus of the screen... Personally I am against stealing focus but feel that this is alright seeing as the user invokes it themselves.
So more background... if any of you are familiar with applications like XFire or Steam.. I'd like to the ability to do a keyboard shortcut and have a window open above all the other applications like Steam can with the in-game windows.
If Silverlight can't do this can someone point me towards a better language where I can create this sort of application?
If Silverlight can do this can someone point me in the direction of how to accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Silverlight 4 无法做到这一点,并且 Silverlight 不是一种“语言”。任何能够完全访问 Windows API 的应用程序开发平台(JAVA、Delphi、VB6、.NET)都可以做到这一点。
Silverlight 5 包含对 PInvoke 的支持,因此如果您愿意等待 RC 转至 RTM,那么您可以挂接监视热键所需的系统级 WinAPI。
Silverlight 4 can't do this and Silverlight is not a "Language". Any application developement platform (JAVA, Delphi, VB6, .NET) that has full access to the windows API could do it.
Silverlight 5 includes support for PInvoke so if your willing to wait for the RC to go to RTM then you may be able to hook the system level WinAPIs needed to watch for a hotkey.