1 #include "omnikeyish.h"
3 void keyboard_pre_init_user(void) {
4 /* Configure LED driving pins as output pins */
5 setPinOutput(NUMLOCKLEDPIN);
6 setPinOutput(CAPSLOCKLEDPIN);
7 setPinOutput(SCROLLLOCKLEDPIN);
12 void keyboard_post_init_user(void) {
13 /* Customise these values to desired behaviour */
14 //debug_enable = true;
16 //debug_keyboard=true;
19 #ifdef DYNAMIC_MACRO_EEPROM_STORAGE
20 /* Restore macros from eeprom */
21 dynamic_macro_load_eeprom_all();
24 /* Send numlock keycode to attempt to force numlock back on. */
25 register_code(KC_NUMLOCK);
26 unregister_code(KC_NUMLOCK);
29 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
30 if (!process_record_dynamic_macro(keycode, record)) {
37 void led_set_user(uint8_t usb_led) {
38 if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
39 writePinHigh(NUMLOCKLEDPIN);
41 writePinLow(NUMLOCKLEDPIN);
44 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
45 writePinHigh(CAPSLOCKLEDPIN);
47 writePinLow(CAPSLOCKLEDPIN);
50 if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
51 writePinHigh(SCROLLLOCKLEDPIN);
53 writePinLow(SCROLLLOCKLEDPIN);