From a1a9a189a821bc17cd1f07d7d145d5fe0e1d80a8 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sun, 13 Mar 2016 14:46:33 -0400 Subject: [PATCH] fix typing several symbols --- editor.coffee | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/editor.coffee b/editor.coffee index 72ec0c6..8bc72ef 100644 --- a/editor.coffee +++ b/editor.coffee @@ -251,7 +251,15 @@ outer_css = (args) -> ret += '}' return ret -# key codes: + +ignore_key_codes = + '18': true # alt + '20': true # capslock + '17': true # ctrl + '144': true # numlock + '16': true # shift + '91': true # windows "start" key +# key codes: (valid on keydown, not keypress) KEY_LEFT = 37 KEY_UP = 38 KEY_RIGHT = 39 @@ -266,14 +274,6 @@ KEY_INSERT = 45 KEY_PAGE_UP = 33 KEY_PAGE_DOWN = 34 KEY_TAB = 9 - -ignore_key_codes = - '18': true # alt - '20': true # capslock - '17': true # ctrl - '144': true # numlock - '16': true # shift - '91': true # windows "start" key control_key_codes = # we react to these, but they aren't typing '37': KEY_LEFT '38': KEY_UP @@ -742,7 +742,7 @@ class PeachHTML5Editor onkeypress: (e) -> return if e.ctrlKey return false if ignore_key_codes[e.keyCode]? - return false if control_key_codes[e.keyCode]? # handled in keydown + # return false if control_key_codes[e.keyCode]? # handled in keydown char = e.charCode ? e.keyCode if char and @cursor? char = String.fromCharCode char -- 1.7.10.4