logo

qmk_firmware

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

keymap.c (1248B)


  1. #include QMK_KEYBOARD_H
  2. // Defines the keycodes used by our macros in process_record_user
  3. enum custom_keycodes {
  4. QMKURL = SAFE_RANGE,
  5. };
  6. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  7. [0] = LAYOUT(
  8. UG_HUEU, QMKURL
  9. )
  10. };
  11. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  12. if (record->event.pressed) {
  13. switch (keycode) {
  14. case QMKURL:
  15. // Using SEND_STRING here adds 400bytes ...
  16. // SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
  17. tap_code(KC_H);
  18. tap_code(KC_T);
  19. tap_code(KC_T);
  20. tap_code(KC_P);
  21. tap_code(KC_S);
  22. tap_code16(KC_COLON);
  23. tap_code(KC_SLASH);
  24. tap_code(KC_SLASH);
  25. tap_code(KC_Q);
  26. tap_code(KC_M);
  27. tap_code(KC_K);
  28. tap_code(KC_DOT);
  29. tap_code(KC_F);
  30. tap_code(KC_M);
  31. tap_code(KC_SLASH);
  32. tap_code(KC_ENTER);
  33. break;
  34. }
  35. }
  36. return true;
  37. }
  38. void keyboard_post_init_user(void) {
  39. rgblight_enable_noeeprom(); // enables Rgb, without saving settings
  40. rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving
  41. rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // sets mode to Fast breathing without saving
  42. }