如何编写禁用默认键盘快捷键的Google Chrome扩展程序? [英] How to write a Google Chrome extension that disables a default keyboard-shortcut?

查看:110
本文介绍了如何编写禁用默认键盘快捷键的Google Chrome扩展程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个谷歌浏览器扩展程序,它只需简单地禁用内置的 alt e 快捷方式并将其传递给HTML访问键即可。 (是的,这一切 - 没有配置/图形)

这是一个内部网络应用程序,我不想使用现有的扩展。



我浏览了扩展文档,但是要感谢在这件事上的一个开始。

div>


不幸的是,没有办法将
挂接到全局热键中。
做的最好的事情就是添加一个window event keypress
监听器。

https://groups.google.com/forum/#!topic/chromium-extensions/yPGeRn9y7Dcrel =nofollow noreferrer>
上的铬扩展组。 p>

相关问题: Google Chrome / Chromium扩展中的键盘快捷键


I need a Google Chrome extension that simply disables the built in alte shortcut and pass it to the HTML accesskey as ordinary. (yes, that all - no configuration/graphics)

It's for an in-house web-application and I don't want to use existing extensions.

I've browsed the extension documentation but would be thankful for a jump start in this matter.

解决方案

Unfortunately there's no way to hook into global hotkeys. The best you can do is add a window event keypress listener.

Source: a Chromium developer post on the chromium-extensions group.

Related Question: Keyboard Shortcuts in Google Chrome / Chromium Extensions

这篇关于如何编写禁用默认键盘快捷键的Google Chrome扩展程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆