diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7b4bbd366a..dd27a6a6667 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
**Misc**
- [Issue #938](https://github.com/grafana/grafana/issues/938). Panel: Plugin panels now reside outside of app/panels directory
+- [Issue #952](https://github.com/grafana/grafana/issues/952). Help: Shortcut "?" to open help modal with list of all shortcuts
**Fixes**
- [Issue #925](https://github.com/grafana/grafana/issues/925). Graph: bar width calculation fix for some edge cases (bars would render on top of each other)
diff --git a/src/app/partials/help_modal.html b/src/app/partials/help_modal.html
new file mode 100644
index 00000000000..8fca3680fa0
--- /dev/null
+++ b/src/app/partials/help_modal.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ |
+ Dashboard wide shortcuts |
+
+
+ | ESC |
+ Exit fullscreen edit/view mode, close search or any editor view |
+
+
+ | CTRL+F |
+ Open dashboard search view (also contains import/playlist controls) |
+
+
+ | CTRL+S |
+ Save dashboard |
+
+
+ | CTRL+H |
+ Hide row controls |
+
+
+ | CTRL+Z |
+ Zoom out |
+
+
+ | CTRL+R |
+ Refresh (Fetches new data and rerenders panels) |
+
+
+
+
+
+
+
diff --git a/src/app/services/dashboard/dashboardKeyBindings.js b/src/app/services/dashboard/dashboardKeyBindings.js
index 987bb5a71ad..c87b07db622 100644
--- a/src/app/services/dashboard/dashboardKeyBindings.js
+++ b/src/app/services/dashboard/dashboardKeyBindings.js
@@ -8,7 +8,7 @@ function(angular, $) {
var module = angular.module('grafana.services');
- module.service('dashboardKeybindings', function($rootScope, keyboardManager) {
+ module.service('dashboardKeybindings', function($rootScope, keyboardManager, $modal, $q) {
this.shortcuts = function(scope) {
@@ -22,6 +22,24 @@ function(angular, $) {
keyboardManager.unbind('esc');
});
+ var helpModalScope = null;
+ keyboardManager.bind('shift+¿', function() {
+ if (helpModalScope) { return; }
+
+ helpModalScope = $rootScope.$new();
+ var helpModal = $modal({
+ template: './app/partials/help_modal.html',
+ persist: false,
+ show: false,
+ scope: helpModalScope,
+ keyboard: false
+ });
+
+ helpModalScope.$on('$destroy', function() { helpModalScope = null; });
+ $q.when(helpModal).then(function(modalEl) { modalEl.modal('show'); });
+
+ }, { inputDisabled: true });
+
keyboardManager.bind('ctrl+f', function() {
scope.appEvent('show-dash-editor', { src: 'app/partials/search.html' });
}, { inputDisabled: true });
diff --git a/src/app/services/keyboardManager.js b/src/app/services/keyboardManager.js
index 9875d74964f..72124fe76af 100644
--- a/src/app/services/keyboardManager.js
+++ b/src/app/services/keyboardManager.js
@@ -277,4 +277,4 @@ function (angular) {
return keyboardManagerService;
}]);
-});
\ No newline at end of file
+});
diff --git a/src/css/less/grafana.less b/src/css/less/grafana.less
index ab9e9ee99b9..1f676b97531 100644
--- a/src/css/less/grafana.less
+++ b/src/css/less/grafana.less
@@ -552,3 +552,9 @@ select.grafana-target-segment-input {
.grafana-tip {
padding-left: 5px;
}
+
+.shortcut-table {
+ td { padding: 3px; }
+ th:last-child { text-align: left; }
+ td:first-child { text-align: right; }
+}