Shortcut keys update

Shortcut keys for Save, New, and Duplicate now include alt
This commit is contained in:
Amer Almadani 2016-09-18 21:24:59 +03:00 committed by GitHub
parent d861934dfc
commit 3fb9caa5b6
1 changed files with 5 additions and 5 deletions

View File

@ -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, '') !== '') {
@ -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();
}