Created
November 19, 2017 17:15
-
-
Save tckmn/02f72d249f5cae13030cf5af23af24b6 to your computer and use it in GitHub Desktop.
my qmk config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "planck.h" | |
#include "action_layer.h" | |
#include "virtser.h" | |
#include "keymap_steno.h" | |
extern keymap_config_t keymap_config; | |
#define QWERTY 0 | |
#define PLOVER 1 | |
#define RAISE 2 | |
#define DEAD 3 | |
#define RAISE_DEAD 4 | |
#define NUMPAD 5 | |
#define FN 6 | |
enum planck_keycodes { | |
KC_QWERTY = SAFE_RANGE, | |
KC_PLOVER, | |
KC_RAISE | |
}; | |
#define _______ KC_TRNS | |
#define XXXXXXX KC_NO | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
[QWERTY] = { | |
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | |
{KC_RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | |
{KC_RGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(NUMPAD)}, | |
{KC_MUTE, KC_VOLD, KC_VOLU, KC_LGUI, KC_LCTL, KC_SPC, KC_ENT, KC_LSFT, KC_LALT, KC_PSCR, KC_RCTL, MO(FN)} | |
}, | |
[PLOVER] = { | |
{XXXXXXX, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR}, | |
{XXXXXXX, STN_S1, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR}, | |
{XXXXXXX, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, XXXXXXX}, | |
{KC_QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | |
}, | |
[RAISE] = { | |
{KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | |
{_______, KC_TAB, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, | |
{_______, XXXXXXX, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_DELETE, XXXXXXX}, | |
{KC_CUT, KC_COPY, KC_PASTE, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX} | |
}, | |
[NUMPAD] = { | |
{KC_NLCK, XXXXXXX, XXXXXXX, KC_E, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PSLS, _______}, | |
{XXXXXXX, KC_A, XXXXXXX, KC_D, KC_F, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PAST, XXXXXXX}, | |
{XXXXXXX, XXXXXXX, XXXXXXX, KC_C, XXXXXXX, KC_B, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PMNS, _______}, | |
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_ENT, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, XXXXXXX} | |
}, | |
[FN] = { | |
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, | |
{MAGIC_TOGGLE_NKRO,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG}, | |
{RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_STEP}, | |
{KC_PLOVER, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______} | |
}, | |
}; | |
void matrix_init_user() { | |
steno_set_mode(STENO_MODE_GEMINI); | |
} | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case KC_RAISE: | |
if (record->event.pressed) { | |
layer_on(RAISE); | |
/* update_tri_layer(RAISE, DEAD, RAISE_DEAD); */ | |
} else { | |
layer_off(RAISE); | |
/* update_tri_layer(RAISE, DEAD, RAISE_DEAD); */ | |
} | |
return false; | |
case KC_PLOVER: | |
if (record->event.pressed) { | |
layer_off(FN); | |
layer_on(PLOVER); | |
keymap_config.nkro = 1; | |
/* register_code(KC_A); */ | |
/* register_code(KC_S); */ | |
/* register_code(KC_D); */ | |
/* register_code(KC_F); */ | |
/* unregister_code(KC_A); */ | |
/* unregister_code(KC_S); */ | |
/* unregister_code(KC_D); */ | |
/* unregister_code(KC_F); */ | |
} | |
return false; | |
case KC_QWERTY: | |
if (record->event.pressed) { | |
layer_off(PLOVER); | |
layer_on(QWERTY); | |
/* register_code(KC_A); */ | |
/* register_code(KC_S); */ | |
/* register_code(KC_D); */ | |
/* register_code(KC_F); */ | |
/* unregister_code(KC_A); */ | |
/* unregister_code(KC_S); */ | |
/* unregister_code(KC_D); */ | |
/* unregister_code(KC_F); */ | |
} | |
return false; | |
} | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |
MOUSEKEY_ENABLE = no # Mouse keys(+4700) | |
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |
CONSOLE_ENABLE = no # Console for debug(+400) | |
COMMAND_ENABLE = no # Commands for debug and configuration | |
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | |
MIDI_ENABLE = no # MIDI controls | |
AUDIO_ENABLE = no # Audio output on port C6 | |
UNICODE_ENABLE = no # Unicode | |
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | |
VIRTSER_ENABLE = yes | |
STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER | |
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |
ifndef QUANTUM_DIR | |
include ../../../../Makefile | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment