From 5c5a22c99c4a563e2c2bfc2c0fd8852016d596ce Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 27 Jan 2016 00:54:50 +0400 Subject: [PATCH] ctrl-\ should send SIGQUIT --- plugins/c9.ide.keys/commands.js | 1 + plugins/c9.ide.terminal/aceterm/input.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/c9.ide.keys/commands.js b/plugins/c9.ide.keys/commands.js index b95d6d6c..0cab430e 100644 --- a/plugins/c9.ide.keys/commands.js +++ b/plugins/c9.ide.keys/commands.js @@ -321,6 +321,7 @@ define(function(require, exports, module) { }, commands.openpreferences, commands.passKeysToBrowser, + commands.commands, commands.find, commands.openterminal, commands.navigate, diff --git a/plugins/c9.ide.terminal/aceterm/input.js b/plugins/c9.ide.terminal/aceterm/input.js index 2fb3e2bc..18289eb8 100644 --- a/plugins/c9.ide.terminal/aceterm/input.js +++ b/plugins/c9.ide.terminal/aceterm/input.js @@ -1,6 +1,7 @@ define(function(require, exports, module) { var isWindows = require("ace/lib/useragent").isWindows; module.exports = function initInput(ace) { + // use showkey --ascii to test var HashHandler = require("ace/keyboard/hash_handler").HashHandler; var KEY_MODS = require("ace/lib/keys").KEY_MODS; var TERM_MODS = { @@ -98,7 +99,7 @@ define(function(require, exports, module) { if (isControl) { if (keyCode >= 65 && keyCode <= 90) { key = String.fromCharCode(keyCode - 64); - } else if (keyCode === 32) { + } else if (keyCode === 32 || keyCode == 192) { // NUL key = String.fromCharCode(0); } else if (keyCode >= 51 && keyCode <= 55) { @@ -116,6 +117,9 @@ define(function(require, exports, module) { } else if (keyCode === 189 || keyCode === 173) { // _ key = String.fromCharCode(31); + } else if (keyCode === 220) { + // SIGQUIT + key = String.fromCharCode(28); } } else if (isMeta) { if (keyCode >= 65 && keyCode <= 90) {