Skip to content

Conversation

zephylac
Copy link
Collaborator

This feature add support for Mac.
Before this the modifier key was Control even on MacOS.
With this fix, windows and linux will have Control as modifierKey whereas MacOS will have cmd which is more natural.

I decided to not add this to the configuration file because we wouldn't be compatible to each architecture or we would need to add modifier key for each platform.

I'm up for any suggestion to improve this.

@zephylac zephylac requested a review from pchampio January 23, 2019 22:03
Copy link
Member

@pchampio pchampio left a comment

Choose a reason for hiding this comment

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

ModShiftControl is still hard coded.
Since the modifierKey is not necessarily Control, the change must take into account the new modifierKey in some statements.

It might me the time to move away from passing int(mods) into each state functions.
I would rather have a Boolean saying which modifier is active or not.
i.e.state.MoveCursorLeft(true, false) for CursorLeft + shift + no-ctrl/meta

Copy link
Member

@pchampio pchampio left a comment

Choose a reason for hiding this comment

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

https://transfer.sh/u2ct3/flutter.gif

Regression: ctrl-Left/Right isn't working anymore.
Regression: when the key Left is pressed it send the cursor to the start of the input.

@GeertJohan GeertJohan mentioned this pull request Feb 19, 2019
@GeertJohan
Copy link
Member

GeertJohan commented Feb 19, 2019

Have the regressions been resolved? (I don't have a Mac currently)

@zephylac
Copy link
Collaborator Author

I solved them on MacOS but didn't had time to test them on linux, we had some issues but I should have fixed the. But still I didn't implemented what you suggested in #51

@GeertJohan
Copy link
Member

I think using runtime.GOOS is good as well. I'll test this PR tomorow evening on linux.

@GeertJohan
Copy link
Member

I've just merged master into this branch to make it compile again with the moved repo.

I did some testing. This still is this case on my linux machine:

Regression: ctrl-Left/Right isn't working anymore.

The other regression has indeed been solved for linux.

@zephylac
Copy link
Collaborator Author

I'll try to look into it ASAP

@GeertJohan GeertJohan merged commit ae0e25c into master Mar 4, 2019
@GeertJohan GeertJohan deleted the feature/MacOS_Shortcuts branch March 4, 2019 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants