summaryrefslogtreecommitdiff
path: root/keyboards/kprepublic/bm40hsrgb
diff options
context:
space:
mode:
authorsyntax-magic <dan.syntaxmagic@gmail.com>2022-10-24 22:46:37 -0700
committerGitHub <noreply@github.com>2022-10-24 22:46:37 -0700
commit846e9d4c537c85f1a549f14865d1923793d8dbf9 (patch)
tree875596389a8227884c0c749aee8b7b31b3132c7d /keyboards/kprepublic/bm40hsrgb
parent2dff39720dda4ad00f89102ab238104c400490df (diff)
[Keymap] Added tap dance to LNG1 key (LNG2) (#18682)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: syntax-magic <dkim.8881@gmail.com>
Diffstat (limited to 'keyboards/kprepublic/bm40hsrgb')
-rw-r--r--keyboards/kprepublic/bm40hsrgb/keymaps/dan/config.h7
-rw-r--r--keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c88
-rw-r--r--keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md25
-rw-r--r--keyboards/kprepublic/bm40hsrgb/keymaps/dan/rules.mk1
4 files changed, 71 insertions, 50 deletions
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/config.h
new file mode 100644
index 0000000000..67f7e7cd6f
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/config.h
@@ -0,0 +1,7 @@
+// Copyright 2021 Dan Kim (@syntax-magic)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define TAPPING_TERM 168
+#define TAPPING_TERM_PER_KEY
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c
index 29e359b94a..797dc164c7 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c
@@ -41,42 +41,53 @@ enum layers {
#define CLEAN TG(_CLEAN)
#define RGB MO(_RGB)
+// Tap dance declarations
+enum {
+ TD_LNG1_LNG2,
+ TD_PAST_PSLS
+};
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_LNG1_LNG2] = ACTION_TAP_DANCE_DOUBLE(KC_LNG1, KC_LNG2),
+ [TD_PAST_PSLS] = ACTION_TAP_DANCE_DOUBLE(KC_PAST, KC_PSLS)
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* ALPHA
* ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Return|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * |ESC/NP| KOR | Win | Alt |LEFTFN| Space |RFN/- | = |Delete| \ | Enter|
+ * |ESC/NU|KOR/HN| Win | Alt |LEFTFN| Space |RFN/- | = |Delete| \ | Enter|
* `-----------------------------------------------------------------------------------'
*/
[_ALPHA] = LAYOUT_planck_mit(
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
- LT(NUMPAD, KC_ESC), KC_LNG1, KC_LGUI, KC_LALT, LEFTFN, KC_SPC, LT(RIGHTFN, KC_MINS), KC_EQL, KC_DEL, KC_BSLS, KC_PENT
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ LT(NUMPAD, KC_ESC), TD(TD_LNG1_LNG2), KC_LGUI, KC_LALT, LEFTFN, KC_SPC, LT(RIGHTFN, KC_MINS), KC_EQL, KC_DEL, KC_BSLS, KC_PENT
),
/* LEFTFN
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | Left | Down | Up |Right |CTRL+/|HANJA | [ | ] | ) | : | " |
+ * | Ctrl | Left | Down | Up |Right |Ctrl+/| PGUP | [ | ] | ) | : | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| PGUP | PGDN | Home | End | CAPS |PRNTSR| ( | , | . | / |Return|
+ * | Shift|CapLck| Ins | Home | End | PGDN |PrntSc| ( | , | . | / |Return|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | RGB | [ | ] | Alt | Trns | Space | _ | + | INS | | | Enter|
+ * | RGB | [ | ] | Alt | Trns | Space | _ | + |Delete| | | Enter|
* `-----------------------------------------------------------------------------------'
*/
[_LEFTFN] = LAYOUT_planck_mit(
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_LCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LCTL(KC_SLSH), KC_LNG2, KC_LBRC, KC_RBRC, KC_RPRN, KC_COLN, KC_DQUO,
- KC_LSFT, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_CAPS, KC_PSCR, KC_LPRN, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- RGB, KC_LBRC, KC_RBRC, KC_LALT, KC_TRNS, KC_SPC, KC_UNDS, KC_PLUS, KC_INS, KC_PIPE, KC_PENT
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_LCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LCTL(KC_SLSH), KC_PGUP, KC_LBRC, KC_RBRC, KC_RPRN, KC_COLN, KC_DQUO,
+ KC_LSFT, KC_CAPS, KC_INS, KC_HOME, KC_END, KC_PGDN, KC_PSCR, KC_LPRN, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ RGB, KC_LBRC, KC_RBRC, KC_LALT, KC_TRNS, KC_SPC, KC_UNDS, KC_PLUS, KC_DEL, KC_PIPE, KC_PENT
),
/* RIGHTFN
@@ -99,23 +110,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* NUMPAD
* ,-----------------------------------------------------------------------------------.
- * | * | 7 | 8 | 9 | NumLk| | | | | | | Bksp |
+ * | *or/ | 7 | 8 | 9 | NumLk| | | | | | | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Alt | 4 | 5 | 6 |Return| | | | | | Shift| |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | - | 1 | 2 | 3 | Bksp | | | | | | Ctrl |Return|
+ * | - | 1 | 2 | 3 | Bksp | | | | , | . | Ctrl |Return|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Trns | , | + | . | 0 | Space |LEAGUE| PUBG | OVWCh| SC |TETRIS|
* `-----------------------------------------------------------------------------------'
*/
[_NUMPAD] = LAYOUT_planck_mit(
- KC_ASTR, KC_P7, KC_P8, KC_P9, KC_NLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC,
- KC_LALT, KC_P4, KC_P5, KC_P6, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_NO,
- KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_ENT,
- KC_TRNS, KC_COMM, KC_PPLS, KC_PDOT, KC_0, KC_SPC, LEAGUE, PUBG, OVERWATCH, STARCRAFT, TETRIS
+ TD(TD_PAST_PSLS), KC_P7, KC_P8, KC_P9, KC_NUM, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC,
+ KC_LALT, KC_P4, KC_P5, KC_P6, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_NO,
+ KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_COMM, KC_DOT, KC_LCTL, KC_ENT,
+ KC_TRNS, KC_COMM, KC_PPLS, KC_PDOT, KC_P0, KC_SPC, LEAGUE, PUBG, OVERWATCH, STARCRAFT, TETRIS
),
-
/* LEAGUE
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | 5 | Y | | | O | P | ESC |
@@ -248,21 +258,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
/*
-
// Key Matrix to LED Index
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
{24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35},
{36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46}
-
*/
-
void rgb_matrix_indicators_user(void) {
- uint8_t red[3] = {50, 5, 0};
- uint8_t yellow[3] = {50, 50, 0};
- uint8_t blue[3] = {0, 15, 50};
- uint8_t green[3] = {15, 33, 1};
+ uint8_t red[3] = {22, 2, 0};
+ uint8_t yellow[3] = {20, 22, 0};
+ uint8_t blue[3] = {0, 6, 20};
+ uint8_t green[3] = {14, 22, 0};
+ uint8_t purple[3] = {6, 0, 22};
+ uint8_t pink[3] = {17, 0, 22};
uint8_t white[3] = {255, 255, 255};
+ uint8_t wasd[4] = {2, 13, 14, 15};
switch (get_highest_layer(layer_state)) {
case _ALPHA:
@@ -274,54 +284,50 @@ void rgb_matrix_indicators_user(void) {
case _NUMPAD:
break;
case _LEAGUE:
- rgb_matrix_set_color(15, yellow[0], yellow[1], yellow[2]);
rgb_matrix_set_color(16, red[0], red[1], red[2]);
+ rgb_matrix_set_color(15, yellow[0], yellow[1], yellow[2]);
rgb_matrix_set_color(29, blue[0], blue[1], blue[2]);
- rgb_matrix_set_color(42, green[0], green[1], green[2]);
-
+ rgb_matrix_set_color(10, purple[0], purple[1], purple[2]);
break;
-
case _PUBG:
rgb_matrix_set_color(43, green[0], green[1], green[2]);
-
break;
-
case _OVERWATCH:
rgb_matrix_set_color(44, green[0], green[1], green[2]);
break;
-
case _STARCRAFT:
rgb_matrix_set_color(45, green[0], green[1], green[2]);
break;
-
case _TETRIS:
- rgb_matrix_set_color(46, green[0], green[1], green[2]);
+ for (int i = 0; i < sizeof wasd; i++) {
+ rgb_matrix_set_color(wasd[i], pink[0], pink[1], pink[2]);
+ }
break;
-
case _CLEAN:
rgb_matrix_set_color_all(white[0], white[1], white[2]);
break;
-
case _RGB:
break;
}
led_t led_state = host_keyboard_led_state();
-
//Capslock led
if (led_state.caps_lock) {
rgb_matrix_set_color(12, green[0], green[1], green[2]);
}
-
//Numlock led
if (led_state.num_lock) {
} else {
rgb_matrix_set_color(11, green[0], green[1], green[2]);
}
-
//Scroll lock led
if (led_state.scroll_lock) {
rgb_matrix_set_color(23, green[0], green[1], green[2]);
}
+}
+// Turn of RGB Matrix Effect
+void keyboard_post_init_user(void) {
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
}
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md
index cc59c816f0..20a15a020b 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md
@@ -1,6 +1,8 @@
# Dan's KPrepublic BM40 Keymap
->This is my personal keymap with an LED indicator support for num lock, caps lock and scroll lock.
+> ** There isn't a qmk firmware for the new bm40 v2 pcb yet. Check with your vendor before purchasing.
+>
+>This is my personal keymap with an LED indicator support for num lock, caps lock and scroll lock.
![](https://i.imgur.com/2yclc1B.jpg)
> * Case: Poseidon PSD40 Case
@@ -8,6 +10,11 @@
> * Keycaps: WOB ABS Cherry Profile
> * Switches: Gazzew Boba u4t (62g 2 stage long spring)
+![](https://i.imgur.com/imqhjZW.jpg)
+> * Case: JJ40 Aluminium Acclive Case with Acrylic Diffuser
+> * Keycaps: YMDK DSA Keycaps
+> * Artisan: Rodríguez Cap by Polykeys
+
### BM40 LED INDEX
**_Numlock (11) Capslock (12) Scroll lock (23)_**
@@ -37,19 +44,19 @@
| **_1_** | TAB | Q | W | E | R | T | Y | U | I | O | P | BSP |
| **_2_** | CTL | A | S | D | F | G | H | J | K | L | ; | ' |
| **_3_** | SFT | Z | X | C | V | B | N | M | , | . | / | RET |
-| **_4_** | &nbsp;ESC | KOR | WIN | &nbsp;&nbsp;ALT | &nbsp;&nbsp;&nbsp;FN | &nbsp;SPC | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- | &nbsp;&nbsp;&nbsp;&nbsp;= | DEL | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\ | ENT |
+| **_4_** | &nbsp;ESC | KOR | WIN | &nbsp;&nbsp;ALT | &nbsp;&nbsp;&nbsp;FN | &nbsp;SPC | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- | &nbsp;&nbsp;&nbsp;&nbsp;= | DEL | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\ | ENT |
>This is a base layer for typing.
<br />
-
+,
### LEFTFN MO(FN)
| | _A_ | _B_ | _C_ | _D_ | _E_ | _F_ | _G_ | _H_ | _I_ | _J_ | _K_ | _L_ |
|---------|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|
| **_1_** | \` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSP |
-| **_2_** | CTL | LFT | DN | UP | RHT | C+/ | HAN | [ | ] | ) | : | " |
-| **_3_** | SFT | PGU | PGD | HOM | END | CAP | PRN | ( | , | . | / | RET |
-| **_4_** | RGB | [ | ] | &nbsp;ALT | TRN | &nbsp;SPC || &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ | &nbsp;&nbsp;&nbsp;&nbsp;+ | &nbsp;INS | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | ENT |
+| **_2_** | CTL | LFT | DN | UP | RHT | C+/ | PGU | [ | ] | ) | : | " |
+| **_3_** | SFT | CAPS| INS | HOM | END | PGD | PRN | ( | , | . | / | RET |
+| **_4_** | RGB | [ | ]&nbsp; | ALT | TRN | &nbsp;SPC || &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ | &nbsp;&nbsp;&nbsp;&nbsp;+ | &nbsp;DEL | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\| | ENT |
>This is the layer dedicated to number, symbol and navigation keys. ie) arrow keys
<br />
@@ -70,9 +77,9 @@
| | _A_ | _B_ | _C_ | _D_ | _E_ | _F_ | _G_ | _H_ | _I_ | _J_ | _K_ | _L_ |
|---------|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|----:|
-| **_1_** | * | 7 | 8 | 9 | NUM | | | | | | | BSP |
-| **_2_** | ALT | 4 | 5 | 6 | RET | | | | | | | |
-| **_3_** | - | 1 | 2 | 3 | BSP | | | | | | | RET |
+| **_1_** | *or/| 7 | 8 | 9 | NUM | | | | | | | BSP |
+| **_2_** | ALT | 4 | 5 | 6 | RET | | | | | | SFT | |
+| **_3_** | - | 1 | 2 | 3 | BSP | | | | , | . | CTL | RET |
| **_4_** | TRN | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. | &nbsp;&nbsp;&nbsp;0 | SPC | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;LY1 | &nbsp;LY2 | &nbsp;LY3 | &nbsp;LY4 | &nbsp;LY5 |
>This layer is the numpad.
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/rules.mk
new file mode 100644
index 0000000000..e5ddcae8d9
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes