]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/helix/rev2/keymaps/edvorakjp/keymap.c
Update KBD67 readme so that it mentions the KBD65 PCB (#5143)
[qmk_firmware.git] / keyboards / helix / rev2 / keymaps / edvorakjp / keymap.c
1 #include QMK_KEYBOARD_H
2 #include "split_util.h"
3 #include "keymap_xrows.h"
4 #ifdef SSD1306OLED
5   #include "oled.h"
6 #endif
7
8 // keymaps definitions are moved to keymap_Xrows.c.
9
10 #ifdef SSD1306OLED
11 void matrix_init_keymap(void) {
12   //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
13   iota_gfx_init(!has_usb());   // turns on the display
14 }
15
16 void matrix_scan_user(void) {
17   iota_gfx_task();  // this is what updates the display continuously
18 }
19 #endif
20
21 #ifdef RGBLIGHT_ENABLE
22 uint32_t layer_state_set_keymap(uint32_t state) {
23   rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
24   switch (biton32(state)) {
25     case _LOWER:
26       rgblight_sethsv_noeeprom_red();
27       break;
28     case _RAISE:
29       rgblight_sethsv_noeeprom_blue();
30       break;
31     default: //  for any other layers, or the default layer
32       rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
33       rgblight_sethsv_red();
34       break;
35   }
36   return state;
37 }
38 #endif