aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbstractKB <49011872+AbstractKB@users.noreply.github.com>2019-04-01 23:58:47 -0400
committerDrashna Jaelre <drashna@live.com>2019-04-01 20:58:47 -0700
commit8b8d69f0dfea22936f4b8b9da2917cdf9f838839 (patch)
tree2b4e44c12a502c3812fcd23f4233defdb33a3b90
parentfbee737ff3b767f0ce95da61a154ef6334312887 (diff)
downloadqmk_firmware-8b8d69f0dfea22936f4b8b9da2917cdf9f838839.tar.gz
qmk_firmware-8b8d69f0dfea22936f4b8b9da2917cdf9f838839.zip
[Keymap] Updated my personal keymaps for the bfo9000 and jj50 (#5508)
* Updated my personal keymaps for the bfo9000 and jj50 * fixed best practices mistakes
-rw-r--r--keyboards/jj50/keymaps/abstractkb/keymap.c135
-rw-r--r--keyboards/jj50/keymaps/abstractkb/readme.md6
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/config.h37
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c92
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md5
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk1
6 files changed, 276 insertions, 0 deletions
diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c
new file mode 100644
index 000000000..456adeee4
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb/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 _RAISE,
26 _LOWER,
27 _FN
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 _RAISE:
47 rgblight_sethsv_noeeprom(240,255,255);
48 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
49 break;
50 case _LOWER:
51 rgblight_sethsv_noeeprom(0,255,255);
52 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
53 break;
54 case _FN:
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 MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
107 ),
108
109
110 [_RAISE] = 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 [_LOWER] = 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 _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \
122 _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \
123 _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
124 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
125 ),
126
127
128 [_FN] = LAYOUT( \
129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
130 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
131 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
132 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
133 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \
134 )
135};
diff --git a/keyboards/jj50/keymaps/abstractkb/readme.md b/keyboards/jj50/keymaps/abstractkb/readme.md
new file mode 100644
index 000000000..7ff7e0268
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb/readme.md
@@ -0,0 +1,6 @@
1# My personal layout for the JJ50
2
3It is an approximation of a 60% layout with the alternate layers set up for programming,
4with brackets and parenthesis on the homerow
5Other things I changed were swapping around delete, backspace, and capslock around
6It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h
new file mode 100644
index 000000000..67c64fd8e
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h
@@ -0,0 +1,37 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6(Modified) Copyright 2019 AbstractKB
7
8This program is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#pragma once
23
24//my block------------
25#define RGBLIGHT_ANIMATIONS
26#define RGBLIGHT_SLEEP
27
28/* Use I2C or Serial, not both */
29
30#define USE_SERIAL
31// #define USE_I2C
32
33/* Select hand configuration */
34
35#define MASTER_LEFT
36// #define MASTER_RIGHT
37// #define EE_HANDS
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c
new file mode 100644
index 000000000..a8348ecfb
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c
@@ -0,0 +1,92 @@
1#include QMK_KEYBOARD_H
2
3enum layers {
4 _BASE,
5 _LIST
6};
7
8enum my_keycodes {
9 MYRGB_TG = SAFE_RANGE
10};
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13
14[_BASE] = LAYOUT( \
15 KC_MPLY, KC_PSLS, KC_PAST, 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, MYRGB_TG, KC_PGUP, \
16 KC_MUTE, KC_PPLS, KC_PMNS, 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_DEL, KC_PGDN, \
17 KC_P7, KC_P8, KC_P9, 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_HOME, \
18 KC_P4, KC_P5, KC_P6, KC_BSPACE, 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_CAPS, KC_PSCR, \
19 KC_P1, KC_P2, KC_P3, 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, XXXXXXX, KC_INS, \
20 KC_P0, KC_PDOT, KC_PENT, TO(_LIST), KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \
21),
22
23[_LIST] = LAYOUT( \
24 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
25 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
26 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
27 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
28 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
29 _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
30)
31
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 matrix_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 _LIST:
47 rgblight_sethsv_noeeprom(0,255,255);
48 rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
49 break;
50 default: //_BASE
51 rgblight_sethsv_noeeprom(0,0,255);
52 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
53 break;
54 }
55
56 return state;
57}
58
59void led_set_user(uint8_t usb_led) {
60 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
61 rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
62 } else {
63 layer_state_set_user(layer_state);
64 }
65}
66
67void myrgb_toggle(void) {
68 if (rgbon) {
69 rgblight_disable_noeeprom();
70 rgbon = false;
71 } else {
72 rgblight_enable_noeeprom();
73 layer_state_set_user(layer_state);
74 led_set_user(host_keyboard_leds());
75 rgbon = true;
76 }
77}
78
79bool process_record_user(uint16_t keycode, keyrecord_t *record) {
80 switch(keycode) {
81 case MYRGB_TG:
82 if (record->event.pressed) {
83 myrgb_toggle();
84 }
85 return false;
86 default:
87 return true;
88 }
89}
90
91
92
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md
new file mode 100644
index 000000000..3ba56571f
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md
@@ -0,0 +1,5 @@
1# My personal layout for the BFO-9000
2
3It is an approximation of a 96% layout with a left-hand number pad
4Other things I changed were swapping around delete, backspace, and capslock
5It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk
new file mode 100644
index 000000000..7ad666d1a
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes \ No newline at end of file