Skip to content

Instantly share code, notes, and snippets.

@gngrwzrd
Last active April 1, 2021 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gngrwzrd/f48e988f31de6583245e4d21590aedb9 to your computer and use it in GitHub Desktop.
Save gngrwzrd/f48e988f31de6583245e4d21590aedb9 to your computer and use it in GitHub Desktop.
keymap.c
static uint8_t mode = 0;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if(keycode == 20737) { //fnc key.
if(record->event.pressed) {
rgb_matrix_set_color_all(110, 50, 100);
mode = rgb_matrix_get_mode();
rgb_matrix_mode_noeeprom(1);
} else {
rgb_matrix_mode(mode);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment