Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Use constants for keyCodes #1225

Open
core-ai-bot opened this issue Aug 29, 2021 · 8 comments
Open

[CLOSED] Use constants for keyCodes #1225

core-ai-bot opened this issue Aug 29, 2021 · 8 comments

Comments

@core-ai-bot
Copy link
Member

Issue by tvoliter
Thursday Jul 12, 2012 at 20:31 GMT
Originally opened as adobe/brackets#1241


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

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Jul 18, 2012 at 20:29 GMT


There's more of this in the unit tests now too... see the tests added by pull #1273, for example.

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Tuesday Aug 21, 2012 at 06:13 GMT


Hi brackets people. Looking into fixing this issue- Jochen

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Friday Aug 31, 2012 at 23:55 GMT


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?

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Friday Aug 31, 2012 at 23:58 GMT


I suppose a better place might be to put constants into a KeyEvent class in utils? Thanks for a quick comment.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Saturday Sep 01, 2012 at 21:36 GMT


Joschen, Thanks for taking this on. I marked it as "Fix in Progress". Yes, I think a KeyEvent module in utils is perfect.

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Sunday Sep 09, 2012 at 05:49 GMT


Pull request pending.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Sep 12, 2012 at 22:49 GMT


FBNC to@jasonsanjose

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Thursday Oct 18, 2012 at 17:43 GMT


Confirmed fixed by pull request #1583.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant