Skip to content

Commit

Permalink
Created keymaps marshalling file
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgdotcom committed Oct 25, 2017
1 parent 8dd058f commit 171d82f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions keymaps.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/** The Model 01's key layouts are defined as 'keymaps'. By default, there are three
* keymaps: The standard QWERTY keymap, the "Function layer" keymap and the "Numpad"
* keymap.
*
* Each keymap is defined as a list using the 'KEYMAP_STACKED' macro, built
* of first the left hand's layout, followed by the right hand's layout.
*
* Keymaps typically consist mostly of `Key_` definitions. There are many, many keys
* defined as part of the USB HID Keyboard specification. You can find the names
* (if not yet the explanations) for all the standard `Key_` defintions offered by
* Kaleidoscope in these files:
* https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_keyboard.h
* https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_consumerctl.h
* https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_sysctl.h
* https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_keymaps.h
*
* Additional things that should be documented here include
* using ___ to let keypresses fall through to the previously active layer
* using XXX to mark a keyswitch as 'blocked' on this layer
* using ShiftToLayer() and LockLayer() keys to change the active keymap.
* the special nature of the PROG key
* keeping NUM and FN consistent and accessible on all layers
*
*
* The "keymaps" data structure is a list of the keymaps compiled into the firmware.
* The order of keymaps in the list is important, as the ShiftToLayer(#) and LockLayer(#)
* macros switch to key layers based on this list.
*
*
* A key defined as 'ShiftToLayer(FUNCTION)' will switch to FUNCTION while held.
* Similarly, a key defined as 'LockLayer(NUMPAD)' will switch to NUMPAD when tapped.
*/

/**
* Layers are "0-indexed" -- That is the first one is layer 0. The second one is layer 1.
* The third one is layer 2.
* This 'enum' lets us use names like QWERTY, FUNCTION, and NUMPAD in place of
* the numbers 0, 1 and 2.
*/

enum { QWERTY, FUNCTION, NUMPAD }; // layers

const Key keymaps[][ROWS][COLS] PROGMEM = {
[QWERTY] =
#include "layer-std-qwerty.h"
,
[FUNCTION] =
#include "layer-std-function.h"
,
[NUMPAD] =
#include "layer-std-numpad.h"
};

0 comments on commit 171d82f

Please sign in to comment.