Bug 714832 - [Linux] the redo command should also have the ctrl-y shortcut; r=msucan

This commit is contained in:
Thaddee Tyl 2012-06-16 12:02:32 +03:00
parent cb13a74d97
commit 0c810c1dd7
2 changed files with 22 additions and 0 deletions

View File

@ -131,6 +131,15 @@ const DEFAULT_KEYBINDINGS = [
},
];
if (Services.appinfo.OS == "WINNT" ||
Services.appinfo.OS == "Linux") {
DEFAULT_KEYBINDINGS.push({
action: "redo",
code: Ci.nsIDOMKeyEvent.DOM_VK_Y,
accel: true,
});
}
var EXPORTED_SYMBOLS = ["SourceEditor"];
/**

View File

@ -98,6 +98,19 @@ function editorLoaded()
is(editor.getText(), "code-editor", "Ctrl-Shift-Z (redo) works");
editor.undo();
EventUtils.synthesizeKey("VK_Y", {accelKey: true}, testWin);
if (Services.appinfo.OS == "WINNT" ||
Services.appinfo.OS == "Linux") {
is(editor.getText(), "code-editor",
"CTRL+Y does redo on Linux and Windows");
} else {
is(editor.getText(), "source-editor",
"CTRL+Y doesn't redo on machines other than Linux and Windows");
editor.setText("code-editor");
}
// Test selection methods.
editor.setSelection(0, 4);