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

Feature/Enhancement: Allow Default Keymaps per Layout Macro #591

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

noroadsleft
Copy link
Member

This restructures the default keymap system such that each layout macro on the keyboard can have a default keymap, independent of the other layouts that can be used by the hardware.

Pros

  • potentially less headache to users who build their keyboard with a physical layout that doesn't match the default

Cons

  • creates a lot more keymaps to keep track of (possibly mitigated in future by qmk_firmware moving to default keymaps in JSON rather than C)
  • possibly more labor required from designers who submit their boards/keymaps to QMK

Things I'd Like to Have for This Feature...

... but probably don't know how to achieve yet:

  • Layout drop-down menu sorted alphabetically in the UI
    • potentially with LAYOUT_all, LAYOUT and KEYMAP macros listed first, then the rest in alphabetical order
  • Some way of tracking changes to default keymaps in qmk_firmware
    • I could maybe solve this locally and not have to do it through the API or something
  • Keyboards with a Community Layout macro but no keyboard-specific keymap file fall back to using the samples in public/keymaps/_generic/
  • Some way in the UI of conveying to the user which macros have/don't have a default (excluding the above)
  • Disable the Load Default button if a keyboard doesn't have any default keymaps pre-loaded (excluding the two situations above)
  • ???

Review / Discuss Please

@yanfali
Copy link
Collaborator

yanfali commented Nov 21, 2019

While I admire the ambition I'm not thrilled with the implementation. I kind of wish you'd discussed this in an open forum rather than doing what is a remarkable amount of work. In general I don't think this is a scaleable or verifiable approach

What I would have preferred is one file per keyboard. Each file contains multiple entries. It would be no worse than what we have today but would allow us to automate verification using tooling.

Let's talk offline about some alternative approaches.

@noroadsleft noroadsleft added the on hold Pull requests that are waiting on other changes to be merged. label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature on hold Pull requests that are waiting on other changes to be merged. WIP Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants