discourse/discourse — pull request #2833 by mamhoff (2014-10-01 13:51:36+00:00)
Title: BUGFIX: Handle text input in keypress handler for I18n

While the `keydown` handler is the only way of reliably catching special keys,
for textual input `keypress` is preferable, as it can handle thing like parens
without having to hardcode a keyboard.

I moved that code and in the process converted some magic numbers to constants
- mostly so I can read stuff better.