SideBySide2: Document Shift-{Left,Right} in ? help popup

Shift-Left and Shift-Right can be used to transfer focus between
the two CM3 instances.

Change-Id: Ifd2976d77d2be25c9af673580fa123c6f086ef1b
This commit is contained in:
Shawn Pearce
2014-04-24 12:42:13 -07:00
parent 3720f22a9c
commit 4048817429
6 changed files with 17 additions and 0 deletions

View File

@@ -74,6 +74,12 @@ public abstract class KeyCommand implements KeyPressHandler {
case KeyCodes.KEY_ESCAPE: case KeyCodes.KEY_ESCAPE:
namedKey(b, KeyConstants.I.keyEsc()); namedKey(b, KeyConstants.I.keyEsc());
break; break;
case KeyCodes.KEY_LEFT:
namedKey(b, KeyConstants.I.keyLeft());
break;
case KeyCodes.KEY_RIGHT:
namedKey(b, KeyConstants.I.keyRight());
break;
default: default:
b.openSpan(); b.openSpan();
b.setStyleName(KeyResources.I.css().helpKey()); b.setStyleName(KeyResources.I.css().helpKey());

View File

@@ -35,4 +35,6 @@ public interface KeyConstants extends Constants {
String keyShift(); String keyShift();
String keyEnter(); String keyEnter();
String keyEsc(); String keyEsc();
String keyLeft();
String keyRight();
} }

View File

@@ -13,3 +13,5 @@ keyMeta = Meta
keyShift = Shift keyShift = Shift
keyEnter = Enter keyEnter = Enter
keyEsc = Esc keyEsc = Esc
keyLeft = Left
keyRight = Right

View File

@@ -403,6 +403,9 @@ public class SideBySide2 extends Screen {
super.registerKeys(); super.registerKeys();
keysNavigation.add(new UpToChangeCommand2(revision, 0, 'u')); keysNavigation.add(new UpToChangeCommand2(revision, 0, 'u'));
keysNavigation.add(
new NoOpKeyCommand(KeyCommand.M_SHIFT, KeyCodes.KEY_LEFT, PatchUtil.C.focusSideA()),
new NoOpKeyCommand(KeyCommand.M_SHIFT, KeyCodes.KEY_RIGHT, PatchUtil.C.focusSideB()));
keysNavigation.add( keysNavigation.add(
new NoOpKeyCommand(0, 'j', PatchUtil.C.lineNext()), new NoOpKeyCommand(0, 'j', PatchUtil.C.lineNext()),
new NoOpKeyCommand(0, 'k', PatchUtil.C.linePrev())); new NoOpKeyCommand(0, 'k', PatchUtil.C.linePrev()));

View File

@@ -49,6 +49,8 @@ public interface PatchConstants extends Constants {
String chunkNext2(); String chunkNext2();
String commentPrev(); String commentPrev();
String commentNext(); String commentNext();
String focusSideA();
String focusSideB();
String fileList(); String fileList();
String expandComment(); String expandComment();
String expandAllCommentsOnCurrentLine(); String expandAllCommentsOnCurrentLine();

View File

@@ -31,6 +31,8 @@ chunkPrev2 = Previous diff chunk
chunkNext2 = Next diff chunk or search result chunkNext2 = Next diff chunk or search result
commentPrev = Previous comment commentPrev = Previous comment
commentNext = Next comment commentNext = Next comment
focusSideA = Focus left side
focusSideB = Focus right side
fileList = Browse files in patch set fileList = Browse files in patch set
expandComment = Expand or collapse comment expandComment = Expand or collapse comment
expandAllCommentsOnCurrentLine = Expand or collapse all comments on current line expandAllCommentsOnCurrentLine = Expand or collapse all comments on current line