From: Scott Worley Date: Sat, 1 Mar 2014 06:40:46 +0000 (-0800) Subject: 'esc' to dismiss UI elements X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/de26d1f865a23c4a31fedf485ab3acc08d567dd2?ds=sidebyside 'esc' to dismiss UI elements This isn't ideal -- it doesn't work if an input has focus. It's just better than nothing. --- diff --git a/picsorter.js b/picsorter.js index 213a553..31ae640 100644 --- a/picsorter.js +++ b/picsorter.js @@ -189,3 +189,4 @@ Mousetrap.bind('r', rotate); Mousetrap.bind('c', function() { $("#name").show().focus(); return false; }); Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); }); Mousetrap.bind('!', show_commands); +Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); });