Compare commits
2 commits
10ebb2f7d2
...
8f3ad54fd6
Author | SHA1 | Date | |
---|---|---|---|
8f3ad54fd6 | |||
d69e74ac64 |
1 changed files with 91 additions and 10 deletions
99
keymap.c
99
keymap.c
|
@ -1,5 +1,13 @@
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
ENT_TO0,
|
||||||
|
SPC_TO0,
|
||||||
|
TAB_TO0,
|
||||||
|
DEL_TO0,
|
||||||
|
BSPC_TO0
|
||||||
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
// NEO
|
// NEO
|
||||||
|
@ -7,8 +15,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
KC_ESC, 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_X, KC_V, KC_L, KC_C, KC_W, KC_K, KC_H, KC_G, KC_F, KC_Q, KC_MINS,
|
KC_TAB, KC_X, KC_V, KC_L, KC_C, KC_W, KC_K, KC_H, KC_G, KC_F, KC_Q, KC_MINS,
|
||||||
MO(1), MT(MOD_LSFT, KC_U), MT(MOD_LALT, KC_I), MT(MOD_LCTL, KC_A), MT(MOD_LGUI,KC_E), KC_O, KC_S, MT(MOD_RGUI,KC_N), MT(MOD_LCTL, KC_R), MT(MOD_LALT, KC_T), MT(MOD_LSFT, KC_D), LT(1, KC_Z),
|
MO(1), MT(MOD_LSFT, KC_U), MT(MOD_LALT, KC_I), MT(MOD_LCTL, KC_A), MT(MOD_LGUI,KC_E), KC_O, KC_S, MT(MOD_RGUI,KC_N), MT(MOD_LCTL, KC_R), MT(MOD_LALT, KC_T), MT(MOD_LSFT, KC_D), LT(1, KC_Z),
|
||||||
KC_LSFT, KC_LBRC, KC_SCLN, KC_QUOT, KC_P, KC_Y, KC_MUTE, KC_END, KC_B, KC_M, KC_COMM, KC_DOT, KC_J, KC_RSFT,
|
KC_LSFT, KC_LBRC, KC_SCLN, KC_QUOT, KC_P, KC_Y, KC_MUTE, KC_NO, KC_B, KC_M, KC_COMM, KC_DOT, KC_J, KC_RSFT,
|
||||||
KC_NO, KC_NO, KC_ENT, KC_SPC, TO(2), OSL(1)
|
KC_NO, KC_ENT, KC_DEL, KC_BSPC, KC_SPC, TO(2)
|
||||||
),
|
),
|
||||||
|
|
||||||
// SYMB
|
// SYMB
|
||||||
|
@ -17,16 +25,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
_______, RALT(KC_Q), LSFT(KC_SLASH), RALT(KC_8), RALT(KC_9), KC_GRV, KC_EXLM, KC_NUBS, LSFT(KC_NUBS), KC_RPRN, KC_CIRC, _______,
|
_______, RALT(KC_Q), LSFT(KC_SLASH), RALT(KC_8), RALT(KC_9), KC_GRV, KC_EXLM, KC_NUBS, LSFT(KC_NUBS), KC_RPRN, KC_CIRC, _______,
|
||||||
_______, RALT(KC_MINS), KC_AMPR, RALT(KC_7), RALT(KC_0), KC_RCBR, KC_UNDS, KC_ASTR, KC_LPRN, KC_SLASH, LSFT(KC_DOT), _______,
|
_______, RALT(KC_MINS), KC_AMPR, RALT(KC_7), RALT(KC_0), KC_RCBR, KC_UNDS, KC_ASTR, KC_LPRN, KC_SLASH, LSFT(KC_DOT), _______,
|
||||||
_______, KC_BSLS, KC_DLR, RALT(KC_NUBS), RALT(KC_RBRC), KC_PLUS, _______, _______, KC_RBRC, KC_PERC, KC_AT, KC_PIPE, LSFT(KC_COMM), _______,
|
_______, KC_BSLS, KC_DLR, RALT(KC_NUBS), RALT(KC_RBRC), KC_PLUS, _______, _______, KC_RBRC, KC_PERC, KC_AT, KC_PIPE, LSFT(KC_COMM), _______,
|
||||||
_______, TO(0), _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
// NAV
|
// NAV
|
||||||
[2] = LAYOUT(
|
[2] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
_______, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, _______, LGUI(LCTL(KC_LEFT)), LGUI(LCTL(KC_RGHT)), _______, _______, _______,
|
TAB_TO0, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, LGUI(LCTL(KC_LEFT)), LGUI(LCTL(KC_RGHT)), KC_NO, KC_NO, KC_F11,
|
||||||
_______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_LGUI, KC_LCTL, KC_LALT, KC_LSFT, _______,
|
KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO, KC_LGUI, KC_LCTL, KC_LALT, KC_LSFT, KC_F12,
|
||||||
_______, _______, _______, RCS(KC_TAB), LCTL(KC_TAB), _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_NO, KC_NO, KC_NO, RCS(KC_TAB), LCTL(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
TO(3), TO(0), _______, _______, TO(2), TO(4)
|
TO(0), ENT_TO0, DEL_TO0, BSPC_TO0, SPC_TO0, TO(4)
|
||||||
),
|
),
|
||||||
|
|
||||||
// FUNCT
|
// FUNCT
|
||||||
|
@ -43,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
KC_ESC, 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_LBRC,
|
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_NO, MT(MOD_LSFT,KC_A),MT(MOD_LALT,KC_S), MT(MOD_LCTL, KC_D), MT(MOD_LGUI,KC_F), KC_G, KC_H, MT(MOD_RGUI,KC_J), MT(MOD_LCTL, KC_K), MT(MOD_LALT, KC_L), MT(MOD_LSFT, KC_SCLN), KC_QUOT,
|
KC_NO, MT(MOD_LSFT,KC_A),MT(MOD_LALT,KC_S), MT(MOD_LCTL, KC_D), MT(MOD_LGUI,KC_F), KC_G, KC_H, MT(MOD_RGUI,KC_J), MT(MOD_LCTL, KC_K), MT(MOD_LALT, KC_L), MT(MOD_LSFT, KC_SCLN), KC_QUOT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_MUTE, _______, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_RSFT,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_RSFT,
|
||||||
TO(5), TO(0), _______, _______, _______, _______
|
TO(5), TO(0), _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -57,6 +65,79 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
// CAPS gets toggeled when LSFT & RSFT are pressed together
|
||||||
|
case KC_LSFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (get_mods() & MOD_BIT(KC_RSFT) ) {
|
||||||
|
tap_code(KC_CAPSLOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_RSFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (get_mods() & MOD_BIT(KC_LSFT)) {
|
||||||
|
tap_code(KC_CAPSLOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// All custom Keycodes, that press a key and move to Layer 0.
|
||||||
|
// A function to perform both actions with the keycode as parameter would
|
||||||
|
// be an improvement.
|
||||||
|
case ENT_TO0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_ENT);
|
||||||
|
layer_move(0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_ENT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SPC_TO0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_SPC);
|
||||||
|
layer_move(0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_SPC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TAB_TO0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_TAB);
|
||||||
|
layer_move(0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DEL_TO0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_DEL);
|
||||||
|
layer_move(0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_DEL);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BSPC_TO0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
layer_move(0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void rgb_matrix_indicators_kb(void) {
|
void rgb_matrix_indicators_kb(void) {
|
||||||
// capslock
|
// capslock
|
||||||
if (host_keyboard_led_state().caps_lock) {
|
if (host_keyboard_led_state().caps_lock) {
|
||||||
|
|
Loading…
Reference in a new issue