summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/app.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/app.js b/js/app.js
index 9c9e994..43ab047 100644
--- a/js/app.js
+++ b/js/app.js
@@ -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) }
})