aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xd75
diff options
context:
space:
mode:
authorVince Gellár <gellar.vince@gmail.com>2019-08-14 21:10:44 +0200
committerDrashna Jaelre <drashna@live.com>2019-08-14 12:10:44 -0700
commit5d23fb1e3afec56f6bac159138b0bb33fddc4c06 (patch)
tree314a8f163898eca242da73451c1612926f6ded28 /keyboards/xd75
parentd14ef52b804115bd07f2c22de7d354d6e9e94c58 (diff)
downloadqmk_firmware-5d23fb1e3afec56f6bac159138b0bb33fddc4c06.tar.gz
qmk_firmware-5d23fb1e3afec56f6bac159138b0bb33fddc4c06.zip
[Keymap] Xd75 bulbizarre keymap (#6525)
* Added Bulbizarre keymap for the XD75 * Fixed no newline at the end of file * Update keyboards/xd75/keymaps/bulbizarre/readme.md Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> * Update led status check Co-Authored-By: fauxpark <fauxpark@gmail.com> * Remove unnecessary define Co-Authored-By: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/xd75')
-rw-r--r--keyboards/xd75/keymaps/bulbizarre/config.h19
-rw-r--r--keyboards/xd75/keymaps/bulbizarre/keymap.c152
-rw-r--r--keyboards/xd75/keymaps/bulbizarre/readme.md4
-rw-r--r--keyboards/xd75/keymaps/bulbizarre/rules.mk16
4 files changed, 191 insertions, 0 deletions
diff --git a/keyboards/xd75/keymaps/bulbizarre/config.h b/keyboards/xd75/keymaps/bulbizarre/config.h
new file mode 100644
index 000000000..e6975da8a
--- /dev/null
+++ b/keyboards/xd75/keymaps/bulbizarre/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2017 Benjamin Kesselring
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// place overrides here
diff --git a/keyboards/xd75/keymaps/bulbizarre/keymap.c b/keyboards/xd75/keymaps/bulbizarre/keymap.c
new file mode 100644
index 000000000..f35eea73c
--- /dev/null
+++ b/keyboards/xd75/keymaps/bulbizarre/keymap.c
@@ -0,0 +1,152 @@
1/* Copyright 2017 Wunder
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
18
19// Layer shorthand
20#define _QW 0
21#define _FN 1
22#define _FS 2
23
24// Defines the keycodes used by our macros in process_record_user
25enum custom_keycodes {
26 SWITCH_FN = SAFE_RANGE,
27 SWITCH_FS
28};
29
30uint16_t lt12_timer;
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33
34/* QWERTY
35 * .--------------------------------------------------------------------------------------------------------------------------------------.
36 * | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
37 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
38 * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | ENTER | DEL |
39 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
40 * | CAP LK | A | S | D | F | G | H | J | K | L | : | @ | ~ | ENTER | HOME |
41 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
42 * | LSHIFT | Z | X | C | V | B | B | N | M | , | . | / | RSHIFT | UP | END |
43 * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
44 * | LCTRL | DEL | LALT | PSCR | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | RCTRL | LEFT | DOWN | RIGHT |
45 * '--------------------------------------------------------------------------------------------------------------------------------------'
46 */
47
48 [_QW] = LAYOUT_ortho_5x15( /* QWERTY */
49 KC_ESC, 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,
50 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_ENT, KC_DEL,
51 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_NUHS, KC_ENT, KC_HOME,
52 KC_LSFT, KC_BSLS, 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_END,
53 KC_LCTL, KC_DEL, KC_LALT, KC_PSCR, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_ALGR, SWITCH_FN, SWITCH_FS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
54 ),
55
56/* FUNCTION
57 * .--------------------------------------------------------------------------------------------------------------------------------------.
58 * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | = | BACKSP |
59 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
60 * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | ENTER | DEL |
61 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
62 * | CAP LK | A | S | D | F | G | H | J | K | L | : | @ | ~ | ENTER | HOME |
63 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
64 * | LSHIFT | Z | X | C | V | B | B | N | M | , | . | / | RSHIFT | UP | END |
65 * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
66 * | LCTRL | DEL | LALT | PSCR | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | RCTRL | LEFT | DOWN | RIGHT |
67 * '--------------------------------------------------------------------------------------------------------------------------------------'
68 */
69
70 [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
71 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_EQL, KC_BSPC,
72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
75 _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QW), TO(_FS), _______, _______, _______, _______
76 ),
77
78/* FUNCTIONS
79 * .--------------------------------------------------------------------------------------------------------------------------------------.
80 * | ESC | RGB+ | BL_BRT | F3 | F4 | F5 | F6 | F7 | F8 | F9 | / | * | - | + | BACKSP |
81 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
82 * | RGB_H+ | RGB- | BL- | E | R | T | Y | U | I | O | 7 | 8 | 9 | ENTER | DEL |
83 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
84 * | RGB_H- | RGB_M+ | BL+ | VOL+ | F | G | H | J | K | L | 4 | 5 | 6 | ENTER | RESET |
85 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
86 * | RGB_S+ | RGB_M- | BL_S | VOL- | V | B | B | N | M | , | 1 | 2 | 3 | UP | END |
87 * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
88 * | RGB_S- | RGB_T | BL_T | MUTE | SPACE | SPACE | SPACE | SPACE | ALTGR | FN | FX | 0 | . | . | RIGHT |
89 * '--------------------------------------------------------------------------------------------------------------------------------------'
90 */
91
92 [_FS] = LAYOUT_ortho_5x15( /* FUNCTION */
93 _______, RGB_VAI, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______,
94 RGB_HUI, RGB_VAD, BL_INC, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
95 RGB_HUD, RGB_RMOD,BL_DEC, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, RESET,
96 RGB_SAI, RGB_MOD, BL_STEP, KC_VOLD, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______,
97 RGB_SAD, RGB_TOG, BL_TOGG, KC_MUTE, _______, _______, _______, _______, _______, TO(_FN), TO(_QW), KC_P0, KC_PDOT, KC_DOT, _______
98 )
99};
100
101bool process_record_user(uint16_t keycode, keyrecord_t *record) {
102 switch (keycode) {
103 case SWITCH_FN:
104 if (record->event.pressed) {
105 lt12_timer = timer_read();
106 layer_on(_FN);
107 gp100_led_on();
108 } else {
109 if (timer_elapsed(lt12_timer) > 200) {
110 layer_off(_FN);
111 gp100_led_off();
112 }
113 }
114 return false;
115 break;
116 case SWITCH_FS:
117 if (record->event.pressed) {
118 lt12_timer = timer_read();
119 layer_on(_FS);
120 gp100_led_on();
121 } else {
122 if (timer_elapsed(lt12_timer) > 200) {
123 layer_off(_FS);
124 gp100_led_off();
125 }
126 }
127 return false;
128 break;
129 }
130 return true;
131}
132
133void matrix_init_user(void) {
134
135}
136
137void matrix_scan_user(void) {
138
139}
140
141void led_set_user(uint8_t usb_led) {
142 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
143 capslock_led_on();
144 } else {
145 capslock_led_off();
146 }
147 if (IS_LAYER_ON(_FN) || IS_LAYER_ON(_FS)) {
148 gp100_led_on();
149 } else {
150 gp100_led_off();
151 }
152}
diff --git a/keyboards/xd75/keymaps/bulbizarre/readme.md b/keyboards/xd75/keymaps/bulbizarre/readme.md
new file mode 100644
index 000000000..87ee9d705
--- /dev/null
+++ b/keyboards/xd75/keymaps/bulbizarre/readme.md
@@ -0,0 +1,4 @@
1# Bulbizarre keymap
2
3Modified full layout, F-key layer, numpad and function layer.
4Uses backlight, RGB underglow, and tap or hold layer switching keys.
diff --git a/keyboards/xd75/keymaps/bulbizarre/rules.mk b/keyboards/xd75/keymaps/bulbizarre/rules.mk
new file mode 100644
index 000000000..e20fde4ed
--- /dev/null
+++ b/keyboards/xd75/keymaps/bulbizarre/rules.mk
@@ -0,0 +1,16 @@
1# Copyright 2013 Jun Wako <wakojun@gmail.com>
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
16BACKLIGHT_ENABLE = yes