On Tue, Dec 29, 2009 at 2:57 PM, Pontorez <[email protected]> wrote:
> Hi, I want to write extension that searches selected word (or phrase)
> then I press F1. I don't need F1 key standard functionality and want
> to override it via plugin. Is it possible to override F1 key behaviour
> via Chrome plugin?
You probably want a content script with some code like*:
onkeyup = function(event) {
if (event.keyCode == 113) {
doAwesomeStuff();
}
}
* This snippet listens for F2 being pressed. You're better off not
messing with F1 since that key brings up Google Chrome Help. Also,
disabling the default F1 functionality would require some extra
hacking that I'm not going to show. ;-)
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.