1
0
Fork 0
qmk_firmware/keyboards/kinesis/keymaps/salty/keymap.c

434 lines
24 KiB
C

#include "kinesis.h"
#include "action_layer.h"
#include "eeconfig.h"
#define _QW 0 // Base QWERTY
#define _CM 1 // Colemak
#define _QG 2 // QWERTY gaming
#define _NS 3 // Number/Symbol
#define _NP 4 // Numpad
#define _LY 5 // Layer switcher
#define _FN 6 // Function
#define _FN2 7 // Function 2 (identical as _FN; used to deal with minor key interaction issue)
#define _______ KC_TRNS
#define XXXXXXX KC_NO
//Tap Dance Declarations
enum {
LPN_LBC,
RPN_RBC
};
qk_tap_dance_action_t tap_dance_actions[] = {
[LPN_LBC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC),
[RPN_RBC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* (Keys separated by /: tap for first, hold for second)
* ,-----------------------------------------------------------------------------------------------------------.
* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer|
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | ` | | [ | ] | | Left | Down | Up | Right|
* `---------------------------' `---------------------------'
* ,--------------. ,--------------.
* | LCtl | LAlt | | RAlt | RCtl |
* ,------|-------|------| |------+-------+------.
* | Space| Enter | App | | RGUI | Delete| Bspc |
* | / | / |------| |------| / | / |
* | Fn | Number| Bspc | | Enter| Number| Fn2 |
* `---------------------' `---------------------'
*/
[_QW] = KEYMAP(
// Left Hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC,
//Left Thumb
KC_LCTL, KC_LALT,
KC_APP,
LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC,
//Right Hand
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY),
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
//Right Thumb
KC_RALT, KC_RCTL,
KC_RGUI,
KC_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC)
),
/* Colemak
* (Keys separated by /: tap for first, hold for second)
* ,-----------------------------------------------------------------------------------------------------------.
* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer|
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Esc | A | R | S | T | D | | H | N | E | I | O | ' |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | ` | | [ | ] | | Left | Down | Up | Right|
* `---------------------------' `---------------------------'
* ,--------------. ,--------------.
* | LCtl | LAlt | | RAlt | RCtl |
* ,------|-------|------| |------+-------+------.
* | Space| Enter | App | | RGUI | Delete| Bspc |
* | / | / |------| |------| / | / |
* | Fn | Number| Bspc | | Enter| Number| Fn2 |
* `---------------------' `---------------------'
*/
[_CM] = KEYMAP(
// Left Hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G,
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC,
//Left Thumb
KC_LCTL, KC_LALT,
KC_APP,
LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC,
//Right Hand
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY),
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
//Right Thumb
KC_RALT, KC_RCTL,
KC_RGUI,
KC_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC)
),
/* QWERTY Gaming
* (Keys separated by /: tap for first, hold for second; no access to Fn layer)
* ,-----------------------------------------------------------------------------------------------------------.
* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer|
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | ` | | [ | ] | | Left | Down | Up | Right|
* `---------------------------' `---------------------------'
* ,--------------. ,--------------.
* | LCtl | LAlt | | RAlt | RCtl |
* ,------|-------|------| |------+-------+------.
* | | Enter | | | RGUI | Delete| |
* | Space| / |------| |------| / | Bspc |
* | | Number| Bspc | | Enter| Number| |
* `---------------------' `---------------------'
*/
[_QG] = KEYMAP(
// Left Hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC,
//Left Thumb
KC_LCTL, KC_LALT,
XXXXXXX,
KC_SPC, LT(_NS, KC_ENT), KC_BSPC,
//Right Hand
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY),
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
//Right Thumb
KC_RALT, KC_RCTL,
KC_RGUI,
KC_ENT, LT(_NS, KC_DEL), KC_BSPC
),
/* Number/symbol layer
* ,-----------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | ! | @ | # | $ | % | | ^ | & | * | ` | ~ | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | = | { | [ | ( | + | | _ | ) | ] | } | - | |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | | | | | | | | | |
* `---------------------------' `---------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_NS] = KEYMAP(
// Left Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC,
_______, KC_1, KC_2, KC_3, KC_4, KC_5,
_______, KC_EQL, KC_LCBR, KC_LBRC, KC_LPRN, KC_PLUS,
_______, _______, _______, _______,
// Left Thumb
_______, _______,
_______,
_______, _______, _______,
// Right Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_CIRC, KC_AMPR, KC_ASTR, KC_GRV, KC_TILD, _______,
KC_6, KC_7, KC_8, KC_9, KC_0, _______,
KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_MINS, _______,
_______, _______, _______, _______,
// Right Thumb
_______, _______,
_______,
_______, _______, _______
),
/* Numpad layer
* ,-----------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | NumLk| Tab | KP / | kP *| KP - | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | Up | | | | | KP 7 | KP 8 | KP 9 | KP + | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | Left | Down | Right| | | | KP 4 | KP 5 | KP 6 | KP = | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | | INS | | | | | KP , | KP . |KP Ent|
* `---------------------------' `---------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | KP 0 |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_NP] = KEYMAP(
// Left Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_UP, _______, _______,
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
_______, _______, _______, _______, _______, _______,
_______, KC_INS, _______, _______,
// Left Thumb
_______, _______,
_______,
_______, _______, _______,
// Right Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_NLCK, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, _______,
_______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
_______, KC_P4, KC_P5, KC_P6, KC_PEQL, _______,
_______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
_______, KC_PCMM, KC_PDOT, KC_PENT,
// Right Thumb
_______, _______,
_______,
_______, _______, KC_P0
),
/* Layer switch layer
* ,-----------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | |QWERTY|Colemk|QW GM | | | | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | | | | | | | | | | |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | | | | | | | | | |
* `---------------------------' `---------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_LY] = KEYMAP(
// Left Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, DF(_QW), DF(_CM), DF(_QG), _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
// Left Thumb
_______, _______,
_______,
_______, _______, _______,
// Right Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
// Right Thumb
_______, _______,
_______,
_______, _______, _______
),
/* Function layer
* ,-----------------------------------------------------------------------------------------------------------.
* | | | | | | | | | |RESET| | | | | | | | |
* `-----------------------------------------------------------------------------------------------------------'
* ,-------------------------------------------. ,-------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | | Up | |Alt+Tb| | | Home | Up | End | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | Left | Down | Right| | | PgUp | Right| Down | Left | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | Prev | Play | Next | Stop | | PgDn | Mute | Vol- | Vol+ | | |
* `--------+------+------+------+------+------' `------+------+------+------+------+--------'
* | | INS | | | | | | | |
* `---------------------------' `---------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_FN] = KEYMAP(
// Left Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
_______, _______, _______, KC_UP, _______, LALT(KC_TAB),
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP,
_______, KC_INS, _______, _______,
// Left Thumb
_______, _______,
_______,
_______, _______, _______,
// Right Hand
RESET, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, KC_HOME, KC_UP, KC_END, _______, _______,
KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
_______, _______, _______, _______,
// Right Thumb
_______, _______,
_______,
_______, _______, _______
),
[_FN2] = KEYMAP(
// Left Hand
_______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
_______, _______, _______, KC_UP, _______, LALT(KC_TAB),
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP,
_______, KC_INS, _______, _______,
// Left Thumb
_______, _______,
_______,
_______, _______, _______,
// Right Hand
RESET, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, KC_HOME, KC_UP, KC_END, _______, _______,
KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
_______, _______, _______, _______,
// Right Thumb
_______, _______,
_______,
_______, _______, _______
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}