qmk_configurator icon indicating copy to clipboard operation
qmk_configurator copied to clipboard

Generate an ascii art keymaps

Open Nanoseb opened this issue 4 years ago • 4 comments

We already have the option to export the keymaps as images. However it would be also nice to have an ascii art version of it to put in keymap.c, readme or else.

Either something like this:

   ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐     ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
   │ESC  │  1  │  2  │  3  │  4  │  5  │  6  │     │  7  │  8  │  9  │  0  │  -  │  =  │BSLS │ DEL │ 
   ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┘  ┌──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┤
   │TAB     │  Q  │  W  │  E  │  R  │  T  │     │  Y  │  U  │  I  │  O  │  P  │  [  │  ]  │BSPC    │
   ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐    └┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┤
   │CAPS     │  A  │  S  │  D  │  F  │  G  │     │  H  │  J  │  K  │  L  │  ;  │  '  │ENTER        │
   ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┐  └──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┤
   │LSHFT       │  Z  │  X  │  C  │  V  │  B  │     │  N  │  M  │  ,  │  .  │  /  │RSHFT     │ UP  │
   ├──────┬─────┴─┬───┴──┬──┴─────┴────┬┴─────┤     ├─────┴┬────┴────┬┴────┬┴────┬┴────┬─────┼─────┤
   │LCTRL │L_GUI  │L_ALT │SPC          │FN1   │     │SPC   │BSPC     │R_ALT│R_CTR│LEFT │DOWN │RIGHT│
   └──────┴───────┴──────┴─────────────┴──────┘     └──────┴─────────┴─────┴─────┴─────┴─────┴─────┘

Or probably easier to generate:

 +-------------------------------------------------------------------------+
 | ESC | 1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 |  0 |  - |  = | BACKSP |
 +-------------------------------------------------------------------------+
 | TAB  |  Q |  W |  E |  R |  T |  Y |  U |  I |  O |  P |  [ |  ] |   \  |
 +-------------------------------------------------------------------------+
 | FN     |  A |  S |  D |  F |  G |  H |  J |  K |  L |  ; |  ' |  RETURN |
 +-------------------------------------------------------------------------+
 | LSHIFT   |  Z |  X |  C |  V |  B |  N |  M |  , |  . |  / | SHIFT | FN |
 +-------------------------------------------------------------------------+
 |LALT|LMETA|RCTRL|   SPACE | FN | SPACE           | RALT| MENU| RWIN|RCTRL|
 +-------------------------------------------------------------------------+

Nanoseb avatar Sep 11 '19 08:09 Nanoseb

Could definitely try and do this, but it might be more useful to have it on the new QMK CLI since that is a python CLI tool.

yanfali avatar Sep 15 '19 03:09 yanfali

Ok, interesting. I put the issue on this repository because to my (limited) knowledge qmk cli and other tools didn't know about the keyboard layout, when this configurator does. But if I am mistaken and this data is available to qmk cli, then I may even try to implement it myself (I can't do javascript, but am ok in python).

Nanoseb avatar Sep 15 '19 11:09 Nanoseb

This would be super nice when documenting keymap.c files! +1

alexweininger avatar Oct 05 '19 23:10 alexweininger

locking this issue until after hacktober

yanfali avatar Oct 25 '19 17:10 yanfali