Commit c0c5b4ce authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add Enter and Escape keybindings for iemgui dialog window

parent 158dfe1e
......@@ -310,7 +310,6 @@ console.log("my working dire is " + pdgui.get_pwd());
// gui preset
pdgui.skin.apply(this);
var pd_object_callback;
function ok() {
......@@ -573,6 +572,13 @@ function add_events(name) {
pdgui.remove_dialogwin(pd_object_callback);
this.close(true);
});
document.onkeydown = function(evt) {
if (evt.keyCode === 13) { // enter
ok();
} else if (evt.keyCode === 27) { // escape
cancel();
}
};
}
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment