fix issue with windows 8 language switching shortcut

pull/39/head^2
nightwing 2015-02-28 01:49:35 +04:00
rodzic 6e8a74e18f
commit b58993dca6
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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,

Wyświetl plik

@ -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)
)
};
};