summaryrefslogtreecommitdiffstats
path: root/keyboards/kprepublic/jj50/keymaps
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2021-08-21 22:53:49 -0500
committerGitHub <noreply@github.com>2021-08-22 13:53:49 +1000
commit78ccd9c201199444bc06161b05ee8d7ba9c31613 (patch)
tree726d9e55d8cde510fe72bc1fb9bb2a7dabdbecc2 /keyboards/kprepublic/jj50/keymaps
parentc70abc8d047319830e369ae4e14cd43bae3bd3b8 (diff)
Organize KPrepublic, K.T.E.C, xiudi boards into directories (#12159)
* reset; redoing my steps; and recommit * include xd002/.noci
Diffstat (limited to 'keyboards/kprepublic/jj50/keymaps')
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb/config.h3
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c135
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md6
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h3
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c135
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md4
-rw-r--r--keyboards/kprepublic/jj50/keymaps/archetype/README.md22
-rw-r--r--keyboards/kprepublic/jj50/keymaps/archetype/config.h9
-rw-r--r--keyboards/kprepublic/jj50/keymaps/archetype/keymap.c277
-rw-r--r--keyboards/kprepublic/jj50/keymaps/archetype/rules.mk4
-rw-r--r--keyboards/kprepublic/jj50/keymaps/default/README.md133
-rw-r--r--keyboards/kprepublic/jj50/keymaps/default/keymap.c241
-rw-r--r--keyboards/kprepublic/jj50/keymaps/yoonbae81/config.h6
-rw-r--r--keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c42
-rw-r--r--keyboards/kprepublic/jj50/keymaps/yoonbae81/rules.mk3
15 files changed, 1023 insertions, 0 deletions
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/config.h b/keyboards/kprepublic/jj50/keymaps/abstractkb/config.h
new file mode 100644
index 0000000000..9439a929e9
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#define RGBLIGHT_SLEEP \ No newline at end of file
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c
new file mode 100644
index 0000000000..e257649369
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c
@@ -0,0 +1,135 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+Modified 2019 AbstractKB
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public LicensezZZ
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _DEFLT,
+ _RAISE,
+ _LOWER,
+ _FN
+};
+
+enum custom_keycodes {
+ MYRGB_TG = SAFE_RANGE
+};
+
+bool rgbinit = true;
+bool rgbon = true;
+
+const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one
+
+void keyboard_post_init_user(void) {
+ rgblight_enable_noeeprom();
+ led_set_user(host_keyboard_leds());
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (biton32(state)) {
+ case _RAISE:
+ rgblight_sethsv_noeeprom(170,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _LOWER:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _FN:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ break;
+ default: //_DEFLT
+ rgblight_sethsv_noeeprom(0,0,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ }
+
+ return state;
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
+ } else {
+ layer_state_set_user(layer_state);
+ }
+}
+
+void myrgb_toggle(void) {
+ if (rgbon) {
+ rgblight_disable_noeeprom();
+ rgbon = false;
+ } else {
+ rgblight_enable_noeeprom();
+ layer_state_set_user(layer_state);
+ led_set_user(host_keyboard_leds());
+ rgbon = true;
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case MYRGB_TG:
+ if (record->event.pressed) {
+ myrgb_toggle();
+ }
+ return false;
+ default:
+ return true;
+ }
+}
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_DEFLT] = LAYOUT( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \
+ KC_BSPC, 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_RSFT, \
+ MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+
+ [_RAISE] = LAYOUT( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \
+ ),
+
+
+ [_LOWER] = LAYOUT( \
+ 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_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \
+ _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+
+ [_FN] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \
+ )
+};
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md b/keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md
new file mode 100644
index 0000000000..7ff7e0268a
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md
@@ -0,0 +1,6 @@
+# My personal layout for the JJ50
+
+It is an approximation of a 60% layout with the alternate layers set up for programming,
+with brackets and parenthesis on the homerow
+Other things I changed were swapping around delete, backspace, and capslock around
+It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h
new file mode 100644
index 0000000000..9439a929e9
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#define RGBLIGHT_SLEEP \ No newline at end of file
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c
new file mode 100644
index 0000000000..baedbb4dd2
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c
@@ -0,0 +1,135 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+Modified 2019 AbstractKB
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public LicensezZZ
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _DEFLT,
+ _FUNC,
+ _SYM,
+ _META
+};
+
+enum custom_keycodes {
+ MYRGB_TG = SAFE_RANGE
+};
+
+bool rgbinit = true;
+bool rgbon = true;
+
+const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one
+
+void keyboard_post_init_user(void) {
+ rgblight_enable_noeeprom();
+ led_set_user(host_keyboard_leds());
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (biton32(state)) {
+ case _FUNC:
+ rgblight_sethsv_noeeprom(170,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _SYM:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _META:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ break;
+ default: //_DEFLT
+ rgblight_sethsv_noeeprom(0,0,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ }
+
+ return state;
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
+ } else {
+ layer_state_set_user(layer_state);
+ }
+}
+
+void myrgb_toggle(void) {
+ if (rgbon) {
+ rgblight_disable_noeeprom();
+ rgbon = false;
+ } else {
+ rgblight_enable_noeeprom();
+ layer_state_set_user(layer_state);
+ led_set_user(host_keyboard_leds());
+ rgbon = true;
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case MYRGB_TG:
+ if (record->event.pressed) {
+ myrgb_toggle();
+ }
+ return false;
+ default:
+ return true;
+ }
+}
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_DEFLT] = LAYOUT( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \
+ KC_BSPC, 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_RSFT, \
+ KC_LCTL, MO(_META), KC_LGUI, KC_LALT, MO(_SYM),KC_SPC,KC_SPC,MO(_FUNC),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+
+ [_FUNC] = LAYOUT( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \
+ ),
+
+
+ [_SYM] = LAYOUT( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______,S(KC_1),S(KC_2),S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),_______, S(KC_MINS), _______, _______, _______, _______, \
+ _______, S(KC_3), S(KC_4), S(KC_9), S(KC_0), KC_GRV, S(KC_EQL), KC_MINS, KC_BSLS, S(KC_8), _______, _______, \
+ _______, S(KC_5), S(KC_6), KC_LBRC,KC_RBRC,S(KC_GRV), S(KC_7),KC_EQL, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+
+ [_META] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \
+ )
+};
diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md
new file mode 100644
index 0000000000..a45ece7ff7
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md
@@ -0,0 +1,4 @@
+# My personal layout for the JJ50
+
+It is an approximation of a cross between a 60% the gergo function layout
+It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/README.md b/keyboards/kprepublic/jj50/keymaps/archetype/README.md
new file mode 100644
index 0000000000..a2ae4e9123
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/archetype/README.md
@@ -0,0 +1,22 @@
+# archetype keymap for jj50 keyboards
+A keymap that can be used with the jj50 ortholinear keyboard.
+
+## Features
+
+- `QWERTY` layout (Default)
+- `COLEMAK` layout
+- `FN` layout (various keys that are rarely needed)
+- `FX` layout (Control lighting and audio)
+- Use `Left Ctrl` and `Left Alt` to output `()`, `[]` and `{}` by tapping once, twice or thrice respectively. Hold them down for the regular keycode (LCtrl or LAlt)
+- `Right Shift` when held or Enter when tapped
+- Auto-Shift enabled (long press on alphas and numeric keys outputs shifted character)
+- Full arrow keys available
+
+
+## Feedback
+
+I made this keymap based on the existing default one. If you happen to use this keymap [drop me a line](mailto://idimitrakopoulos@gmail.com) about what could be improved etc
+
+Enjoy!
+
+Iason Dimitrakopoulos
diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/config.h b/keyboards/kprepublic/jj50/keymaps/archetype/config.h
new file mode 100644
index 0000000000..a12e070b4f
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/archetype/config.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#undef AUTO_SHIFT_TIMEOUT
+#undef TAPPING_TERM
+
+#define AUTO_SHIFT_TIMEOUT 150
+#define NO_AUTO_SHIFT_ALPHA
+#define TAPPING_TERM 150
+//#define BOOTMAGIC_KEY_SALT KC_LCTL
diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c
new file mode 100644
index 0000000000..82c615f135
--- /dev/null
+++ b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c
@@ -0,0 +1,277 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+Modified 2019 Iason Dimitrakopoulos (idimitrakopoulos) <idimitrakopoulos@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public LicensezZZ
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+#include "action_layer.h"
+#include "rgblight.h"
+#include "quantum.h"
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _FN 2
+#define _FX 3
+
+enum {
+ TD_BSPC_DEL = 0,
+ TD_LCTL_LBRC = 1,
+ TD_LALT_RBRC = 2,
+ TD_ESC_LAYER = 3,
+};
+
+
+void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (!state->pressed) {
+ register_code16(KC_LPRN);
+ } else {
+ register_code(KC_LCTL);
+ }
+ } else if (state->count == 2) {
+ register_code16(KC_LBRC);
+ } else if (state->count == 3) {
+ register_code16(KC_LCBR);
+ }
+}
+
+void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code16(KC_LPRN);
+ } else if (state->count == 2) {
+ unregister_code16(KC_LBRC);
+ } else if (state->count == 3) {
+ unregister_code16(KC_LCBR);
+ }
+
+ unregister_code(KC_LCTL);
+}
+
+void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (!state->pressed) {
+ register_code16(KC_RPRN);
+ } else {
+ register_code(KC_LALT);
+ }
+ } else if (state->count == 2) {
+ register_code16(KC_RBRC);
+ } else if (state->count == 3) {
+ register_code16(KC_RCBR);
+ }
+}
+
+void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code16(KC_RPRN);
+ } else if (state->count == 2) {
+ unregister_code16(KC_RBRC);
+ } else if (state->count == 3) {
+ unregister_code16(KC_RCBR);
+ }
+
+ unregister_code(KC_LALT);
+}
+
+typedef struct {
+ bool is_press_action;
+ int state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD = 2,
+ DOUBLE_TAP = 3,
+ DOUBLE_HOLD = 4,
+ DOUBLE_SINGLE_TAP = 5, //send two single taps
+ TRIPLE_TAP = 6,
+ TRIPLE_HOLD = 7,
+ TRIPLE_SINGLE_TAP = 8, //send three single taps
+};
+
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ else return SINGLE_HOLD;
+ }
+ else if (state->count == 2) {
+ if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ else if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+
+ if (state->count == 3) {
+ if (state->interrupted) return TRIPLE_SINGLE_TAP;
+ else if (state->pressed) return TRIPLE_HOLD;
+ else return TRIPLE_TAP;
+ }
+ else return 9; //magic number. At some point this method will expand to work for more presses
+}
+
+static tap tap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void layer_switcher (qk_tap_dance_state_t *state, void *user_data) {
+ tap_state.state = cur_dance(state);
+ switch (tap_state.state) {
+ case SINGLE_TAP: register_code(KC_ESC); break;
+ case SINGLE_HOLD: register_code(KC_ESC); break;
+ case DOUBLE_TAP: register_code(KC_ESC); break;
+ case DOUBLE_HOLD: layer_on(_COLEMAK); break;
+ case DOUBLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
+ case TRIPLE_TAP: register_code(KC_ESC); break;
+ case TRIPLE_HOLD: layer_on(_FX); break;
+ case TRIPLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
+ //Last case is for fast typing. Assuming your key is `f`:
+ //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
+ //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
+ }
+}
+
+void layer_switcher_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (tap_state.state) {
+ case SINGLE_TAP: unregister_code(KC_ESC); break;
+ case SINGLE_HOLD: unregister_code(KC_ESC); break;
+ case DOUBLE_TAP: unregister_code(KC_ESC); break;
+ case DOUBLE_HOLD: break;
+ case DOUBLE_SINGLE_TAP: unregister_code(KC_ESC); break;
+ case TRIPLE_TAP: unregister_code(KC_ESC); break;
+ case TRIPLE_HOLD: break;
+ case TRIPLE_SINGLE_TAP: unregister_code(KC_ESC); break;
+ }
+ tap_state.state = 0;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ // Single tap = Backspace | Double tap = Delete
+ [TD_BSPC_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, KC_DEL),
+ // Single tap = ( | Double tap = [ | Triple tap = { | Single hold = KC_LCTL
+ [TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
+ // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT
+ [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset),
+ // Layer Switcher ESC
+ [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100),
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ TD(TD_ESC_LAYER), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_SLSH, KC_UP, SFT_T(KC_ENT), \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), _______, LT(_FX, KC_SPC), KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_COLEMAK] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, KC_R, KC_S, KC_T, KC_D, _______, KC_N, KC_E, KC_I, KC_O, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, KC_K, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_FN] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_FX] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______,