From b578e889cb8520736be10265de4483a65ba60e3e Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Thu, 21 Jan 2016 11:09:40 -0600 Subject: [PATCH 1/2] map alt or opt based on device --- .../paragraph/paragraph.controller.js | 2 ++ .../modal-shortcut/modal-shortcut.html | 22 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 30c7ea44015..7753f3be5fb 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -574,9 +574,11 @@ angular.module('zeppelinWebApp') if (navigator.appVersion.indexOf('Mac') !== -1 ) { $scope.editor.setKeyboardHandler('ace/keyboard/emacs'); + $rootScope.isMac = true; } else if (navigator.appVersion.indexOf('Win') !== -1 || navigator.appVersion.indexOf('X11') !== -1 || navigator.appVersion.indexOf('Linux') !== -1) { + $rootScope.isMac = false; // not applying emacs key binding while the binding override Ctrl-v. default behavior of paste text on windows. } diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html index 1191ec51f93..4a7315159ae 100644 --- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html +++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html @@ -37,7 +37,7 @@

Control in Note

- Ctrl + Alt + c + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + c
@@ -70,7 +70,7 @@

Control in Note

- Ctrl + Alt + d + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + d
@@ -81,7 +81,7 @@

Control in Note

- Ctrl + Alt + a + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + a
@@ -92,7 +92,7 @@

Control in Note

- Ctrl + Alt + b + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + b
@@ -103,7 +103,7 @@

Control in Note

- Ctrl + Alt + k + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + k
@@ -114,7 +114,7 @@

Control in Note

- Ctrl + Alt + j + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + j
@@ -125,7 +125,7 @@

Control in Note

- Ctrl + Alt + o + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + o
@@ -136,7 +136,7 @@

Control in Note

- Ctrl + Alt + e + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + e
@@ -147,7 +147,7 @@

Control in Note

- Ctrl + Alt + m + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + m
@@ -158,7 +158,7 @@

Control in Note

- Ctrl + Alt + t + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + t
@@ -169,7 +169,7 @@

Control in Note

- Ctrl + Alt + 1~0,-,+ + Ctrl + {{ isMac ? 'Opt' : 'Alt'}} + 1~0,-,+
From 86153b1656bb5c3d11e231a10745f97e5ef62fef Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Fri, 22 Jan 2016 09:30:03 -0600 Subject: [PATCH 2/2] change wording opt to option and titles" --- .../modal-shortcut/modal-shortcut.html | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html index 676aac763ed..863d7dd6a96 100644 --- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html +++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html @@ -21,7 +21,7 @@