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

Initial DD keycode migration #18643

Merged
merged 2 commits into from
Nov 5, 2022
Merged

Initial DD keycode migration #18643

merged 2 commits into from
Nov 5, 2022

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Oct 8, 2022

Description

Initial pass covers:

  • basic keycodes
  • keycodes expecting no arguments and have constant values
  • ranges
    • including moving "variable" keycode values to static blocks (eg sequencer)

Due to the tight coupling in the code base, currently it has been chosen to not simultaneously support the current keycode values as a "legacy" version.

TODO

  • "approve" new keycode ranges
  • improve data folder structure?
    • data/constants/keycodes/ folder?
    • data/constants/keycodes/0.0.1/ folder for each version?
      • easier to merge without, more like xap
  • fix issues
    • via will compile but not work due to range changes

Future

  • sub ranges?
    • nest range objects?
    • specify as additional ranges?
    • specify values as fake keycodes?
    • validation of overlapping?
  • Migrate anything keycode(with_args)
  • keymap extras
  • automatically regenerate files
    • static data so no point generating it 2500 times for each keyboard
    • pre/post merge?
    • actions?
    • reuse process for other features

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • 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 cli qmk cli command core python labels Oct 8, 2022
@zvecr
Copy link
Member Author

zvecr commented Oct 8, 2022

Current Allocations:

area number
quantum loose 512
keyboard 256
keymap 256

SAFE_RANGE currently maps to both keyboard+keymap - keyboard refactoring can happen at a later date

QK_MACRO block 128 keycodes (with room to expand to 256) potentially for https://get.vial.today/manual/macros.html#3-changing-the-amount-of-macros

data/constants/keycodes_0.0.1.json Outdated Show resolved Hide resolved
data/constants/keycodes_0.0.1_swap_hands.json Outdated Show resolved Hide resolved
@zvecr zvecr force-pushed the feature/dd_keycodes2 branch 3 times, most recently from 4995e36 to 18a484d Compare October 10, 2022 21:49
@zvecr
Copy link
Member Author

zvecr commented Oct 24, 2022

@fauxpark could you have a look at the allocated ranges and flag any potential issues or recommendations please.

quantum/keycode.h Show resolved Hide resolved
@ToyKeeper
Copy link
Contributor

This looks fantastic; huge improvement over the old disorganized keycode enums. While the keycodes are changing though, might it be worth taking the opportunity to sort a few? Like, the magic swap/unswap/toggle keycodes for each option could be grouped together.

@zvecr zvecr force-pushed the feature/dd_keycodes2 branch 3 times, most recently from 914120a to 500ed3a Compare November 5, 2022 02:40
@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Nov 5, 2022
@github-actions github-actions bot removed keymap keyboard via Adds via keymap and/or updates keyboard for via support labels Nov 5, 2022
@zvecr zvecr merged commit a69ab05 into qmk:develop Nov 5, 2022
@wilba
Copy link
Contributor

wilba commented Nov 8, 2022

VIA has been updated to use these new int values, still to do is the refactoring to the changed keycode names and adding new keycodes to the UI.

ramonimbao pushed a commit to ramonimbao/qmk_firmware that referenced this pull request Nov 28, 2022
* Initial DD keycode migration

* Sort magic keycodes
elpekenin pushed a commit to elpekenin/qmk_firmware that referenced this pull request Dec 7, 2022
* Initial DD keycode migration

* Sort magic keycodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli qmk cli command core python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants