Allow keyboard shortcuts to be scoped to a dom element

This gets rid of the need to enable/disable the keyboard handling
at various times.

Allows Ctrl-C to work as expected when selecting text in debug/info
sidebar.

Downside is shortcuts that apply to the workspace (select-all, copy
etc) now require the workspace to be focussed.
This commit is contained in:
Nick O'Leary
2016-05-08 22:50:55 +01:00
parent 8e6bba143a
commit a9bfa4e79b
9 changed files with 208 additions and 208 deletions

View File

@@ -472,10 +472,8 @@ RED.library = (function() {
],
open: function(e) {
$(this).parent().find(".ui-dialog-titlebar-close").hide();
RED.keyboard.disable();
},
close: function(e) {
RED.keyboard.enable();
}
});
exportToLibraryDialog.children(".dialog-form").append($(