diff options
author | henrikosorensen <[email protected]> | 2019-06-22 17:36:05 +0200 |
---|---|---|
committer | Drashna Jaelre <[email protected]> | 2019-06-22 08:36:05 -0700 |
commit | 1c75385d7663388e930933884b8a5de77e98692e (patch) | |
tree | cc3216fd349401eb6aef8cf6b8b88cb0889f10ed /keyboards/omnikeyish/omnikeyish.c | |
parent | 7f23ad72c5c736b58bab16995e7b0a599268b56f (diff) | |
download | qmk_firmware-1c75385d7663388e930933884b8a5de77e98692e.tar.gz qmk_firmware-1c75385d7663388e930933884b8a5de77e98692e.zip |
[Keyboard] Add new keyboard: Omnikeyish - A replacement PCB for the Northgate Omnikey family (#6167)
* Add omnikeyish keyboard support.
* remove out of date comment
* PCB Rev 1.1 moved Row5's pin to E6, because the teensy++ hangs an onboard LED off D6.
* Move string.h include to .c file
* Add pcb kicad link.
* Add info.json
* Move macro programming to numlock's keyposition, the most useless key on the post model M layout. Force numlock enabled on host at init time, so you're not stuck without a numpad (hopefully)
* Make the macro blink function toggle LEDs from their previous state.
* Use incorrect but code style compliant opening curly bracing style.
* Make PCB rev 1.1 the default Omnikeyish config, as the author has the only rev 1.0 boards that'll ever be.
* Fix silly spelling error in 3 defines
* First set of review changes.
* Layout macro and keymap defined using it.
* Layout macros for the northgate factory plates.
* minor rearrangements
* ALL the layouts.
* Forgot ultra-t in info.json
Diffstat (limited to 'keyboards/omnikeyish/omnikeyish.c')
-rw-r--r-- | keyboards/omnikeyish/omnikeyish.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c new file mode 100644 index 0000000000..d7b68d41ab --- /dev/null +++ b/keyboards/omnikeyish/omnikeyish.c @@ -0,0 +1,55 @@ +#include "omnikeyish.h" + +void keyboard_pre_init_user(void) { + /* Configure LED driving pins as output pins */ + setPinOutput(NUMLOCKLEDPIN); + setPinOutput(CAPSLOCKLEDPIN); + setPinOutput(SCROLLLOCKLEDPIN); + + dynamic_macro_init(); +} + +void keyboard_post_init_user(void) { + /* Customise these values to desired behaviour */ + //debug_enable = true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; + +#ifdef DYNAMIC_MACRO_EEPROM_STORAGE + /* Restore macros from eeprom */ + dynamic_macro_load_eeprom_all(); +#endif + + /* Send numlock keycode to attempt to force numlock back on. */ + register_code(KC_NUMLOCK); + unregister_code(KC_NUMLOCK); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(NUMLOCKLEDPIN); + } else { + writePinLow(NUMLOCKLEDPIN); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(CAPSLOCKLEDPIN); + } else { + writePinLow(CAPSLOCKLEDPIN); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(SCROLLLOCKLEDPIN); + } else { + writePinLow(SCROLLLOCKLEDPIN); + } +}
\ No newline at end of file |