summaryrefslogtreecommitdiff
path: root/js/app.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-22 17:33:47 -0500
committerJules Laplace <jules@okfoc.us>2014-11-22 17:33:47 -0500
commitd14b3d777182602093364874ceeccae1d595e3a9 (patch)
tree8ee27e72a7fa3f37fb57fcd96d0c5707d3c55f83 /js/app.js
parent59302353fb1fb7724b5c64c80fd765fc1dcce8ec (diff)
fixing brackets
Diffstat (limited to 'js/app.js')
-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) }
})