]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - Keymap.md
Updated Keymap (markdown)
[qmk_firmware.git] / Keymap.md
index 64b20bb799afcff67f85bb8ef7e874888f5ec7e8..df219850976dfab764075014644e499ba13a653c 100644 (file)
--- a/Keymap.md
+++ b/Keymap.md
@@ -4,7 +4,9 @@ QMK keymaps are defined inside a C source file. The data structure is an array o
 
 ## Anatomy Of A `keymap.c`
 
-For this example we will walk through the [default Clueboard keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/default/keymap.c). There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
+For this example we will walk through the [default Clueboard keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
+
+There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
 
 * The Definitions
 * The Layer/Keymap Datastructure
@@ -20,10 +22,12 @@ At the top of the file you'll find this:
     #define GRAVE_MODS  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
     #define _______ KC_TRNS
 
-    // Each layer gets a name for readability, which is then used in the keymap matrix below.
-    // The underscores don't mean anything - you can have a layer called STUFF or any other name.
-    // Layer names don't all need to be of the same length, obviously, and you can also skip them
-    // entirely and just use numbers.
+    // Each layer gets a name for readability.
+    // The underscores don't mean anything - you can
+    // have a layer called STUFF or any other name.
+    // Layer names don't all need to be of the same 
+    // length, and you can also skip them entirely
+    // and just use numbers.
     #define _BL 0
     #define _FL 1
     #define _CL 2
@@ -80,7 +84,7 @@ At the bottom of the file we've defined a single custom function. This function
 
 #### `fn_actions[]`
 
-We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. In the Clueboard's case that definition looks like this:
+We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this:
 
     const uint16_t PROGMEM fn_actions[] = {
       [0] = ACTION_FUNCTION(0),  // Calls action_function()