qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.23k stars 39.26k forks source link

OSM key not registered when other key is pressed #6567

Closed robertrosman closed 2 years ago

robertrosman commented 5 years ago

Thanks for the excellent work with QMK, it's such a blast!

I've set up shift like an OSM (one shot modifier) and when typing fast enough I sometimes press it before I've released the previous key. The expected behavior would've been that the OSM was registered and applied to the next keypress, not omitted. Would it be possible to achieve such behavior? Are there any obvious drawbacks or unwanted side effects?

Note: If the OSM is pressed and released before releasing the previous key, it is registered as expected. I'll try to illustrate (just to be obvious)

  1. A down, OSM down, A up, OSM up, B, results in ab
  2. A down, OSM down, OSM up, A up, B, results in aB

I would've expected both scenarios to result in aB. I might be able to help fix it if pointed in the right direction in the code base. Fixing this issue would result in so much smoother camelCasing and PascalCasing.

Thanks again, you're awesome!

drashna commented 5 years ago

Which keyboard is this for?

Because I can't reproduce this on my ergodox ez, where I use OSM extensively.

robertrosman commented 5 years ago

That's interesting! This is on a Dactyl.

robertrosman commented 5 years ago

Some more investigation shows that OSL does not have this issue. I've tried OSM on both the microcontroller side and the IO expander side, both are having this issue.

drashna commented 5 years ago

That's is very weird, and I suspect that this is a low level issue.

I suspect that this is an edge case in the handling, but I'm not entirely sure where.

for reference, the actual code for this is here: https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L252-L293

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

zvecr commented 2 years ago

This issue has been automatically closed because it has not had any recent activity. If this issue is still valid, re-open the issue and let us know.