Эх сурвалжийг харах

[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
henrikosorensen 6 жил өмнө
parent
commit
1c75385d76

+ 63 - 0
keyboards/omnikeyish/config.h

@@ -0,0 +1,63 @@
+#pragma once
+
+#include "config_common.h"
+
+#define KEYBOARD_PCB_REV 11
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x0666
+#define DEVICE_VER      0x1337
+#define MANUFACTURER    Henrik O. Sørensen
+#define PRODUCT         Omnikey(-ish) Keyboard
+#define DESCRIPTION     Replacement PCB for Omnikey keyboards
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 23
+
+/* key matrix pins */
+#if KEYBOARD_PCB_REV == 10
+#define MATRIX_ROW_PINS { D2, D3, D4, D5, D6, D7 }
+#else
+#define MATRIX_ROW_PINS { D2, D3, D4, D5, E6, D7 }
+#endif 
+#define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, C7, C6, C5, C4, C3, C2, C1, C0, B0, B1, B2, B3, B4, B5, B6 }
+
+#define NUMLOCKLEDPIN E0
+#define CAPSLOCKLEDPIN E1
+#define SCROLLLOCKLEDPIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* number of backlight levels */
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 0
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* force n-key rollover*/
+#define FORCE_NKRO
+
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 0
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif
+
+#define DYNAMIC_MACRO_COUNT 12
+#define DYNAMIC_MACRO_SIZE 48
+#define DYNAMIC_MACRO_EEPROM_STORAGE
+#define DYNAMIC_MACRO_EEPROM_MAGIC_ADDR (uint16_t*)32
+#define DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR (uint8_t*)34

+ 252 - 0
keyboards/omnikeyish/dynamic_macro.c

@@ -0,0 +1,252 @@
+#include QMK_KEYBOARD_H
+#include <string.h>
+
+void dynamic_macro_init(void) {
+  /* zero out macro blocks  */
+  memset(&dynamic_macros, 0, DYNAMIC_MACRO_COUNT * sizeof(dynamic_macro_t));
+}
+
+/* Blink the LEDs to notify the user about some event. */
+void dynamic_macro_led_blink(void) {
+#ifdef BACKLIGHT_ENABLE
+  backlight_toggle();
+  wait_ms(100);
+  backlight_toggle();
+#else
+  led_set(host_keyboard_leds() ^ 0xFF);
+  wait_ms(100);
+  led_set(host_keyboard_leds());
+#endif
+}
+
+/**
+ * Start recording of the dynamic macro.
+ *
+ * @param macro_id[in]     The id of macro to be recorded
+ */
+void dynamic_macro_record_start(uint8_t macro_id) {
+  dprintf("dynamic macro recording: started for slot %d\n", macro_id);
+
+  dynamic_macro_led_blink();
+
+  clear_keyboard();
+  layer_clear();
+
+  dynamic_macros[macro_id].length = 0;
+}
+
+/**
+ * Play the dynamic macro.
+ *
+ * @param macro_id[in]     The id of macro to be played
+ */
+void dynamic_macro_play(uint8_t macro_id) {
+  dprintf("dynamic macro: slot %d playback, length %d\n", macro_id, dynamic_macros[macro_id].length);
+
+  uint32_t saved_layer_state = layer_state;
+
+  clear_keyboard();
+  layer_clear();
+
+  for (uint8_t i = 0; i < dynamic_macros[macro_id].length; ++i) {
+    process_record(&dynamic_macros[macro_id].events[i]);
+  }
+
+  clear_keyboard();
+
+  layer_state = saved_layer_state;
+}
+
+/**
+ * Record a single key in a dynamic macro.
+ *
+ * @param macro_id[in] The start of the used macro buffer.
+ * @param record[in]     The current keypress.
+ */
+void dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record) {
+  dynamic_macro_t* macro  = &dynamic_macros[macro_id];
+  uint8_t          length = macro->length;
+
+  /* If we've just started recording, ignore all the key releases. */
+  if (!record->event.pressed && length == 0) {
+    dprintln("dynamic macro: ignoring a leading key-up event");
+    return;
+  }
+
+  if (length < DYNAMIC_MACRO_SIZE) {
+    macro->events[length] = *record;
+    macro->length         = ++length;
+  } else {
+    dynamic_macro_led_blink();
+  }
+
+  dprintf("dynamic macro: slot %d length: %d/%d\n", macro_id, length, DYNAMIC_MACRO_SIZE);
+}
+
+/**
+ * End recording of the dynamic macro. Essentially just update the
+ * pointer to the end of the macro.
+ */
+void dynamic_macro_record_end(uint8_t macro_id) {
+  dynamic_macro_led_blink();
+
+  dynamic_macro_t* macro  = &dynamic_macros[macro_id];
+  uint8_t          length = macro->length;
+
+  keyrecord_t* events_begin   = &(macro->events[0]);
+  keyrecord_t* events_pointer = &(macro->events[length - 1]);
+
+  dprintf("dynamic_macro: macro length before trimming: %d\n", macro->length);
+  while (events_pointer != events_begin && (events_pointer)->event.pressed) {
+    dprintln("dynamic macro: trimming a trailing key-down event");
+    --(macro->length);
+    --events_pointer;
+  }
+
+#ifdef DYNAMIC_MACRO_EEPROM_STORAGE
+  macro->checksum = dynamic_macro_calc_crc(macro);
+  dynamic_macro_save_eeprom(macro_id);
+#endif
+
+  dprintf("dynamic macro: slot %d saved, length: %d\n", macro_id, length);
+}
+
+/* Handle the key events related to the dynamic macros. Should be
+ * called from process_record_user() like this:
+ *
+ *   bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ *       if (!process_record_dynamic_macro(keycode, record)) {
+ *           return false;
+ *       }
+ *       <...THE REST OF THE FUNCTION...>
+ *   }
+ */
+bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record) {
+  /* 0 to DYNAMIC_MACRO_COUNT -1 - macro macro_id is being recorded */
+  static uint8_t macro_id        = 255;
+  static uint8_t recording_state = STATE_NOT_RECORDING;
+
+  if (STATE_NOT_RECORDING == recording_state) {
+    /* Program key pressed to request programming mode */
+    if (keycode == DYN_MACRO_PROG && record->event.pressed) {
+      dynamic_macro_led_blink();
+
+      recording_state = STATE_RECORD_KEY_PRESSED;
+      dprintf("dynamic macro: programming key pressed, waiting for macro slot selection. %d\n", recording_state);
+
+      return false;
+    }
+    /* Macro key pressed to request macro playback */
+    if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) {
+      dynamic_macro_play(keycode - DYN_MACRO_KEY1);
+
+      return false;
+    }
+
+    /* Non-dynamic macro key, process it elsewhere. */
+    return true;
+  } else if (STATE_RECORD_KEY_PRESSED == recording_state) {
+    /* Program key pressed again before a macro selector key, cancel macro recording.
+       Blink leds to indicate cancelation. */
+    if (keycode == DYN_MACRO_PROG && record->event.pressed) {
+      dynamic_macro_led_blink();
+
+      recording_state = STATE_NOT_RECORDING;
+      dprintf("dynamic macro: programming key pressed, programming mode canceled. %d\n", recording_state);
+
+      return false;
+    } else if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) {
+      macro_id = keycode - DYN_MACRO_KEY1;
+
+      /* Macro slot selected, enter recording state. */
+      recording_state = STATE_CURRENTLY_RECORDING;
+      dynamic_macro_record_start(macro_id);
+
+      return false;
+    }
+    /* Ignore any non-macro key press while in RECORD_KEY_PRESSED state. */
+    return false;
+  } else if (STATE_CURRENTLY_RECORDING == recording_state) {
+    /* Program key pressed to request end of macro recording. */
+    if (keycode == DYN_MACRO_PROG && record->event.pressed) {
+      dynamic_macro_record_end(macro_id);
+      recording_state = STATE_NOT_RECORDING;
+
+      return false;
+    }
+    /* Don't record other macro key presses. */
+    else if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) {
+      dprintln("dynamic macro: playback key ignored in programming mode.");
+      return false;
+    }
+    /* Non-macro keypress that should be recorded  */
+    else {
+      dynamic_macro_record_key(macro_id, record);
+
+      /* Don't output recorded keypress. */
+      return false;
+    }
+  }
+
+  return true;
+}
+
+#ifdef __AVR__
+#  include <util/crc16.h>
+uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro) {
+  uint16_t crc  = 0;
+  uint8_t* data = (uint8_t*)macro;
+
+  for (uint16_t i = 0; i < DYNAMIC_MACRO_CRC_LENGTH; ++i) {
+    crc = _crc16_update(crc, *(data++));
+  }
+  return crc;
+}
+#endif /* __AVR__ */
+
+inline void* dynamic_macro_eeprom_macro_addr(uint8_t macro_id) { 
+    return DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR + sizeof(dynamic_macro_t) * macro_id;
+}
+
+bool dynamic_macro_header_correct(void) { 
+    return eeprom_read_word(DYNAMIC_MACRO_EEPROM_MAGIC_ADDR) == DYNAMIC_MACRO_EEPROM_MAGIC;
+}
+
+void dynamic_macro_load_eeprom_all(void) {
+  if (!dynamic_macro_header_correct()) {
+    dprintf("dynamic_macro: eeprom header not valid, not restoring macros.\n");
+    return;
+  }
+
+  for (uint8_t i = 0; i < DYNAMIC_MACRO_COUNT; ++i) {
+    dynamic_macro_load_eeprom(i);
+  }
+}
+
+void dynamic_macro_load_eeprom(uint8_t macro_id) {
+  dynamic_macro_t* dst = &dynamic_macros[macro_id];
+
+  eeprom_read_block(dst, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t));
+
+  /* Validate checksum, ifchecksum is NOT valid for macro, set its length to 0 to prevent its use. */
+  if (dynamic_macro_calc_crc(dst) != dst->checksum) {
+    dprintf("dynamic macro: slot %d not loaded, checksum mismatch\n", macro_id);
+    dst->length = 0;
+
+    return;
+  }
+
+  dprintf("dynamic macro: slot %d loaded from eeprom, checksum okay\n", macro_id);
+}
+
+void dynamic_macro_save_eeprom(uint8_t macro_id) {
+  if (!dynamic_macro_header_correct()) {
+    eeprom_write_word(DYNAMIC_MACRO_EEPROM_MAGIC_ADDR, DYNAMIC_MACRO_EEPROM_MAGIC);
+    dprintf("dynamic macro: writing magic eeprom header\n");
+  }
+
+  dynamic_macro_t* src = &dynamic_macros[macro_id];
+
+  eeprom_update_block(src, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t));
+  dprintf("dynamic macro: slot %d saved to eeprom\n", macro_id);
+}

+ 95 - 0
keyboards/omnikeyish/dynamic_macro.h

@@ -0,0 +1,95 @@
+/* Copyright 2016 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
+#pragma once
+
+#include "action.h"
+#include "action_layer.h"
+
+#ifndef DYNAMIC_MACRO_COUNT
+#define DYNAMIC_MACRO_COUNT 2
+#endif
+
+#ifndef DYNAMIC_MACRO_SIZE
+/* May be overridden with a custom value. Be aware that the effective
+ * macro length is half of this value: each keypress is recorded twice
+ * because of the down-event and up-event. This is not a bug, it's the
+ * intended behavior.
+ *
+ * Usually it should be fine to set the macro size to at least 256 but
+ * there have been reports of it being too much in some users' cases,
+ * so 128 is considered a safe default.
+ */
+#define DYNAMIC_MACRO_SIZE 64
+#endif
+
+#ifndef DYNAMIC_MACRO_EEPROM_STORAGE
+#define DYNAMIC_MACRO_EEPROM_STORAGE
+#endif
+
+/* DYNAMIC_MACRO_RANGE must be set as the last element of user's
+ * "planck_keycodes" enum prior to including this header. This allows
+ * us to 'extend' it.
+ */
+enum dynamic_macro_keycodes {
+  DYN_MACRO_PROG = DYNAMIC_MACRO_RANGE,
+
+  /* Requirement: DYN_MACRO_KEYs are in sequence in the enum. */
+  DYN_MACRO_KEY1,
+  DYN_MACRO_KEY2,
+  DYN_MACRO_KEY3,
+  DYN_MACRO_KEY4,
+  DYN_MACRO_KEY5,
+  DYN_MACRO_KEY6,
+  DYN_MACRO_KEY7,
+  DYN_MACRO_KEY8,
+  DYN_MACRO_KEY9,
+  DYN_MACRO_KEY10,
+  DYN_MACRO_KEY11,
+  DYN_MACRO_KEY12
+};
+
+enum dynamic_macro_recording_state { STATE_NOT_RECORDING, STATE_RECORD_KEY_PRESSED, STATE_CURRENTLY_RECORDING };
+
+typedef struct {
+  keyrecord_t events[DYNAMIC_MACRO_SIZE];
+  uint8_t     length;
+  uint16_t    checksum;
+} dynamic_macro_t;
+
+dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT];
+
+void     dynamic_macro_init(void);
+void     dynamic_macro_led_blink(void);
+void     dynamic_macro_record_start(uint8_t macro_id);
+void     dynamic_macro_play(uint8_t macro_id);
+void     dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record);
+void     dynamic_macro_record_end(uint8_t macro_id);
+bool     process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record);
+
+#define DYNAMIC_MACRO_CRC_LENGTH (sizeof(dynamic_macro_t) - sizeof(uint16_t))
+
+#ifdef DYNAMIC_MACRO_EEPROM_STORAGE
+#define DYNAMIC_MACRO_EEPROM_MAGIC (uint16_t)0xDEAD
+
+uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro);
+void dynamic_macro_load_eeprom_all(void);
+void dynamic_macro_load_eeprom(uint8_t macro_id);
+void dynamic_macro_save_eeprom(uint8_t macro_id);
+bool dynamic_macro_header_correct(void);
+#endif
+

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 8 - 0
keyboards/omnikeyish/info.json


+ 14 - 0
keyboards/omnikeyish/keymaps/default/keymap.c

@@ -0,0 +1,14 @@
+#include QMK_KEYBOARD_H
+
+#define M_PROG DYN_MACRO_PROG
+
+/*    COL1             COL2                  COL3     COL4     COL5     COL6     COL7     COL8     COL9     COL10    COL11    COL12    COL13    COL14    COL15    COL16        COL17    COL18    COL19        COL20    COL21    COL22    COL23 */
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  LAYOUT_all(
+  	  DYN_MACRO_KEY11, DYN_MACRO_KEY12,      KC_ESC,           KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,      KC_PSCR, KC_SLCK, KC_PAUS,     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+  	  DYN_MACRO_KEY1,  DYN_MACRO_KEY2,       KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,     KC_INS,  KC_HOME, KC_PGUP,     M_PROG,  KC_PSLS, KC_PAST, KC_PMNS,
+  	  DYN_MACRO_KEY3,  DYN_MACRO_KEY4,       KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,     KC_DEL,  KC_END,  KC_PGDN,     KC_P7,   KC_P8,   KC_P9,   KC_PPLS,
+  	  DYN_MACRO_KEY5,  DYN_MACRO_KEY6,       KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,      KC_MPRV, KC_MPLY, KC_MNXT,     KC_P4,   KC_P5,   KC_P6,   KC_PEQL,
+  	  DYN_MACRO_KEY7,  DYN_MACRO_KEY8,       KC_LSFT, KC_NUBS, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, KC_BSLS,     DEBUG,   KC_UP,   RESET,       KC_P1,   KC_P2,   KC_P3,   KC_PENT,
+  	  DYN_MACRO_KEY9,  DYN_MACRO_KEY10,      KC_LCTL, KC_LGUI, KC_LALT,                                     KC_SPACE,                  KC_RALT, KC_RGUI, KC_APP,  KC_RCTL,     KC_LEFT, KC_DOWN, KC_RGHT,     KC_P0,            KC_PDOT)
+};

+ 55 - 0
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);
+  }
+}

+ 159 - 0
keyboards/omnikeyish/omnikeyish.h

@@ -0,0 +1,159 @@
+#pragma once
+
+#include "quantum.h" 
+
+enum keycodes {
+	QWERTY = SAFE_RANGE,
+	DYNAMIC_MACRO_RANGE
+};
+
+#include "dynamic_macro.h"
+
+#define ____ KC_NO
+
+/* Every possible switch positions on the PCB. Depending on plate and keycap choice, some of these positions will be blocked by other keys. */
+#define LAYOUT_all( \
+	K101, K102,   K103,       K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   K120, K121, K122, K123, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316,   K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416,   K417, K418, K419,   K420, K421, K422, K423, \
+	K501, K502,   K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614, K615, K616,   K617, K618, K619,   K620,       K622        \
+) { \
+ 	{ K101, K102,   K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   K120, K121, K122, K123 }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416,   K417, K418, K419,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, K615, K616,   K617, K618, K619,   K620, ____, K622, ____ } \
+}
+
+/* Northgate Factory Plates. Most are based on internet research, user beware. */ 
+#define LAYOUT_101 ( \
+					K103,       K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119, \
+					K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+					K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316    K317, K318, K319,   K320, K321, K322, K323, \
+					K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,                          K420, K421, K422,       \
+					K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,         K518,         K520, K521, K522, K523, \
+					K603,       K605,                               K610,       K613,             K616,   K617, K618, K619,   K620,       K622  \
+) { \
+ 	{ ____, ____,   K103, ____  K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ ____, ____,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ ____, ____,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ ____, ____,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   ____, ____, ____,   K420, K421, K422, ____ }, \
+	{ ____, ____,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   ____, K518, ____,   K520, K521, K522, K523 }, \
+	{ ____, ____,   K603, ____, K605, ____, ____, ____, ____, K610, ____, ____, K613, ____, ____, K616,   K617, K618, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_102_rev1( \
+	K101, K102,              																			K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,                          K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,         K518,         K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,   K617, K618, K619,   K620,       K622  \
+) { \
+ 	{ K101, K102,   ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   ____, ____, ____,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   ____, K518, ____,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, K618, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_102_rev3( \
+	K101, K102,   K103,       																			K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,                          K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,         K518,         K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,   K617, K618, K619,   K620,       K622  \
+) { \
+ 	{ K101, K102,   K103, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   ____, ____, ____,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   ____, K518, ____,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, K618, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_plus_rev1( \
+	K101, K102,              																			K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,      K417, K418, K419,   K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,      K617, K619,      K620,       K622  \
+) { \
+ 	{ K101, K102,   ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   K417, K418, K419,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, ____, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_plus_rev3( \
+	K101, K102,   K103,       																			K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,      K417, K418, K419,   K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,      K617, K619,      K620,       K622  \
+) { \
+ 	{ K101, K102,   K103, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   K417, K418, K419,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, ____, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_ultra_rev1( \
+	K101, K102,               K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,	K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,      K417, K418, K419,   K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,      K617, K619,      K620,       K622  \
+) { \
+ 	{ K101, K102,   ____, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   K417, K418, K419,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, ____, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_ultra_rev3( \
+	K101, K102,   K103,       K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,	K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,      K417, K418, K419,   K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,      K617, K619,      K620,       K622  \
+) { \
+ 	{ K101, K102,   K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   K417, K418, K419,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   K517, K518, K519,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, ____, K619,   K620, ____, K622, ____ } \
+}
+
+#define LAYOUT_ultra_t( \
+	K101, K102,   K103,       K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119, \
+	K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223, \
+	K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315,         K317, K318, K319,   K320, K321, K322, K323, \
+	K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,    K416,                          K420, K421, K422, K423, \
+	K501, K502,   K503,       K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,         K518,         K520, K521, K522, K523, \
+	K601, K602,   K603, K604, K605,                         K610,             K613, K614,       K616,   K617, K618, K619,   K620,       K622  \
+) { \
+ 	{ K101, K102,   K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116,   K117, K118, K119,   ____, ____, ____, ____ }, \
+	{ K201, K202,   K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216,   K217, K218, K219,   K220, K221, K222, K223 }, \
+	{ K301, K302,   K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____,   K317, K318, K319,   K320, K321, K322, K323 }, \
+	{ K401, K402,   K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416,   ____, ____, ____,   K420, K421, K422, K423 }, \
+	{ K501, K502,   K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516,   ____, K518, ____,   K520, K521, K522, K523 }, \
+	{ K601, K602,   K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616,   K617, K618, K619,   K620, ____, K622, ____ } \
+}
+

+ 14 - 0
keyboards/omnikeyish/readme.md

@@ -0,0 +1,14 @@
+Omnikey(-ish)
+===
+
+A replacement PCB for Omnikey keyboards. (In theory) supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs.
+
+Keyboard Maintainer: QMK Community and Henrik O. Sørensen  
+Hardware Supported: Omnikey(-ish) PCB  
+Hardware Availability: https://github.com/henrikosorensen/keyboard_pcbs/tree/master/omnikeyish_pcb
+
+Make example for this keyboard (after setting up your build environment):
+
+    make omnikeyish:default
+
+See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.

+ 65 - 0
keyboards/omnikeyish/rules.mk

@@ -0,0 +1,65 @@
+# keyboard specific files
+SRC += dynamic_macro.c
+
+# MCU name
+MCU = at90usb1286
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+#   Teensy       halfkay
+#   Pro Micro    caterina
+#   Atmel DFU    atmel-dfu
+#   LUFA DFU     lufa-dfu
+#   QMK DFU      qmk-dfu
+#   atmega32a    bootloadHID
+BOOTLOADER = halfkay
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = lite	# Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no	# Mouse keys
+EXTRAKEY_ENABLE = yes	# Audio control and System control
+CONSOLE_ENABLE = yes	# Console for debug
+COMMAND_ENABLE = yes    # Commands for debug and configuration
+SLEEP_LED_ENABLE = no 	# Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes		# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no  	# Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно