aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nomu30
diff options
context:
space:
mode:
authormarksard <38324387+marksard@users.noreply.github.com>2019-05-20 02:00:53 +0900
committerDrashna Jaelre <drashna@live.com>2019-05-19 10:00:53 -0700
commit2a8fd5823244eb1c7e8906b4118f01d2078c4e28 (patch)
tree30fd70f54b2f82657c0e79372b45fdcc51853b30 /keyboards/nomu30
parent2ce3c5548ae7329a80d4db73a5ce3e7f092332f3 (diff)
downloadqmk_firmware-2a8fd5823244eb1c7e8906b4118f01d2078c4e28.tar.gz
qmk_firmware-2a8fd5823244eb1c7e8906b4118f01d2078c4e28.zip
[Keymap] Add keymap nomu30 likejijs (#5917)
* Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add like_jis keymap for nomu30
Diffstat (limited to 'keyboards/nomu30')
-rw-r--r--keyboards/nomu30/keymaps/like_jis/config.h66
-rw-r--r--keyboards/nomu30/keymaps/like_jis/keymap.c159
-rw-r--r--keyboards/nomu30/keymaps/like_jis/readme.md64
-rw-r--r--keyboards/nomu30/keymaps/like_jis/rules.mk26
4 files changed, 315 insertions, 0 deletions
diff --git a/keyboards/nomu30/keymaps/like_jis/config.h b/keyboards/nomu30/keymaps/like_jis/config.h
new file mode 100644
index 000000000..8861dc539
--- /dev/null
+++ b/keyboards/nomu30/keymaps/like_jis/config.h
@@ -0,0 +1,66 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
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 License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23// place overrides here
24#define TAPPING_TERM 200
25#define IGNORE_MOD_TAP_INTERRUPT
26
27#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term
28#define TAPPING_TERM_PER_KEY
29
30#ifdef MOUSEKEY_ENABLE
31 #undef MOUSEKEY_INTERVAL
32 #define MOUSEKEY_INTERVAL 1
33
34 #undef MOUSEKEY_TIME_TO_MAX
35 #define MOUSEKEY_TIME_TO_MAX 150
36
37 #undef MOUSEKEY_MAX_SPEED
38 #define MOUSEKEY_MAX_SPEED 3
39
40 #undef MOUSEKEY_MOVE_DELTA
41 #define MOUSEKEY_MOVE_DELTA 4
42
43 #undef MOUSEKEY_DELAY
44 #define MOUSEKEY_DELAY 0
45#endif
46
47// Selection of RGBLIGHT MODE to use.
48#if defined(LED_ANIMATIONS)
49 //#define RGBLIGHT_EFFECT_BREATHING
50 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
51 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
52 //#define RGBLIGHT_EFFECT_SNAKE
53 #define RGBLIGHT_EFFECT_KNIGHT
54 //#define RGBLIGHT_EFFECT_CHRISTMAS
55 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
56 //#define RGBLIGHT_EFFECT_RGB_TEST
57 //#define RGBLIGHT_EFFECT_ALTERNATING
58#endif
59
60// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes
61#ifdef RGBLIGHT_ENABLE
62 #define RGB_DI_PIN B5
63 #define RGBLIGHT_TIMER
64
65 #define RGBLED_NUM 6
66#endif
diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c
new file mode 100644
index 000000000..203d0a7a4
--- /dev/null
+++ b/keyboards/nomu30/keymaps/like_jis/keymap.c
@@ -0,0 +1,159 @@
1#include QMK_KEYBOARD_H
2#include "keymap_jp.h"
3
4extern keymap_config_t keymap_config;
5
6#ifdef RGBLIGHT_ENABLE
7//Following line allows macro to read current RGB settings
8extern rgblight_config_t rgblight_config;
9#endif
10
11// Each layer gets a name for readability, which is then used in the keymap matrix below.
12// The underscores don't mean anything - you can have a layer called STUFF or any other name.
13// Layer names don't all need to be of the same length, obviously, and you can also skip them
14// entirely and just use numbers.
15enum layer_number {
16 _BASE = 0,
17 _LOWER,
18 _RAISE,
19 _ADJUST,
20};
21
22enum custom_keycodes {
23 RGBRST = SAFE_RANGE,
24 LOWER,
25 RAISE,
26 KANJI,
27};
28
29// enum tapdances{
30// TD_CODO = 0,
31// TD_SLRO,
32// };
33
34// Layer Mode aliases
35#define KC_MLAD MO(_ADJUST)
36
37// Base layer mod tap
38#define KC_CMSF LSFT_T(KC_COMM)
39#define KC_DTCT LCTL_T(KC_DOT)
40#define KC_Z_AL LALT_T(KC_Z)
41#define KC_X_GU LGUI_T(KC_X)
42#define KC_ENSF LSFT_T(KC_ENT)
43
44// Lower layer mod tap
45#define KC_BSSF LSFT_T(KC_BSLS)
46#define KC_11AL LALT_T(KC_F11)
47
48// Layer tap
49#define KC_BSLO LT(_LOWER, KC_BSPC)
50#define KC_SPRA LT(_RAISE, KC_SPC)
51
52// Tap dance
53// #define KC_CODO TD(TD_CODO)
54// #define KC_SLRO TD(TD_SLRO)
55
56// qk_tap_dance_action_t tap_dance_actions[] = {
57// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
58// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
59// };
60
61const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 [_BASE] = LAYOUT(
63 //,-----------------------------------------------------------------------------------------------------------------------.
64 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO,
65 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
66 KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF,
67 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
68 KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA
69 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
70 ),
71
72 [_LOWER] = LAYOUT(
73 //,-----------------------------------------------------------------------------------------------------------------------.
74 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______,
75 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
76 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF,
77 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
78 _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD
79 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
80 ),
81
82 [_RAISE] = LAYOUT(
83 //,-----------------------------------------------------------------------------------------------------------------------.
84 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
85 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
86 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT,
87 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
88 _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______
89 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
90 ),
91
92 [_ADJUST] = LAYOUT(
93 //,-----------------------------------------------------------------------------------------------------------------------.
94 RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
95 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
96 _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
97 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
98 _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX
99 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
100 )
101};
102
103uint16_t get_tapping_term(uint16_t keycode) {
104 switch (keycode) {
105 case KC_BSLO:
106 return TAPPING_LAYER_TERM;
107 case KC_SPRA:
108 return TAPPING_LAYER_TERM;
109 default:
110 return TAPPING_TERM;
111 }
112}
113
114int RGB_current_mode;
115bool process_record_user(uint16_t keycode, keyrecord_t *record) {
116
117 bool result = false;
118 switch (keycode) {
119 case KANJI:
120 if (record->event.pressed) {
121 if (keymap_config.swap_lalt_lgui == false) {
122 register_code(KC_LANG2);
123 } else {
124 SEND_STRING(SS_LALT("`"));
125 }
126 } else {
127 unregister_code(KC_LANG2);
128 }
129 break;
130 #ifdef RGBLIGHT_ENABLE
131 //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
132 case RGB_MOD:
133 if (record->event.pressed) {
134 rgblight_mode(RGB_current_mode);
135 rgblight_step();
136 RGB_current_mode = rgblight_config.mode;
137 }
138 break;
139 case RGBRST:
140 if (record->event.pressed) {
141 eeconfig_update_rgblight_default();
142 rgblight_enable();
143 RGB_current_mode = rgblight_config.mode;
144 }
145 break;
146 #endif
147 default:
148 result = true;
149 break;
150 }
151
152 return result;
153}
154
155void keyboard_post_init_user(void) {
156 #ifdef RGBLIGHT_ENABLE
157 RGB_current_mode = rgblight_config.mode;
158 #endif
159}
diff --git a/keyboards/nomu30/keymaps/like_jis/readme.md b/keyboards/nomu30/keymaps/like_jis/readme.md
new file mode 100644
index 000000000..ad64f06b1
--- /dev/null
+++ b/keyboards/nomu30/keymaps/like_jis/readme.md
@@ -0,0 +1,64 @@
1# The LikeJIS is Japanese Keyboard like keymap
2
3A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option.
4
5## Keymap Description
6
7- KC_CMSF ...... , key is one tap, Shift key is long push.
8- KC_DTCT ...... . key is one tap, Ctrl key is long tap.
9- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap.
10- KC_Z_AL ...... Z key is one tap, Alt key is long tap.
11- KC_X_GU ...... X key is one tap, GUI key is long tap.
12- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push.
13- KC_SPRA ...... Space key is one tap, Move to Raise layer with.
14- AG_NORM ...... If you use Mac set to mode.
15- AG_SWAP ...... If you use Win set to mode.
16- KANJI ...... Japanese IME toggle key.
17
18## How to move to Ajdust Layer
19
20At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state.
21
22```c
23
24 [_BASE] = LAYOUT(
25 //,-----------------------------------------------------------------------------------------------------------------------.
26 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO,
27 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
28 KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF,
29 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
30 KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA
31 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
32 ),
33
34 [_LOWER] = LAYOUT(
35 //,-----------------------------------------------------------------------------------------------------------------------.
36 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______,
37 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
38 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF,
39 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
40 _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD
41 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
42 ),
43
44 [_RAISE] = LAYOUT(
45 //,-----------------------------------------------------------------------------------------------------------------------.
46 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
47 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
48 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT,
49 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
50 _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______
51 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
52 ),
53
54 [_ADJUST] = LAYOUT(
55 //,-----------------------------------------------------------------------------------------------------------------------.
56 RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
57 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
58 _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
59 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
60 _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX
61 //`---------+---------+---------+---------+---------+---------+---------+---------+---------'
62 )
63
64```
diff --git a/keyboards/nomu30/keymaps/like_jis/rules.mk b/keyboards/nomu30/keymaps/like_jis/rules.mk
new file mode 100644
index 000000000..b1a6026c2
--- /dev/null
+++ b/keyboards/nomu30/keymaps/like_jis/rules.mk
@@ -0,0 +1,26 @@
1
2# Build Options
3# change to "no" to disable the options, or define them in the Makefile in
4# the appropriate keymap folder that will get included automatically
5#
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7TAP_DANCE_ENABLE = no
8
9# If your custom treadstone32 pcb, you can rewrite to yes.
10RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
11LED_ANIMATIONS = yes # LED animations
12
13# Other selectable option
14IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
15
16ifeq ($(strip $(LED_ANIMATIONS)), yes)
17 # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
18 OPT_DEFS += -DLED_ANIMATIONS
19endif
20
21ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
22 OPT_DEFS += -DIOS_DEVICE_ENABLE
23endif
24
25# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
26SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend