I. Origin
These shortcut keys in Firefox keep me out of habit:
1. Right-click "Save as" in the menu"
In the IE kernel browser, right-click the link and the pop-up menu is as follows:
The shortcut key is.
The default menu of Firefox is as follows:
The shortcut key is K.
2. Pre-and Post-Tab Switch
In MT and TW, I usually switch the Tab forward and backward to Ctrl + Left and Ctrl + Right, respectively.
However, in Firefox, the corresponding values are Ctrl + PageUp and Ctrl + PageDown (or Ctrl + Tab and Ctrl + Shift + Tab)
I found a way to modify the default Firefox shortcut on the internet, basically using an extension called keyconfig.
I don't really want to add more burdens to my already bloated Firefox, so I did my research on a bunch of jar files in firefox, and I found the results.
The following describes the modification methods. You can customize them.
Ii. Modification
The Firefox version I use is portableFirefox3, update to 2009011913 Firefox 3.0.6
Let's take a look at how to modify "Save "...
1. Modify "save link as (K )..." Shortcut Key
First, I decompress the jar packages under FireFoxPortable3/App/Firefox/chrome to the directory of the corresponding name, and then use TotalCommand to search the entire directory for the string "saving the link"
As a result, I found the file:
Zh-CN.jar/locale/browser. dtd
<! ENTITY saveLinkCmd. label "link saved... "> <Br/> <! ENTITY saveLinkCmd. accesskey "k"> <br/>... <br/> <! ENTITY copyLinkCmd. label "Copy link address"> <br/> <! ENTITY copyLinkCmd. accesskey "a">
It is probably here, so I made a comparison between the above two.
<! ENTITY saveLinkCmd. label "link saved... "> <Br/> <! ENTITY saveLinkCmd. accesskey "a"> <br/>... <br/> <! ENTITY copyLinkCmd. label "Copy link address"> <br/> <! ENTITY copyLinkCmd. accesskey "k">
Okay, first make sure to turn off firefox, and then put the file back under the corresponding path of the zh-CN.jar package
Open firefox again!
Haha, success!
2. Modify the Tab switch shortcut
The modification was successful upon the first attempt, which greatly increased my confidence and then changed the shortcut keys for tab switching.
This is troublesome because no exact keyword is provided for me to search.
I tried to use "Tab" as the keyword to find a file in the entire directory, and the results filtered out the image resources, with the following results:
Browser. jar/content/browser/preferences/tabs. js Chrome. jar/test/browser/content/browser/preferences/tabs. xul Chrome. jar/test/browser/content/browser/tabbrowser.css Browser. jar/content/browser/tabbrowser. xml Classic. jar/skin/classic/aero/global/tabbox.css Classic. jar/skin/classic/global/tabbox.css En-US.jar/locale/Browser/preferences/tabs. DTD En-US.jar/locale/Browser/tabbrowser. DTD En-US.jar/locale/Browser/tabbrowser. Properties Toolkit. Jar/content/global/bindings/tabbox. xml Zh-CN.jar/locale/Browser/preferences/tabs. DTD Zh-CN.jar/locale/Browser/tabbrowser. DTD Zh-CN.jar/locale/Browser/tabbrowser. Properties |
I will try again to search for the string "pageDown" in these files (Case Insensitive)
None of the results were found.
Try again to search for "page_down" and the file will be searched.
Toolkit. jar/content/global/bindings/tabbox. xml
I copied the entire part of the code to show it to you: (the green part is the comment I added later)
... <Method name = "handleevent"> <Parameter Name = "Event"/> <Body> <! [CDATA [ If (! Event. istrusted ){ // Don't let untrusted events mess Tabs. Return; } Switch (event. keyCode ){ Case Event. DOM_VK_TAB: If (event. ctrlKey && ! Event. altKey &&! Event. metaKey) If (This. tabs & this. handleCtrlTab ){
This. tabs. advanceSelectedTab (event. shiftKey? -1: 1, True );
Event. stopPropagation ();
Event. preventDefault (); }
Break; CaseEvent. dom_vk_page_up: // 1. Switch the tab forward
If (event. ctrlKey &&! Event. shiftKey &&! Event. altKey && ! Event. metaKey) If (this. tabs && This. handleCtrlPageUpDown ){
This. tabs. advanceSelectedTab (-1, true );
Event. stoppropagation ();
Event. preventdefault (); }
Break; CaseEvent. dom_vk_page_down:// 2, Switch from tab to backward If (event. ctrlKey && ! Event. shiftKey &&! Event. altKey && ! Event. metaKey) If (this. tabs && This. handleCtrlPageUpDown ){
This. tabs. advanceSelectedTab (1, true );
Event. stopPropagation ();
Event. preventDefault (); }
Break; CaseEvent. dom_vk_left:// 3. function not studied If (event. metaKey & Event. altKey &&! Event. shiftKey && ! Event. ctrlKey) If (this. tabs && This. _ handleMetaAltArrows ){ Var offset = Window. getComputedStyle (this, ""). direction = "ltr "? -1: 1; This. tabs. advanceSelectedTab (offset, True );
Event. stopPropagation ();
Event. preventDefault (); }
Break; CaseEvent. DOM_VK_RIGHT: // 4, function not studied If (Event. metaKey & event. altKey &&! Event. shiftKey && ! Event. ctrlKey) If (this. tabs && This. _ handleMetaAltArrows ){ Var offset = Window. getComputedStyle (this, ""). direction = "ltr "? 1: -1; This. tabs. advanceSelectedTab (offset, True );
Event. stopPropagation ();
Event. preventdefault (); }
Break; } ]>
</Body> </Method> ... |
Combined with the default shortcut key I know, I quickly located the location to be modified (comment the four lines)
MeReconcile lines 1 and 3, and lines 2 and 4
I think this should meet the expected behavior, so save it and compress it back to the corresponding path of the original jar
Open firefox again
Haha, again!
Now, I will introduce my experience here.
I believe that we can do more with these jar files ~
If you have any new discoveries, please leave a message for me!