diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/dozen0/keymaps |
Diffstat (limited to 'keyboards/dozen0/keymaps')
-rw-r--r-- | keyboards/dozen0/keymaps/default/keymap.c | 122 | ||||
-rw-r--r-- | keyboards/dozen0/keymaps/default/readme.md | 45 | ||||
-rw-r--r-- | keyboards/dozen0/keymaps/f12/keymap.c | 40 | ||||
-rw-r--r-- | keyboards/dozen0/keymaps/via/keymap.c | 48 | ||||
-rw-r--r-- | keyboards/dozen0/keymaps/via/rules.mk | 1 |
5 files changed, 256 insertions, 0 deletions
diff --git a/keyboards/dozen0/keymaps/default/keymap.c b/keyboards/dozen0/keymaps/default/keymap.c new file mode 100644 index 000000000..a869c6e93 --- /dev/null +++ b/keyboards/dozen0/keymaps/default/keymap.c | |||
@@ -0,0 +1,122 @@ | |||
1 | /* Copyright 2019 yynmt | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | #ifdef RGBLIGHT_ENABLE | ||
19 | //Following line allows macro to read current RGB settings | ||
20 | extern rgblight_config_t rgblight_config; | ||
21 | #endif | ||
22 | |||
23 | enum layer_number { | ||
24 | _BASE = 0, | ||
25 | _LOWER, | ||
26 | _RAISE, | ||
27 | _ADJUST | ||
28 | }; | ||
29 | |||
30 | enum custom_keycodes { | ||
31 | BASE = SAFE_RANGE, | ||
32 | LOWER, | ||
33 | RAISE, | ||
34 | ADJUST, | ||
35 | RGBRST | ||
36 | }; | ||
37 | |||
38 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
39 | /* Base | ||
40 | * ,-----------------------------------------. | ||
41 | * | Cut | Copy |Paste | Up |Delete| Bksp | | ||
42 | * | | | | | |Raise | | ||
43 | * |------+------+------+------+------+------| | ||
44 | * | Ctrl |Shift | Left | Down |Right |Enter | | ||
45 | * | | | | | |Lower | | ||
46 | * `-----------------------------------------' | ||
47 | */ | ||
48 | [_BASE] = LAYOUT( | ||
49 | LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, LT(_RAISE,KC_BSPC), | ||
50 | KC_LCTL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, LT(_LOWER,KC_ENT) | ||
51 | ), | ||
52 | |||
53 | /* Lower | ||
54 | * ,-----------------------------------------. | ||
55 | * | | | | Page | | | | ||
56 | * | | | | Up | | | | ||
57 | * |------+------+------+------+------+------| | ||
58 | * | | | Home | Page | End | | | ||
59 | * | | | | Down | | | | ||
60 | * `-----------------------------------------' | ||
61 | */ | ||
62 | [_LOWER] = LAYOUT( | ||
63 | _______, _______, _______, KC_PGUP, _______, _______, | ||
64 | _______, _______, KC_HOME, KC_PGDN, KC_END, _______ | ||
65 | ), | ||
66 | |||
67 | /* Raise | ||
68 | * ,-----------------------------------------. | ||
69 | * | | | | | | | | ||
70 | * | | | | | | | | ||
71 | * |------+------+------+------+------+------| | ||
72 | * | | | | | | | | ||
73 | * | | | | | | | | ||
74 | * `-----------------------------------------' | ||
75 | */ | ||
76 | [_RAISE] = LAYOUT( | ||
77 | _______, _______, _______, _______, _______, _______, | ||
78 | _______, _______, _______, _______, _______, _______ | ||
79 | ), | ||
80 | |||
81 | /* Adjust | ||
82 | * ,-----------------------------------------. | ||
83 | * | RGB | RGB | RGB | RGB | RGB | | | ||
84 | * |Toggle|Mode+ | Hue+ | Sat+ | Val+ | | | ||
85 | * |------+------+------+------+------+------| | ||
86 | * | RGB | RGB | RGB | RGB | RGB | | | ||
87 | * |Reset |Mode- | Hue- | Sat- | Val- | | | ||
88 | * `-----------------------------------------' | ||
89 | */ | ||
90 | [_ADJUST] = LAYOUT( | ||
91 | RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, | ||
92 | RGBRST, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______ | ||
93 | ) | ||
94 | }; | ||
95 | |||
96 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
97 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
98 | } | ||
99 | |||
100 | int RGB_current_mode; | ||
101 | |||
102 | void matrix_init_user(void) { | ||
103 | #ifdef RGBLIGHT_ENABLE | ||
104 | RGB_current_mode = rgblight_config.mode; | ||
105 | #endif | ||
106 | } | ||
107 | |||
108 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
109 | |||
110 | switch (keycode) { | ||
111 | case RGBRST: | ||
112 | #ifdef RGBLIGHT_ENABLE | ||
113 | if (record->event.pressed) { | ||
114 | eeconfig_update_rgblight_default(); | ||
115 | rgblight_enable(); | ||
116 | RGB_current_mode = rgblight_config.mode; | ||
117 | } | ||
118 | #endif | ||
119 | break; | ||
120 | } | ||
121 | return true; | ||
122 | } | ||
diff --git a/keyboards/dozen0/keymaps/default/readme.md b/keyboards/dozen0/keymaps/default/readme.md new file mode 100644 index 000000000..832c72075 --- /dev/null +++ b/keyboards/dozen0/keymaps/default/readme.md | |||
@@ -0,0 +1,45 @@ | |||
1 | # The default keymap for Dozen0 | ||
2 | |||
3 | ## Base | ||
4 | ``` | ||
5 | ,-----------------------------------------. | ||
6 | | Cut | Copy |Paste | Up |Delete| Bksp | | ||
7 | | | | | | |Raise | | ||
8 | |------+------+------+------+------+------| | ||
9 | | Ctrl |Shift | Left | Down |Right |Enter | | ||
10 | | | | | | |Lower | | ||
11 | `-----------------------------------------' | ||
12 | ``` | ||
13 | |||
14 | ## Lower | ||
15 | ``` | ||
16 | ,-----------------------------------------. | ||
17 | | | | | Page | | | | ||
18 | | | | | Up | | | | ||
19 | |------+------+------+------+------+------| | ||
20 | | | | Home | Page | End | | | ||
21 | | | | | Down | | | | ||
22 | `-----------------------------------------' | ||
23 | ``` | ||
24 | |||
25 | ## Raise | ||
26 | ``` | ||
27 | ,-----------------------------------------. | ||
28 | | | | | | | | | ||
29 | | | | | | | | | ||
30 | |------+------+------+------+------+------| | ||
31 | | | | | | | | | ||
32 | | | | | | | | | ||
33 | `-----------------------------------------' | ||
34 | ``` | ||
35 | |||
36 | ## Adjust | ||
37 | ``` | ||
38 | ,-----------------------------------------. | ||
39 | | RGB | RGB | RGB | RGB | RGB | | | ||
40 | |Toggle|Mode+ | Hue+ | Sat+ | Val+ | | | ||
41 | |------+------+------+------+------+------| | ||
42 | | RGB | RGB | RGB | RGB | RGB | | | ||
43 | |Reset |Mode- | Hue- | Sat- | Val- | | | ||
44 | `-----------------------------------------' | ||
45 | ``` | ||
diff --git a/keyboards/dozen0/keymaps/f12/keymap.c b/keyboards/dozen0/keymaps/f12/keymap.c new file mode 100644 index 000000000..167e29e10 --- /dev/null +++ b/keyboards/dozen0/keymaps/f12/keymap.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Copyright 2019 yynmt | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | [0] = LAYOUT( | ||
21 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, | ||
22 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 | ||
23 | ), | ||
24 | }; | ||
25 | |||
26 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
27 | return true; | ||
28 | } | ||
29 | |||
30 | void matrix_init_user(void) { | ||
31 | |||
32 | } | ||
33 | |||
34 | void matrix_scan_user(void) { | ||
35 | |||
36 | } | ||
37 | |||
38 | void led_set_user(uint8_t usb_led) { | ||
39 | |||
40 | } | ||
diff --git a/keyboards/dozen0/keymaps/via/keymap.c b/keyboards/dozen0/keymaps/via/keymap.c new file mode 100644 index 000000000..91f15469f --- /dev/null +++ b/keyboards/dozen0/keymaps/via/keymap.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 2021 yynmt | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | /* Base | ||
21 | * ,-----------------------------------------. | ||
22 | * | Cut | Copy |Paste | Up |Delete| Bksp | | ||
23 | * | | | | | |Raise | | ||
24 | * |------+------+------+------+------+------| | ||
25 | * | Ctrl |Shift | Left | Down |Right |Enter | | ||
26 | * | | | | | |Lower | | ||
27 | * `-----------------------------------------' | ||
28 | */ | ||
29 | [0] = LAYOUT( | ||
30 | LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, LT(2,KC_BSPC), | ||
31 | KC_LCTL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, LT(1,KC_ENT) | ||
32 | ), | ||
33 | /* Lower */ | ||
34 | [1] = LAYOUT( | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
37 | ), | ||
38 | /* Raise */ | ||
39 | [2] = LAYOUT( | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
42 | ), | ||
43 | /* Adjust */ | ||
44 | [3] = LAYOUT( | ||
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
47 | ), | ||
48 | }; | ||
diff --git a/keyboards/dozen0/keymaps/via/rules.mk b/keyboards/dozen0/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/dozen0/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||