diff options
author | Lalit Maganti <lalitmaganti@gmail.com> | 2022-02-05 01:59:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 17:59:08 -0800 |
commit | 1febea8d4b18f87844618492d43aefc5c22c8174 (patch) | |
tree | 86b0a1c95178e8b15189be973370ef12ef82b6cb | |
parent | 904d5f14f5bb257960c0ca13aac605b029bbb18f (diff) | |
download | qmk_firmware-1febea8d4b18f87844618492d43aefc5c22c8174.tar.gz qmk_firmware-1febea8d4b18f87844618492d43aefc5c22c8174.zip |
[Keymap] add LalitMaganti GMMK Pro Keymap (#16203)
Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r-- | keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/config.h | 19 | ||||
-rw-r--r-- | keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/keymap.c | 91 | ||||
-rw-r--r-- | keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/rules.mk | 1 |
3 files changed, 111 insertions, 0 deletions
diff --git a/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/config.h b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/config.h new file mode 100644 index 000000000..74c018f7f --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/config.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* Copyright 2021 Lalit Maganti | ||
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 RGB_DISABLE_WHEN_USB_SUSPENDED \ No newline at end of file | ||
diff --git a/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/keymap.c new file mode 100644 index 000000000..7bedf0598 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/keymap.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* Copyright 2021 Lalit Maganti | ||
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 | #ifdef PROGRAMMABLE_BUTTON_ENABLE | ||
20 | #define L1_NUM1 PROGRAMMABLE_BUTTON_1 | ||
21 | #define L1_NUM2 PROGRAMMABLE_BUTTON_2 | ||
22 | #define L1_NUM3 PROGRAMMABLE_BUTTON_3 | ||
23 | #define L1_NUM4 PROGRAMMABLE_BUTTON_4 | ||
24 | #define L1_NUM5 PROGRAMMABLE_BUTTON_5 | ||
25 | #define L1_NUM6 PROGRAMMABLE_BUTTON_6 | ||
26 | #define L1_NUM7 PROGRAMMABLE_BUTTON_7 | ||
27 | #define L1_NUM8 PROGRAMMABLE_BUTTON_8 | ||
28 | #define L1_NUM9 PROGRAMMABLE_BUTTON_9 | ||
29 | #else | ||
30 | #define L1_NUM1 _______ | ||
31 | #define L1_NUM2 _______ | ||
32 | #define L1_NUM3 _______ | ||
33 | #define L1_NUM4 _______ | ||
34 | #define L1_NUM5 _______ | ||
35 | #define L1_NUM6 _______ | ||
36 | #define L1_NUM7 _______ | ||
37 | #define L1_NUM8 _______ | ||
38 | #define L1_NUM9 _______ | ||
39 | #endif | ||
40 | |||
41 | |||
42 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
43 | [0] = LAYOUT( | ||
44 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, | ||
45 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, | ||
46 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, | ||
47 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, | ||
48 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | ||
49 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
50 | ), | ||
51 | |||
52 | [1] = LAYOUT( | ||
53 | _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, RGB_TOG, _______, | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, | ||
56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
59 | ), | ||
60 | }; | ||
61 | |||
62 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
63 | if (clockwise) { | ||
64 | tap_code_delay(KC_VOLU, 10); | ||
65 | } else { | ||
66 | tap_code_delay(KC_VOLD, 10); | ||
67 | } | ||
68 | return false; | ||
69 | } | ||
70 | |||
71 | |||
72 | #ifdef RGB_MATRIX_ENABLE | ||
73 | |||
74 | static void set_rgb_side_leds(void); | ||
75 | |||
76 | static void set_rgb_side_leds() { | ||
77 | rgb_matrix_set_color(67, RGB_WHITE); // Left side LED 1 | ||
78 | rgb_matrix_set_color(68, RGB_WHITE); // Right side LED 1 | ||
79 | rgb_matrix_set_color(91, RGB_WHITE); // Left side LED 8 | ||
80 | rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8 | ||
81 | } | ||
82 | |||
83 | void rgb_matrix_indicators_user() { | ||
84 | rgb_matrix_set_color_all(0x0, 0x0, 0x0); | ||
85 | if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { | ||
86 | rgb_matrix_set_color(3, RGB_WHITE); // CAPS | ||
87 | } | ||
88 | set_rgb_side_leds(); | ||
89 | } | ||
90 | |||
91 | #endif \ No newline at end of file | ||
diff --git a/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/rules.mk new file mode 100644 index 000000000..0a5b666e8 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/lalitmaganti/rules.mk | |||
@@ -0,0 +1 @@ | |||
MOUSEKEY_ENABLE = no | |||