]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/melody96/keymaps/zunger/readme.md
Add missing links to features page and sidebar section (#5949)
[qmk_firmware.git] / keyboards / melody96 / keymaps / zunger / readme.md
1 * The "Cadet-Style" keymap for the melody96.
2 * Author: Yonatan Zunger (zunger@gmail.com)
3
4 This is an experimental keymap being used both for practical reasons (as my daily driver) and to
5 work out the ideas of a "space-cadet-style" keyboard which can type text and mathematical symbols
6 with equal ease. It's designed for anyone who frequently needs to do this outside of a LaTeX
7 environment, or for anyone who loves the old "Space Cadet" keyboard! And it works at its best when
8 you have actual Cadet keycaps (like SA Symbolics) installed, because those keycaps will actually
9 show what you get.
10
11 The core idea of this keyboard is that, in addition to a QWERTY base layer and a function layer, it
12 supports two additional base layers -- the GREEK layer (the analogue of the Space Cadet "Greek," or
13 "Front," keys) and the CADET layer (the analogue of the Space Cadet "Top" keys). These layers use
14 Unicode to generate all of the mathematical symbols you can find on a traditional Space Cadet
15 layout, plus a bunch of extras.
16
17 Because Unicode can't be encoded using the traditional USB HID protocol, QMK does some clever but
18 horrifying things to fool your OS. One consequence of this is that the shift key needs to be handled
19 by the keyboard firmware, not the host OS. To handle this, we have two additional layers --
20 SHIFTGREEK and SHIFTCADET -- and handle the flipping between all of these layers here in the
21 firmware.
22
23 *The simple bit: Using this layout on a Melody96*
24
25 At the core of this layout are three special modifier keys and two special lock keys:
26
27 * The GREEK key, to the right of the spacebar, activates the GREEK layer. GREEK+SHIFT activates
28   SHIFTGREEK. These keys generate Greek letters on the letter keys (thus the name), and a few
29   mathematical symbols on other keys. They correspond to the notations on the front of traditional
30   Space Cadet keys; if your capset doesn't include those (alas, most don't), they're the "pretty
31   obvious" mappings.
32 * The CADET key, to the right of GREEK, activates the CADET layer. These are the symbols above the
33   letters on a Space Cadet layout. CADET+SHIFT activates the SHIFTCADET layer, with even more
34   symbols.
35 * The FUNCTION key, to the right of CADET, activates the function layer. This is where you have a
36   reset mechanism, a selector for which Unicode input type you want, and so on.
37
38 Additionally, GREEK+ALT is equivalent to CADET. This is handy for other keyboards where you don't
39 have room for this many modifiers.
40
41 The lock keys are:
42
43 * Caps lock, if you use it, will also act as a "shift lock" for the Greek and Cadet layers. Shift
44   lock is slightly different, in that while it is engaged shift will _dis_engage it; that's actually
45   pretty useful when typing math.
46 * An additional "layer lock" key, by default where "num lock" usually goes, will lock the choice of
47   base layer. To use it, hold down any invocation of the GREEK or CADET layers, or none at all, and
48   hit lock; it will then put you in that layer. The corresponding modifier key will then toggle you
49   back to the QWERTY layer. (So for example, if you hit GREEK+LAYER_LOCK and release them, you're
50   now typing in Greek; the GREEK modifier would cause you to type QWERTY momentarily. To go back to
51   ordinary QWERTY mode, you'd just hit LAYER_LOCK again with no modifiers held)
52
53 To see the full layout, check out the big comment in keymap.c.
54
55 *A less-simple bit: Adapting this to other keyboards*
56
57 This is really a canary for generic Cadet implementations. Before this can be made generic, a few
58 things will have to happen:
59
60 (1) Instead of a fixed keymap, this has to be refactored into some kind of array showing the
61 mappings of QWERTY-layer keys onto the appropriate code points in the GREEK and CADET layers, and
62 some preprocessor magic needs to auto-transform this plus a traditional keymap for the QWERTY layer
63 into keymaps for all five of the core layers. (Function layers would presumably be handled on a
64 per-keyboard basis)
65
66 (2) The standard mapping of those should have some #define's to control things like whether there
67 are physical F-keys (you would probably want to move superscript and subscripts onto the numbers if
68 there weren't, and figure out what to do with the non-numeric super/sub keys), whether you actually
69 want to enable GREEK+ALT=CADET, and so on;
70
71 (3) There should be support for controlling indicator LEDs based on the base layer selection,
72 caps/shift lock state, and layer lock state, as well as for triggering audio on transitions;
73
74 (4) All the core fancy logic in process_record_user which implements the layer handling should be
75 factored out into its own function, so that keyboards can easily reuse that, too.
76
77 This is a lovely TODO for future work, and could be particularly fun to go along with new releases
78 of SA Symbolics and the like. Anyone interested in such things, ping me!