Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unbind F1 'Help' keyboard shortcut in eclipse

Tags:

eclipse

How can you unbind the F1 keyboard shortcut in Eclipse? I have unbound it using the Windows -> Preferences -> General -> Keys, but it appears to have no effect (F1 still brings up the help pane, regardless of the binding in the Keys Preference).

Is F1/Help treated as a special case shortcut in Windows?

like image 474
Cooper Avatar asked Aug 17 '10 17:08

Cooper


3 Answers

It doesn't matter that F1 generates a help event on Windows. As explained here, SWT generates both a help event and a key event when F1 is pressed. You can map things to F1 and it will work, but it will still also open help.

To fix this, delete the JAR file in the plugins directory that starts with "org.eclipse.help.base". Help will no longer open!

Edit: in fact, I use this to smoke Eclipse junk:

rm -rf readme
rm -rf *.html

rm -rf features/org.eclipse.aether*
rm -rf features/org.eclipse.cvs*
rm -rf features/org.eclipse.egit*
rm -rf features/org.eclipse.gef*
rm -rf features/org.eclipse.help.ui*
rm -rf features/org.eclipse.jgit*
rm -rf features/org.eclipse.m2e*
rm -rf features/org.eclipse.mylyn*
rm -rf features/org.eclipse.team.cvs*
rm -rf features/org.eclipse.wb*
rm -rf features/org.eclipse.wst*
rm -rf features/org.eclipse.xsd*
rm -rf features/org.eclipse.epp.mpc*
rm -rf features/org.eclipse.buildship*
rm -rf features/org.eclipse.oomph*
rm -rf features/org.eclipse.recommenders*

rm -rf plugins/org.eclipse.aether*
rm -rf plugins/org.eclipse.cvs*
rm -rf plugins/org.eclipse.egit*
rm -rf plugins/org.eclipse.gef*
rm -rf plugins/org.eclipse.help.ui*
rm -rf plugins/org.eclipse.jgit*
rm -rf plugins/org.eclipse.m2e*
rm -rf plugins/org.eclipse.mylyn*
rm -rf plugins/org.eclipse.team.cvs*
rm -rf plugins/org.eclipse.wb*
rm -rf plugins/org.eclipse.wst*
rm -rf plugins/org.eclipse.xsd*
rm -rf plugins/org.eclipse.epp.mpc*
rm -rf plugins/org.eclipse.buildship*
rm -rf plugins/org.eclipse.oomph*
rm -rf plugins/org.eclipse.recommenders*
like image 76
NateS Avatar answered Nov 15 '22 21:11

NateS


If you installed eclipse in the default location, go to:

C:\Users\[your username]\.p2\pool\plugins

and search for:

org.eclipse.help.base

then, after closing eclipse, add .jbak to the end of the file you found. This should fix the problem. If for whatever reason you need it back, just remove the .jbak from the file name and restart eclipse.

Note: you will need to agree to windows warning and close eclipse before renaming the file.

like image 28
Raymo111 Avatar answered Nov 15 '22 19:11

Raymo111


According to this Microsoft KB the F1 is a system-wide shortcut, so you won't be able to remap it inside your application.

like image 42
Danail Nachev Avatar answered Nov 15 '22 20:11

Danail Nachev