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

simple define to disable auto shift at startupAUTO_SHIFT_DISABLED_AT_STARTUP #14201

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion quantum/process_keycode/process_auto_shift.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

# include "process_auto_shift.h"

#ifndef AUTO_SHIFT_DISABLED_AT_STARTUP
# define AUTO_SHIFT_STARTUP_STATE true /* enabled */
#else
# define AUTO_SHIFT_STARTUP_STATE false /* disabled */
#endif

static uint16_t autoshift_time = 0;
static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT;
static uint16_t autoshift_lastkey = KC_NO;
Expand All @@ -34,7 +40,7 @@ static struct {
bool in_progress : 1;
// Whether the auto-shifted keypress has been registered.
bool holding_shift : 1;
} autoshift_flags = {true, false, false, false};
} autoshift_flags = {AUTO_SHIFT_STARTUP_STATE, false, false, false};

/** \brief Record the press of an autoshiftable key
*
Expand Down