aboutsummaryrefslogtreecommitdiff
path: root/keyboards/omnikeyish/omnikeyish.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/omnikeyish/omnikeyish.c')
-rw-r--r--keyboards/omnikeyish/omnikeyish.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c
new file mode 100644
index 000000000..d7b68d41a
--- /dev/null
+++ b/keyboards/omnikeyish/omnikeyish.c
@@ -0,0 +1,55 @@
1#include "omnikeyish.h"
2
3void keyboard_pre_init_user(void) {
4 /* Configure LED driving pins as output pins */
5 setPinOutput(NUMLOCKLEDPIN);
6 setPinOutput(CAPSLOCKLEDPIN);
7 setPinOutput(SCROLLLOCKLEDPIN);
8
9 dynamic_macro_init();
10}
11
12void keyboard_post_init_user(void) {
13 /* Customise these values to desired behaviour */
14 //debug_enable = true;
15 //debug_matrix=true;
16 //debug_keyboard=true;
17 //debug_mouse=true;
18
19#ifdef DYNAMIC_MACRO_EEPROM_STORAGE
20 /* Restore macros from eeprom */
21 dynamic_macro_load_eeprom_all();
22#endif
23
24 /* Send numlock keycode to attempt to force numlock back on. */
25 register_code(KC_NUMLOCK);
26 unregister_code(KC_NUMLOCK);
27}
28
29bool process_record_user(uint16_t keycode, keyrecord_t *record) {
30 if (!process_record_dynamic_macro(keycode, record)) {
31 return false;
32 }
33
34 return true;
35}
36
37void led_set_user(uint8_t usb_led) {
38 if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
39 writePinHigh(NUMLOCKLEDPIN);
40 } else {
41 writePinLow(NUMLOCKLEDPIN);
42 }
43
44 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
45 writePinHigh(CAPSLOCKLEDPIN);
46 } else {
47 writePinLow(CAPSLOCKLEDPIN);
48 }
49
50 if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
51 writePinHigh(SCROLLLOCKLEDPIN);
52 } else {
53 writePinLow(SCROLLLOCKLEDPIN);
54 }
55} \ No newline at end of file