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

keyboard layout prettyness #49

Open
gilescope opened this issue Feb 20, 2021 · 1 comment
Open

keyboard layout prettyness #49

gilescope opened this issue Feb 20, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@gilescope
Copy link

The layers design takes a lot of work to keep looking neat. Lots of tabbing to make sure it alligns nicely in a grid.

Wondering if there's a nicer way... I think there's some nice ideas here:
https://github.com/qmk/qmk_firmware/blob/master/layouts/community/ortho_5x14/yet-another-developer/keymap.c

but wrapped all into one. Half of me thinks that ideally rustfmt could do a better job with arrays ( rust-lang/rustfmt#4710 ) but half of me thinks some macro magic might be the answer...

@camrbuss
Copy link
Contributor

For an ortholinear or orthoclumnar board, I find EasyAlign does the trick with a visual mode on each layer.
https://github.com/junegunn/vim-easy-align
Visual command: :'<,'>EasyAlign *\

Makes your layout look something like this:

    pub static LAYERS: keyberon::layout::Layers<CustomActions> = keyberon::layout::layout! {
    {[ // 0
        Q          W        E        R      T      Y          U   I          O          P
        {A_LSHIFT} {L5_S}   {D_LALT} {L2_F} G      H          J   K          L          {SEMI_RSHIFT}
        {Z_LCTRL}  {X_LALT} {L4_C}   V      B      N          M   {L4_COMMA} {DOT_RALT} {SLASH_RCTRL}
        t          t        t        (3)    BSpace {L7_SPACE} Tab Escape     Enter      Tab
    ]}
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants