aboutsummaryrefslogtreecommitdiff
path: root/keyboards/jisplit89/keymaps/default/keymap.c
diff options
context:
space:
mode:
authorSalicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com>2020-10-16 13:22:25 +0900
committerGitHub <noreply@github.com>2020-10-15 21:22:25 -0700
commita1f129edd50f0c2e751b904db9639cea9c9314e9 (patch)
tree75a3f706bdc2410ed958d11637d2899f81498b82 /keyboards/jisplit89/keymaps/default/keymap.c
parent73699cccbce4bf04fb2667eb7c1d037f6163986a (diff)
downloadqmk_firmware-a1f129edd50f0c2e751b904db9639cea9c9314e9.tar.gz
qmk_firmware-a1f129edd50f0c2e751b904db9639cea9c9314e9.zip
[Keyboard] Added via support for JISplit89 (#10547)
-Changing the VID -Add a keymap via -Keymap and copyright fixes
Diffstat (limited to 'keyboards/jisplit89/keymaps/default/keymap.c')
-rw-r--r--keyboards/jisplit89/keymaps/default/keymap.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/keyboards/jisplit89/keymaps/default/keymap.c b/keyboards/jisplit89/keymaps/default/keymap.c
index 787e74c4e..bfbb09898 100644
--- a/keyboards/jisplit89/keymaps/default/keymap.c
+++ b/keyboards/jisplit89/keymaps/default/keymap.c
@@ -1,3 +1,20 @@
1/*
2Copyright 2020 Salicylic_Acid
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
2#include "keymap_jp.h" 19#include "keymap_jp.h"
3// Each layer gets a name for readability, which is then used in the keymap matrix below. 20// Each layer gets a name for readability, which is then used in the keymap matrix below.
@@ -46,30 +63,18 @@ LT(_ADJUST,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7
46 ) 63 )
47}; 64};
48 65
49int RGB_current_mode;
50bool process_record_user(uint16_t keycode, keyrecord_t *record) { 66bool process_record_user(uint16_t keycode, keyrecord_t *record) {
51 bool result = false; 67 switch (keycode) {
52 switch (keycode) {
53 #ifdef RGBLIGHT_ENABLE 68 #ifdef RGBLIGHT_ENABLE
54 case RGB_MOD:
55 if (record->event.pressed) {
56 rgblight_mode(RGB_current_mode);
57 rgblight_step();
58 RGB_current_mode = rgblight_get_mode();
59 }
60 break;
61 case RGB_RST: 69 case RGB_RST:
62 if (record->event.pressed) { 70 if (record->event.pressed) {
63 eeconfig_update_rgblight_default(); 71 uint8_t mode = rgblight_get_mode();
64 rgblight_enable(); 72 eeconfig_update_rgblight_default();
65 RGB_current_mode = rgblight_get_mode(); 73 rgblight_enable();
74 rgblight_mode(mode);
66 } 75 }
67 break; 76 break;
68 #endif 77 #endif
69 default: 78 }
70 result = true; 79 return true;
71 break;
72 }
73
74 return result;
75} 80}