IDEA-111466 Mac OS X keyboard shortcuts with alt don't work under Oracle Java 7

This commit is contained in:
Denis Fokin
2014-07-18 20:09:22 +04:00
parent 6bf1409b85
commit 3bc9fa3df9
2 changed files with 12 additions and 2 deletions
@@ -419,8 +419,14 @@ public final class IdeKeyEventDispatcher implements Disposable {
KeyStroke originalKeyStroke=KeyStroke.getKeyStrokeForEvent(e);
KeyStroke keyStroke=getKeyStrokeWithoutMouseModifiers(originalKeyStroke);
if (SystemInfo.isMac && SystemInfo.isOracleJvm && (keyStroke.getModifiers() & InputEvent.ALT_MASK) == InputEvent.ALT_MASK) {
keyStroke = getKeyStrokeWithoutCtrlModifier(keyStroke);
if (Registry.is("fix.jdk7.alt.shortcuts") && SystemInfo.isMac && SystemInfo.isOracleJvm && (keyStroke.getModifiers() & InputEvent.ALT_MASK) == InputEvent.ALT_MASK)
{
if (KeymapManager.getInstance().getActiveKeymap().getActionIds(new KeyboardShortcut(keyStroke, null)).length == 0) {
keyStroke = getKeyStrokeWithoutCtrlModifier(keyStroke);
}
}
if (myKeyGestureProcessor.processInitState()) {
@@ -387,3 +387,7 @@ ide.new.project.settings.description=Temporary key for new project settings dial
commonjs.complete.required.filename.with.extension=false
commonjs.complete.required.filename.with.extension.description=If checked, required filenames are completed with extension
fix.jdk7.alt.shortcuts=true
fix.jdk7.alt.shortcuts.description=Allow to use alt for shortcuts on MacOSX with jdk7+