diff options
Diffstat (limited to 'keyboards/anavi/macropad8/keymaps')
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/default/config.h | 19 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/default/keymap.c | 62 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/git/config.h | 23 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/git/keymap.c | 145 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/kicad/keymap.c | 118 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/kodi/keymap.c | 81 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/obs/keymap.c | 98 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/vlc/keymap.c | 138 | ||||
-rw-r--r-- | keyboards/anavi/macropad8/keymaps/zoom/keymap.c | 97 |
9 files changed, 781 insertions, 0 deletions
diff --git a/keyboards/anavi/macropad8/keymaps/default/config.h b/keyboards/anavi/macropad8/keymaps/default/config.h new file mode 100644 index 000000000..dd687cad5 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/default/config.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* Copyright 2021 QMK | ||
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 | #pragma once | ||
18 | |||
19 | #define LAYER_STATE_8BIT | ||
diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c new file mode 100644 index 000000000..84be7f3c6 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c | |||
@@ -0,0 +1,62 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | #define _MAIN 0 | ||
4 | #define _FN 1 | ||
5 | |||
6 | #define KC_X0 LT(_FN, KC_ESC) | ||
7 | |||
8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
9 | [_MAIN] = LAYOUT_ortho_2x4( | ||
10 | G(KC_D), KC_UP, C(KC_C), C(KC_V), | ||
11 | KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN) | ||
12 | ), | ||
13 | |||
14 | [_FN] = LAYOUT_ortho_2x4( | ||
15 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
16 | BL_TOGG, BL_STEP, BL_BRTG, _______ | ||
17 | ) | ||
18 | }; | ||
19 | |||
20 | #ifdef OLED_ENABLE | ||
21 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
22 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
23 | } | ||
24 | |||
25 | bool oled_task_user(void) { | ||
26 | // Host Keyboard Layer Status | ||
27 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
28 | oled_write_P(PSTR("Active layer: "), false); | ||
29 | |||
30 | switch (get_highest_layer(layer_state)) { | ||
31 | case _MAIN: | ||
32 | oled_write_ln_P(PSTR("Main"), false); | ||
33 | break; | ||
34 | case _FN: | ||
35 | oled_write_ln_P(PSTR("FN"), false); | ||
36 | break; | ||
37 | default: | ||
38 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
39 | oled_write_ln_P(PSTR("N/A"), false); | ||
40 | } | ||
41 | |||
42 | // Host Keyboard LED Status | ||
43 | led_t led_state = host_keyboard_led_state(); | ||
44 | oled_write_P(PSTR("Num Lock: "), false); | ||
45 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
46 | oled_write_P(PSTR("Caps Lock: "), false); | ||
47 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
48 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
49 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
50 | oled_write_P(PSTR("Backlit: "), false); | ||
51 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
52 | #ifdef RGBLIGHT_ENABLE | ||
53 | static char rgbStatusLine1[26] = {0}; | ||
54 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
55 | oled_write_ln(rgbStatusLine1, false); | ||
56 | static char rgbStatusLine2[26] = {0}; | ||
57 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
58 | oled_write_ln(rgbStatusLine2, false); | ||
59 | #endif | ||
60 | return false; | ||
61 | } | ||
62 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/git/config.h b/keyboards/anavi/macropad8/keymaps/git/config.h new file mode 100644 index 000000000..3fe0304ff --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/git/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2021 Leon Anavi <[email protected]> | ||
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 | #pragma once | ||
18 | |||
19 | #undef RGBLIGHT_ANIMATIONS | ||
20 | #define RGBLIGHT_EFFECT_BREATHING | ||
21 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
22 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
23 | #define RGBLIGHT_EFFECT_SNAKE | ||
diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c new file mode 100644 index 000000000..9b7afb5d6 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c | |||
@@ -0,0 +1,145 @@ | |||
1 | /* Copyright 2021 Leon Anavi <[email protected]> | ||
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 | #define _MAIN 0 | ||
20 | #define _FN 1 | ||
21 | |||
22 | /* | ||
23 | * This keymap contains the following shortcuts for Git. On the | ||
24 | * first row from left to right: | ||
25 | * | ||
26 | * git status | ||
27 | * git log | ||
28 | * git pull | ||
29 | * git push | ||
30 | * | ||
31 | * On the second row from left to right: | ||
32 | * | ||
33 | * git diff | ||
34 | * git add | ||
35 | * git commit | ||
36 | * FN key to switch to the 2nd layout and control lights | ||
37 | * | ||
38 | */ | ||
39 | |||
40 | enum custom_keycodes { | ||
41 | GITCOMMIT = SAFE_RANGE, | ||
42 | GITPUSH, | ||
43 | GITPULL, | ||
44 | GITSTATUS, | ||
45 | GITDIFF, | ||
46 | GITLOG, | ||
47 | GITADD | ||
48 | }; | ||
49 | |||
50 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
51 | switch (keycode) { | ||
52 | case GITCOMMIT: | ||
53 | if (record->event.pressed) { | ||
54 | SEND_STRING("git commit -s\n"); | ||
55 | } | ||
56 | break; | ||
57 | case GITPUSH: | ||
58 | if (record->event.pressed) { | ||
59 | SEND_STRING("git push\n"); | ||
60 | } | ||
61 | break; | ||
62 | case GITPULL: | ||
63 | if (record->event.pressed) { | ||
64 | SEND_STRING("git pull\n"); | ||
65 | } | ||
66 | break; | ||
67 | case GITSTATUS: | ||
68 | if (record->event.pressed) { | ||
69 | SEND_STRING("git status\n"); | ||
70 | } | ||
71 | break; | ||
72 | case GITDIFF: | ||
73 | if (record->event.pressed) { | ||
74 | SEND_STRING("git diff "); | ||
75 | } | ||
76 | break; | ||
77 | case GITLOG: | ||
78 | if (record->event.pressed) { | ||
79 | SEND_STRING("git log\n"); | ||
80 | } | ||
81 | break; | ||
82 | case GITADD: | ||
83 | if (record->event.pressed) { | ||
84 | SEND_STRING("git add "); | ||
85 | } | ||
86 | break; | ||
87 | } | ||
88 | return true; | ||
89 | }; | ||
90 | |||
91 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
92 | [_MAIN] = LAYOUT_ortho_2x4( | ||
93 | GITSTATUS, GITLOG, GITPULL, GITPUSH, | ||
94 | GITDIFF, GITADD, GITCOMMIT, MO(_FN) | ||
95 | ), | ||
96 | |||
97 | [_FN] = LAYOUT_ortho_2x4( | ||
98 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
99 | BL_TOGG, BL_STEP, BL_BRTG, _______ | ||
100 | ) | ||
101 | }; | ||
102 | |||
103 | #ifdef OLED_ENABLE | ||
104 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
105 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
106 | } | ||
107 | |||
108 | bool oled_task_user(void) { | ||
109 | // Host Keyboard Layer Status | ||
110 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
111 | oled_write_P(PSTR("Active layer: "), false); | ||
112 | |||
113 | switch (get_highest_layer(layer_state)) { | ||
114 | case _MAIN: | ||
115 | oled_write_ln_P(PSTR("Git"), false); | ||
116 | break; | ||
117 | case _FN: | ||
118 | oled_write_ln_P(PSTR("FN"), false); | ||
119 | break; | ||
120 | default: | ||
121 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
122 | oled_write_ln_P(PSTR("N/A"), false); | ||
123 | } | ||
124 | |||
125 | // Host Keyboard LED Status | ||
126 | led_t led_state = host_keyboard_led_state(); | ||
127 | oled_write_P(PSTR("Num Lock: "), false); | ||
128 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
129 | oled_write_P(PSTR("Caps Lock: "), false); | ||
130 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
131 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
132 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
133 | oled_write_P(PSTR("Backlit: "), false); | ||
134 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
135 | #ifdef RGBLIGHT_ENABLE | ||
136 | static char rgbStatusLine1[26] = {0}; | ||
137 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
138 | oled_write_ln(rgbStatusLine1, false); | ||
139 | static char rgbStatusLine2[26] = {0}; | ||
140 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
141 | oled_write_ln(rgbStatusLine2, false); | ||
142 | #endif | ||
143 | return false; | ||
144 | } | ||
145 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c new file mode 100644 index 000000000..e75d58847 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* Copyright 2020 Leon Anavi <[email protected]> | ||
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 | #define _SCH 0 | ||
20 | #define _PCB 1 | ||
21 | #define _FN 2 | ||
22 | |||
23 | #define KC_X0 LT(_FN, KC_ESC) | ||
24 | |||
25 | #ifdef RGBLIGHT_ENABLE | ||
26 | // How long (in ms) to wait between animation steps for the rainbow mode | ||
27 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; | ||
28 | // How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations | ||
29 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; | ||
30 | #endif | ||
31 | |||
32 | /* | ||
33 | * The keymap contains 2 layers for KiCad hotkeys and a 3rd layer | ||
34 | * for controlling the backlighting and the underlighting. | ||
35 | * | ||
36 | * - Layer for KiCad Schematic hotkeys: | ||
37 | * m - to move selected component | ||
38 | * r - to rotate selected component | ||
39 | * w - to wire components | ||
40 | * v - to edit component value | ||
41 | * F1 - zoom in | ||
42 | * F2 - zoom out | ||
43 | * F4 - zoom center | ||
44 | * | ||
45 | * - Layer for KiCad PCB layout hotkets: | ||
46 | * m - to move selected component | ||
47 | * r - to rotate selected component | ||
48 | * x - to route a new track | ||
49 | * v - to add a via | ||
50 | * F1 - zoom in | ||
51 | * F2 - zoom out | ||
52 | * F4 - zoom center | ||
53 | * | ||
54 | */ | ||
55 | |||
56 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
57 | [_SCH] = LAYOUT_ortho_2x4( | ||
58 | KC_M, KC_R, KC_W, KC_V, | ||
59 | KC_F1, KC_F2, KC_F4, TO(_PCB) | ||
60 | ), | ||
61 | |||
62 | [_PCB] = LAYOUT_ortho_2x4( | ||
63 | KC_M, KC_R, KC_X, KC_V, | ||
64 | KC_F1, KC_F2, KC_F4, TO(_FN) | ||
65 | ), | ||
66 | |||
67 | [_FN] = LAYOUT_ortho_2x4( | ||
68 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
69 | BL_TOGG, BL_STEP, BL_BRTG, TO(_SCH) | ||
70 | ) | ||
71 | }; | ||
72 | |||
73 | #ifdef OLED_ENABLE | ||
74 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
75 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
76 | } | ||
77 | |||
78 | bool oled_task_user(void) { | ||
79 | // Host Keyboard Layer Status | ||
80 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
81 | oled_write_P(PSTR("Layer: "), false); | ||
82 | |||
83 | switch (get_highest_layer(layer_state)) { | ||
84 | case _SCH: | ||
85 | oled_write_ln_P(PSTR("KiCad Schema"), false); | ||
86 | break; | ||
87 | case _PCB: | ||
88 | oled_write_ln_P(PSTR("KiCad PCB"), false); | ||
89 | break; | ||
90 | case _FN: | ||
91 | oled_write_ln_P(PSTR("FN "), false); | ||
92 | break; | ||
93 | default: | ||
94 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
95 | oled_write_ln_P(PSTR("N/A"), false); | ||
96 | } | ||
97 | |||
98 | // Host Keyboard LED Status | ||
99 | led_t led_state = host_keyboard_led_state(); | ||
100 | oled_write_P(PSTR("Num Lock: "), false); | ||
101 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
102 | oled_write_P(PSTR("Caps Lock: "), false); | ||
103 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
104 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
105 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
106 | oled_write_P(PSTR("Backlit: "), false); | ||
107 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
108 | #ifdef RGBLIGHT_ENABLE | ||
109 | static char rgbStatusLine1[26] = {0}; | ||
110 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
111 | oled_write_ln(rgbStatusLine1, false); | ||
112 | static char rgbStatusLine2[26] = {0}; | ||
113 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
114 | oled_write_ln(rgbStatusLine2, false); | ||
115 | #endif | ||
116 | return false; | ||
117 | } | ||
118 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c new file mode 100644 index 000000000..f99a22d72 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c | |||
@@ -0,0 +1,81 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | #define _MAIN 0 | ||
4 | #define _FN 1 | ||
5 | |||
6 | #define KC_X0 LT(_FN, KC_ESC) | ||
7 | |||
8 | #ifdef RGBLIGHT_ENABLE | ||
9 | // How long (in ms) to wait between animation steps for the rainbow mode | ||
10 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; | ||
11 | // How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations | ||
12 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; | ||
13 | #endif | ||
14 | |||
15 | /** | ||
16 | * Kodi shortcuts: | ||
17 | * | ||
18 | * ESC - Previous menu OR Home screen | ||
19 | * Enter - Select | ||
20 | * X - Stop | ||
21 | * Arrows to move | ||
22 | * | ||
23 | * For details have a look at: | ||
24 | * https://kodi.wiki/view/Keyboard_controls | ||
25 | */ | ||
26 | |||
27 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
28 | [_MAIN] = LAYOUT_ortho_2x4( | ||
29 | KC_ESC, KC_UP, KC_ENTER, KC_X, | ||
30 | KC_LEFT, KC_DOWN, KC_RIGHT, MO(_FN) | ||
31 | ), | ||
32 | |||
33 | [_FN] = LAYOUT_ortho_2x4( | ||
34 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
35 | BL_TOGG, BL_STEP, BL_BRTG, _______ | ||
36 | ) | ||
37 | }; | ||
38 | |||
39 | #ifdef OLED_ENABLE | ||
40 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
41 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
42 | } | ||
43 | |||
44 | bool oled_task_user(void) { | ||
45 | // Host Keyboard Layer Status | ||
46 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
47 | oled_write_P(PSTR("Active layer: "), false); | ||
48 | |||
49 | switch (get_highest_layer(layer_state)) { | ||
50 | case _MAIN: | ||
51 | oled_write_ln_P(PSTR("Kodi"), false); | ||
52 | break; | ||
53 | case _FN: | ||
54 | oled_write_ln_P(PSTR("FN"), false); | ||
55 | break; | ||
56 | default: | ||
57 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
58 | oled_write_ln_P(PSTR("N/A"), false); | ||
59 | } | ||
60 | |||
61 | // Host Keyboard LED Status | ||
62 | led_t led_state = host_keyboard_led_state(); | ||
63 | oled_write_P(PSTR("Num Lock: "), false); | ||
64 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
65 | oled_write_P(PSTR("Caps Lock: "), false); | ||
66 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
67 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
68 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
69 | oled_write_P(PSTR("Backlit: "), false); | ||
70 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
71 | #ifdef RGBLIGHT_ENABLE | ||
72 | static char rgbStatusLine1[26] = {0}; | ||
73 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
74 | oled_write_ln(rgbStatusLine1, false); | ||
75 | static char rgbStatusLine2[26] = {0}; | ||
76 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
77 | oled_write_ln(rgbStatusLine2, false); | ||
78 | #endif | ||
79 | return false; | ||
80 | } | ||
81 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c new file mode 100644 index 000000000..1d9fd38ee --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* Copyright 2020 Leon Anavi <[email protected]> | ||
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 | #define _MAIN 0 | ||
20 | #define _FN 1 | ||
21 | |||
22 | #define KC_X0 LT(_FN, KC_ESC) | ||
23 | |||
24 | #ifdef RGBLIGHT_ENABLE | ||
25 | // How long (in ms) to wait between animation steps for the rainbow mode | ||
26 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; | ||
27 | // How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations | ||
28 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; | ||
29 | #endif | ||
30 | |||
31 | /* | ||
32 | * This keymap contains the following shortcuts for OBS: | ||
33 | * | ||
34 | * - Shortcuts useful for switching scenes on the 1st row: | ||
35 | * Hold Left Control, Shift, Alt and GUI and press F9 | ||
36 | * Hold Left Control, Shift, Alt and GUI and press F10 | ||
37 | * Hold Left Control, Shift, Alt and GUI and press F11 | ||
38 | * Hold Left Control, Shift, Alt and GUI and press F12 | ||
39 | * - Center to screen: Ctrl+D | ||
40 | * - Fit to screen: Ctrl+F | ||
41 | * - Move source to top of sources list: Ctrl+Home | ||
42 | */ | ||
43 | |||
44 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
45 | [_MAIN] = LAYOUT_ortho_2x4( | ||
46 | HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), | ||
47 | LCTL(KC_D), LCTL(KC_F), LCTL(KC_HOME), MO(_FN) | ||
48 | ), | ||
49 | |||
50 | [_FN] = LAYOUT_ortho_2x4( | ||
51 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
52 | BL_TOGG, BL_STEP, BL_BRTG, _______ | ||
53 | ) | ||
54 | }; | ||
55 | |||
56 | #ifdef OLED_ENABLE | ||
57 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
58 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
59 | } | ||
60 | |||
61 | bool oled_task_user(void) { | ||
62 | // Host Keyboard Layer Status | ||
63 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
64 | oled_write_P(PSTR("Active layer: "), false); | ||
65 | |||
66 | switch (get_highest_layer(layer_state)) { | ||
67 | case _MAIN: | ||
68 | oled_write_ln_P(PSTR("OBS"), false); | ||
69 | break; | ||
70 | case _FN: | ||
71 | oled_write_ln_P(PSTR("FN"), false); | ||
72 | break; | ||
73 | default: | ||
74 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
75 | oled_write_ln_P(PSTR("N/A"), false); | ||
76 | } | ||
77 | |||
78 | // Host Keyboard LED Status | ||
79 | led_t led_state = host_keyboard_led_state(); | ||
80 | oled_write_P(PSTR("Num Lock: "), false); | ||
81 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
82 | oled_write_P(PSTR("Caps Lock: "), false); | ||
83 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
84 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
85 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
86 | oled_write_P(PSTR("Backlit: "), false); | ||
87 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
88 | #ifdef RGBLIGHT_ENABLE | ||
89 | static char rgbStatusLine1[26] = {0}; | ||
90 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
91 | oled_write_ln(rgbStatusLine1, false); | ||
92 | static char rgbStatusLine2[26] = {0}; | ||
93 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
94 | oled_write_ln(rgbStatusLine2, false); | ||
95 | #endif | ||
96 | return false; | ||
97 | } | ||
98 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/vlc/keymap.c b/keyboards/anavi/macropad8/keymaps/vlc/keymap.c new file mode 100644 index 000000000..3e15a8186 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/vlc/keymap.c | |||
@@ -0,0 +1,138 @@ | |||
1 | /* Copyright 2021 Marc Nause <[email protected]> | ||
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 | enum custom_layers { | ||
20 | _PLAY, | ||
21 | _FRAME, | ||
22 | _DVD, | ||
23 | _FN | ||
24 | }; | ||
25 | |||
26 | #define KC_X0 LT(_FN, KC_ESC) | ||
27 | |||
28 | #ifdef RGBLIGHT_ENABLE | ||
29 | // How long (in ms) to wait between animation steps for the rainbow mode | ||
30 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; | ||
31 | // How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations | ||
32 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; | ||
33 | #endif | ||
34 | |||
35 | /* | ||
36 | * The keymap contains 3 layers for vlc hotkeys and a 4th layer | ||
37 | * for controlling the backlighting and the underlighting. | ||
38 | * | ||
39 | * See https://wiki.videolan.org/QtHotkeys/ for VLC hotkeys | ||
40 | * | ||
41 | * - Layer for VLC media play hotkeys: | ||
42 | * Space - Play/pause | ||
43 | * P - Previous track | ||
44 | * S - Stop | ||
45 | * N - Next track | ||
46 | * + - Slower | ||
47 | * - - Faster | ||
48 | * = - Normal rate | ||
49 | * | ||
50 | * - Layer for VLC frame control hotkeys: | ||
51 | * Shift + right arrow - Jump 5 seconds forward | ||
52 | * Alt + right arrow - Jump 10 seconds forward | ||
53 | * Control + right arrow - Jump 1 minute forward | ||
54 | * E - Next frame | ||
55 | * Shift + left arrow - Jump 5 seconds back | ||
56 | * Alt + left arrow - Jump 10 seconds back | ||
57 | * Control + left arrow - Jump 1 minute back | ||
58 | * | ||
59 | * - Layer for VLC DVD hotkeys: | ||
60 | * Shift + M - Disc menu | ||
61 | * Arrow up - Navigate menu (up) | ||
62 | * Enter - Select menu entry | ||
63 | * Shift + V - Toggle subtitles | ||
64 | * Arrow left - Navigate menu (left) | ||
65 | * Arrow down - Navigate menu (down) | ||
66 | * Arrow right - Navigate menu (right) | ||
67 | */ | ||
68 | |||
69 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
70 | [_PLAY] = LAYOUT_ortho_2x4( | ||
71 | KC_SPC, KC_P, KC_S, KC_N, | ||
72 | KC_KP_PLUS, KC_KP_MINUS, KC_KP_EQUAL, TO(_FRAME) | ||
73 | ), | ||
74 | |||
75 | [_FRAME] = LAYOUT_ortho_2x4( | ||
76 | LSFT(KC_RIGHT), LALT(KC_RIGHT), LCTL(KC_RIGHT), KC_E, | ||
77 | LSFT(KC_LEFT), LALT(KC_LEFT), LCTL(KC_LEFT), TO(_DVD) | ||
78 | ), | ||
79 | |||
80 | [_DVD] = LAYOUT_ortho_2x4( | ||
81 | LSFT(KC_M), KC_UP, KC_ENTER, LSFT(KC_V), | ||
82 | KC_LEFT, KC_DOWN, KC_RIGHT, TO(_FN) | ||
83 | ), | ||
84 | |||
85 | [_FN] = LAYOUT_ortho_2x4( | ||
86 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
87 | BL_TOGG, BL_STEP, BL_BRTG, TO(_PLAY) | ||
88 | ) | ||
89 | }; | ||
90 | |||
91 | #ifdef OLED_ENABLE | ||
92 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
93 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
94 | } | ||
95 | |||
96 | void oled_task_user(void) { | ||
97 | // Host Keyboard Layer Status | ||
98 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
99 | oled_write_P(PSTR("Layer: "), false); | ||
100 | |||
101 | switch (get_highest_layer(layer_state)) { | ||
102 | case _PLAY: | ||
103 | oled_write_ln_P(PSTR("VLC Play"), false); | ||
104 | break; | ||
105 | case _FRAME: | ||
106 | oled_write_ln_P(PSTR("VLC Frame"), false); | ||
107 | break; | ||
108 | case _DVD: | ||
109 | oled_write_ln_P(PSTR("VLC DVD"), false); | ||
110 | break; | ||
111 | case _FN: | ||
112 | oled_write_ln_P(PSTR("FN "), false); | ||
113 | break; | ||
114 | default: | ||
115 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
116 | oled_write_ln_P(PSTR("N/A"), false); | ||
117 | } | ||
118 | |||
119 | // Host Keyboard LED Status | ||
120 | led_t led_state = host_keyboard_led_state(); | ||
121 | oled_write_P(PSTR("Num Lock: "), false); | ||
122 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
123 | oled_write_P(PSTR("Caps Lock: "), false); | ||
124 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
125 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
126 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
127 | oled_write_P(PSTR("Backlit: "), false); | ||
128 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
129 | #ifdef RGBLIGHT_ENABLE | ||
130 | static char rgbStatusLine1[26] = {0}; | ||
131 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
132 | oled_write_ln(rgbStatusLine1, false); | ||
133 | static char rgbStatusLine2[26] = {0}; | ||
134 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
135 | oled_write_ln(rgbStatusLine2, false); | ||
136 | #endif | ||
137 | } | ||
138 | #endif | ||
diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c new file mode 100644 index 000000000..965bbec42 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c | |||
@@ -0,0 +1,97 @@ | |||
1 | /* Copyright 2020 Leon Anavi <[email protected]> | ||
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 | #define _MAIN 0 | ||
20 | #define _FN 1 | ||
21 | |||
22 | #define KC_X0 LT(_FN, KC_ESC) | ||
23 | |||
24 | #ifdef RGBLIGHT_ENABLE | ||
25 | // How long (in ms) to wait between animation steps for the rainbow mode | ||
26 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; | ||
27 | // How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations | ||
28 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; | ||
29 | #endif | ||
30 | |||
31 | /* | ||
32 | * The keymap contains the following shortcuts for Zoom meeting: | ||
33 | * | ||
34 | * Alt+V: Start/stop video | ||
35 | * Alt+A: Mute/unmute my audio | ||
36 | * Alt+M: Mute/unmute audio for everyone except the host | ||
37 | * Alt+S: Start/stop screen sharing | ||
38 | * Alt+R: Start/stop local recording | ||
39 | * Alt+P: Pause/resume recording | ||
40 | * Alt+C: Start/stop cloud recording | ||
41 | */ | ||
42 | |||
43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
44 | [_MAIN] = LAYOUT_ortho_2x4( | ||
45 | LALT(KC_V), LALT(KC_A), LALT(KC_M), LALT(KC_S), | ||
46 | LALT(KC_R), LALT(KC_P), LALT(KC_C), MO(_FN) | ||
47 | ), | ||
48 | |||
49 | [_FN] = LAYOUT_ortho_2x4( | ||
50 | RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, | ||
51 | BL_TOGG, BL_STEP, BL_BRTG, _______ | ||
52 | ) | ||
53 | }; | ||
54 | |||
55 | #ifdef OLED_ENABLE | ||
56 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
57 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
58 | } | ||
59 | |||
60 | bool oled_task_user(void) { | ||
61 | // Host Keyboard Layer Status | ||
62 | oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); | ||
63 | oled_write_P(PSTR("Active layer: "), false); | ||
64 | |||
65 | switch (get_highest_layer(layer_state)) { | ||
66 | case _MAIN: | ||
67 | oled_write_ln_P(PSTR("Zoom"), false); | ||
68 | break; | ||
69 | case _FN: | ||
70 | oled_write_ln_P(PSTR("FN"), false); | ||
71 | break; | ||
72 | default: | ||
73 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
74 | oled_write_ln_P(PSTR("N/A"), false); | ||
75 | } | ||
76 | |||
77 | // Host Keyboard LED Status | ||
78 | led_t led_state = host_keyboard_led_state(); | ||
79 | oled_write_P(PSTR("Num Lock: "), false); | ||
80 | oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); | ||
81 | oled_write_P(PSTR("Caps Lock: "), false); | ||
82 | oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); | ||
83 | oled_write_P(PSTR("Scroll Lock: "), false); | ||
84 | oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); | ||
85 | oled_write_P(PSTR("Backlit: "), false); | ||
86 | oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); | ||
87 | #ifdef RGBLIGHT_ENABLE | ||
88 | static char rgbStatusLine1[26] = {0}; | ||
89 | snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); | ||
90 | oled_write_ln(rgbStatusLine1, false); | ||
91 | static char rgbStatusLine2[26] = {0}; | ||
92 | snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); | ||
93 | oled_write_ln(rgbStatusLine2, false); | ||
94 | #endif | ||
95 | return false; | ||
96 | } | ||
97 | #endif | ||