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

Prioritize platform-specific keybindings over generic bindings #2372

Merged
merged 4 commits into from
Dec 18, 2012

Conversation

jasonsanjose
Copy link
Member

Fixes Joel's issue from this morning's standup

@ghost ghost assigned redmunds Dec 17, 2012

/**
* Use windows-specific bindings if no other are found (e.g. linux)
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Should add a note here that the purpose of this is to make extensions backward-compatible and brackets core code should always have keybindings explicitly defined.

Is there a way to verify this in the code and write something in the console log?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way to verify what? That we eventually get either (1) a generic key binding or (2) a key binding for the current platform? We could validate the default keyboard.json, but for clients calling addBinding directly we can't.

Copy link
Member Author

Choose a reason for hiding this comment

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

added comment

@redmunds
Copy link
Contributor

Done with initial review.

@jasonsanjose
Copy link
Member Author

@redmunds ready to review again. I didn't add any validation of key bindings since it depends on usage. Clients may add key bindings at any time, in any order. It doesn't seem to make sense to do the validation work, at least in our current state.

@redmunds
Copy link
Contributor

The validation I was asking about is whether a keybinding is for core Brackets code, or from an extension.

@redmunds
Copy link
Contributor

There doesn't yet seem to be a reasonable way to determine if a shortcut is coming from an extension, so dropping that.

@redmunds
Copy link
Contributor

Looks good. Merging.

@joelrbrandt This fixes the key binding bug you showed in the architecture meeting

redmunds added a commit that referenced this pull request Dec 18, 2012
Prioritize platform-specific keybindings over generic bindings
@redmunds redmunds merged commit 2804ee2 into master Dec 18, 2012
ArtanisAce added a commit to ArtanisAce/brackets that referenced this pull request Sep 20, 2017
flukeout pushed a commit to mozilla/brackets that referenced this pull request Sep 26, 2017
gideonthomas pushed a commit to mozilla/brackets that referenced this pull request Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants