This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Use constants for keyCodes #1241
Comments
There's more of this in the unit tests now too... see the tests added by pull #1273, for example. |
Hi brackets people. Looking into fixing this issue- Jochen |
This is an easy fix but I wonder what the preferred place to define key constants would be. Do you want them in utils.Globals.js? |
I suppose a better place might be to put constants into a KeyEvent class in utils? Thanks for a quick comment. |
Joschen, Thanks for taking this on. I marked it as "Fix in Progress". Yes, I think a KeyEvent module in utils is perfect. |
Pull request pending. |
ghost
assigned jasonsanjose
Sep 12, 2012
FBNC to @jasonsanjose |
Confirmed fixed by pull request #1583. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Most of Brackets code that looks at the keyCode member of an event compares it against the keyCode number. Brackets could would be more readable if keycode constants were used instead.
References regarding constants and keyCodes
http://www.javascripter.net/faq/keyeventconstantsfirefox.htm
http://stackoverflow.com/questions/1465374/javascript-event-keycode-constants
The text was updated successfully, but these errors were encountered: