From e9e419dc38c57987093e55c20ea5b0fb7dde596c Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Fri, 15 Jan 2016 10:10:10 -0600 Subject: [PATCH 1/2] keyboard shortcut to add above --- .../app/notebook/paragraph/paragraph.controller.js | 4 +++- .../src/components/modal-shortcut/modal-shortcut.html | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 6a70f48ee3c..75e4dd16d48 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -796,8 +796,10 @@ angular.module('zeppelinWebApp') $scope.moveUp(); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 74) { // Ctrl + Alt + j $scope.moveDown(); + } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 78) { // Ctrl + Alt + n + $scope.insertNew('above'); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 66) { // Ctrl + Alt + b - $scope.insertNew(); + $scope.insertNew('below'); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 79) { // Ctrl + Alt + o $scope.toggleOutput(); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 69) { // Ctrl + Alt + e diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html index 95320399e6f..dc75551a98e 100644 --- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html +++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html @@ -78,6 +78,17 @@

Control in Note

+
+
+
+ Ctrl + Alt + n +
+
+
+ Insert new paragraph above +
+
+
From 732917f6c1341129dec2d162a8258ee4cdd19034 Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Fri, 15 Jan 2016 12:04:00 -0600 Subject: [PATCH 2/2] change to a --- zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 2 +- zeppelin-web/src/components/modal-shortcut/modal-shortcut.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 75e4dd16d48..be88498ac57 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -796,7 +796,7 @@ angular.module('zeppelinWebApp') $scope.moveUp(); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 74) { // Ctrl + Alt + j $scope.moveDown(); - } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 78) { // Ctrl + Alt + n + } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 65) { // Ctrl + Alt + a $scope.insertNew('above'); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 66) { // Ctrl + Alt + b $scope.insertNew('below'); diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html index dc75551a98e..1191ec51f93 100644 --- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html +++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html @@ -81,7 +81,7 @@

Control in Note

- Ctrl + Alt + n + Ctrl + Alt + a