fixing keyboard handling with least hassle
This commit is contained in:
parent
2d43ddd047
commit
2ddec8717c
4 changed files with 16 additions and 7 deletions
|
|
@ -405,4 +405,9 @@ exports.startup = function() {
|
|||
};
|
||||
|
||||
|
||||
exports.shutdown = function() {
|
||||
// TODO: unregister commands
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,11 +43,13 @@ define(function(require, exports, module) {
|
|||
exports.startup = function startup(data) {
|
||||
require("ace/settings").startup(data);
|
||||
require("ace/commands/settings").startup(data);
|
||||
require('ace/commands/default_commands').startup(data);
|
||||
require("ace/settings/default-settings").startup(data);
|
||||
};
|
||||
|
||||
exports.shutdown = function shutdown(data) {
|
||||
require("ace/settings/default-settings").shutdown(data);
|
||||
require('ace/commands/default_commands').shutdown(data);
|
||||
require("ace/commands/settings").shutdown(data);
|
||||
require("ace/settings").shutdown(data);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@
|
|||
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var useragent = require("pilot/useragent");
|
||||
var event = require("pilot/event");
|
||||
var canon = require("cockpit/canon");
|
||||
var useragent = require('pilot/useragent');
|
||||
var event = require('pilot/event');
|
||||
var typecheck = require('pilot/typecheck');
|
||||
var canon = require('cockpit/canon');
|
||||
|
||||
var keyUtil = require("ace/keys");
|
||||
var settings = require("ace/settings").settings;
|
||||
require("ace/commands/default_commands");
|
||||
var keyUtil = require('ace/keys');
|
||||
var settings = require('ace/settings').settings;
|
||||
|
||||
var KeyBinding = function(editor) {
|
||||
this.$editor = editor;
|
||||
|
|
@ -202,6 +202,8 @@ function buildKeyHash(command) {
|
|||
}
|
||||
}
|
||||
|
||||
canon.buildKeyHash = buildKeyHash;
|
||||
|
||||
function findKeyCommand(env, sender, hashId, textOrKey) {
|
||||
// Convert keyCode to the string representation.
|
||||
if (typecheck.isNumber(textOrKey)) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c2f60c25cf56854c67be75dead68d3b37f0acbb6
|
||||
Subproject commit 81d897e6248d4304655dc068353af40a94e35c7a
|
||||
Loading…
Add table
Add a link
Reference in a new issue