Skip to content

Autocorrection Improvements#25996

Open
drashna wants to merge 28 commits intoqmk:developfrom
drashna:autocorrections
Open

Autocorrection Improvements#25996
drashna wants to merge 28 commits intoqmk:developfrom
drashna:autocorrections

Conversation

@drashna
Copy link
Member

@drashna drashna commented Feb 10, 2026

Description

This includes a number of other PRs (#25838, #22788) and other additional changes. Specifically:

  • Allow for larger node size to accommodate for more than 64k dictionary size
  • Allow for multiple dictionaries
    • Move autocorrect config to separate config and nvme/eeconfig block
    • Add keycode for cycling through dictionaries
    • Min/max defines removed in favor of "typo buffer size" to accommodate all libraries
  • Separated processing from helper functions (process_autocorrect.c vs autocorrect.c) and associated header files
  • Proper init function
  • Added Autocorrect keycodes to keycode strings
  • Expanded tests
    • Verify that cycling works correctly
    • Ensure that previous library "format" works with newer code, so no user action is needed

Types of Changes

  • Core
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added core documentation python cli qmk cli command dd Data Driven Changes labels Feb 10, 2026
Comment on lines +55 to 63
static inline uint32_t autocorrect_read_state(uint32_t state) {
uint32_t new_state = 0;

for (uint8_t i = 0; i < current_dict_node_size; ++i) {
new_state |= (uint32_t)AUTOCORRECT_PGM_READ_BYTE(state + 1 + i) << (8 * i);
}

return new_state;
}
Copy link
Member Author

@drashna drashna Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work in place of this, but really just ignores the pgm near vs far part. Testing on AVR and ARM, this seems to work fine (not tested on avr that would actually use the far function, though).

memcpy_P(&state, current_dict_data + state + 1, sizeof(state));

@drashna drashna requested a review from a team February 23, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli qmk cli command core dd Data Driven Changes documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant