Skip to content

Make qmk_settings respect AUTO_SHIFT definitions. - #225

Open
riannucci wants to merge 1 commit into
vial-kb:vialfrom
riannucci:auto-shift-settings
Open

Make qmk_settings respect AUTO_SHIFT definitions.#225
riannucci wants to merge 1 commit into
vial-kb:vialfrom
riannucci:auto-shift-settings

Conversation

@riannucci

Copy link
Copy Markdown

Previously when qmk_settings_reset() was called, it would always
reset auto_shift to 0 (i.e. totally disabled). With this change,
all defined AUTO_SHIFT config macros will instead be used as the
default value.

@riannucci

Copy link
Copy Markdown
Author

Definitely open to suggestions on how to make the bit sets consistent.

@xyzz

xyzz commented Aug 18, 2022

Copy link
Copy Markdown
Contributor

This looks like it'd cause auto shift to always be enabled when qmk settings are enabled, since Vial sets

AUTO_SHIFT_ENABLE := yes
in order to pull in the autoshift code.

@riannucci

Copy link
Copy Markdown
Author

Ah... that's a bummer. Looking closer I think I can change it to use AUTO_SHIFT_DISABLED_AT_STARTUP from https://github.com/vial-kb/vial-qmk/blob/vial/quantum/process_keycode/process_auto_shift.c#L24 and then set that by default in common_features.mk to keep the previous behavior?

@riannucci

Copy link
Copy Markdown
Author

(and then users could un-define it if they want it enabled at startup)

Another thing I could do would be to invert this define? It doesn't seem to be documented anywhere, and clearly has no effect in Vial currently. Looks like this was added in qmk/qmk_firmware#14201... WDYT?

Previously when `qmk_settings_reset()` was called, it would always
reset `auto_shift` to 0 (i.e. totally disabled). With this change,
all defined AUTO_SHIFT config macros will instead be used as the
default value.

To avoid changing the default behavior, this keeps AUTO_SHIFT off by
default unless the user #undef's AUTO_SHIFT_DISABLED_AT_STARTUP.
@riannucci
riannucci force-pushed the auto-shift-settings branch from 1b404e6 to c858a8b Compare August 22, 2022 16:06
@riannucci

Copy link
Copy Markdown
Author

OK, updated this to use AUTO_SHIFT_DISABLED_AT_STARTUP, which shouldn't affect existing vial configs.

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.

2 participants