qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

keymap.c (670B)


      1 #include QMK_KEYBOARD_H
      2 #include "rgblite.h"
      3 
      4 // Defines the keycodes used by our macros in process_record_user
      5 enum custom_keycodes {
      6   QMKURL = SAFE_RANGE,
      7 };
      8 
      9 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     10   [0] = LAYOUT(
     11     UG_HUEU,  QMKURL
     12   )
     13 };
     14 
     15 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     16   if (record->event.pressed) {
     17     switch (keycode) {
     18       case QK_UNDERGLOW_HUE_UP:
     19         rgblite_increase_hue();
     20         break;
     21       case QMKURL:
     22         SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
     23         break;
     24     }
     25   }
     26   return true;
     27 }
     28 
     29 void keyboard_post_init_user(void) {
     30   rgblite_init();
     31   rgblite_increase_hue();
     32 }