使用插件禁用chrome / Mozilla中的键

问题描述 投票:-1回答:1
I am building a plugin using JavaScript,as part of this i have disabled all the keys but still unable to control the bellow keys , is there any way that i can block the fallowing?

 New Window (Ctrl+N)
 Restore Tab (Ctrl+Shift+T)
 Select Next Tab (Ctrl+Tab, Ctrl+PageDown)
 Select Previous Tab (Ctrl+Shift+Tab, Ctrl+PageUp)
 Exit (Alt+F4, Cmd+Q)
 (Alt+Tab)

我正在尝试使用注册表,安装插件后是否可以禁用远程桌面?

javascript google-chrome mozilla
1个回答
0
投票

您可以打开窗口的信息亭模式,使其全屏显示并始终位于顶部,因此您无法进入其他应用程序。

您还可以使窗口透明,并将登录名放置在屏幕中间,以便看起来好像屏幕中间有一个窗口,但是您不能单击屏幕的其他区域。

要处理Alt + F4,您可以使用window.onbeforeunload事件或在close事件中调用event.preventDefault()。

https://electron.atom.io/docs/api/browser-window/#event-close

© www.soinside.com 2019 - 2024. All rights reserved.