Update 'addBinding' documentation in KeyBindingManager.#10225
Update 'addBinding' documentation in KeyBindingManager.#10225
Conversation
There was a problem hiding this comment.
Btw what is the reason for this key replacement?
It's to make specifying shortcuts simpler. Usually a command with a shortcut of Ctrl on Windows is Cmd on Mac.
Is this causing a problem, or you just weren't aware of it?
There was a problem hiding this comment.
Wasn't aware of it and quite surprised me :)
I had an issue that user was trying to set Ctrl shortcuts in Git extension but it got binded to Cmd instead, so I had to look through the codes to realize I have to specify brackets.platform as a third argument for addBinding method.
There was a problem hiding this comment.
I should have followed the link first :)
Shortcuts specified for keybindings are cross-platform, so Ctrl is translated to Cmd on Mac for reason stated here.
But, user key map is user-specific, which is more likely to be machine-specific, so we do not translate Ctrl is translated to Cmd on Mac in this case.
|
I'll merge this as soon as we tag the repo for |
|
@redmunds this can be merged now. I have tagged the repo yesterday. |
Update 'addBinding' documentation in KeyBindingManager.
Related to issue brackets-userland/brackets-git#846
Btw what is the reason for this key replacement?