# Keymap Overview
-QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a KEYMAP() macro to help you create this array of arrays.
+QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
## 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
#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
#### `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()