Merge remote-tracking branch 'qmk/master' into merge-2023-12-16
This commit is contained in:
@ -67,7 +67,7 @@ __attribute__((weak)) bool get_custom_auto_shifted_key(uint16_t keycode, keyreco
|
||||
return false;
|
||||
}
|
||||
|
||||
/** \brief Called on physical press, returns whether is Auto Shift key */
|
||||
/** \brief Called on physical press, returns whether key is an Auto Shift key */
|
||||
__attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
#ifndef NO_AUTO_SHIFT_ALPHA
|
||||
@ -179,9 +179,8 @@ if (!QS_auto_shift_modifiers) {
|
||||
}
|
||||
|
||||
// Store record to be sent to user functions if there's no release record then.
|
||||
autoshift_lastrecord = *record;
|
||||
autoshift_lastrecord.event.pressed = false;
|
||||
autoshift_lastrecord.event.time = 0;
|
||||
autoshift_lastrecord = *record;
|
||||
autoshift_lastrecord.event.time = 0;
|
||||
// clang-format off
|
||||
#if defined(AUTO_SHIFT_REPEAT) || defined(AUTO_SHIFT_REPEAT_PER_KEY)
|
||||
if (keycode == autoshift_lastkey &&
|
||||
@ -411,8 +410,12 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
|
||||
// If Retro Shift is disabled, possible custom actions shouldn't happen.
|
||||
// clang-format off
|
||||
#if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING)
|
||||
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record);
|
||||
# ifdef HOLD_ON_OTHER_KEY_PRESS
|
||||
const bool is_hold_on_interrupt = (IS_QK_MOD_TAP(keycode)
|
||||
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
&& get_hold_on_other_key_press(keycode, record)
|
||||
# endif
|
||||
);
|
||||
# else
|
||||
const bool is_hold_on_interrupt = false;
|
||||
# endif
|
||||
@ -452,8 +455,12 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
|
||||
#endif
|
||||
) {
|
||||
// Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set.
|
||||
#ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
if (autoshift_flags.in_progress && get_hold_on_other_key_press(keycode, record)) {
|
||||
#ifdef HOLD_ON_OTHER_KEY_PRESS
|
||||
if (autoshift_flags.in_progress
|
||||
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
&& get_hold_on_other_key_press(keycode, record)
|
||||
# endif
|
||||
) {
|
||||
autoshift_end(KC_NO, now, false, &autoshift_lastrecord);
|
||||
}
|
||||
#endif
|
||||
@ -490,10 +497,8 @@ void retroshift_poll_time(keyevent_t *event) {
|
||||
}
|
||||
// Used to swap the times of Retro Shifted key and Auto Shift key that interrupted it.
|
||||
void retroshift_swap_times(void) {
|
||||
if (last_retroshift_time != 0 && autoshift_flags.in_progress) {
|
||||
uint16_t temp = retroshift_time;
|
||||
retroshift_time = last_retroshift_time;
|
||||
last_retroshift_time = temp;
|
||||
if (autoshift_flags.in_progress) {
|
||||
autoshift_time = last_retroshift_time;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -56,4 +56,5 @@ uint16_t (get_autoshift_timeout)(uint16_t keycode, keyrecord_t *record);
|
||||
void set_autoshift_timeout(uint16_t timeout);
|
||||
void autoshift_matrix_scan(void);
|
||||
bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record);
|
||||
bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record);
|
||||
// clang-format on
|
||||
|
@ -28,7 +28,7 @@ float clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT;
|
||||
float clicky_rand = AUDIO_CLICKY_FREQ_RANDOMNESS;
|
||||
|
||||
// the first "note" is an intentional delay; the 2nd and 3rd notes are the "clicky"
|
||||
float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_MIN, AUDIO_CLICKY_DELAY_DURATION}, {AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations
|
||||
float clicky_song[][2] = {{0.0f, AUDIO_CLICKY_DELAY_DURATION}, {AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations
|
||||
|
||||
extern audio_config_t audio_config;
|
||||
|
||||
|
@ -580,7 +580,7 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) {
|
||||
/* Only check keycodes from one layer. */
|
||||
keycode = keymap_key_to_keycode(COMBO_ONLY_FROM_LAYER, record->event.key);
|
||||
#else
|
||||
uint8_t highest_layer = get_highest_layer(layer_state);
|
||||
uint8_t highest_layer = get_highest_layer(layer_state | default_layer_state);
|
||||
uint8_t ref_layer = combo_ref_from_layer(highest_layer);
|
||||
if (ref_layer != highest_layer) {
|
||||
keycode = keymap_key_to_keycode(ref_layer, record->event.key);
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "process_steno.h"
|
||||
#include "quantum_keycodes.h"
|
||||
#include "eeconfig.h"
|
||||
#include "keymap_steno.h"
|
||||
#include <string.h>
|
||||
#ifdef VIRTSER_ENABLE
|
||||
# include "virtser.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "action.h"
|
||||
#include "steno_keycodes.h"
|
||||
|
||||
#define BOLT_STROKE_SIZE 4
|
||||
#define GEMINI_STROKE_SIZE 6
|
||||
|
Reference in New Issue
Block a user