Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Use constants for keyCodes #1241

Closed
tvoliter opened this issue Jul 12, 2012 · 8 comments
Closed

Use constants for keyCodes #1241

tvoliter opened this issue Jul 12, 2012 · 8 comments

Comments

@tvoliter
Copy link
Contributor

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

@peterflynn
Copy link
Member

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

@couzteau
Copy link
Member

Hi brackets people. Looking into fixing this issue- Jochen

@couzteau
Copy link
Member

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?

@couzteau
Copy link
Member

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

@redmunds
Copy link
Contributor

redmunds commented Sep 1, 2012

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

@couzteau
Copy link
Member

couzteau commented Sep 9, 2012

Pull request pending.

@ghost ghost assigned jasonsanjose Sep 12, 2012
@jasonsanjose
Copy link
Member

FBNC to @jasonsanjose

@jasonsanjose
Copy link
Member

Confirmed fixed by pull request #1583.

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

No branches or pull requests

5 participants