aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xd87
diff options
context:
space:
mode:
authorLouis D <LouWii@users.noreply.github.com>2019-09-02 07:33:04 -0700
committerDrashna Jaelre <drashna@live.com>2019-09-02 07:33:04 -0700
commitd653e5546120e42c07196fd85cb2b214bf91a738 (patch)
treeebcb762742523ddb110246a0359049da62334ad8 /keyboards/xd87
parent05d0e8c09eb972e654e15936aa0118add35f6376 (diff)
downloadqmk_firmware-d653e5546120e42c07196fd85cb2b214bf91a738.tar.gz
qmk_firmware-d653e5546120e42c07196fd85cb2b214bf91a738.zip
[Keyboard] add rgb led configuration for xd87 (#6635)
* add rgb led configuration for xd87 * Add RGB underglow to a separate keymap * rename keymap and make small review changes
Diffstat (limited to 'keyboards/xd87')
-rw-r--r--keyboards/xd87/config.h16
-rwxr-xr-xkeyboards/xd87/keymaps/default_underglow/config.h19
-rwxr-xr-xkeyboards/xd87/keymaps/default_underglow/keymap.c74
-rwxr-xr-xkeyboards/xd87/keymaps/default_underglow/readme.md13
-rwxr-xr-xkeyboards/xd87/keymaps/default_underglow/rules.mk3
-rw-r--r--keyboards/xd87/rules.mk2
6 files changed, 118 insertions, 9 deletions
diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h
index dae9d3db8..438da93fb 100644
--- a/keyboards/xd87/config.h
+++ b/keyboards/xd87/config.h
@@ -54,14 +54,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
54// #define BACKLIGHT_BREATHING 54// #define BACKLIGHT_BREATHING
55#define BACKLIGHT_LEVELS 3 55#define BACKLIGHT_LEVELS 3
56 56
57// #define RGB_DI_PIN E2 57#define RGB_DI_PIN B7
58// #ifdef RGB_DI_PIN 58#ifdef RGB_DI_PIN
59// #define RGBLIGHT_ANIMATIONS 59#define RGBLIGHT_ANIMATIONS
60// #define RGBLED_NUM 16 60#define RGBLED_NUM 14
61// #define RGBLIGHT_HUE_STEP 8 61#define RGBLIGHT_HUE_STEP 8
62// #define RGBLIGHT_SAT_STEP 8 62#define RGBLIGHT_SAT_STEP 8
63// #define RGBLIGHT_VAL_STEP 8 63#define RGBLIGHT_VAL_STEP 8
64// #endif 64#endif
65 65
66/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 66/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
67#define DEBOUNCE 5 67#define DEBOUNCE 5
diff --git a/keyboards/xd87/keymaps/default_underglow/config.h b/keyboards/xd87/keymaps/default_underglow/config.h
new file mode 100755
index 000000000..6432d4b1f
--- /dev/null
+++ b/keyboards/xd87/keymaps/default_underglow/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2019 Louwii
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/xd87/keymaps/default_underglow/keymap.c b/keyboards/xd87/keymaps/default_underglow/keymap.c
new file mode 100755
index 000000000..8852c3a62
--- /dev/null
+++ b/keyboards/xd87/keymaps/default_underglow/keymap.c
@@ -0,0 +1,74 @@
1/* Copyright 2019 Louwii
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// Defines the keycodes used by our macros in process_record_user
19enum custom_keycodes {
20 QMKBEST = SAFE_RANGE,
21 QMKURL
22};
23
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [0] = LAYOUT_tkl_ansi(
27 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_PSCR, KC_SLCK, KC_PAUS,
28 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_INS, KC_HOME, KC_PGUP,
29 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_DEL, KC_END, KC_PGDN,
30 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,
31 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,
32 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
33 [1] = LAYOUT_tkl_ansi(
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, RGB_TOG, RGB_VAI, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
37 KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD,RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
39 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS )
40};
41
42bool process_record_user(uint16_t keycode, keyrecord_t *record) {
43 switch (keycode) {
44 case QMKBEST:
45 if (record->event.pressed) {
46 // when keycode QMKBEST is pressed
47 SEND_STRING("QMK is the best thing ever!");
48 } else {
49 // when keycode QMKBEST is released
50 }
51 break;
52 case QMKURL:
53 if (record->event.pressed) {
54 // when keycode QMKURL is pressed
55 SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
56 } else {
57 // when keycode QMKURL is released
58 }
59 break;
60 }
61 return true;
62}
63
64void matrix_init_user(void) {
65
66}
67
68void matrix_scan_user(void) {
69
70}
71
72void led_set_user(uint8_t usb_led) {
73
74}
diff --git a/keyboards/xd87/keymaps/default_underglow/readme.md b/keyboards/xd87/keymaps/default_underglow/readme.md
new file mode 100755
index 000000000..676709fcc
--- /dev/null
+++ b/keyboards/xd87/keymaps/default_underglow/readme.md
@@ -0,0 +1,13 @@
1# The default RGB underglow layout for xd87
2
3The RGB Underglow feature is disabled by default. This specific keymap enables RGB Underglow but disables the Command feature in order to save space.
4
5## Keymap
6
7### Layer 0
8
9![XD87 - rgb_default keymap - layer 0](https://i.imgur.com/lCOZADn.png)
10
11### Layer 1
12
13![XD87 - rgb_default keymap - layer 1](https://i.imgur.com/BIsAgtO.png) \ No newline at end of file
diff --git a/keyboards/xd87/keymaps/default_underglow/rules.mk b/keyboards/xd87/keymaps/default_underglow/rules.mk
new file mode 100755
index 000000000..390dad18d
--- /dev/null
+++ b/keyboards/xd87/keymaps/default_underglow/rules.mk
@@ -0,0 +1,3 @@
1BOOTMAGIC_ENABLE = lite
2COMMAND_ENABLE = no
3RGBLIGHT_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/xd87/rules.mk b/keyboards/xd87/rules.mk
index b0a417e2a..1b1b6fdf2 100644
--- a/keyboards/xd87/rules.mk
+++ b/keyboards/xd87/rules.mk
@@ -77,7 +77,7 @@ UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6 78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches 79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) 80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
81 81
82# Supported layouts 82# Supported layouts
83LAYOUTS = tkl_ansi tkl_iso 83LAYOUTS = tkl_ansi tkl_iso