Benvenuto in SeaMonkey Add-ons.
Aggiungi nuove funzionalità e stili per rendere SeaMonkey veramente tuo.
ChiudiRisposta dello sviluppatore mikhail_s
Assegnate 4 su 5 stelle
How can I add a custom hotkey? Like I use F4 (simple, no ctrl, or anything else) to close tabs. Or F5 for refreshing page, can you please tell me what lines do I have to add to focusregainer.js to make it work? thanks
Questa recensione riguarda una versione precedente (0.2.1-signed) del componente aggiuntivo.This is not addon for custom hotkeys. Hotkeys are forwarded to browser as is.
If you want F5 then ugly way is to change first "if (event.ctrlKey) {" to "if (true) {".
For F4 you need to change also
"newEvent.initKeyEvent( "keypress", true, true, null, event.ctrlKey, event.altKey, event.shiftKey, event.metaKey, event.keyCode, event.charCode);"
to
"newEvent.initKeyEvent( "keypress", true, true, null, true, event.altKey, event.shiftKey, event.metaKey, event.keyCode, event.charCode);"
and
"} else if (VK==event.DOM_VK_Q || VK==event.DOM_VK_Q+d || VK==event.DOM_VK_W || VK==event.DOM_VK_W+d || VK==event.DOM_VK_E || VK==event.DOM_VK_E+d || VK==event.DOM_VK_R || VK==event.DOM_VK_R+d || VK==event.DOM_VK_T || VK==event.DOM_VK_T+d || (VK_>=event.DOM_VK_F1 && VK_<=event.DOM_VK_F11) || VK==event.DOM_VK_L || VK==event.DOM_VK_L+d || VK==event.DOM_VK_N || VK==event.DOM_VK_N+d) {"
to
"} else if (((VK==event.DOM_VK_Q || VK==event.DOM_VK_Q+d || VK==event.DOM_VK_W || VK==event.DOM_VK_W+d || VK==event.DOM_VK_E || VK==event.DOM_VK_E+d || VK==event.DOM_VK_R || VK==event.DOM_VK_R+d || VK==event.DOM_VK_T || VK==event.DOM_VK_T+d || VK==event.DOM_VK_L || VK==event.DOM_VK_L+d || VK==event.DOM_VK_N || VK==event.DOM_VK_N+d) && event.ctrlKey) || (VK_>=event.DOM_VK_F1 && VK_<=event.DOM_VK_F11)) {",
but this F4 will work only for flash, because see first sentence of this answer.
Per creare una tua raccolta devi avere un account per Mozilla Add-ons.