لتجربة الآلاف من الإضافات المتوفرة هنا، نزّل متصفح موزيلا فَيَرفُكس مجانًا. المتصفح الأسرع والأكثر أمانًا في عالم الإنترنت.
Closeمرحبا بك في إضافات فَيَرفُكس.
اختر من بين الآلاف من المميزات والمظاهر الإضافية واجعل فيرفُكس ملكًا لك.
Closeتعليق واحد على Focus Regainer بواسطة Merwenus
مقيمة بـ 4 من 5 نجوم
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
هذا التعليق كان على إصدارة سابقة من هذه الإضافة (0.2.1-signed)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.
لإنشاء مجموعاتك الخاصة، يجب أن تمتلك حسابا على موقع إضافات موزيلا.