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

Fix #156: clear weak mods on every key press #188

Merged
merged 1 commit into from
Mar 27, 2016

Conversation

DidierLoiseau
Copy link
Contributor

Fix for #156:

  • new macro_mods bit field for mods applied by macros – implementation is exactly the same as weak_mods used to be;
  • weak_mods is now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.);
  • clear weak_mods on every key pressed such that LSFT etc. can no more interfere with the next key.

- new macro_mods bit field for mods applied by macros
- weak_mods now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.)
- clear the _weak_ mods on every key *pressed* such that LSFT etc.
  can no more interfere with the next key
@DidierLoiseau
Copy link
Contributor Author

@Eric-L-T TBH I don't really get why you are holding your contribution if you have already tested it sufficiently. I'm not following the OLKB news – I'm an ErgoDox EZ user – but as I understand it the delay for OLKB is 3-8 weeks, right?

I really need a fix for #156 for my everyday usage and I'd prefer to have one in Jack's repository so that I can contribute layouts that rely on it.

For the moment I can't even be sure that your solution will actually be merged – or even whether it actually fixes #156 for my use case.

p.s.: I'm replying directly on the PR so that people watching Jack's repo also get notifications

@jackhumbert
Copy link
Member

I like this solution - I'll try to do some testing soon :)

@DidierLoiseau
Copy link
Contributor Author

@Eric-L-T This fix clears the weak mods on every key press, such that the mods applied by LSFT are removed if the next key is pressed before the key with the modifier is released.

However simply clearing the weak mods without using a different bit field for macros would obviously affect the macros too, and some people might be using macros to intentionally apply modifiers so I don't want to change this behaviour.

@ezuk
Copy link
Contributor

ezuk commented Mar 27, 2016

@jackhumbert - wanna merge this one?

@jackhumbert
Copy link
Member

I'd like to, but I haven't had the chance to double-check things yet - if it looks ok to you, let's get it merged!

@ezuk
Copy link
Contributor

ezuk commented Mar 27, 2016

Let's do it! Living dangerously here. Can always revert with the power of git. @DidierLoiseau here we go!

@ezuk ezuk merged commit 80eefb0 into qmk:master Mar 27, 2016
@DidierLoiseau
Copy link
Contributor Author

Thanks :-)

DidierLoiseau added a commit to DidierLoiseau/qmk_firmware that referenced this pull request Apr 5, 2016
on mod keys, register LGUI, LSFT etc. as normal mods
 instead of weak mods:
 - they won't be cleared when pressing another key (qmk#188)
 - they won't be cleared by layer switching
 - LSFT(KC_LGUI) will now have the same behavior as LGUI(KC_LSFT)
@eltang
Copy link
Contributor

eltang commented Apr 21, 2016

@DidierLoiseau Jack has given me the go-ahead. One pull request coming up!

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.

4 participants