keymap.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #include QMK_KEYBOARD_H
  2. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  3. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  4. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  5. // entirely and just use numbers.
  6. #define _DEFAULT 0
  7. #define _FN_1 1
  8. #define _FN_2 2
  9. enum custom_keycodes {
  10. DEFAULT = SAFE_RANGE,
  11. FN_1,
  12. FN_2
  13. };
  14. // Defines for task manager and such
  15. #define CALTDEL LCTL(LALT(KC_DEL))
  16. #define TSKMGR LCTL(LSFT(KC_ESC))
  17. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  18. /* Default Layer
  19. * ,-----------------------------------------------.
  20. * | FN_2 | 2 |TSKMGR |CALTDEL| ESC | FN_1 |
  21. * `-----------------------------------------------'
  22. */
  23. [_DEFAULT] = LAYOUT( \
  24. MO(_FN_2), KC_2, TSKMGR, CALTDEL, KC_ESC, MO(_FN_1)
  25. ),
  26. /* FN 1 Layer
  27. * ,-----------------------------------------------.
  28. * |RGB_TOG|RGB_HUD|RGB_HUI|RGB_SAD|RGB_SAI| FN_1 |
  29. * `-----------------------------------------------'
  30. */
  31. [_FN_1] = LAYOUT( \
  32. RGB_TOG, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______
  33. ),
  34. /* FN 2 Layer
  35. * ,-----------------------------------------------.
  36. * | FN_2 |RGB_VAD|RGB_VAI|RGB_MOD|TSKMGR | RESET |
  37. * `-----------------------------------------------'
  38. */
  39. [_FN_2] = LAYOUT( \
  40. _______, RGB_VAD, RGB_VAI, RGB_MOD, TSKMGR, RESET
  41. )
  42. };
  43. void persistant_default_layer_set(uint16_t default_layer) {
  44. eeconfig_update_default_layer(default_layer);
  45. default_layer_set(default_layer);
  46. }
  47. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  48. switch (keycode) {
  49. // NONE
  50. }
  51. return true;
  52. }