logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (2181B)


  1. // Copyright 2025 Qmk, Erik Peyronson @erikpeyronson
  2. // SPDX-License-Identifier: GPL-3.0-or-later
  3. // NOTE: This keymap is for debugging purposes to have firmware to test the matrix when building the keyboard. If you intend to build this keyboard
  4. // you should copy this to your fork or userspace repository and create your own.
  5. #include QMK_KEYBOARD_H
  6. // clang-format off
  7. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  8. [0] = LAYOUT_split_3x6_5(
  9. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
  10. KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
  11. KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
  12. KC_LBRC, KC_RBRC, KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT, KC_LPRN, KC_RPRN
  13. )
  14. };
  15. // clang-format on
  16. void keyboard_post_init_user(void) {
  17. #ifdef CONSOLE_ENABLE
  18. debug_enable = true;
  19. debug_matrix = true;
  20. #endif
  21. }
  22. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  23. // If console is enabled, it will print the matrix position and status of each key pressed
  24. #ifdef CONSOLE_ENABLE
  25. uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %u, time: %5u, int: %u, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
  26. #endif
  27. return true;
  28. }
  29. // This function prints which half the keyboard considers itself to be which is
  30. // useful for verify if the handedness pin and display is correctly set up when building
  31. #ifdef OLED_ENABLE
  32. bool oled_task_user(void) {
  33. if (is_keyboard_left()) {
  34. oled_write_P(PSTR("left"), false);
  35. } else {
  36. oled_write_P(PSTR("right"), false);
  37. }
  38. return false;
  39. }
  40. #endif
  41. #ifdef ENCODER_MAP_ENABLE
  42. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  43. [0] = {ENCODER_CCW_CW(KC_UP, KC_DOWN), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT)}
  44. };
  45. #endif