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

[monaco] Fix keybindings on os x #3835

Merged
merged 1 commit into from
Dec 14, 2018
Merged

[monaco] Fix keybindings on os x #3835

merged 1 commit into from
Dec 14, 2018

Conversation

svenefftinge
Copy link
Contributor

Fixes #3834

Signed-off-by: Sven Efftinge [email protected]

@svenefftinge
Copy link
Contributor Author

@kittaakos could you check on windows as well?

@@ -79,7 +79,7 @@ export class MonacoKeybindingContribution implements KeybindingContribution {
first: Key.getKey(monaco2BrowserKeyCode(keyCode & 255)),
modifiers: []
};
if (keybinding.ctrlKey) {
if (keybinding.metaKey) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think with this change, we never add Ctrl to the sequence in Windows... I am verifying it anyways

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@kittaakos kittaakos Dec 14, 2018

Choose a reason for hiding this comment

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

The logic should be something like this

  • IF OS === macOS AND isMeta AND isCtrl then it is a CtrlCmd
  • IF OS === macOS AND !isMeta AND isCtrl the it is a MacCtrl (this should not do anything on Windows)
  • IF OS !== macOS AND isCtrl then it is a CtrlCmd

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. So it is already handled by monaco. Thanks for the clarification.

@kittaakos
Copy link
Contributor

Space does not work anymore in Windows. It always shows the CA instead:

screencast 2018-12-14 11-39-54

@svenefftinge
Copy link
Contributor Author

oh, how convenient :-)

Fixes #3834

Signed-off-by: Sven Efftinge <[email protected]>
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

I have verified the changes on Windows with the browser example. It worked. 👍

@svenefftinge svenefftinge merged commit a1180d7 into master Dec 14, 2018
@svenefftinge svenefftinge deleted the GH-3834 branch December 14, 2018 12:36
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

Successfully merging this pull request may close these issues.

2 participants