在全屏图表中捕获 Ctrl 键
我能够使用 event.ctrlKey
在正常模式下捕获 Ctrl 键。
出于某种原因,该标志未在全屏模式下设置。
protected function chart_itemClickHandler(event:ChartItemEvent):void {
if(event.ctrlKey) {
// do something (not executed in fullscreen mode)
} else {
// do something else
}
有什么技巧可以在全屏模式下获得此标志吗?
I am able to capture Ctrl Key just fine in normal mode using event.ctrlKey
For some reason, the flag is not set in fullscreen.
protected function chart_itemClickHandler(event:ChartItemEvent):void {
if(event.ctrlKey) {
// do something (not executed in fullscreen mode)
} else {
// do something else
}
Is there any trick to get this flag in fullscreen mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在全屏模式下,几乎所有键盘输入都被禁用。这包括 ctrl 键。 Adobe 这样做是出于安全原因。仅允许使用 escape 键,该键可关闭全屏模式。
举个例子:如果您要制作一个看起来与默认 Windows 登录屏幕完全相同的全屏应用程序,您可以诱骗用户在您的应用程序中输入其 Windows 凭据。
我还担心您的问题的简短答案是:没有解决方法。 (除非您使用 ExternalInterface 和一些 JavaScript 将浏览器置于全屏模式而不是 Flash 应用程序。)
Almost all keyboard input is disabled in fullscreen mode. This includes the ctrl key. Adobe has done this for security reasons. Only the escape key is allowed, which closes fullscreen mode.
An example: if you would make a fullscreen application that looks exactly like a default Windows logon screen, you could trick a user into typing in his Windows credentials into your application.
I'm also afraid the short answer to your question is: there's no workaround. (Except perhaps if you would use ExternalInterface and some JavaScript to put the browser in fullscreen mode instead of the Flash application.)