2 Copyright 2016 Paul Williamson <squarefrog@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <util/delay.h>
18 #include "bootloader.h"
19 #include "keymap_common.h"
22 const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 * Keymap 0: Default Colemak Layer
27 * This is a general purpose Colemak layout which should serve as a good
28 * basis for your own custom layout. Mac users may want to swap the
29 * position of the Alt and GUI keys.
31 * ,--------------------------------------------------. ,--------------------------------------------------.
32 * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | - | 6 | 7 | 8 | 9 | 0 | + |
33 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
34 * | Tab | Q | W | F | P | G | [ | | ] | J | L | U | Y | ; | \ |
35 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
36 * | | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
37 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
38 * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift |
39 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
40 * | | | LAlt | | BkSp | | Del | | RAlt | | RCtrl |
41 * `----------------------------------' `----------------------------------'
42 * ,-------------. ,-------------.
43 * | | | | PgUp | PgDn |
44 * ,------|------|------| |------+------+------.
45 * | | | | | RAlt | | |
46 * |Space | LCtrl|------| |------| LAlt | Enter|
47 * | | | LGui | | ~L1 | | |
48 * `--------------------' `--------------------'
53 ESC, 1, 2, 3, 4, 5, GRV,
54 TAB, Q, W, F, P, G, LBRC,
56 LSFT,Z, X, C, V, B, NO,
57 NO, NO, LALT, NO ,BSPC,
62 MINS,6, 7, 8, 9, 0, EQL,
63 RBRC,J, L, U, Y, SCLN,BSLS,
65 NO, K, M, COMM,DOT, SLSH,RSFT,
66 DEL, NO ,RALT,NO, RCTL,
73 * Layer 1: Function keys
75 * This layer contains function keys, and media keys. *
76 * Most of the non-modifier keys are marked as NO, so it's immediately
77 * obvious if you start typing on a secondary layer.
79 * ,--------------------------------------------------. ,--------------------------------------------------.
80 * | Teensy | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS |
81 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
82 * | TRNS | | | UP | | | TRNS | | TRNS | | | | | | TRNS |
83 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
84 * | TRNS | | LEFT | DOWN |RIGHT | |------| |------| | | | | | TRNS |
85 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
86 * | TRNS | | | | | | | | | | | | | | TRNS |
87 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
88 * | TRNS | TRNS | Play | RW | FF | | Mute | Vol- | Vol+ | TRNS | TRNS |
89 * `----------------------------------' `----------------------------------'
90 * ,-------------. ,-------------.
91 * | | | | HOME | END |
92 * ,------|------|------| |------+------+------.
93 * | | | TRNS | | TRNS | | |
94 * | TRNS | |------| |------| TRNS | TRNS |
95 * | | | TRNS | | TRNS | | |
96 * `--------------------' `--------------------'
101 FN31,F1, F2, F3, F4, F5, F11,
102 TRNS,NO, NO, UP, NO, NO, TRNS,
103 TRNS,NO,LEFT,DOWN,RIGHT, NO,
104 TRNS,NO, NO, NO, NO, NO, NO,
105 TRNS,TRNS,MPLY,MPRV,MNXT,
110 F12, F6, F7, F8, F9, F10, TRNS,
111 TRNS,NO, NO, NO, NO, NO, TRNS,
112 NO,NO,NO, NO,NO, TRNS,
113 NO, NO, NO, NO, NO, NO, TRNS,
114 MUTE,VOLD,VOLU,TRNS,TRNS,
121 /* id for user defined functions */
127 * Fn action definition
129 const action_t PROGMEM fn_actions[] = {
131 [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0
132 [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1
133 [2] = ACTION_LAYER_SET(2, ON_PRESS), // Switch to Layer 2
136 [31] = ACTION_FUNCTION(TEENSY_KEY),
139 void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
141 if (id == TEENSY_KEY) {
143 print("\n\nJump to bootloader... ");
145 bootloader_jump(); // should not return
146 print("not supported.\n");