SideBySide2: Restore some old keybindings and fix help popup
Disable reverse search, restore "?" for help popup. Map Ctrl+F to searching in CodeMirror, map Space to PageDown. Take Ctrl+A back from Vim mode for selecting all text. Disable Ctrl+O in Vim keymap since it's used by some browsers. Add explanation of key commands to help popup. '/' still starts a CodeMirror search instead of a Gerrit one. Jumping within Gerrit using the 'g' prefix is still not supported. Change-Id: Id77faa4b36add35c78edfd0d7d0611279cbe7120
This commit is contained in:
@@ -24,6 +24,7 @@ public abstract class KeyCommand implements KeyPressHandler {
|
||||
public static final int M_CTRL = 1 << 16;
|
||||
public static final int M_ALT = 2 << 16;
|
||||
public static final int M_META = 4 << 16;
|
||||
public static final int M_SHIFT = 8 << 16;
|
||||
|
||||
public static boolean same(final KeyCommand a, final KeyCommand b) {
|
||||
return a.getClass() == b.getClass() && a.helpText.equals(b.helpText);
|
||||
@@ -58,6 +59,9 @@ public abstract class KeyCommand implements KeyPressHandler {
|
||||
if ((keyMask & M_META) == M_META) {
|
||||
modifier(b, KeyConstants.I.keyMeta());
|
||||
}
|
||||
if ((keyMask & M_SHIFT) == M_SHIFT) {
|
||||
modifier(b, KeyConstants.I.keyShift());
|
||||
}
|
||||
|
||||
final char c = (char) (keyMask & 0xffff);
|
||||
switch (c) {
|
||||
|
||||
@@ -32,6 +32,7 @@ public interface KeyConstants extends Constants {
|
||||
String keyCtrl();
|
||||
String keyAlt();
|
||||
String keyMeta();
|
||||
String keyShift();
|
||||
String keyEnter();
|
||||
String keyEsc();
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ thenOtherKey = then
|
||||
keyCtrl = Ctrl
|
||||
keyAlt = Alt
|
||||
keyMeta = Meta
|
||||
keyShift = Shift
|
||||
keyEnter = Enter
|
||||
keyEsc = Esc
|
||||
|
||||
Reference in New Issue
Block a user