aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/jj50/keymaps/abstractkb/config.h3
-rw-r--r--keyboards/jj50/keymaps/abstractkb/keymap.c2
-rw-r--r--keyboards/jj50/keymaps/abstractkb_gergomatch/config.h3
-rw-r--r--keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c135
-rw-r--r--keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md4
5 files changed, 146 insertions, 1 deletions
diff --git a/keyboards/jj50/keymaps/abstractkb/config.h b/keyboards/jj50/keymaps/abstractkb/config.h
new file mode 100644
index 000000000..9439a929e
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb/config.h
@@ -0,0 +1,3 @@
1#pragma once
2
3#define RGBLIGHT_SLEEP \ No newline at end of file
diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c
index 456adeee4..2de5ce6b9 100644
--- a/keyboards/jj50/keymaps/abstractkb/keymap.c
+++ b/keyboards/jj50/keymaps/abstractkb/keymap.c
@@ -44,7 +44,7 @@ void keyboard_post_init_user(void) {
44uint32_t layer_state_set_user(uint32_t state) { 44uint32_t layer_state_set_user(uint32_t state) {
45 switch (biton32(state)) { 45 switch (biton32(state)) {
46 case _RAISE: 46 case _RAISE:
47 rgblight_sethsv_noeeprom(240,255,255); 47 rgblight_sethsv_noeeprom(170,255,255);
48 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); 48 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
49 break; 49 break;
50 case _LOWER: 50 case _LOWER:
diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h b/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h
new file mode 100644
index 000000000..9439a929e
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h
@@ -0,0 +1,3 @@
1#pragma once
2
3#define RGBLIGHT_SLEEP \ No newline at end of file
diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c
new file mode 100644
index 000000000..9c129ba9a
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c
@@ -0,0 +1,135 @@
1/*
2Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
4Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
5Modified 2019 AbstractKB
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public LicensezZZ
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#include QMK_KEYBOARD_H
22
23enum layers {
24 _DEFLT,
25 _FUNC,
26 _SYM,
27 _META
28};
29
30enum custom_keycodes {
31 MYRGB_TG = SAFE_RANGE
32};
33
34bool rgbinit = true;
35bool rgbon = true;
36
37const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one
38
39void keyboard_post_init_user(void) {
40 rgblight_enable_noeeprom();
41 led_set_user(host_keyboard_leds());
42}
43
44uint32_t layer_state_set_user(uint32_t state) {
45 switch (biton32(state)) {
46 case _FUNC:
47 rgblight_sethsv_noeeprom(170,255,255);
48 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
49 break;
50 case _SYM:
51 rgblight_sethsv_noeeprom(0,255,255);
52 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
53 break;
54 case _META:
55 rgblight_sethsv_noeeprom(0,255,255);
56 rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
57 break;
58 default: //_DEFLT
59 rgblight_sethsv_noeeprom(0,0,255);
60 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
61 break;
62 }
63
64 return state;
65}
66
67void led_set_user(uint8_t usb_led) {
68 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
69 rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
70 } else {
71 layer_state_set_user(layer_state);
72 }
73}
74
75void myrgb_toggle(void) {
76 if (rgbon) {
77 rgblight_disable_noeeprom();
78 rgbon = false;
79 } else {
80 rgblight_enable_noeeprom();
81 layer_state_set_user(layer_state);
82 led_set_user(host_keyboard_leds());
83 rgbon = true;
84 }
85}
86
87bool process_record_user(uint16_t keycode, keyrecord_t *record) {
88 switch(keycode) {
89 case MYRGB_TG:
90 if (record->event.pressed) {
91 myrgb_toggle();
92 }
93 return false;
94 default:
95 return true;
96 }
97}
98
99const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
100
101 [_DEFLT] = LAYOUT( \
102 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
103 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \
104 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
105 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
106 KC_LCTL, MO(_META), KC_LGUI, KC_LALT, MO(_SYM),KC_SPC,KC_SPC,MO(_FUNC),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
107 ),
108
109
110 [_FUNC] = LAYOUT( \
111 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
112 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
113 _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \
114 _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \
115 _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \
116 ),
117
118
119 [_SYM] = LAYOUT( \
120 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
121 _______,S(KC_1),S(KC_2),S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),_______, S(KC_MINS), _______, _______, _______, _______, \
122 _______, S(KC_3), S(KC_4), S(KC_9), S(KC_0), KC_GRV, S(KC_EQL), KC_MINS, KC_BSLS, S(KC_8), _______, _______, \
123 _______, S(KC_5), S(KC_6), KC_LBRC,KC_RBRC,S(KC_GRV), S(KC_7),KC_EQL, _______, _______, _______, _______, \
124 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
125 ),
126
127
128 [_META] = LAYOUT( \
129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
130 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
131 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
132 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
133 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \
134 )
135};
diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md b/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md
new file mode 100644
index 000000000..a45ece7ff
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md
@@ -0,0 +1,4 @@
1# My personal layout for the JJ50
2
3It is an approximation of a cross between a 60% the gergo function layout
4It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file