Author Topic: converting from keyboard-layout-editor.com to c  (Read 3580 times)

0 Members and 1 Guest are viewing this topic.

Offline pigsu

  • Thread Starter
  • Posts: 3
converting from keyboard-layout-editor.com to c
« on: Tue, 13 December 2016, 16:43:23 »
I've just got my first mechanical keyboard (an AMJ40). I want to set it up so that it has the same layout as my android keyboard, the theory being that it's probably easier to learn, even if it does seem a bit odd.

I've been using keyboard-layout-editor.com to fiddle with the planned layout, here (http://www.keyboard-layout-editor.com/#/gists/d2f77590c1457ce44d139af34552fc40), but then when it comes to actually programming the keyboard it looks pretty manual.

I started a quick stab at something to help speed it up, but I wondered if I was reinventing the wheel. Has anyone already been down this road?

https://gist.github.com/notionparallax/5243a5f0bed46f811dea1c3d2b51ce6d

The idea is that it produces an ascii art version and a c keymap version, e.g.:

******
main Layer

-----------------------------------------------------------
| Esc | Q | W | E | R | T | Y | U | I | O | P | Backspace |
-----------------------------------------------------------
| Tab | A | S | D | F | G | H | J | K | L | Enter |
---------------------------------------------------
| shift | Z | X | C | V | B | N | M | . | ↑ | Shift |
----------------------------------------------------------
| Ctrl |   | Alt |   | space | ← | ↓ | → |
---------------------------------------------------------


KEYMAP(
      Esc,  Q,  W,  E,  R,  T,  Y,  U,  I,  O,  P,  Backspace,  \
      Tab,  A,  S,  D,  F,  G,  H,  J,  K,  L,  Enter,  \
      shift,  Z,  X,  C,  V,  B,  N,  M,  .,  ↑,  Shift,  \
      Ctrl,  TRNS,  Alt,  TRNS,  space,  ←,  ↓,  →,  \
)
******


and so on. There is still a bit of converting to do between ← and LEFT etc.

Anyway, if it's been done before, then great, if not, do people think that it's useful?
« Last Edit: Tue, 13 December 2016, 18:07:41 by pigsu »

Offline yangdigi

  • Posts: 79
  • Location: China
Re: converting from keyboard-layout-editor.com to c
« Reply #1 on: Wed, 14 December 2016, 02:27:09 »
tkg.io can do this exact same thing.
Maybe you can have a try.