aboutsummaryrefslogtreecommitdiff
path: root/keyboards/bm60poker/keymaps/ipetepete/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/bm60poker/keymaps/ipetepete/keymap.c')
-rw-r--r--keyboards/bm60poker/keymaps/ipetepete/keymap.c144
1 files changed, 144 insertions, 0 deletions
diff --git a/keyboards/bm60poker/keymaps/ipetepete/keymap.c b/keyboards/bm60poker/keymaps/ipetepete/keymap.c
new file mode 100644
index 000000000..e59660242
--- /dev/null
+++ b/keyboards/bm60poker/keymaps/ipetepete/keymap.c
@@ -0,0 +1,144 @@
1/* Copyright 2020 ipetepete
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
18enum layers {
19_qwerty,
20_gamer,
21_colemak,
22_fn,
23_rgb,
24_spcfn
25};
26
27
28enum keycodes {
29gamer = SAFE_RANGE,
30qwerty,
31colemak
32};
33
34#define KC_SPFN LT(_spcfn, KC_SPC) // press for space, hold for function layer (aka spacefn)
35
36const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37 [_qwerty] = LAYOUT_60_ansi(
38 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,
39 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,
40 CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
41 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
42 KC_LCTL, KC_LGUI, KC_LALT, KC_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb)
43 ),
44 // Gamer standard qwerty layout but with normal space for jumping etc
45 [_gamer] = LAYOUT_60_ansi(
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
49 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
50 _______, _______, _______, KC_SPACE, _______, _______, _______, _______
51 ),
52 [_colemak] = LAYOUT_60_ansi(
53 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
54 _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
55 _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______,
56 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______,
57 _______, _______, _______, KC_SPFN, _______, _______, _______, _______
58 ),
59 [_fn] = LAYOUT_60_ansi(
60 KC_GESC, 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,
61 _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
62 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
63 KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT,
64 qwerty, colemak, gamer, _______, _______, _______, _______, _______
65 ),
66 [_rgb] = LAYOUT_60_ansi(
67 _______, 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,
68 _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
69 _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______,
70 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
71 _______, _______, _______, _______, _______, _______, _______, _______
72 ),
73 [_spcfn] = LAYOUT_60_ansi(
74 _______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL,
75 _______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______,
76 KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
77 _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______,
78 _______, _______, _______, _______, _______, _______, _______, _______
79 )
80};
81
82bool process_record_user(uint16_t keycode, keyrecord_t *record) {
83 switch (keycode) {
84 case qwerty:
85 if (record->event.pressed) {
86 layer_clear();
87 layer_on(_qwerty);
88 set_single_persistent_default_layer(_qwerty);
89 }
90 return false;
91 break;
92 case colemak:
93 if (record->event.pressed) {
94 layer_clear();
95 layer_on(_colemak);
96 }
97 return false;
98 break;
99 case gamer:
100 if (record->event.pressed) {
101 layer_clear();
102 layer_on(_gamer);
103 }
104 return false;
105 break;
106
107 }
108 return true;
109}
110
111void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
112 for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
113 if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
114 rgb_matrix_set_color( i, red, green, blue );
115 }
116 }
117}
118
119
120void rgb_matrix_indicators_kb(void)
121{
122 if (!g_suspend_state && rgb_matrix_config.enable) {
123 switch (get_highest_layer(layer_state)) {
124 //case _qwerty:
125 // rgb_matrix_set_color(26, 0xFF, 0x00, 0x00);
126 // break;
127 case _colemak:
128 rgb_matrix_set_color(55, 0xFF, 0xFF, 0xFF);
129 break;
130 case _spcfn:
131 rgb_matrix_set_color(22, 0xFF, 0x00, 0x00);
132 rgb_matrix_set_color(35, 0xFF, 0x00, 0x00);
133 rgb_matrix_set_color(36, 0xFF, 0x00, 0x00);
134 rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
135 break;
136 case _gamer:
137 rgb_matrix_set_color(16, 0xFF, 0x00, 0xFF);
138 rgb_matrix_set_color(29, 0xFF, 0x00, 0xFF);
139 rgb_matrix_set_color(30, 0xFF, 0x00, 0xFF);
140 rgb_matrix_set_color(31, 0xFF, 0x00, 0xFF);
141 break;
142 }
143 }
144}