SideBySide2: Fix copy in Firefox and Safari

Ctrl-C/Cmd-C should be copy to clipboard and should not activate the
insert new comment feature of Gerrit.  Bind to the C key not 'c'.
This uses a different binding method inside of CM3 allowing the
browser to still handle Ctrl-C/Cmd-C.

Bug: issue 2416
Change-Id: Iad6d4e8502c1766caf1cc897f1398068bbde7155
This commit is contained in:
Shawn Pearce 2014-01-27 18:40:17 -08:00 committed by David Pursehouse
parent 817533fae0
commit 527200c83d

View File

@ -288,12 +288,12 @@ public class SideBySide2 extends Screen {
}
});
cm.addKeyMap(KeyMap.create()
.on("'a'", upToChange(true))
.on("'u'", upToChange(false))
.on("'r'", toggleReviewed())
.on("'o'", toggleOpenBox(cm))
.on("A", upToChange(true))
.on("U", upToChange(false))
.on("R", toggleReviewed())
.on("O", toggleOpenBox(cm))
.on("Enter", toggleOpenBox(cm))
.on("'c'", insertNewDraft(cm))
.on("C", insertNewDraft(cm))
.on("Alt-U", new Runnable() {
public void run() {
cm.getInputField().blur();