mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
override ControlDoubleClick+Left/Right, make new bindings switchable
This commit is contained in:
@@ -28,6 +28,7 @@ import com.intellij.openapi.options.SchemesManager;
|
||||
import com.intellij.openapi.options.SchemesManagerFactory;
|
||||
import com.intellij.openapi.util.InvalidDataException;
|
||||
import com.intellij.openapi.util.WriteExternalException;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
@@ -95,8 +96,12 @@ public class KeymapManagerImpl extends KeymapManagerEx implements PersistentStat
|
||||
}
|
||||
load();
|
||||
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_CLONE_CARET_ABOVE, KeyEvent.VK_CONTROL, KeyEvent.VK_UP);
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_CLONE_CARET_BELOW, KeyEvent.VK_CONTROL, KeyEvent.VK_DOWN);
|
||||
if (Registry.is("editor.add.carets.on.double.control.arrows")) {
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_CLONE_CARET_ABOVE, KeyEvent.VK_CONTROL, KeyEvent.VK_UP);
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_CLONE_CARET_BELOW, KeyEvent.VK_CONTROL, KeyEvent.VK_DOWN);
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_MOVE_CARET_LEFT, KeyEvent.VK_CONTROL, KeyEvent.VK_LEFT);
|
||||
ModifierKeyDoubleClickHandler.getInstance().registerAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT, KeyEvent.VK_CONTROL, KeyEvent.VK_RIGHT);
|
||||
}
|
||||
|
||||
ourKeymapManagerInitialized = true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class ModifierKeyDoubleClickHandler {
|
||||
}
|
||||
handleModifier((KeyEvent)event);
|
||||
return false;
|
||||
} else if (ourPressed.first.get() && ourReleased.first.get() && ourPressed.second.get() && myActionKeyCode != -1 && !isActionBound()) {
|
||||
} else if (ourPressed.first.get() && ourReleased.first.get() && ourPressed.second.get() && myActionKeyCode != -1) {
|
||||
if (keyCode == myActionKeyCode) {
|
||||
if (event.getID() == KeyEvent.KEY_RELEASED) {
|
||||
run(keyEvent);
|
||||
|
||||
@@ -121,6 +121,8 @@ editor.smarterSelectionQuoting=true
|
||||
editor.skip.copy.and.cut.for.empty.selection=false
|
||||
editor.distraction.free.mode=false
|
||||
|
||||
editor.add.carets.on.double.control.arrows=true
|
||||
|
||||
ide.showIndexRebuildMessage=false
|
||||
|
||||
ide.tabbedPane.bufferedPaint=true
|
||||
|
||||
Reference in New Issue
Block a user