Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have several item in the context menu with the same shortcut character.

How can I disable the shortcut for those items that I rarely use?

In my case, the shortcut is "G_r_afik anzeigen" (probably "View image" in the English version)

share|improve this question

3 Answers 3

You could try ffchrome:

a nifty little addon that slims and trims your context menus on the fly for simplicity, ease of use, easy access and eliminates the clutter.

Menus show only the essential items by default. You can hover the mouse on "Show All" and menus expand on the fly. You can change the timing from the options box.

share|improve this answer
    
I tried it; at first glance it seems better than "menu editor" but while I could find the entry that I wanted to remove, I couldn't find the entry that I wanted to see. The list contains roughly 1000 elements and there is no search :-( So while it might work, it's too hard to use for me. –  Aaron Digulla Apr 26 '11 at 20:35

You can try menu editor which will allow you, at the very least, to remove those menu entries you do not want (since they clash in shortcut with another entry). Not a perfect solution, but should work.

share|improve this answer
    
Unfortunately, this doesn't allow me to edit the menu; I can only delete it completely. Not really useful since I'd like to keep the option. –  Aaron Digulla Apr 26 '11 at 20:34
up vote 1 down vote accepted

After some peeking, I found that all the UI is in the file omni.jar. To change the shortcut, you need to edit the accesskey of the label defined in chrome/de/locale/browser/browser.dtd. In my case, the patch looks like so:

diff -r 4a8bdaa9a867 chrome/browser/content/browser/browser.xul
--- a/chrome/browser/content/browser/browser.xul        Mon Apr 25 17:56:36 2011 +0200
+++ b/chrome/browser/content/browser/browser.xul        Tue Apr 26 22:31:21 2011 +0200
@@ -609,7 +609,6 @@
        oncommand="gContextMenu.reloadImage();"/>
  <menuitem id="context-viewimage"
        label="&viewImageCmd.label;"
-                accesskey="&viewImageCmd.accesskey;"
        oncommand="gContextMenu.viewMedia(event);"
        onclick="checkForMiddleClick(this, event);"/>
  <menuitem id="context-viewvideo"
diff -r 4a8bdaa9a867 chrome/browser/content/browser/web-panels.xul
--- a/chrome/browser/content/browser/web-panels.xul     Mon Apr 25 17:56:36 2011 +0200
+++ b/chrome/browser/content/browser/web-panels.xul     Tue Apr 26 22:31:21 2011 +0200
@@ -130,7 +130,6 @@
        oncommand="gContextMenu.reloadImage();"/>
  <menuitem id="context-viewimage"
        label="&viewImageCmd.label;"
-                accesskey="&viewImageCmd.accesskey;"
        oncommand="gContextMenu.viewMedia(event);"
        onclick="checkForMiddleClick(this, event);"/>
  <menuitem id="context-viewvideo"
diff -r 4a8bdaa9a867 chrome/de/locale/browser/browser.dtd
--- a/chrome/de/locale/browser/browser.dtd      Mon Apr 25 17:56:36 2011 +0200
+++ b/chrome/de/locale/browser/browser.dtd      Tue Apr 26 22:31:21 2011 +0200
@@ -347,7 +347,6 @@
<!ENTITY reloadImageCmd.label         "Grafik neu laden">
<!ENTITY reloadImageCmd.accesskey     "G">
<!ENTITY viewImageCmd.label           "Grafik anzeigen">
-<!ENTITY viewImageCmd.accesskey       "r">
<!ENTITY viewImageInfoCmd.label       "Grafik-Info anzeigen">
<!ENTITY viewImageInfoCmd.accesskey   "o">
<!ENTITY viewVideoCmd.label           "Video anzeigen">

Change the file, create a new JAR, backup the old omni.jar, stop firefox, copy the new file into the old one's place, start firefox from a console[*], pray.

[*] That allows you to see if you made any errors editing the files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.