Added keyboard patch for funky Chromebook search key combos (now compatible with Crouton).

This commit is contained in:
Thomas Wilburn 2013-12-13 08:25:10 -08:00
parent 01af29f551
commit 6331cfebdf
3 changed files with 9 additions and 6 deletions

View file

@ -11,6 +11,10 @@
//Chromebook fixes
"^-up": { "ace": "addCursorAbove" },
"^-down": { "ace": "addCursorBelow" },
"M-pagedown": { "ace": "pagedown" },
"M-pageup": { "ace": "pageup" },
"M-home": { "ace": "gotolinestart" },
"M-end": { "ace": "gotolineend" },
//Sublime compatibility
"^-l": "sublime:expand-to-line",

View file

@ -11,7 +11,6 @@ define([
});
//this is a place to put bindings that don't have direct equivalents in Ace, but are required for Sublime compatibility
command.on("sublime:expand-to-line", function() {
editor.execCommand("gotolinestart");
editor.execCommand("selecttolineend");
@ -109,7 +108,6 @@ define([
editor.commands.bindKey("Ctrl-Shift-P", null);
//filter some Ace commands for UI purposes
var isRecording = false;
command.on("ace:togglemacro", function() {
isRecording = !isRecording;
@ -122,6 +120,7 @@ define([
}
});
//API bindings
command.on("editor:insert", function(text) {
editor.insert(text);
});

View file

@ -4,15 +4,15 @@ define([
"editor",
"util/dom2"
], function(Settings, command, editor) {
/*
Still need to set Sublime keybindings
*/
var keycodes = {
9: "TAB",
13: "RETURN",
32: "SPACE",
33: "PAGEUP",
34: "PAGEDOWN",
35: "END",
36: "HOME",
37: "LEFT",
39: "RIGHT",
38: "UP",