Skip to content

Conversation

@crondog
Copy link

@crondog crondog commented Jul 12, 2014

I end up receiving the event modifier events starting from 1024. Masking fixes this. Is there a nicer way of doing this?

@m910q
Copy link

m910q commented Jul 12, 2014

Thanks, this fixes the non-working shortcuts in Ubuntu.

I guess it would be better to pre-calculate the value, instead of doing it in each if-statement.

@crondog
Copy link
Author

crondog commented Jul 13, 2014

So i found a nice way of doing it. I ended up creating Mod vars to make things easier to read. From what i have seen elsewhere doing it inside the if is common practice.

Could a mac person please test this as i changed the mac modifier code

@spolu
Copy link
Member

spolu commented Jul 13, 2014

I'll test it on both OSX and Linux on Monday!

@spolu
Copy link
Member

spolu commented Jul 14, 2014

Looks not bad, can you comply with the coding style (no camelcase).
Maybe we could define a function instead of a bunch of variable names, to test the the masks?

@spolu
Copy link
Member

spolu commented Jul 14, 2014

Works well on OSX! :)

ps2: Use Mod vars and clean up mac overrides
ps3: Fix var names
@crondog
Copy link
Author

crondog commented Jul 15, 2014

Ok I have fixed the var names to be lower case. Also I'm not really sure how we would use a function here instead the the variable names because wouldn't we still need to pass in and/or test that the event key modifier is what we want.

@spolu
Copy link
Member

spolu commented Jul 15, 2014

It could take the event as imput, an array of modifiers and a key?

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