summaryrefslogtreecommitdiff
path: root/keyboards/unikeyboard/divergetm2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/unikeyboard/divergetm2')
-rw-r--r--keyboards/unikeyboard/divergetm2/config.h73
-rw-r--r--keyboards/unikeyboard/divergetm2/divergetm2.c17
-rw-r--r--keyboards/unikeyboard/divergetm2/divergetm2.h70
-rw-r--r--keyboards/unikeyboard/divergetm2/info.json57
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/default/config.h23
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/default/keymap.c199
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/default/readme.md5
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/config.h23
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/keymap.c155
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/readme.md9
-rw-r--r--keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/rules.mk3
-rw-r--r--keyboards/unikeyboard/divergetm2/readme.md21
-rw-r--r--keyboards/unikeyboard/divergetm2/rules.mk20
13 files changed, 675 insertions, 0 deletions
diff --git a/keyboards/unikeyboard/divergetm2/config.h b/keyboards/unikeyboard/divergetm2/config.h
new file mode 100644
index 0000000000..ee8372aa7e
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/config.h
@@ -0,0 +1,73 @@
+/* Copyright 2018 Christon DeWan (xton)
+ * Copyright 2017 IslandMan93
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1256
+#define DEVICE_VER 0x0001
+#define MANUFACTURER UniKeyboard
+#define PRODUCT diverge tm2
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
+#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* number of backlight levels */
+
+/* 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
+
+/* serial.c configuration for split keyboard */
+#define SOFT_SERIAL_PIN D0
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
diff --git a/keyboards/unikeyboard/divergetm2/divergetm2.c b/keyboards/unikeyboard/divergetm2/divergetm2.c
new file mode 100644
index 0000000000..61ea45416c
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/divergetm2.c
@@ -0,0 +1,17 @@
+/* Copyright 2018 Christon DeWan (xton)
+ * Copyright 2017 IslandMan93
+ *
+ * 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/>.
+ */
+#include "divergetm2.h"
diff --git a/keyboards/unikeyboard/divergetm2/divergetm2.h b/keyboards/unikeyboard/divergetm2/divergetm2.h
new file mode 100644
index 0000000000..6de48e41c7
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/divergetm2.h
@@ -0,0 +1,70 @@
+/* Copyright 2018 Christon DeWan (xton)
+ * Copyright 2017 IslandMan93
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+#endif
+#endif
+
+#ifndef FLIP_HALF
+// Standard Keymap
+// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, KC_NO }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { R35, R34, R33, R32, R31, KC_NO } \
+ }
+#else
+// Keymap with right side flipped
+// (TRRS jack on both halves are to the right)
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, KC_NO }, \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { KC_NO, R31, R32, R33, R34, R35 } \
+ }
+#endif
+
+#define LAYOUT_ortho_4x12_2x2u LAYOUT
diff --git a/keyboards/unikeyboard/divergetm2/info.json b/keyboards/unikeyboard/divergetm2/info.json
new file mode 100644
index 0000000000..fc64e57906
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/info.json
@@ -0,0 +1,57 @@
+{
+ "keyboard_name": "UniKeyboard Diverge TM 2",
+ "url": "",
+ "maintainer": "islandman93, xton",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"L00", "x":0, "y":0},
+ {"label":"L01", "x":1, "y":0},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0},
+ {"label":"L04", "x":4, "y":0},
+ {"label":"L05", "x":5, "y":0},
+ {"label":"R00", "x":7, "y":0},
+ {"label":"R01", "x":8, "y":0},
+ {"label":"R02", "x":9, "y":0},
+ {"label":"R03", "x":10, "y":0},
+ {"label":"R04", "x":11, "y":0},
+ {"label":"R05", "x":12, "y":0},
+ {"label":"L10", "x":0, "y":1},
+ {"label":"L11", "x":1, "y":1},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1},
+ {"label":"L14", "x":4, "y":1},
+ {"label":"L15", "x":5, "y":1},
+ {"label":"R10", "x":7, "y":1},
+ {"label":"R11", "x":8, "y":1},
+ {"label":"R12", "x":9, "y":1},
+ {"label":"R13", "x":10, "y":1},
+ {"label":"R14", "x":11, "y":1},
+ {"label":"R15", "x":12, "y":1},
+ {"label":"L20", "x":0, "y":2},
+ {"label":"L21", "x":1, "y":2},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2},
+ {"label":"L24", "x":4, "y":2},
+ {"label":"L25", "x":5, "y":2},
+ {"label":"R20", "x":7, "y":2},
+ {"label":"R21", "x":8, "y":2},
+ {"label":"R22", "x":9, "y":2},
+ {"label":"R23", "x":10, "y":2},
+ {"label":"R24", "x":11, "y":2},
+ {"label":"R25", "x":12, "y":2},
+ {"label":"L30", "x":0, "y":3},
+ {"label":"L31", "x":1, "y":3},
+ {"label":"L32", "x":2, "y":3},
+ {"label":"L33", "x":3, "y":3},
+ {"label":"L34", "x":4, "y":3, "w":2},
+ {"label":"R31", "x":7, "y":3, "w":2},
+ {"label":"R32", "x":9, "y":3},
+ {"label":"R33", "x":10, "y":3},
+ {"label":"R34", "x":11, "y":3},
+ {"label":"R35", "x":12, "y":3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/default/config.h b/keyboards/unikeyboard/divergetm2/keymaps/default/config.h
new file mode 100644
index 0000000000..ccd00621fd
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/default/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2018 Christon DeWan (xton)
+ * Copyright 2017 IslandMan93
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+// place overrides here
+#define MASTER_RIGHT
+#define PERMISSIVE_HOLD
+#define TAPPING_TERM 150
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/default/keymap.c b/keyboards/unikeyboard/divergetm2/keymaps/default/keymap.c
new file mode 100644
index 0000000000..fb5957ccae
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/default/keymap.c
@@ -0,0 +1,199 @@
+/* Copyright 2018 Christon DeWan (xton)
+ * Copyright 2017 IslandMan93
+ *
+ * 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/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK
+};
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12_2x2u(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ RESET, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_ortho_4x12_2x2u(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_ortho_4x12_2x2u(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12_2x2u(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
+ _______, _______, _______, _______, _______, MO(_RAISE), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12_2x2u(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
+ _______, _______, _______, _______, MO(_LOWER), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12_2x2u(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dvorak[][2] = SONG(DVORAK_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
+#endif
+
+#define SPACE_WAIT 100
+uint16_t rl_start_time = 0;
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if(rl_start_time && record->event.pressed) rl_start_time = 0;
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_qwerty);
+ #endif
+ set_single_persistent_default_layer(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_colemak);
+ #endif
+ set_single_persistent_default_layer(1UL<<_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_dvorak);
+ #endif
+ set_single_persistent_default_layer(1UL<<_DVORAK);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
+}
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/default/readme.md b/keyboards/unikeyboard/divergetm2/keymaps/default/readme.md
new file mode 100644
index 0000000000..dceb4f8a95
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# A default-ish keymap for diverge tm2
+
+Actually it's a Planck layout, but I needed something for the default. :-D
+
+The 2u spacebars are space when tapped, raise/lower when held.
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/config.h b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/config.h
new file mode 100644
index 0000000000..4ba4a57165
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/config.h
@@ -0,0 +1,23 @@
+#pragma once
+
+// help for fast typist+dual function keys?
+#define PERMISSIVE_HOLD
+// Let me type `ls -l` more quickly.
+#define TAPPING_FORCE_HOLD
+
+// where is the cord plugged in?
+#define MASTER_RIGHT
+
+/* speed up mousekeys a bit */
+#define MOUSEKEY_DELAY 50
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 8
+#define MOUSEKEY_TIME_TO_MAX 30
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
+
+// because I'm lazy and didn't case out the rgb support
+#define RGBLED_NUM 2
+
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_LEVELS 3
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/keymap.c b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/keymap.c
new file mode 100644
index 0000000000..5f478c1df1
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/keymap.c
@@ -0,0 +1,155 @@
+ /* Copyright 2018 Christon DeWan
+ *
+ * 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/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "xtonhasvim.h"
+
+/************************************
+ * states
+ ************************************/
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _MOVE,
+ _MOUSE,
+ _CMD
+};
+
+extern uint8_t vim_cmd_layer(void) { return _CMD; }
+
+enum keymap_keycodes {
+ RAISE = VIM_SAFE_RANGE,
+ LOWER
+};
+
+/************************************
+ * keymaps!
+ ************************************/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl*| A | S | D | F | G | H | J | K | L | ;* | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | chkwm| | Alt | GUI | Lower* | Raise* | SPC | GUI | | Vim |
+ * `-----------------------------------------------------------------------------------'
+ *
+ * - Ctrl acts as Esc when tapped.
+ * - Holding ; switches to movement layer.
+ * - Tapping raise or lower produces space.
+ */
+[_QWERTY] = LAYOUT_ortho_4x12_2x2u( \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) , \
+ LSFT(KC_LALT), MO(_MOVE), KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE, KC_SPC), KC_RGUI, KC_RALT, MO(_MOVE), VIM_START \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | | Raise | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12_2x2u( \
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC, \
+ KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
+ RESET, TO(_QWERTY), _______, _______, _______, MO(_RAISE), _______, _______, TO(_QWERTY), X_____X \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | Lower | | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12_2x2u( \
+ KC_GRV, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC, \
+ KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
+ X_____X, TO(_QWERTY), _______, _______, MO(_LOWER), _______, _______, _______, TO(_QWERTY), RESET \
+),
+
+
+/* Adjust (Lower + Raise)
+ * ,-------------------------------------------------------------------------------------.
+ * |BL Raise| | | | | | | | | | | |
+ * |--------+------+------+------+------+-------------+------+------+------+------+------|
+ * |BL Lower| | | | | | | | | | | |
+ * |--------+------+------+------+------+------|------+------+------+------+------+------|
+ * |BL STEP | | | | | | | Next | Vol- | Vol+ | Play | |
+ * |--------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Backlite| Mouse| | | | | | | Bail | |
+ * `-------------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12_2x2u( \
+ BL_INC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \
+ BL_DEC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \
+ BL_STEP, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, X_____X, \
+ BL_TOGG, TO(_MOUSE), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \
+),
+
+
+/* movement layer (hold semicolon) */
+[_MOVE] = LAYOUT_ortho_4x12_2x2u( \
+ TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, \
+ _______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, X_____X, \
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, X_____X \
+),
+
+/* mouse layer
+ */
+[_MOUSE] = LAYOUT_ortho_4x12_2x2u( \
+ TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X , \
+ _______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, \
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
+ _______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \
+),
+
+/* vim command layer.
+ */
+[_CMD] = LAYOUT_ortho_4x12_2x2u( \
+ X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, \
+ VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, \
+ VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT, \
+ _______, TO(_QWERTY), _______, _______, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X \
+)
+
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
+}
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/readme.md b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/readme.md
new file mode 100644
index 0000000000..9ff4ce1f19
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/readme.md
@@ -0,0 +1,9 @@
+# Xton has a tiny keyboard! With Vim!
+
+Based on the standard Planck layout with a few changes:
+
+* Escape moved to dual-function with control.
+* Dedicated movement and mouse layers.
+* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys.
+* Vim layers! See `users/xtonhasvim`.
+
diff --git a/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/rules.mk b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/rules.mk
new file mode 100644
index 0000000000..ede4e02b64
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/keymaps/xtonhasvim/rules.mk
@@ -0,0 +1,3 @@
+MOUSEKEY_ENABLE = yes
+# BACKLIGHT_ENABLE = yes
+AUDIO_ENABLE = no
diff --git a/keyboards/unikeyboard/divergetm2/readme.md b/keyboards/unikeyboard/divergetm2/readme.md
new file mode 100644
index 0000000000..5bff74389f
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/readme.md
@@ -0,0 +1,21 @@
+# diverge tm2
+
+A 4x6x2 split ortholinear keyboard with 2u spacebars like the Levinson (similar to Let's Split). Made by [Unikeyboard](https://unikeyboard.io).
+
+Keyboard Maintainer: [IslandMan93](https://github.com/islandman93) and [xton](https://github.com/xton)
+Hardware Supported: Pro Micro
+Hardware Availability: [Diverge TM2](https://unikeyboard.io/product/diverge-tm/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make unikeyboard/divergetm2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+# Flashing the first time
+
+Disassemble the case so you have access to each Pro Micro. Flash each half with QMK Toolbox by connecting the USB cable and shorting RST and GND. After that, just use the soft reset key on your respective layout to reflash both halves.
+
+# Reflashing Animus
+
+Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST) during the upload step. Then reapply your keymap through Arbites.
diff --git a/keyboards/unikeyboard/divergetm2/rules.mk b/keyboards/unikeyboard/divergetm2/rules.mk
new file mode 100644
index 0000000000..bd53948797
--- /dev/null
+++ b/keyboards/unikeyboard/divergetm2/rules.mk
@@ -0,0 +1,20 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no # Audio output
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+
+SPLIT_KEYBOARD = yes