diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/app.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -45,17 +45,20 @@ function bind () { if (! e.metaKey && ! e.ctrlKey && ! e.altKey) { e.preventDefault() } + + console.log("keycode:", e.keyCode) + switch (e.keyCode) { case 27: // esc if (focused) focused.blur() break case 219: // [ - if (! focused && current_tool.name != "text") { + if (current_tool.name != "text") { brush.contract(1) break } case 221: // ] - if (! focused && current_tool.name != "text") { + if (current_tool.name != "text") { brush.expand(1) break } @@ -69,7 +72,10 @@ function bind () { return } var char = cursor_input.value - cursor_input.value = "" +// cursor_input.value = "" + + console.log("input:", char) + if (focused) { focused.key(char, e.keyCode) } }) |
