forked from forks/qmk_firmware
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
035f7bb1bf
2
keyboards/clueboard/keymaps/magicmonty/Makefile
Normal file
2
keyboards/clueboard/keymaps/magicmonty/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
152
keyboards/clueboard/keymaps/magicmonty/keymap.c
Normal file
152
keyboards/clueboard/keymaps/magicmonty/keymap.c
Normal file
|
@ -0,0 +1,152 @@
|
|||
#include "clueboard.h"
|
||||
|
||||
// Helpful defines
|
||||
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
#define _ME 2
|
||||
#define _CL 3
|
||||
#define _ML 4
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
F(0), 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_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, \
|
||||
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, _______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_RALT, MO(_ME), MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,_______, _______, _______, _______, _______, _______, \
|
||||
MO(_FL), _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______, _______, _______, _______, KC_PGUP, \
|
||||
_______, _______, _______,_______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap _ME: Media layer
|
||||
*/
|
||||
[_ME] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_VOLD, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
MO(_FL), _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______, _______, _______, MO(_FL), _______, \
|
||||
_______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_MPRV, KC_MPLY,KC_MNXT),
|
||||
|
||||
/* Keymap _CL: Control layer
|
||||
*/
|
||||
[_CL] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
|
||||
_______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
|
||||
_______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||
|
||||
/* Keymap _ML: Mouse layer
|
||||
*/
|
||||
[_ML] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \
|
||||
_______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R),
|
||||
};
|
||||
|
||||
/* This is a list of user defined functions. F(N) corresponds to item N
|
||||
of this list.
|
||||
*/
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(0), // Calls action_function()
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t mods_pressed;
|
||||
static bool mod_flag;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
/* Handle the combined Grave/Esc key
|
||||
*/
|
||||
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
|
||||
|
||||
if (record->event.pressed) {
|
||||
/* The key is being pressed.
|
||||
*/
|
||||
if (mods_pressed) {
|
||||
mod_flag = true;
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
/* The key is being released.
|
||||
*/
|
||||
if (mod_flag) {
|
||||
mod_flag = false;
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
enum layer_id {
|
||||
LAYER_BASE,
|
||||
LAYER_FUNCTION,
|
||||
LAYER_MEDIA,
|
||||
LAYER_CONTROL,
|
||||
LAYER_MOUSE
|
||||
};
|
||||
|
||||
void clueboard_set_led(uint8_t id) {
|
||||
switch (id) {
|
||||
case LAYER_BASE:
|
||||
rgblight_sethsv(346, 0, 255);
|
||||
break;
|
||||
case LAYER_FUNCTION:
|
||||
rgblight_sethsv(46, 255, 255);
|
||||
break;
|
||||
case LAYER_MEDIA:
|
||||
rgblight_sethsv(86, 255, 255);
|
||||
break;
|
||||
case LAYER_CONTROL:
|
||||
rgblight_sethsv(346, 255, 255);
|
||||
break;
|
||||
case LAYER_MOUSE:
|
||||
rgblight_sethsv(206, 255, 255);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint32_t layer = layer_state;
|
||||
|
||||
if (layer & (1<<_FL)) {
|
||||
if (layer & (1<<_ME)) {
|
||||
clueboard_set_led(LAYER_MEDIA);
|
||||
} else if (layer & (1<<_CL)) {
|
||||
clueboard_set_led(LAYER_CONTROL);
|
||||
} else {
|
||||
clueboard_set_led(LAYER_FUNCTION);
|
||||
}
|
||||
} else if (layer & (1<<_ML)) {
|
||||
clueboard_set_led(LAYER_MOUSE);
|
||||
} else {
|
||||
clueboard_set_led(LAYER_BASE);
|
||||
}
|
||||
};
|
BIN
keyboards/clueboard/keymaps/magicmonty/layout.png
Normal file
BIN
keyboards/clueboard/keymaps/magicmonty/layout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
32
keyboards/clueboard/keymaps/magicmonty/readme.md
Normal file
32
keyboards/clueboard/keymaps/magicmonty/readme.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
```
|
||||
___ _____ _ _ _ __ __ _ __
|
||||
|__ \ / ____| | | | | | / / / /(_) / /
|
||||
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|
||||
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|
||||
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
|
||||
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
|
||||
```
|
||||
|
||||
![Clueboard Layout Image](layout.png)
|
||||
|
||||
# MouseKeys Layout
|
||||
|
||||
This layout is a combination of the `mouse_keys` and the `win_optimized` layouts.
|
||||
This layout is optimized for an ISO layout.
|
||||
|
||||
It adds a mouse layer. When you hold down the spacebar the arrow keys
|
||||
will move your mouse cursor. You can click using the 3 mods to the left of the
|
||||
arrow keys, or the 3 keys under your primary fingers on the home row.
|
||||
The Left, Down, Up and Right for the mouse movement are also VIM-Like on the HJKL keys
|
||||
|
||||
The CapsLock is disabled and works as Function key.
|
||||
|
||||
There is also a separate media layer with Volume/Play controls
|
||||
|
||||
The different layers are signalled throug setting of the underlight:
|
||||
|
||||
- Base layer: White
|
||||
- Function layer: Yellow
|
||||
- Media layer: Green
|
||||
- Mouse layer: Blue
|
||||
- Control layer: Red
|
|
@ -57,12 +57,12 @@
|
|||
{
|
||||
"f": 3
|
||||
},
|
||||
"\n{\n\n\n\n\n\n\n\nH",
|
||||
"\\\n\n\n\n\n\n\n\n\nH",
|
||||
{
|
||||
"c": "#c4bcbc",
|
||||
"f": 3
|
||||
},
|
||||
"\n}\n\n\n\n\n\n\n\nJ",
|
||||
"|\n\n\n\n\n\n\n\n\nJ",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 7,
|
||||
|
@ -79,13 +79,13 @@
|
|||
},
|
||||
";\n\n:",
|
||||
{
|
||||
"a": 7,
|
||||
"f": 3
|
||||
},
|
||||
"Enter"
|
||||
"'\n\n\""
|
||||
],
|
||||
[
|
||||
{
|
||||
"a": 7,
|
||||
"f": 3
|
||||
},
|
||||
"Shift",
|
||||
|
@ -103,6 +103,22 @@
|
|||
"C",
|
||||
{
|
||||
"a": 4,
|
||||
"fa": [
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"\n[\n\n\n\n\n\n\n\nV",
|
||||
"\n]\n\n\n\n\n\n\n\nB",
|
||||
{
|
||||
"fa": [
|
||||
0,
|
||||
2,
|
||||
|
@ -116,10 +132,8 @@
|
|||
2
|
||||
]
|
||||
},
|
||||
"\\\n[\n\n\n\n\n\n\n\nV",
|
||||
"|\n]\n\n\n\n\n\n\n\nB",
|
||||
"`\n'\n\n\n\n\n\n\n\nN",
|
||||
"~\n\"\n\n\n\n\n\n\n\nM",
|
||||
"`\n{\n\n\n\n\n\n\n\nN",
|
||||
"~\n}\n\n\n\n\n\n\n\nM",
|
||||
{
|
||||
"a": 6
|
||||
},
|
||||
|
@ -129,7 +143,7 @@
|
|||
{
|
||||
"a": 7
|
||||
},
|
||||
"Shift\n\n\n\nEnter"
|
||||
"Shift ↵"
|
||||
],
|
||||
[
|
||||
{
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
@ -56,20 +56,20 @@ const uint16_t PROGMEM fn_actions[] = {
|
|||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = { /* QWERTY */
|
||||
{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_ENT},
|
||||
{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, SFT_ENT},
|
||||
{KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[_LOWER] = { /* LOWER */
|
||||
{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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[_RAISE] = { /* RAISE */
|
||||
{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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE}
|
||||
},
|
||||
[_CUSTOM] = { /* CUSTOM */
|
||||
|
|
|
@ -4,7 +4,7 @@ A practical keymap that emulates standard QWERTY keyboard for Planck. Once you g
|
|||
![Layout](keyboard-layout.png "Practical Keymap")
|
||||
![Photo](keyboard-photo.jpg "Planck Keyboard")
|
||||
|
||||
* Online keyboard layout editor: http://goo.gl/mlLAFZ
|
||||
* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc
|
||||
|
||||
# Programming Instructions:
|
||||
Enter into programming mode and run the following command.
|
||||
|
|
|
@ -16,17 +16,37 @@
|
|||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
||||
|
||||
// dynamic macro keys
|
||||
#define DM_PLAY DYN_MACRO_PLAY1
|
||||
#define DM_STRT DYN_REC_START1
|
||||
#define DM_STOP DYN_REC_STOP
|
||||
|
||||
// one-shot layer keys
|
||||
#define OSL_RSE OSL(RSE)
|
||||
#define OSL_LWR OSL(LWR)
|
||||
#define OSL_FUN OSL(FUN)
|
||||
|
||||
// one-shot modifier keys
|
||||
#define OSM_CTL OSM(MOD_LCTL)
|
||||
#define OSM_ALT OSM(MOD_LALT)
|
||||
#define OSM_SFT OSM(MOD_LSFT)
|
||||
|
||||
// tap dance keys
|
||||
#define TD_SCLN TD(TDK_SCLN)
|
||||
#define TD_COMM TD(TDK_COMM)
|
||||
#define TD_DOT TD(TDK_DOT)
|
||||
#define TD_SLSH TD(TDK_SLSH)
|
||||
|
||||
#define ACTION_TAP_DANCE_FN_KEYCODE(user_fn, kc) { \
|
||||
.fn = { NULL, user_fn, NULL }, \
|
||||
.user_data = (void *)&((qk_tap_dance_pair_t) { kc, 0 }) \
|
||||
}
|
||||
|
||||
#define ACTION_TAP_DANCE_FN_KEYCODE2(user_fn, kc1, kc2) { \
|
||||
.fn = { NULL, user_fn, NULL }, \
|
||||
.user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ extern keymap_config_t keymap_config;
|
|||
|
||||
enum planck_layers { DEF, LWR, RSE, FUN };
|
||||
enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
|
||||
enum tap_dance_keys { TD_SCLN };
|
||||
enum tap_dance_keys { TDK_SCLN, TDK_COMM, TDK_DOT, TDK_SLSH };
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
|
@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
*/
|
||||
[DEF] = {
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)},
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD_SCLN},
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, TD_COMM, TD_DOT, TD_SLSH},
|
||||
{OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
/* Lower
|
||||
|
@ -43,8 +43,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
*/
|
||||
[LWR] = {
|
||||
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
|
||||
{S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)},
|
||||
{KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||
},
|
||||
/* Raise
|
||||
|
@ -84,8 +84,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
};
|
||||
|
||||
void tap(uint16_t keycode) {
|
||||
register_code16(keycode);
|
||||
unregister_code16(keycode);
|
||||
};
|
||||
|
||||
void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) {
|
||||
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
|
||||
uint16_t keycode = pair->kc1;
|
||||
|
||||
switch(state->count) {
|
||||
case 2:
|
||||
register_code(KC_LSFT);
|
||||
tap(keycode);
|
||||
unregister_code(KC_LSFT);
|
||||
break;
|
||||
case 3:
|
||||
if (pair->kc2) {
|
||||
keycode = pair->kc2;
|
||||
}
|
||||
tap(keycode);
|
||||
tap(keycode);
|
||||
break;
|
||||
default:
|
||||
tap(keycode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon
|
||||
[TDK_SCLN] = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_SCLN, KC_COLN),
|
||||
[TDK_COMM] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_COMM),
|
||||
[TDK_DOT] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_DOT),
|
||||
[TDK_SLSH] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_SLSH)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
|
|
@ -28,4 +28,4 @@ QMK is developed and maintained by Jack Humbert of OLKB with contributions from
|
|||
|
||||
## Documentation
|
||||
|
||||
[https://docs.qmk.fm](https://docs.qmk.fm) is hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [Github](https://github.com/qmk/qmk_firmware_docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware_docs/pulls), or by clicking the "suggest an edit" link on any page of the Docs.
|
||||
[https://docs.qmk.fm](https://docs.qmk.fm) is hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [Github](/docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "suggest an edit" link on any page of the Docs.
|
||||
|
|
Loading…
Reference in a new issue