]> git.scottworley.com Git - picsort/commitdiff
'esc' to dismiss UI elements
authorScott Worley <scottworley@scottworley.com>
Sat, 1 Mar 2014 06:40:46 +0000 (22:40 -0800)
committerScott Worley <scottworley@scottworley.com>
Sat, 1 Mar 2014 06:40:46 +0000 (22:40 -0800)
This isn't ideal -- it doesn't work if an input has focus.
It's just better than nothing.

picsorter.js

index 213a553ac488356fc9b15d4784c5e2bace04a51b..31ae640d9a2c25ace09ec644024c2c65758abbd2 100644 (file)
@@ -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(); });