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

Couzteau issue1241 #1583

Merged
merged 10 commits into from
Sep 12, 2012
Merged

Couzteau issue1241 #1583

merged 10 commits into from
Sep 12, 2012

Conversation

couzteau
Copy link
Member

@couzteau couzteau commented Sep 7, 2012

Hello Brackets people,
Happy to make a stab at my first contribution. :)

All keycode references in src should be updated. All tests are passing.
I have not updated all tests to use the new module yet, but would be happy to update them soon.
Got to get to my day job ;)

Not sure if you like that I added some KeyCode definitions that are not defined here:
http://www.javascripter.net/faq/keyeventconstantsfirefox.htm

Those listed below are not defined in the , as IE deviates from other browsers. Since brackets uses them I added them following the same naming convention as other key codes. We may want to use a different prefix rather than DOM_VK? to stay consisten Happy to change if you prefer.
DOM_VK_SEMICOLON: 186,
DOM_VK_EQUALS: 187,
DOM_VK_COMMA: 188,
DOM_VK_DASH: 189

Adding them in required to remove definition defined the reference doc above:
DOM_VK_EQUALS: 61,
DOM_VK_SEMICOLON: 59,

I have not updated any key code references in sources in 3rd party or extensions.

Jochen

@ghost ghost assigned jasonsanjose Sep 7, 2012
/*global define, $, window */

/**
* Utilities for working with Deferred, Promise, and other asynchronous processes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix comment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@jasonsanjose
Copy link
Member

Reviewing

@jasonsanjose
Copy link
Member

Looks like there are some additional references that use e.which instead of e.keyCode in widgets/Dialogs. Would you update those as well?

Initial review complete.

@couzteau
Copy link
Member Author

couzteau commented Sep 7, 2012

Sure - will make the changes.

@couzteau
Copy link
Member Author

couzteau commented Sep 7, 2012

Thanks for the through review - i was rushing it a bit this morning

@couzteau
Copy link
Member Author

couzteau commented Sep 7, 2012

@RaymondLim : I did think about that, but I looked it up. Turns out the original definition
per also defines the code as VK_EQUALS
http://www.javascripter.net/faq/keyeventconstantsfirefox.htm

Note - I redefined the code as the brackets uses 187.
KeyEvent.DOM_VK_EQUALS = 61

  •    DOM_VK_EQUALS: 187,
    

Also, why plural here? should be VK_EQUAL.

@RaymondLim
Copy link
Contributor

@couzteau

I googled on VK_EQUAL and found out that there are two camps. So I'm okay to keep it as is.

BTW, there are some hard-coded key codes in CodeHintManager.js that you need to replace with your changes too.

@couzteau
Copy link
Member Author

Thanks Ray - I'll take a look at Code hinte manger as well as the tests and update the pull request.

@jasonsanjose
Copy link
Member

Hi Jochen. Looks like you need to sync up with master before we can merge.

@couzteau
Copy link
Member Author

Thanks for the info - won't get ti it before tonight.

@@ -23,7 +23,7 @@


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, $, brackets, window */
/*global define, brackets */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing $ was ok here, but you should be seeing a jslint error for window.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - JSLint did complain. - I put it back in

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was complaining about both - I put both back in.

@jasonsanjose
Copy link
Member

@couzteau please also sign the CLA before I merge this pull request http://dev.brackets.io/brackets-contributor-license-agreement.html

@couzteau
Copy link
Member Author

done

@jasonsanjose
Copy link
Member

Thanks. Merging.

jasonsanjose added a commit that referenced this pull request Sep 12, 2012
@jasonsanjose jasonsanjose merged commit 6c8d32e into adobe:master Sep 12, 2012
@couzteau
Copy link
Member Author

Yay! Thanks -my pleasure.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants