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

classlib: translate modifier keys on mac #1434

Merged
merged 1 commit into from
May 22, 2015

Conversation

scztt
Copy link
Contributor

@scztt scztt commented Apr 18, 2015

This matches View behavior. Fixes #952.

This matches View behavior.
@scztt
Copy link
Contributor Author

scztt commented Apr 18, 2015

@telephon This is fine on mac, but any chance you could verify that it doesn't break anything on Linux?

@scztt scztt added this to the 3.7 milestone Apr 18, 2015
@crucialfelix
Copy link
Member

I can also confirm: works on The Macintosh and it definitely did not work before.

both linux and windows would perform this hack/fix to the modifier:

        { if (mods & QKeyModifiers.control > 0) {cmods = cmods | 262144} } // Ctrl
Document.current.mouseDownAction = { |doc, x, y, mod ...args| 
    [mod,
        'alt:', mod.isAlt,
        'ctrl:', mod.isCtrl,
        'shift:', mod.isShift,
        'cmd:', mod.isCmd,
    ].postln
};

The bug this fixes was that toCocoa was not being used on Document key events as it already is on normal Views.

So as long as normal views are working on linux/windows they must also work on this Document view. If they didn't work then it wouldn't have anything to do with this PR anyway.

should we merge ?

crucialfelix added a commit that referenced this pull request May 22, 2015
…key-modifiers

classlib: translate modifier keys on mac
@crucialfelix crucialfelix merged commit 1bc3e0f into master May 22, 2015
@scztt scztt deleted the topic/fix-Document-wrong-key-modifiers branch May 29, 2015 01:41
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.

3 participants