diff options
author | That-Canadian <Poole.Chris.11@gmail.com> | 2017-12-11 17:57:40 -0800 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-12-11 20:57:40 -0500 |
commit | c1a6ca46a77d88da40647a54bf1e712da69bc143 (patch) | |
tree | 71305bb9aab8b9dcdee5bed6e720217bc2e50039 /keyboards/the_ruler/keymaps/default/keymap.c | |
parent | 7c5428b56dbaa97993bef80605d00fff31bf0b77 (diff) | |
download | qmk_firmware-c1a6ca46a77d88da40647a54bf1e712da69bc143.tar.gz qmk_firmware-c1a6ca46a77d88da40647a54bf1e712da69bc143.zip |
The ruler (#2138)
* Line ending stuff again
* Added initital files and layout for the PCB Ruler keyboard/macro pad thing
* Updated Readme
* Changed make command to new format
Diffstat (limited to 'keyboards/the_ruler/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/the_ruler/keymaps/default/keymap.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c new file mode 100644 index 000000000..78a785534 --- /dev/null +++ b/keyboards/the_ruler/keymaps/default/keymap.c | |||
@@ -0,0 +1,70 @@ | |||
1 | #include "the_ruler.h" | ||
2 | #include "action_layer.h" | ||
3 | #include "eeconfig.h" | ||
4 | |||
5 | extern keymap_config_t keymap_config; | ||
6 | |||
7 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
8 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
9 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
10 | // entirely and just use numbers. | ||
11 | #define _DEFAULT 0 | ||
12 | #define _FN_1 1 | ||
13 | #define _FN_2 2 | ||
14 | |||
15 | enum custom_keycodes { | ||
16 | DEFAULT = SAFE_RANGE, | ||
17 | FN_1, | ||
18 | FN_2 | ||
19 | }; | ||
20 | |||
21 | // Fillers to make layering more clear | ||
22 | #define _______ KC_TRNS | ||
23 | #define XXXXXXX KC_NO | ||
24 | |||
25 | // Defines for task manager and such | ||
26 | #define CALTDEL LCTL(LALT(KC_DEL)) | ||
27 | #define TSKMGR LCTL(LSFT(KC_ESC)) | ||
28 | |||
29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
30 | |||
31 | /* Default Layer | ||
32 | * ,-----------------------------------------------. | ||
33 | * | FN_2 | 2 |TSKMGR |CALTDEL| ESC | FN_1 | | ||
34 | * `-----------------------------------------------' | ||
35 | */ | ||
36 | [_DEFAULT] = KEYMAP( \ | ||
37 | MO(_FN_2), KC_2, TSKMGR, CALTDEL, KC_ESC, MO(_FN_1) | ||
38 | ), | ||
39 | |||
40 | /* FN 1 Layer | ||
41 | * ,-----------------------------------------------. | ||
42 | * |RGB_TOG|RGB_HUD|RGB_HUI|RGB_SAD|RGB_SAI| FN_1 | | ||
43 | * `-----------------------------------------------' | ||
44 | */ | ||
45 | [_FN_1] = KEYMAP( \ | ||
46 | RGB_TOG, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______ | ||
47 | ), | ||
48 | |||
49 | /* FN 2 Layer | ||
50 | * ,-----------------------------------------------. | ||
51 | * | FN_2 |RGB_VAD|RGB_VAI|RGB_MOD|TSKMGR | RESET | | ||
52 | * `-----------------------------------------------' | ||
53 | */ | ||
54 | [_FN_2] = KEYMAP( \ | ||
55 | _______, RGB_VAD, RGB_VAI, RGB_MOD, TSKMGR, RESET | ||
56 | ) | ||
57 | |||
58 | }; | ||
59 | |||
60 | void persistant_default_layer_set(uint16_t default_layer) { | ||
61 | eeconfig_update_default_layer(default_layer); | ||
62 | default_layer_set(default_layer); | ||
63 | } | ||
64 | |||
65 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
66 | switch (keycode) { | ||
67 | // NONE | ||
68 | } | ||
69 | return true; | ||
70 | } \ No newline at end of file | ||