From 6a97f1fc01179c56734e70aaf492f2e1762f5b7f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 16 Oct 2014 06:18:26 -0400 Subject: [PATCH] feature(key) ctrl || meta -> ctrlMeta --- lib/client/key.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/client/key.js b/lib/client/key.js index 99db3c04..2458e01e 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -195,7 +195,8 @@ var CloudCmd, Util, DOM; shift = event.shiftKey, alt = event.altKey, ctrl = event.ctrlKey, - meta = event.metaKey; + meta = event.metaKey, + ctrlMeta = ctrl || meta; if (current) { prev = current.previousSibling; @@ -416,14 +417,14 @@ var CloudCmd, Util, DOM; break; case Key.BACKSLASH: - if (ctrl || meta) + if (command) CloudCmd.loadDir({ path: '/' }); break; case Key.A: - if (ctrl || meta) + if (ctrlMeta) DOM.toggleAllSelectedFiles(); Events.preventDefault(event); @@ -437,7 +438,7 @@ var CloudCmd, Util, DOM; * (обновляем кэш) */ case Key.R: - if (ctrl) { + if (ctrlMeta) { Util.log('reloading page...\n'); CloudCmd.refresh(); @@ -446,28 +447,28 @@ var CloudCmd, Util, DOM; break; case Key.C: - if (ctrl || meta) + if (ctrlMeta) Buffer.copy(); break; case Key.X: - if (ctrl || meta) + if (ctrlMeta) Buffer.cut(); break; case Key.V: - if (ctrl || meta) + if (ctrlMeta) Buffer.paste(); break; case Key.Z: - if (ctrl || meta) + if (ctrlMeta) Buffer.clear(); break; /* чистим хранилище */ case Key.D: - if (ctrl) { + if (ctrlMeta) { Util.log('clearing storage...'); DOM.Storage.clear();