Tap dance callbacks may register weak mods; one case when it happens
is when a tap dance registers a key with modifiers. When the tap
dance is interrupted by pressing another key, these weak mods could
affect the interrupting key (normally any stale weak mods are cleared
at the start of action_exec() when handling a keypress event, but the
tap dance interrupt check code is called later, and the weak mods left
by that code were not cleared). Add another clear_weak_mods() call to
preprocess_tap_dance() to make sure that the interrupting keypress is
not affected by unrelated weak mods from the previous tap dance.
Fixes#12445.
* Fix how USB queue overflow is handled in chibios.
This commit reverts PR 12472 (commit c823fe2d3f),
and it implements the original intent of the commit in a better way.
The original intent of the above mentioned commit was to not deadlock the
keyboard when console is enabled, and hid_listen is not started.
The above mentioned commit had a few drawbacks:
1) When a lot of data was printed to the console, the queue would get full,
and drop data, even if hid_listen was running. (For example having matrix debug
enabled just didn't work right at all)
2) I believe the function in which this was implemented is used by all other
USB endpoints, so with the above change, overflow, and data loss could
happen in other important functions of QMK as well.
This commit implements deadlock prevention in a slightly similar way to how
it's done on AVR. There is an additional static local variable, that memorizes
whether the console has timeouted before. If we are in the timeouted=false
state, then we send the character normally with a 5ms timeout. If it does
time out, then hid_listen is likely not running, and future characters should
not be sent with a timeout, but those characters should still be sent if there
is space in the queue. The difference between the AVR implementation and this
one is that the AVR implementation checks the queue state directly, but this
implementation instead attempts to write the character with a zero timeout.
If it fails, then we remain in the timeouted=true state, if it succeeds, then
hid_listen started removing data from the queue, so we can go out of the
timeouted=true state.
* Added comment explaining the timeouted logic to console flow control.
* Console flow control: refactor chibios flowcontrol code to make it more readable, and rename the timeouted variable to timed_out on both chibios and lufa. Changed comments to says timed_out is an approximation of listener_disconnected, to make it clear that it's not the same thing
* fix typo
* Add RGB matrix suspend wake function for Planck/rev6
* Update suggested definition to allow user override.
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: filterpaper <filterpaper@localhost>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Git keymap for ANAVI Macro Pad 8 with the following shortcuts.
On the first row from left to right:
- git status
- git log
- git pull
- git push
On the second row from left to right:
- git diff
- git add
- git commit
- FN key to switch to the 2nd layout and control lights
Reduce the number of supported RGB animations and effects in
config.h to shrink the firmware size and fit it on the device.
Signed-off-by: Leon Anavi <leon@anavi.org>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: George Wietor <george@LIGHT-GRAY.local>
Co-authored-by: Jack Humbert <jack.humb@gmail.com>
The keymap for this PCB as of April 5, 2020 has a 4rth, largely superfluous layer, creating a total of 5 layers.
When ported to VIA, this results in a layer that users can access but cannot edit. I propose removing this layer completely along with it's access from the default.
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin). Fix the code to configure the A4 pin as intended.