From 3fb9caa5b666ce5282a1de1f11ef3c87f1a72e89 Mon Sep 17 00:00:00 2001 From: Amer Almadani Date: Sun, 18 Sep 2016 21:24:59 +0300 Subject: [PATCH] Shortcut keys update Shortcut keys for Save, New, and Duplicate now include alt --- static/application.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/application.js b/static/application.js index ddc18ee..b2f90c0 100644 --- a/static/application.js +++ b/static/application.js @@ -262,9 +262,9 @@ haste.prototype.configureButtons = function() { { $where: $('#box2 .save'), label: 'Save', - shortcutDescription: 'control + s', + shortcutDescription: 'control + alt + s', shortcut: function(evt) { - return evt.ctrlKey && (evt.keyCode === 83); + return evt.ctrlKey && evt.altKey && (evt.keyCode === 83); }, action: function() { if (_this.$textarea.val().replace(/^\s+|\s+$/g, '') !== '') { @@ -276,7 +276,7 @@ haste.prototype.configureButtons = function() { $where: $('#box2 .new'), label: 'New', shortcut: function(evt) { - return evt.ctrlKey && evt.altKey && evt.keyCode === 78 + return evt.ctrlKey && evt.altKey && evt.keyCode === 78 }, shortcutDescription: 'control + atl + n', action: function() { @@ -287,9 +287,9 @@ haste.prototype.configureButtons = function() { $where: $('#box2 .duplicate'), label: 'Duplicate & Edit', shortcut: function(evt) { - return _this.doc.locked && evt.ctrlKey && evt.keyCode === 68; + return _this.doc.locked && evt.ctrlKey && evt.altKey && evt.keyCode === 68; }, - shortcutDescription: 'control + d', + shortcutDescription: 'control + alt + d', action: function() { _this.duplicateDocument(); }