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

Adding a layouts/ folder to share keymaps between keyboards of the same layout #1582

Closed
jackhumbert opened this issue Aug 15, 2017 · 3 comments

Comments

@jackhumbert
Copy link
Member

Something we've been throwing around a little recently is to add a layouts/ folder, which would contain a number of common/predefined layouts that could be compiled with keyboards that are compatible with them. Some examples would be:

  • layouts/ergodox - Ergodox EZ/Ergodox Infinity/Ergodone?
  • layouts/60_ansi - GH60/DK60/Infinity 60/KC60/ORG60/S60-X/XD60/etc
  • layouts/60_iso - GH60/DK60/Infinity 60/KC60/ORG60/S60-X/XD60/etc (I'm not 100% sure these keyboards are compatible with ansi/iso)
  • layouts/ortho_4x12 - Planck/Let's Split/Mechmini 2

Obviously naming them could be a bit of an issue, but as long as they're the common term and clear, I don't think we'll have too many problems. I think keeping them description rather than associative is important.

This would allow us to break up some of the current subprojects that don't make a whole lot of sense (namely ergodox), while allowing them to still share keymaps.

When compiling, the make system would search in keyboards/<keyboard>/keymaps first for a keymap, and if it's not found, the compatible layouts' folder (layouts/<layout>/) would be searched. It may make sense to add the layout as an argument (similar to subprojects now), but I would like to avoid that, or make the detection automatic, but overridable.

We'd need a list of layouts that a certain keyboard supports, which could be added in the rules.mk (I think it would need to be here rather than the config.h for compilation reasons), and the keyboard would need to implement a specific KEYMAP function for that could be as simple as:

#define LAYOUT_ORTHO_4x12 PLANCK_GRID

Where PLANCK_GRID defines the actual mapping for the matrix, and LAYOUT_ORTHO_4x12 is then used in the layouts/ortho_4x12/ keymaps.

This discussion also brought up some ideas about enabling/disabling features, the separation of hardware/software features, and having features "available," all of which need to be considered with this addition, but may not be required for the initial implementation.

@Dbroqua
Copy link
Contributor

Dbroqua commented Aug 15, 2017

Maybe we can also add layouts/60_hhkb.

@ezuk
Copy link
Contributor

ezuk commented Aug 17, 2017

👍 makes sense to me!

@jackhumbert
Copy link
Member Author

Cool! Starting to mess around with this on layouts.

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

No branches or pull requests

3 participants