I have an Eclipse plugin that makes use of several keybindings (Alt-G x, Alt-G y, etc…). For most keyboard layouts, there are no problems for these specific keybindings. However, for Swiss German, it turns out that ‘Alt-G’ creates ‘@’ and this makes it very hard for Swiss Germans to use the plugins I created. I do not want to change the current keybindings since this would confuse existing users.
My question is:
How can I programmatically detect that a user is on a Swiss German keyboard and programmatically disable (or change) those keybindings?
(Is this something I can specify in the plugin.xml?)
To answer my own question, you can use the org.eclipse.ui.bindings extension point to completely solve the problem.
First, you set a keybinding as you normally would, and then you can un-set that particular keybinding on a single locale. And for that locale only, you can re-set the binding to something different.
This works, but is unfortunately very verbose if you have lots of keys to bind, unbind, and rebind.
Here is an example: