Created
January 30, 2022 10:44
-
-
Save shearn89/49ad700fc65d53309863e71622d03430 to your computer and use it in GitHub Desktop.
Current QMK keymap
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 <stdint.h> | |
#include "annepro2.h" | |
#include "config.h" | |
enum anne_pro_layers { | |
_QWERTY, | |
_WORKMAN, | |
_FN1_LAYER, | |
_FN2_LAYER, | |
}; | |
enum ap_keycodes { | |
QWERTY = SAFE_RANGE, | |
WORKMAN, | |
}; | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
[_QWERTY] = KEYMAP( | |
KC_ESC, 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_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, | |
MO(_FN1_LAYER), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |
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, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_LAYER), MO(_FN2_LAYER), KC_RCTL | |
), | |
[_WORKMAN] = KEYMAP( | |
KC_ESC, 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_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, | |
MO(_FN1_LAYER), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, KC_ENT, | |
KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | |
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_LAYER), MO(_FN2_LAYER), KC_RCTL | |
), | |
[_FN1_LAYER] = 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, KC_DEL, | |
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, | |
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, | |
_______, KC_VOLU, KC_MUTE, KC_VOLD, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, | |
_______, _______, _______, _______, _______, _______, MO(_FN2_LAYER), _______ | |
), | |
[_FN2_LAYER] = KEYMAP( | |
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |
_______, _______, _______, _______, _______, MO(_FN1_LAYER), _______, _______ | |
), | |
}; | |
const uint16_t keymaps_size = sizeof(keymaps); | |
void matrix_init_user(void) { } | |
void matrix_scan_user(void) { } | |
// void keyboard_post_init_user(void) { } | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case QWERTY: | |
if (record->event.pressed) { | |
set_single_persistent_default_layer(_QWERTY); | |
} | |
return false; | |
break; | |
case WORKMAN: | |
if (record->event.pressed) { | |
set_single_persistent_default_layer(_WORKMAN); | |
} | |
return false; | |
break; | |
default: | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment