简体   繁体   English

Chrome扩展程序地址栏事件

[英]Chrome extension address bar events

Does it possoble to detect keyup or keypress event with google chrome extension when user type url in adress bar? 当用户在地址栏中输入网址时,是否可以检测到带有Google Chrome扩展程序的keyup或keypress事件?

Thanks. 谢谢。

As far as I know, it is possible by using the chrome.input.ime API to implement a custom IME for Chrome OS. 据我所知,可以通过使用chrome.input.ime API为Chrome操作系统实现自定义IME。

As mentioned in the documentation 如文档中所述

This allows your extension to handle keystrokes, set the composition, and manage the candidate window. 这使您的扩展程序可以处理击键,设置组合和管理候选窗口。

With this, you can use the KeyboardEventType property with type keyup or keydown . 这样,您可以将KeyboardEventType属性与keyupkeydown类型一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM