From b58993dca63a0676a0fd974da11a0a04d53c2c53 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 28 Feb 2015 01:49:35 +0400 Subject: [PATCH] fix issue with windows 8 language switching shortcut --- plugins/c9.ide.keys/commands.js | 1 - plugins/c9.ide.terminal/aceterm/input.js | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/c9.ide.keys/commands.js b/plugins/c9.ide.keys/commands.js index 0815c7df..a8f88a09 100644 --- a/plugins/c9.ide.keys/commands.js +++ b/plugins/c9.ide.keys/commands.js @@ -326,7 +326,6 @@ define(function(require, exports, module) { commands.find, commands.openterminal, commands.navigate, - commands.navigate_altkey, commands.searchinfiles, commands.close_term_pane, commands.closeallbutme, diff --git a/plugins/c9.ide.terminal/aceterm/input.js b/plugins/c9.ide.terminal/aceterm/input.js index aa56ac39..d9bdc17a 100644 --- a/plugins/c9.ide.terminal/aceterm/input.js +++ b/plugins/c9.ide.terminal/aceterm/input.js @@ -1,4 +1,5 @@ define(function(require, exports, module) { + var isWindows = require("ace/lib/useragent").isWindows; module.exports = function initInput(ace) { var HashHandler = require("ace/keyboard/hash_handler").HashHandler; var KEY_MODS = require("ace/lib/keys").KEY_MODS; @@ -156,6 +157,9 @@ define(function(require, exports, module) { passEvent: !hashId || hashId === KEY_MODS.shift || ( // on mac key combos without ctrl or cmd trigger textinput specialKeys.platform === "mac" && !(hashId & (KEY_MODS.ctrl | KEY_MODS.cmd)) + ) || ( + // on windows 8+ calling preventDefault on win+space breaks textinput + specialKeys.platform === "win" && hashId == KEY_MODS.cmd && (keyCode == 32 || keyCode == -1) ) }; };