mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 09:57:30 +01:00
space: deselect and quit current tool with escape key
This commit is contained in:
@@ -197,6 +197,7 @@ var SpacedeckSections = {
|
|||||||
|
|
||||||
Mousetrap.bind('del', function(evt) { this.if_editable(function() {this.delete_selected_artifacts(evt);}) }.bind(this));
|
Mousetrap.bind('del', function(evt) { this.if_editable(function() {this.delete_selected_artifacts(evt);}) }.bind(this));
|
||||||
Mousetrap.bind('backspace', function(evt) { this.if_editable(function() {this.delete_selected_artifacts(evt);}) }.bind(this));
|
Mousetrap.bind('backspace', function(evt) { this.if_editable(function() {this.delete_selected_artifacts(evt);}) }.bind(this));
|
||||||
|
Mousetrap.bind('esc', function(evt) { this.deselect(); this.deactivate_tool(); }.bind(this));
|
||||||
Mousetrap.bind(['command+d', 'ctrl+d' ], function(evt) { evt.preventDefault(); evt.stopPropagation(); this.if_editable(function() {this.duplicate_selected_artifacts();}) }.bind(this));
|
Mousetrap.bind(['command+d', 'ctrl+d' ], function(evt) { evt.preventDefault(); evt.stopPropagation(); this.if_editable(function() {this.duplicate_selected_artifacts();}) }.bind(this));
|
||||||
Mousetrap.bind(['command+z', 'ctrl+z' ], function(evt) { this.if_editable(function() {this.undo();}) }.bind(this));
|
Mousetrap.bind(['command+z', 'ctrl+z' ], function(evt) { this.if_editable(function() {this.undo();}) }.bind(this));
|
||||||
Mousetrap.bind(['command+shift+z','ctrl+shift+z'], function(evt) { this.if_editable(function() {this.redo();}) }.bind(this));
|
Mousetrap.bind(['command+shift+z','ctrl+shift+z'], function(evt) { this.if_editable(function() {this.redo();}) }.bind(this));
|
||||||
@@ -666,14 +667,6 @@ var SpacedeckSections = {
|
|||||||
},100);
|
},100);
|
||||||
},
|
},
|
||||||
|
|
||||||
handle_section_keydown: function(evt) {
|
|
||||||
if (evt.keyCode == 67 && (evt.ctrlKey || evt.metaKey)) { // c key
|
|
||||||
this.prepare_clipboard();
|
|
||||||
this.prepare_clipboard_step2();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
handle_onbeforecopy: function(evt) {
|
handle_onbeforecopy: function(evt) {
|
||||||
if (this.editing_artifact_id) return;
|
if (this.editing_artifact_id) return;
|
||||||
|
|
||||||
@@ -2554,6 +2547,10 @@ var SpacedeckSections = {
|
|||||||
this.toolbar_artifacts_in = false;
|
this.toolbar_artifacts_in = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deactivate_tool: function(evt) {
|
||||||
|
this.active_tool = "pointer";
|
||||||
|
},
|
||||||
|
|
||||||
start_adding_artifact: function(evt) {
|
start_adding_artifact: function(evt) {
|
||||||
evt = fixup_touches(evt);
|
evt = fixup_touches(evt);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user