From 044b4aaf018522ae326bae71ae5a899930fbdf1b Mon Sep 17 00:00:00 2001
From: umi <57262844+umi-umi@users.noreply.github.com>
Date: Sat, 13 Jun 2020 15:50:19 +0900
Subject: [PATCH 01/36] [Docs] Japanese translation of
docs/feature_split_keyboard.md (#9031)
* add feature_split_keyboard.md translation
* add header for git
* update based on comment
* update based on comment
---
docs/ja/feature_split_keyboard.md | 232 ++++++++++++++++++++++++++++++
1 file changed, 232 insertions(+)
create mode 100644 docs/ja/feature_split_keyboard.md
diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md
new file mode 100644
index 000000000000..275647b8033b
--- /dev/null
+++ b/docs/ja/feature_split_keyboard.md
@@ -0,0 +1,232 @@
+# 分割キーボード
+
+
+
+QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I2C 接続で接続します。
+
+分割キーボードには多くの利点がありますが、有効にするには追加の作業が必要です。
+
+QMK ファームウェアには、任意のキーボードで使用可能な一般的な実装と、多くのキーボード固有の実装があります。
+
+このため、主に Let's Split とその他のキーボードで使われる一般的な実装について説明します。
+
+!> ARM はまだ完全には分割キーボードをサポートしておらず、様々な制限があります。進捗はしていますが、機能の100%にはまだ達していません。
+
+
+## 互換性の概要
+
+| Transport | AVR | ARM |
+|------------------------------|--------------------|--------------------|
+| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 |
+| I2C | :heavy_check_mark: | |
+
+注意:
+
+1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。
+
+## ハードウェア設定
+
+2つの Pro Micro 互換のコントローラを使っており、キーボードの左右を接続するために TRRS ジャックを使っていることを前提とします。
+
+### ハードウェア要件
+
+左右それぞれのキーボードマトリックスのためのダイオードとスイッチとは別に、2個の TRRS ソケットと 1本の TRRS ケーブルが必要です。
+
+あるいは、少なくとも3本のワイヤがあるケーブルとソケットを使うことができます。
+
+キーボードの左右間で通信するために I2C を使いたい場合は、少なくとも4本のワイヤを備えたケーブルと 2個の 4.7kΩ プルアップ抵抗が必要です。
+
+#### 考慮事項
+
+最も一般的に使われる接続は、TRRS ケーブルとジャックです。これらは4本のワイヤを提供し、分割キーボードに非常に有用で、簡単に見つけることができます。
+
+ただし、ワイヤのうちの1本が Vcc を供給するため、キーボードはホットプラグ不可能です。TRRS ケーブルを抜き差しする前に、必ずキーボードのUSB接続をはずす必要があります。そうしなければ、コントローラを短絡させたり、もっと悪いことが起こるかもしれません。
+
+別のオプションは電話ケーブルを使うことです (例えば、旧式の RJ-11/RJ-14 ケーブル)。実際に4本のワイヤ/レーンをサポートするものを使うようにしてください。
+
+ただし、USB ケーブル、SATA ケーブル、そして単に4本の電線でもコントローラ間の通信に使用できることがわかっています。
+
+!> コントローラ間の通信に USB ケーブルを使っても問題ありませんが、コネクタは通常の USB 接続と間違えられるかもしれず、配線方法によってはキーボードが短絡する可能性があります。このため、分割キーボードの接続のためにはお勧めできません。
+
+### シリアル配線
+
+2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。
+
+?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。
+
+![シリアル配線](https://i.imgur.com/C3D1GAQ.png)
+
+### I2C 配線
+
+2つの Pro Micro 間で GND、Vcc、さらに SCL と SDA (それぞれ 別名 PD0/ピン3 および PD1/ピン2) を TRRS ケーブルの4本のワイヤで接続します。
+
+プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。
+
+![I2C 配線](https://i.imgur.com/Hbzhc6E.png)
+
+## ファームウェア設定
+
+分割キーボード機能を有効にするには、以下を `rules.mk` に追加してください:
+
+```make
+SPLIT_KEYBOARD = yes
+```
+
+カスタムトランスポート (通信メソッド)を使っている場合は、以下を追加する必要もあります:
+
+```make
+SPLIT_TRANSPORT = custom
+```
+
+### 左右の設定
+
+デフォルトでは、ファームウェアはどちら側がどちらであるかを認識しません; 決定するには幾つかの助けが必要です。これを行うには幾つかの方法があり、以下に優先順に列挙します。
+
+#### ピンによる左右の設定
+
+左右を決定するためにコントローラ上のピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します:
+
+```c
+#define SPLIT_HAND_PIN B7
+```
+
+これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。
+
+#### EEPROM による左右の設定
+
+このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。
+
+
+このメソッドを有効にするには、以下を `config.h` ファイルに追加します:
+
+```c
+#define EE_HANDS
+```
+
+ただし、各コントローラに正しい側の EEPROM ファイルを書き込む必要があります。これを手動で行うこともできますが、ファームウェアを書き込む時にこれを行う avrdude および dfu のターゲットが存在します。
+
+* `:avrdude-split-left`
+* `:avrdude-split-right`
+* `:dfu-split-left`
+* `:dfu-split-right`
+* `:dfu-util-split-left`
+* `:dfu-util-split-right`
+
+この設定は、`EEP_RST` キーや `eeconfig_init()` 関数を使って EEPROM を再初期化する時には変更されません。ただし、ファームウェアの組み込みオプション以外で EEPROM をリセット([QMK Toolbox]() の "Reset EEPROM" ボタンの動作のように、`EEPROM` を上書きするファイルを書きこむなど)した場合、`EEPROM` ファイルを再書き込みする必要があります。
+
+`EEPROM` ファイルは、QMK ファームウェアのリポジトリ内の[ここ](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common)にあります。
+
+#### `#define` による左右の設定
+
+コンパイル時に左右を設定することができます。これは以下を `config.h` ファイルに追加することで行うことができます:
+
+```c
+#define MASTER_RIGHT
+```
+
+あるいは
+
+```c
+#define MASTER_LEFT
+```
+
+どちらも定義されていない場合、左右のデフォルトは `MASTER_LEFT` になります。
+
+
+### 通信オプション
+
+全ての分割キーボードが同一であるとは限らないため、`config.h` ファイル内で設定することができる多くの追加のオプションがあります。
+
+```c
+#define USE_I2C
+```
+
+これは分割キーボードの I2C サポートを有効にします。これは厳密には通信用ではありませんが、OLED あるいは I2C ベースのデバイスに使うことができます。
+
+```c
+#define SOFT_SERIAL_PIN D0
+```
+
+これはシリアル通信用に使われるピンを設定します。シリアルを使っていない場合は、これを定義する必要はありません。
+
+ただし、キーボード上でシリアルおよび I2C を使っている場合は、これを設定し、D0 および D1 以外の値に設定する必要があります (これらは I2C 通信のために使われます)。
+
+```c
+#define SELECT_SOFT_SERIAL_SPEED {#}`
+```
+
+シリアル通信に問題がある場合は、この値を変更して、シリアル用の通信速度を制御することができます。デフォルトは1で、可能な値は以下の通りです:
+
+* **`0`**: 約189kbps (実験用途専用)
+* **`1`**: 約137kbps (デフォルト)
+* **`2`**: 約75kbps
+* **`3`**: 約39kbps
+* **`4`**: 約26kbps
+* **`5`**: 約20kbps
+
+### ハードウェア設定オプション
+
+ハードウェアのセットアップ方法に基づいて、設定する必要のある設定が幾つかあります。
+
+```c
+#define MATRIX_ROW_PINS_RIGHT { }
+#define MATRIX_COL_PINS_RIGHT { }
+```
+
+これにより、右側のマトリックスに異なるピンのセットを指定することができます。これは、左右の形が違うキーボード (Keebio の Quefrency など)で、左右で別の構成が必要な場合に便利です。
+
+```c
+#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
+```
+
+これにより右側のための異なる直接ピンのセットを指定することができます。
+
+```c
+#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
+#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
+```
+
+これにより右側のための異なるエンコーダピンのセットを指定することができます。
+
+```c
+#define RGBLIGHT_SPLIT
+```
+
+このオプションは、分割キーボードのコントローラ間で RGB ライトモードの同期を有効にします。これはコントローラに直接配線されている RGB LED を持つキーボード用です (つまり、それらは TRRS ケーブルで "追加データ"オプションを使っていません)。
+
+```c
+#define RGBLED_SPLIT { 6, 6 }
+```
+
+これは各コントローラに直接接続されている LED の数を設定します。最初の数は左側、2番目の数は右側です。
+
+?> この設定は `RGBLIGHT_SPLIT` が有効になっていることを意味し、有効になっていない場合は強制的に有効にします。
+
+
+```c
+#define SPLIT_USB_DETECT
+```
+このオプションは、スタートアップの挙動を変更して、マスタ/スレーブの決定時にアクティブな USB 接続を検出します。このオプションがタイムアウトになった場合、その片側はスレーブと見なされます。これは ARM のデフォルトの挙動で、AVR Teensy ボードに必要です (ハードウェアの制限のため)。
+
+?> この設定はバッテリパックを使ったデモの機能を停止します。
+
+```c
+#define SPLIT_USB_TIMEOUT 2000
+```
+これは、`SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウトを設定します。
+
+```c
+#define SPLIT_USB_TIMEOUT_POLL 10
+```
+これは `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度を設定します
+
+## 追加のリソース(英語)
+
+Nicinabox には Let's Split キーボードのための[非常に優れた詳細なガイド](https://github.com/nicinabox/lets-split-guide)があり、トラブルシューティング情報を含む知っておくべきほとんど全てをカバーします。
+
+ただし、RGB ライトセクションは、RGB Split コードが QMK ファームウェアに追加されるずっと前に書かれたため、古くなっています。ガイドに従う代わりに、各 LED テーブ(訳注: LED strip とも呼びます)を直接コントローラに配線します。
+
+
From 54ef02dead1663ca7ed91c862f97d9fc1a2b5cb7 Mon Sep 17 00:00:00 2001
From: Andrew Kannan
Date: Sat, 13 Jun 2020 03:06:38 -0400
Subject: [PATCH 02/36] Fix project alice indicators (#9342)
---
keyboards/projectkb/alice/alice.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c
index 22e387761594..aacf448bffb4 100644
--- a/keyboards/projectkb/alice/alice.c
+++ b/keyboards/projectkb/alice/alice.c
@@ -8,6 +8,7 @@ void keyboard_pre_init_kb(void) {
keyboard_pre_init_user();
}
+
bool led_update_kb(led_t led_state) {
bool runDefault = led_update_user(led_state);
if (runDefault) {
From 400423d10b53ea9e309e7b014aa4685961f25a4f Mon Sep 17 00:00:00 2001
From: MechMerlin <30334081+mechmerlin@users.noreply.github.com>
Date: Sat, 13 Jun 2020 00:16:07 -0700
Subject: [PATCH 03/36] VIA Support: Noxary 260 (#9349)
* add VIA support to noxary 260
* change the layout macro to be 60_ansi as thats going to be the base VIA layout
* update readme
---
keyboards/noxary/260/keymaps/via/keymap.c | 85 +++++++++++++++++++++++
keyboards/noxary/260/keymaps/via/rules.mk | 2 +
keyboards/noxary/260/readme.md | 6 +-
3 files changed, 90 insertions(+), 3 deletions(-)
create mode 100644 keyboards/noxary/260/keymaps/via/keymap.c
create mode 100644 keyboards/noxary/260/keymaps/via/rules.mk
diff --git a/keyboards/noxary/260/keymaps/via/keymap.c b/keyboards/noxary/260/keymaps/via/keymap.c
new file mode 100644
index 000000000000..4177abd154fc
--- /dev/null
+++ b/keyboards/noxary/260/keymaps/via/keymap.c
@@ -0,0 +1,85 @@
+/* Copyright 2020 MechMerlin
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* _BL: Base Layer(Default) - For ISO enter use ANSI enter
+ * ,-----------------------------------------------------------.
+ * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc|
+ * |-----------------------------------------------------------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
+ * |-----------------------------------------------------------|
+ * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|
+ * |-----------------------------------------------------------|
+ * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift |Del|
+ * |-----------------------------------------------------------|
+ * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl |
+ * `-----------------------------------------------------------'
+ */
+ [0] = LAYOUT_60_ansi(
+ KC_ESC, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_RGUI, MO(1), KC_RCTL),
+ /* _FL1: Function Layer 1 - For ISO enter use ANSI enter
+ * ,----------------------------------------------------------------.
+ * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| |
+ * |----------------------------------------------------------------|
+ * | | | | |RST| | | | | | | | | | Ins|
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | | | | | | |Home|
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End|
+ * |----------------------------------------------------------------|
+ * | | | | BL_Toggle | | | | |Vol-| |
+ * `----------------------------------------------------------------'
+ */
+ [1] = LAYOUT_60_ansi(
+ KC_GRV, 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_VOLU, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE,
+ _______, _______, _______, BL_TOGG, _______, _______, _______, _______),
+ /* _FL2: Function Layer 2 - For ISO enter use ANSI enter
+ * ,----------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | | |
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | |
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | |
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | |
+ * |----------------------------------------------------------------|
+ * | | | | | | | | | | |
+ * `----------------------------------------------------------------'
+ */
+ [2] = LAYOUT_60_ansi(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______),
+
+ [3] = LAYOUT_60_ansi(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______),
+};
+
diff --git a/keyboards/noxary/260/keymaps/via/rules.mk b/keyboards/noxary/260/keymaps/via/rules.mk
new file mode 100644
index 000000000000..36b7ba9cbc98
--- /dev/null
+++ b/keyboards/noxary/260/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/noxary/260/readme.md b/keyboards/noxary/260/readme.md
index 48cbbbf22970..80b9f8e5150a 100644
--- a/keyboards/noxary/260/readme.md
+++ b/keyboards/noxary/260/readme.md
@@ -4,9 +4,9 @@ Noxary 260
A fully customizable 60% keyboard.
-Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
-Hardware Supported: Noxary 260 PCB
-Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93572.0)
+* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
+* Hardware Supported: Noxary 260 PCB
+* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93572.0)
Make example for this keyboard (after setting up your build environment):
From 1f42071238c57aff1ec2d441fe82ae2df4a0853f Mon Sep 17 00:00:00 2001
From: mcarni
Date: Sat, 13 Jun 2020 09:29:22 +0200
Subject: [PATCH 04/36] dz60 iso split - cleaned up the readme and replaced
normal key with numpad key on numpad layer (#9339)
* README cleanup
* replaced "normal" numbers with "keypad" numbers:
KC_P4 replaced by KC_KP_P4
* replaced "normal" keys on Numpad Layer with the "KeyPad" keys
KC_1 replaced by KC_P1 etc.
---
.../dz60/keymaps/iso_split-spacebar/README.md | 123 ++++++++++--------
.../dz60/keymaps/iso_split-spacebar/keymap.c | 33 +++--
2 files changed, 95 insertions(+), 61 deletions(-)
diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/README.md b/keyboards/dz60/keymaps/iso_split-spacebar/README.md
index 7d96f2225fac..2600d2271574 100644
--- a/keyboards/dz60/keymaps/iso_split-spacebar/README.md
+++ b/keyboards/dz60/keymaps/iso_split-spacebar/README.md
@@ -1,69 +1,86 @@
-# iso layout with a split spacebar
+# ISO layout with a split spacebar
-i needed to have an ISO layout
-and i wanted to have a split spacebar
-i couldn't find anything ready so i cobbled this together
+I needed to have an ISO layout
+and I wanted to have a split spacebar
+I couldn't find anything ready
+so i cobbled this together
----- Layer 0 - BL
-this is basically the standard iso layout with the addition of the split spacebar
+## Layer 0 - BL
+
+standard ISO layout with the addition of the split spacebar
menu key (KC_APP) is used to move to the next layer
the key in between the two spacebars is the function key
- *,-----------------------------------------------------------.
- *| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |
- *|-----------------------------------------------------------|
- *| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter|
- *|------------------------------------------------------ |
- *| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | |
- *|-----------------------------------------------------------|
- *|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift |
- *|-----------------------------------------------------------|
- *|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl |
- *`-----------------------------------------------------------'
----- Layer 1 - FL
+```
+,-----------------------------------------------------------.
+| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |
+|-----------------------------------------------------------|
+| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter|
+|------------------------------------------------------ |
+| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | |
+|-----------------------------------------------------------|
+|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift |
+|-----------------------------------------------------------|
+|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl |
+`-----------------------------------------------------------'
+```
+
+## Layer 1 - FL
+
quite standard function layer
arrow keys and mouse movement/buttons on the home row
- *,-----------------------------------------------------------.
- *|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL |
- *|-----------------------------------------------------------|
- *| | | | | | | | | | |prt| | | |
- *|------------------------------------------------------ |
- *| |m l|m d|m u|m r| | | l | d | u | r | | | |
- *|-----------------------------------------------------------|
- *| | | | | |mb1|mb2| |hm |pgd|pgu|end| |
- *|-----------------------------------------------------------|
- *| | | | | | | | | | |
- *`-----------------------------------------------------------'
----- Layer 2 - NL
+```
+,-----------------------------------------------------------.
+|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL |
+|-----------------------------------------------------------|
+| | | | | | | | | | |prt| | | |
+|------------------------------------------------------ |
+| |m l|m d|m u|m r| | | l | d | u | r | | | |
+|-----------------------------------------------------------|
+| | | | | |mb1|mb2| |hm |pgd|pgu|end| |
+|-----------------------------------------------------------|
+| | | | | | | | | | |
+`-----------------------------------------------------------'
+```
+
+## Layer 2 - NL
+
numbers numbers numbers...
first key (top left) to return to BL
menu key (KC_APP) is used to move to the next layer
- *,-----------------------------------------------------------.
- *|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | |
- *|-----------------------------------------------------------|
- *| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | |
- *|------------------------------------------------------ |
- *| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | |
- *|-----------------------------------------------------------|
- *| | | 0 | , | . | = | | | 0 | , | . | = | |
- *|-----------------------------------------------------------|
- *| | | | | | | | | RL | |
- *`-----------------------------------------------------------'
+
+```
+,-----------------------------------------------------------.
+|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | |
+|-----------------------------------------------------------|
+| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | |
+|------------------------------------------------------ |
+| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | |
+|-----------------------------------------------------------|
+| | | 0 | , | . | = | | | 0 | , | . | = | |
+|-----------------------------------------------------------|
+| | | | | | | | | RL | |
+`-----------------------------------------------------------'
+```
----- Layer 3 - BL
+## Layer 3 - BL
+
all the fancy lights
and useful reset button (top right)
- *,-----------------------------------------------------------.
- *|BL | | | | | | | | | | | | |Reset |
- *|-----------------------------------------------------------|
- *| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | |
- *|------------------------------------------------------ |
- *| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | |
- *|-----------------------------------------------------------|
- *| | |bd |bt |bi |bs | | | | | | | |
- *|-----------------------------------------------------------|
- *| | | | | | | | | BL | |
- *`-----------------------------------------------------------'
+
+```
+,-----------------------------------------------------------.
+|BL | | | | | | | | | | | | |Reset |
+|-----------------------------------------------------------|
+| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | |
+|------------------------------------------------------ |
+| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | |
+|-----------------------------------------------------------|
+| | |bd |bt |bi |bs | | | | | | | |
+|-----------------------------------------------------------|
+| | | | | | | | | BL | |
+`-----------------------------------------------------------'
+```
diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c
index a54c06f55783..a9e811f9a411 100644
--- a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c
+++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c
@@ -112,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[NL] = LAYOUT_60_iso_split(
- // 1 2 3 4 5 6 7 8 9 10 11 12 13 14
- TG(NL), 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_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______,
- _______, KC_7, KC_8, KC_9, KC_PPLS, KC_PMNS, _______, KC_1, KC_2, KC_3, KC_PPLS, KC_PMNS, _______, _______,
- _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______,
- _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______),
+ // 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+ TG(NL), KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS, KC_PMNS, _______,
+ _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______,
+ _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, _______, _______,
+ _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, KC_PSLS, KC_PMNS, _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, _______,
+ _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______),
/* Keymap RL: RGB Layer
*
@@ -150,6 +150,23 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
+// always enable num lock on layer NL and disable on other layers
+// thanks to spidey3 & Erovia on discord
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (get_highest_layer(state)) {
+ case NL:
+ if (!host_keyboard_led_state().num_lock) {
+ tap_code16(KC_NLCK);
+ }
+ break;
+ default: // for any other layers, or the default layer
+ if (host_keyboard_led_state().num_lock) {
+ tap_code16(KC_NLCK);
+ }
+ break;
+ }
+ return state;
+}
// layer-activated RGB underglow
@@ -172,11 +189,11 @@ void matrix_scan_user(void) {
break;
case NL:
RGB_NL_MODE;
- // RGB_NL_LIGHT;
+ RGB_NL_LIGHT;
break;
case RL:
RGB_RL_MODE;
- // RGB_RL_LIGHT;
+ RGB_RL_LIGHT;
break;
}
From 2bfcb6bfc5766ede2b63041af3a163408caa6ad9 Mon Sep 17 00:00:00 2001
From: Gautham Yerroju
Date: Sat, 13 Jun 2020 01:18:33 -0700
Subject: [PATCH 05/36] [Keymap] Add custom corne keymap (#9283)
* Add custom corne keymap
* Clean up rules.mk
* Clean up base layer on keymap.c
* Clean up lower layer on keymap.c
* Clean up raise layer on keymap.c
* Clean up adjust layer in keymap.c
---
keyboards/crkbd/keymaps/gotham/README.md | 16 ++
keyboards/crkbd/keymaps/gotham/config.h | 88 +++++++
keyboards/crkbd/keymaps/gotham/glcdfont.c | 18 ++
keyboards/crkbd/keymaps/gotham/keycodes.h | 28 +++
keyboards/crkbd/keymaps/gotham/keymap.c | 143 ++++++++++++
keyboards/crkbd/keymaps/gotham/oled.c | 265 ++++++++++++++++++++++
keyboards/crkbd/keymaps/gotham/rgb.c | 79 +++++++
keyboards/crkbd/keymaps/gotham/rules.mk | 6 +
8 files changed, 643 insertions(+)
create mode 100644 keyboards/crkbd/keymaps/gotham/README.md
create mode 100644 keyboards/crkbd/keymaps/gotham/config.h
create mode 100644 keyboards/crkbd/keymaps/gotham/glcdfont.c
create mode 100644 keyboards/crkbd/keymaps/gotham/keycodes.h
create mode 100644 keyboards/crkbd/keymaps/gotham/keymap.c
create mode 100644 keyboards/crkbd/keymaps/gotham/oled.c
create mode 100644 keyboards/crkbd/keymaps/gotham/rgb.c
create mode 100644 keyboards/crkbd/keymaps/gotham/rules.mk
diff --git a/keyboards/crkbd/keymaps/gotham/README.md b/keyboards/crkbd/keymaps/gotham/README.md
new file mode 100644
index 000000000000..23c1d4fdd81f
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/README.md
@@ -0,0 +1,16 @@
+# Gotham's custom CRKBD Layout
+
+My take on the 40% layout with programming in mind. Do read about the layers, it helps with forming a mental model to remember the keymap better than just memorization.
+
+## Layers
+- QWERTY: Base layer. The idea is to reduce thumb movement by placing commonly used keys and layers on resting thumb positions (center thumb keys). You might need to play around with TAPPING_TERM to find your perfect setting. Also, both Lower and Raise buttons appear on both halves for easy access (think of it as: middle thumb key is Lower, outer thumb key is Raise).
+- LOWER: Numbers, common symbols and navigation. Easiest layer to reach (middle thumb button on both halves). The nav is shaped as a T instead of an inverted T for a few reasons. First, Left and Right needed to be on the home row (since I use them a lot to navigate through code). But the Up key can't be on the top row because numbers occupy that space. So I moved the Up and Down keys one key down. It takes some getting used to, but I find this a great balance without separating the nav and number rows. The nav cluster also contains Home and End keys below Left and Right, making it a breeze to navigate through code.
+- RAISE: All symbols are here, arranged in a way that can be (kind of) deduced more by logic and less by memory. On the left hand, the first 2 cols contain the symbols for shifted numbers 1-6, with ! and @ in the home row instead of the top row. Think of the 3 rows as symbols for 3 and 4, 1 and 2, 5 and 6). The next 2 cols contain common brackets. On the right hand is everything else. Note that -, _ and = are close to the home row because of how common they are in code. Operators (&, | and !) are on the top row for convinience. Just try and remember where +, *, < and > located. Admitedlly, the locations for these symbols could use improvement.
+- ADJUST: Contains settings and Function keys. This is placed on the bottom-right corner (triggerred by the pinky), since the thumb keys already have multiple uses.
+
+## Custom OLED
+This keymap includes custom OLED font and code. The font contains some logos and status indidcators for some of the features I use (RGB and Audio). Enable OLED in rukes.mk to check it out. Feel free to reuse the font or parts of it.
+__KNOWN BUG:__ When the computer sleeps, one of the OLEDs is always on (they don't turn off on their own, and the timeout doesn't work). I haven't been able to figure out what's going on there and am open to suggestions/PRs.
+
+## Flashing
+Flash using `make crkbd:gotham:avrdude` for Pro Micro and `make crkbd:gotham:dfu` for Elite-C.
diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h
new file mode 100644
index 000000000000..ed08203aa156
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/config.h
@@ -0,0 +1,88 @@
+#pragma once
+
+#define EE_HANDS
+#define SPLIT_USB_DETECT
+
+#undef USE_I2C
+#undef SSD1306OLED
+
+#define USE_SERIAL_PD2
+
+#define IGNORE_MOD_TAP_INTERRUPT
+#define PERMISSIVE_HOLD
+#define TAPPING_TERM 250
+
+#define NO_ACTION_ONESHOT
+
+#ifdef AUDIO_ENABLE
+# define B5_AUDIO
+# define NO_MUSIC_MODE
+# define AUDIO_CLICKY
+#endif
+
+#define OLED_FONT_H "keyboards/crkbd/keymaps/gotham/glcdfont.c"
+
+#define RGBLIGHT_SLEEP
+
+#ifdef RGBLIGHT_ENABLE
+# undef RGBLED_NUM
+# define RGBLED_NUM 6
+# define RGBLIGHT_LIMIT_VAL 150
+# define RGBLIGHT_HUE_STEP 16
+# define RGBLIGHT_SAT_STEP 32
+# define RGBLIGHT_VAL_STEP 32
+
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_KNIGHT
+#endif
+
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_HUE_STEP 32
+# define RGB_MATRIX_SAT_STEP 64
+# define RGB_MATRIX_VAL_STEP 64
+# define RGB_MATRIX_SPD_STEP 20
+# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
+
+/* Disable the animations you don't want/need. You will need to disable a good number of these *
+ * because they take up a lot of space. Disable until you can successfully compile your firmware. */
+# define DISABLE_RGB_MATRIX_ALPHAS_MODS
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_BREATHING
+# define DISABLE_RGB_MATRIX_BAND_SAT
+# define DISABLE_RGB_MATRIX_BAND_VAL
+# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+// #define DISABLE_RGB_MATRIX_CYCLE_ALL
+# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
+# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+# define DISABLE_RGB_MATRIX_DUAL_BEACON
+# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
+# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+# define DISABLE_RGB_MATRIX_RAINDROPS
+# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+# define DISABLE_RGB_MATRIX_TYPING_HEATMAP
+# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+// #define DISABLE_RGB_MATRIX_SPLASH
+# define DISABLE_RGB_MATRIX_MULTISPLASH
+# define DISABLE_RGB_MATRIX_SOLID_SPLASH
+# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#endif
diff --git a/keyboards/crkbd/keymaps/gotham/glcdfont.c b/keyboards/crkbd/keymaps/gotham/glcdfont.c
new file mode 100644
index 000000000000..656b13974a3f
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/glcdfont.c
@@ -0,0 +1,18 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+// https://helixfonteditor.netlify.com/
+
+#include "progmem.h"
+
+// Standard ASCII 5x7 font
+const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, 0x06, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0xC3, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x1C, 0x22, 0x41, 0x41, 0x41, 0x22, 0x1C, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xF8, 0x0C, 0x04, 0xE7, 0xE4, 0xE4, 0x07, 0x04, 0xE4, 0xE7, 0xE4, 0x04, 0x07, 0xE4, 0xE4, 0xE7, 0x04, 0x0C, 0xF8, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x77, 0x77, 0x77, 0x00, 0x77, 0x77,
+ 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x60, 0x70, 0x3E, 0x1F, 0x19, 0x18, 0x0C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0C, 0x06, 0x07, 0xFC, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x80, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x1C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x1C, 0x22, 0x00, 0x00, 0x1C, 0x3E, 0x7F, 0x63, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0xFF, 0x00, 0x00, 0x0F, 0x1F, 0x3F, 0x38, 0x30, 0xFF, 0xFF, 0xFF, 0x30, 0x38, 0x3F, 0x1F, 0x0F, 0x00, 0x00, 0xFF, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, 0x00, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x00, 0x00, 0x00, 0xF0, 0x90, 0x90, 0xF0, 0x90, 0x90, 0xF0, 0x98, 0x9C, 0xF2, 0x22, 0x21, 0xE1, 0x01, 0x01, 0x01, 0xF1, 0x91, 0x91, 0xFA, 0x4C, 0x4C, 0xF8, 0x48, 0x48, 0xF8, 0x48, 0x48, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x18, 0x30, 0x21, 0x21, 0x31, 0x18, 0x10, 0x30, 0x20, 0x60, 0x41, 0x60, 0x20, 0x30, 0x18, 0x30, 0x60, 0x40, 0x40, 0x47, 0x4C, 0x48, 0x68, 0x38, 0x1C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x63, 0x7F, 0x3E, 0x1C,
+ 0x00, 0x00, 0x22, 0x1C, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0F, 0x18, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x13, 0x73, 0x13, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x18, 0x0F, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, 0x08, 0x0C, 0x7E, 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x0F, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
diff --git a/keyboards/crkbd/keymaps/gotham/keycodes.h b/keyboards/crkbd/keymaps/gotham/keycodes.h
new file mode 100644
index 000000000000..9ba44c54a7cb
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/keycodes.h
@@ -0,0 +1,28 @@
+#pragma once
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, ADJUST, RGBRST };
+
+#define SFT_EQ MT(MOD_LSFT, KC_EQL)
+#define SFT_QT MT(MOD_RSFT, KC_QUOT)
+
+#define SFT_A MT(MOD_LSFT, KC_A)
+#define CTL_Z MT(MOD_LCTL, KC_Z)
+
+#define SFT_SCLN MT(MOD_RSFT, KC_SCLN)
+#define CTL_SLSH MT(MOD_RCTL, KC_SLSH)
+
+#define LOW_SPC LT(_LOWER, KC_SPC)
+#define RAI_EQ LT(_RAISE, KC_EQL)
+#define RAI_ENT LT(_RAISE, KC_ENT)
+#define LOW_BSP LT(_LOWER, KC_BSPC)
+#define LOW_DEL LT(_LOWER, KC_DEL)
+#define ADJ_GRV LT(_ADJUST, KC_GRV)
+#define KC_ANGL LSFT(KC_COMM)
+#define KC_ANGR LSFT(KC_DOT)
diff --git a/keyboards/crkbd/keymaps/gotham/keymap.c b/keyboards/crkbd/keymaps/gotham/keymap.c
new file mode 100644
index 000000000000..6657f21ee9d4
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/keymap.c
@@ -0,0 +1,143 @@
+#include QMK_KEYBOARD_H
+#include "keycodes.h"
+
+#ifdef OLED_DRIVER_ENABLE
+# include "oled.c"
+#endif
+
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+# include "rgb.c"
+#endif
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT(
+ //|-----------------------------------------------------| |-----------------------------------------------------|
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ SFT_EQ, SFT_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_SCLN,SFT_QT,
+ //---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LCTL, CTL_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLSH,ADJ_GRV,
+ //---------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ KC_LALT, LOW_SPC, RAI_EQ, RAI_ENT, LOW_BSP, KC_LGUI
+ //|--------------------------| |--------------------------|
+
+
+ ),
+
+ [_LOWER] = LAYOUT(
+ //|-----------------------------------------------------| |-----------------------------------------------------|
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, KC_ANGL, KC_ANGR, KC_LPRN, KC_RPRN, KC_PGUP, KC_MINS, KC_LEFT, KC_UP, KC_RIGHT,KC_PLUS, _______,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_PGDOWN, KC_UNDS, KC_HOME, KC_DOWN, KC_END, XXXXXXX, _______,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ _______, _______, _______, _______, LOW_DEL, _______
+ //|--------------------------| |--------------------------|
+ ),
+
+ [_RAISE] = LAYOUT(
+ //|-----------------------------------------------------| |-----------------------------------------------------|
+ KC_ESC, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, KC_AMPR, KC_PIPE, KC_EXLM, KC_ASTR, XXXXXXX,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_UNDS, KC_EQL, KC_ANGL, KC_ANGR, XXXXXXX,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_PLUS, XXXXXXX, KC_BSLS, _______,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ _______, _______, _______, _______, _______, _______
+ //|--------------------------| |--------------------------|
+ ),
+
+ [_ADJUST] = LAYOUT(
+ //|-----------------------------------------------------| |-----------------------------------------------------|
+ XXXXXXX, CK_RST, CK_DOWN, CK_UP, CK_TOGG, RGB_TOG, MU_TOG, KC_F12, KC_F7, KC_F8, KC_F9, XXXXXXX,\
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, MU_MOD, KC_F11, KC_F4, KC_F5, KC_F6, RESET, \
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGBRST, AU_TOG, KC_F10, KC_F1, KC_F2, KC_F3, _______,\
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ _______, _______, _______, _______, KC_VOLD, KC_VOLU \
+ //|--------------------------| |--------------------------|
+ )
+};
+// clang-format off
+
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+layer_state_t layer_state_set_user(layer_state_t state) {
+ /* For any layer other than default, save current RGB state and switch to layer-based RGB */
+ if (layer_state_cmp(state, 0)) {
+ restore_rgb_config();
+ } else {
+ uint8_t layer = get_highest_layer(state);
+ if (layer_state_cmp(layer_state, 0)) save_rgb_config();
+ rgb_by_layer(layer);
+ }
+ return state;
+}
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+#ifdef OLED_DRIVER_ENABLE
+ if (record->event.pressed) {
+ oled_timer = timer_read();
+ add_keylog(keycode);
+ }
+#endif
+
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ case RGB_MOD:
+ case RGB_TOG:
+ case RGB_HUI:
+ case RGB_HUD:
+ case RGB_SAI:
+ case RGB_SAD:
+ case RGB_VAI:
+ case RGB_VAD:
+ case RGB_SPI:
+ case RGB_SPD:
+ /* Override layer-based RGB and resume RGB effect to be able to preview changes */
+ if (record->event.pressed) {
+ restore_rgb_config();
+ process_rgb(keycode, record);
+ save_rgb_config();
+ }
+ return false;
+ case RGBRST:
+ if (record->event.pressed) {
+# ifdef RGBLIGHT_ENABLE
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+# elif RGB_MATRIX_ENABLE
+ eeconfig_update_rgb_matrix_default();
+ rgb_matrix_enable();
+# endif
+ save_rgb_config();
+ }
+ return false;
+#endif
+ }
+ return true;
+}
diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c
new file mode 100644
index 000000000000..ac6f236fc6b9
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/oled.c
@@ -0,0 +1,265 @@
+#pragma once
+
+extern uint8_t is_master;
+
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+# include "rgb.c"
+#endif
+
+#ifdef AUDIO_ENABLE
+extern audio_config_t audio_config;
+#endif
+
+// 5x3 Logos
+
+void render_corne_logo(void) {
+ static const char PROGMEM font_logo[16] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0};
+ oled_write_P(font_logo, false);
+};
+
+void render_qmk_logo(void) {
+ static const char PROGMEM font_qmk_logo[16] = {0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0};
+ oled_write_P(font_qmk_logo, false);
+};
+
+// 5x2 Keyboard, Controller logos
+
+void render_keyboard(void) {
+ static const char PROGMEM font_keyboard[11] = {0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0};
+ oled_write_P(font_keyboard, false);
+};
+
+void render_kb_split(void) {
+ static const char PROGMEM font_kb_split[11] = {0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0};
+ oled_write_P(font_kb_split, false);
+};
+
+// 5x1 Layer indicator
+
+void render_layer(void) {
+ static const char PROGMEM font_layer[4][6] = {
+ {0x85, 0x86, 0x87, 0x88, 0x89, 0},
+ {0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0},
+ {0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0},
+ {0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0},
+ };
+ uint8_t layer = 0;
+ if (layer_state_is(_LOWER)) {
+ layer = 1;
+ } else if (layer_state_is(_RAISE)) {
+ layer = 2;
+ } else if (layer_state_is(_ADJUST)) {
+ layer = 3;
+ }
+ oled_write_P(font_layer[layer], false);
+};
+
+ // 2x1 Audio, clicky and RGB status indicators
+
+#ifdef AUDIO_ENABLE
+void render_audio_status(void) {
+ static const char PROGMEM font_audio_off[3] = {0x8f, 0x90, 0};
+ static const char PROGMEM font_audio_on[3] = {0x91, 0x92, 0};
+ oled_write_P(audio_config.enable ? font_audio_on : font_audio_off, false);
+};
+
+void render_clicky_status(void) {
+ static const char PROGMEM font_clicky_off[3] = {0xaf, 0xb0, 0};
+ static const char PROGMEM font_clicky_on[3] = {0xb1, 0xb2, 0};
+ oled_write_P(audio_config.clicky_enable ? font_clicky_on : font_clicky_off, false);
+};
+#endif
+
+#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
+void render_rgb_status(void) {
+ static const char PROGMEM font_rgb_off[3] = {0xcf, 0xd0, 0};
+ static const char PROGMEM font_rgb_on[3] = {0xd1, 0xd2, 0};
+# ifdef RGBLIGHT_ENABLE
+ bool rgb_enabled = rgblight_config.enable;
+# elif RGB_MATRIX_ENABLE
+ bool rgb_enabled = rgb_matrix_config.enable;
+# endif
+ oled_write_P(rgb_enabled ? font_rgb_on : font_rgb_off, false);
+};
+#endif
+
+// 2x1 Ctrl, Alt, Shift, GUI, Mouse
+
+void render_mod_ctrl(void) {
+ static const char PROGMEM font_ctrl[3] = {0x93, 0x94, 0};
+ oled_write_P(font_ctrl, false);
+};
+
+void render_mod_alt(void) {
+ static const char PROGMEM font_alt[3] = {0xb3, 0xb4, 0};
+ oled_write_P(font_alt, false);
+};
+
+void render_mod_shift(void) {
+ static const char PROGMEM font_shift[3] = {0xd3, 0xd4, 0};
+ oled_write_P(font_shift, false);
+};
+
+void render_mod_gui(void) {
+ static const char PROGMEM font_gui[3] = {0x95, 0x96, 0};
+ oled_write_P(font_gui, false);
+};
+
+#ifdef MOUSEKEY_ENABLE
+void render_mod_mouse(void) {
+ static const char PROGMEM font_mouse[3] = {0x97, 0x98, 0};
+ oled_write_P(font_mouse, false);
+};
+#endif
+
+// 5x2 Mod and feature indicator clusters
+
+void render_mod_status(void) {
+#ifdef NO_ACTION_ONESHOT
+ uint8_t modifiers = get_mods();
+#else
+ uint8_t modifiers = get_mods() | get_oneshot_mods();
+#endif
+
+ (modifiers & MOD_MASK_CTRL) ? render_mod_ctrl() : oled_write_P(PSTR(" "), false);
+ oled_write_P(PSTR(" "), false);
+ (modifiers & MOD_MASK_SHIFT) ? render_mod_shift() : oled_write_P(PSTR(" "), false);
+
+ (modifiers & MOD_MASK_ALT) ? render_mod_alt() : oled_write_P(PSTR(" "), false);
+ oled_write_P(PSTR(" "), false);
+ (modifiers & MOD_MASK_GUI) ? render_mod_gui() : oled_write_P(PSTR(" "), false);
+}
+
+void render_feature_status(void) {
+#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
+ render_rgb_status();
+#endif
+
+#ifdef AUDIO_ENABLE
+ oled_write_P(PSTR(" "), false);
+ render_audio_status();
+#endif
+};
+
+// Keylogger
+#define KEYLOGGER_LENGTH 5
+static uint16_t oled_timer = 0;
+static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
+// clang-format off
+static const char PROGMEM code_to_name[0xFF] = {
+// 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
+ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
+ '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
+ ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
+ ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
+ 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
+};
+
+void add_keylog(uint16_t keycode) {
+ if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
+ keycode = keycode & 0xFF;
+ } else if (keycode > 0xFF) {
+ keycode = 0;
+ }
+
+ for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
+ keylog_str[i] = keylog_str[i - 1];
+ }
+
+ if (keycode < (sizeof(code_to_name) / sizeof(char))) {
+ keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
+ }
+}
+
+void render_keylogger_status(void) {
+ oled_write(keylog_str, false);
+}
+
+void render_prompt(void) {
+ bool blink = (timer_read() % 1000) < 500;
+
+ if (layer_state_is(_LOWER)) {
+ oled_write_ln_P(blink ? PSTR("> lo_") : PSTR("> lo "), false);
+ } else if (layer_state_is(_RAISE)) {
+ oled_write_ln_P(blink ? PSTR("> hi_") : PSTR("> hi "), false);
+ } else if (layer_state_is(_ADJUST)) {
+ oled_write_ln_P(blink ? PSTR("> aj_") : PSTR("> aj "), false);
+ } else {
+ oled_write_ln_P(blink ? PSTR("> _ ") : PSTR("> "), false);
+ }
+};
+
+void render_status_secondary(void) {
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ render_kb_split();
+
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ render_layer();
+
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) || defined(AUDIO_ENABLE)
+ layer_state_is(_ADJUST) ? render_feature_status() : render_mod_status();
+ #else
+ render_mod_status();
+ #endif
+};
+
+void render_status_main(void) {
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ render_corne_logo();
+
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ render_qmk_logo();
+
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+ oled_write_ln("", false);
+
+ render_prompt();
+}
+
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ return OLED_ROTATION_270;
+}
+
+void oled_task_user(void) {
+ if (timer_elapsed(oled_timer) > 10000) {
+ oled_off();
+ return;
+ }
+ #ifndef SPLIT_KEYBOARD
+ else {
+ oled_on();
+ }
+ #endif
+
+ if (is_master) {
+ render_status_main();
+ } else {
+ render_status_secondary();
+ }
+}
diff --git a/keyboards/crkbd/keymaps/gotham/rgb.c b/keyboards/crkbd/keymaps/gotham/rgb.c
new file mode 100644
index 000000000000..9f66428836dc
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/rgb.c
@@ -0,0 +1,79 @@
+#pragma once
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+rgblight_config_t RGB_current_config;
+#endif
+
+#ifdef RGB_MATRIX_ENABLE
+extern rgb_config_t rgb_matrix_config;
+rgb_config_t RGB_current_config;
+#endif
+
+void save_rgb_config(void) {
+#ifdef RGBLIGHT_ENABLE
+ RGB_current_config.enable = rgblight_config.enable;
+ RGB_current_config.mode = rgblight_get_mode();
+ RGB_current_config.speed = rgblight_get_speed();
+ RGB_current_config.hue = rgblight_get_hue();
+ RGB_current_config.sat = rgblight_get_sat();
+ RGB_current_config.val = rgblight_get_val();
+#elif RGB_MATRIX_ENABLE
+ RGB_current_config.enable = rgb_matrix_config.enable;
+ RGB_current_config.mode = rgb_matrix_get_mode();
+ RGB_current_config.speed = rgb_matrix_config.speed;
+ RGB_current_config.hsv = rgb_matrix_config.hsv;
+#endif
+}
+
+void restore_rgb_config(void) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_set_speed_noeeprom(RGB_current_config.speed);
+ if (rgblight_config.mode != RGB_current_config.mode) {
+ rgblight_mode_noeeprom(RGB_current_config.mode);
+ }
+ if ((RGB_current_config.hue != rgblight_config.hue) || (RGB_current_config.sat != rgblight_config.sat) || (RGB_current_config.val != rgblight_config.val)) {
+ rgblight_sethsv_noeeprom(RGB_current_config.hue, RGB_current_config.sat, RGB_current_config.val);
+ }
+ if (rgblight_config.enable) {
+ rgblight_enable_noeeprom();
+ } else {
+ rgblight_disable_noeeprom();
+ }
+#elif RGB_MATRIX_ENABLE
+ rgb_matrix_config.speed = RGB_current_config.speed;
+ if (rgb_matrix_config.mode != RGB_current_config.mode) {
+ rgb_matrix_mode_noeeprom(RGB_current_config.mode);
+ }
+ if ((RGB_current_config.hsv.h != rgb_matrix_config.hsv.h) || (RGB_current_config.hsv.s != rgb_matrix_config.hsv.s) || (RGB_current_config.hsv.v != rgb_matrix_config.hsv.v)) {
+ rgb_matrix_sethsv_noeeprom(RGB_current_config.hsv.h, RGB_current_config.hsv.s, RGB_current_config.hsv.v);
+ }
+ if (rgb_matrix_config.enable) {
+ rgb_matrix_enable_noeeprom();
+ } else {
+ rgb_matrix_disable_noeeprom();
+ }
+#endif
+}
+
+void rgb_by_layer(int layer) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+#elif RGB_MATRIX_ENABLE
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+#endif
+
+ switch (layer) {
+ case _ADJUST:
+ rgblight_sethsv_noeeprom(9, 255, 255);
+ break;
+ case _RAISE:
+ rgblight_sethsv_noeeprom(HSV_CYAN);
+ break;
+ case _LOWER:
+ rgblight_sethsv_noeeprom(HSV_MAGENTA);
+ break;
+ default:
+ rgblight_sethsv_noeeprom(HSV_RED);
+ }
+}
diff --git a/keyboards/crkbd/keymaps/gotham/rules.mk b/keyboards/crkbd/keymaps/gotham/rules.mk
new file mode 100644
index 000000000000..eaf8f89fd1f0
--- /dev/null
+++ b/keyboards/crkbd/keymaps/gotham/rules.mk
@@ -0,0 +1,6 @@
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes
+AUDIO_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+OLED_DRIVER_ENABLE = yes
+LTO_ENABLE = yes
From 4057d44989e2ee83ca3b171bdb1a29bc9f3ae0cd Mon Sep 17 00:00:00 2001
From: Gautham Yerroju
Date: Sat, 13 Jun 2020 01:24:13 -0700
Subject: [PATCH 06/36] [Keymap] Add Kyria keymap (#9224)
* Add Kyria keymap
* clean split hand detection code
* rename "joystick" to "thumbstick"
* thumbstick overhaul
* removed angle correction, seems buggy
* save some memory
* Remove deprecated config option
* Use the correct types for getting host led states
* Fix include path
* Made .h files for encoder and oled code
* Increase speed cap on thumbstick
---
keyboards/kyria/keymaps/gotham/README.md | 56 +++++
keyboards/kyria/keymaps/gotham/config.h | 48 +++++
.../kyria/keymaps/gotham/encoder_utils.c | 94 +++++++++
.../kyria/keymaps/gotham/encoder_utils.h | 37 ++++
keyboards/kyria/keymaps/gotham/keycodes.h | 16 ++
keyboards/kyria/keymaps/gotham/keymap.c | 126 +++++++++++
keyboards/kyria/keymaps/gotham/oled_utils.c | 103 +++++++++
keyboards/kyria/keymaps/gotham/oled_utils.h | 25 +++
keyboards/kyria/keymaps/gotham/rules.mk | 21 ++
keyboards/kyria/keymaps/gotham/thumbstick.c | 195 ++++++++++++++++++
keyboards/kyria/keymaps/gotham/thumbstick.h | 98 +++++++++
11 files changed, 819 insertions(+)
create mode 100644 keyboards/kyria/keymaps/gotham/README.md
create mode 100644 keyboards/kyria/keymaps/gotham/config.h
create mode 100644 keyboards/kyria/keymaps/gotham/encoder_utils.c
create mode 100644 keyboards/kyria/keymaps/gotham/encoder_utils.h
create mode 100644 keyboards/kyria/keymaps/gotham/keycodes.h
create mode 100644 keyboards/kyria/keymaps/gotham/keymap.c
create mode 100644 keyboards/kyria/keymaps/gotham/oled_utils.c
create mode 100644 keyboards/kyria/keymaps/gotham/oled_utils.h
create mode 100644 keyboards/kyria/keymaps/gotham/rules.mk
create mode 100644 keyboards/kyria/keymaps/gotham/thumbstick.c
create mode 100644 keyboards/kyria/keymaps/gotham/thumbstick.h
diff --git a/keyboards/kyria/keymaps/gotham/README.md b/keyboards/kyria/keymaps/gotham/README.md
new file mode 100644
index 000000000000..1598e95a73e4
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/README.md
@@ -0,0 +1,56 @@
+# Gotham's Keymap for [Kyria](https://github.com/splitkb/kyria)
+
+## Keymap
+This is my personal keymap for Kyria with some mods.
+
+More information about the Kyria keyboard can be found [here](https://blog.splitkb.com/blog/introducing-the-kyria)
+
+### Rotary Encoders
+
+Press the encoder on each half to cycle between:
+- Volume
+- Word Nav (Ctrl + Left / Right)
+- Left / Right
+- Up / Down
+- Page Up / Page Down
+
+### OLEDs
+
+Master-side OLED displays dynamic data:
+- Current layer
+- Current mode of each rotary encoder
+- Current mode of thumbstick
+
+Slave-side OLED currently only displays a static content.
+
+### Thumbstick
+
+A PSP 2000 thumbstick is attached to the right half. It will currently only function when the USB cable is connected to the right half. When I figure out how to transfer data between halves using serial link, I will make this work regardless of which side is the master.
+
+#### Thumbstick Configuration
+
+- __THUMBSTICK_ENABLE:__ Enable thumbstick.
+- __THUMBSTICK_PIN_X/Y (mandatory):__ The QMK pins to use for the respective axis. The values are from the [QMK's ADC driver](https://docs.qmk.fm/#/adc_driver). I used F0 and F1, for example.
+- __THUMBSTICK_FLIP_X/Y:__ Mirror the direction of the respective axis. Use to compensate for actual orientation of thumbstick.
+- __THUMBSTICK_DEBUG:__ Print raw and calculated values from analogReadPin to console. Will only work with CONSOLE_ENABLE turned on.
+
+#### Thumbstick Fine-tuning
+
+More tunables are described here. Values like deadzone threshold are hardware-specific. The theoretical range for analog readings is [0, 1023], but emperical readings don't extend the entire range. To find the right values, turn on CONSOLE_ENABLE in rules.mk and THUMBSTICK_DEBUG in config.h to look at the raw values from the pins using hid_listen (or QMK Toolbox).
+
+- __THUMBSTICK_DEAD_ZONE 90:__ Values below this are ignored (deadzone).
+- __THUMBSTICK_FINE_ZONE 180:__ Values below this enable fine movement.
+
+- __THUMBSTICK_MODE :__ One of THUMBSTICK_MODE_MOUSE, THUMBSTICK_MODE_ARROWS and THUMBSTICK_MODE_SCROLL. This is just the default mode, it can be changed by calling ```void thumbstick_mode_cycle(bool reverse)``` within code.
+
+- __THUMBSTICK_SPEED 127:__ Cursor speed in THUMBSTICK_MODE_MOUSE.
+- __THUMBSTICK_FINE_SPEED 64:__ Fine cursor speed in THUMBSTICK_MODE_MOUSE (kicks in when slightly nudging the thumbstick).
+- __THUMBSTICK_SCROLL_SPEED 1:__ Scrolling speed in THUMBSTICK_MODE_SCROLL.
+
+- __THUMBSTICK_EIGHT_AXIS true:__ 8-axis toggle for ARROW and SCROLL modes. Disable to fall back to 4 axes (think D-pads vs analog stick).
+- __THUMBSTICK_AXIS_SEPARATION 0.5f:__ Float value between 0 and 1, used to discretize the circular range into distinct zones for 8-axis. Imagine the top-right quadrant on a graph, and picture the diagonal. This value indicates the angular "distance" from the diagonal to either axis. Moving from the diagonal to each of the axes, this value changes from 0 to 1. So, a value of 0.5 will "sweep" from the center to half-way towards each axis, creating a zone across the diagonal. Smaller values make narrower diagonal zones, and vice versa.
+
+#### Thanks
+
+- @pyrho and u/\_GEIST\_ for the inspiration and initial reference code.
+- @zvecr and @drashna for code review and more pointers.
diff --git a/keyboards/kyria/keymaps/gotham/config.h b/keyboards/kyria/keymaps/gotham/config.h
new file mode 100644
index 000000000000..1b84d996fedd
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/config.h
@@ -0,0 +1,48 @@
+/* Copyright 2019 Thomas Baart
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#define EE_HANDS
+#define IGNORE_MOD_TAP_INTERRUPT
+
+// Fix for Elite C rev3
+#define SPLIT_USB_DETECT
+// Speed up slave half startup
+#define SPLIT_USB_TIMEOUT 1000
+
+#ifdef OLED_DRIVER_ENABLE
+# define OLED_DISPLAY_128X64
+# define OLED_TIMEOUT 10000
+#endif
+
+#ifdef RGBLIGHT_ENABLE
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_KNIGHT
+#endif
+
+#ifdef ENCODER_ENABLE
+# define ENCODER_DIRECTION_FLIP
+# define ENCODER_RESOLUTION 2
+#endif
+
+#ifdef THUMBSTICK_ENABLE
+# define THUMBSTICK_FLIP_X
+# define THUMBSTICK_PIN_X F0
+# define THUMBSTICK_PIN_Y F1
+#endif
diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.c b/keyboards/kyria/keymaps/gotham/encoder_utils.c
new file mode 100644
index 000000000000..1c2962339d32
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/encoder_utils.c
@@ -0,0 +1,94 @@
+#include "encoder_utils.h"
+
+void encoder_utils_init(void) {
+ encoder_left_mode = ENC_MODE_VOLUME;
+ encoder_right_mode = ENC_MODE_LEFT_RIGHT;
+}
+
+void set_encoder_mode(bool left, encoder_mode_t mode) {
+ if (left) {
+ encoder_left_mode = mode;
+ } else {
+ encoder_right_mode = mode;
+ }
+}
+
+encoder_mode_t get_encoder_mode(bool left) {
+ if (left) {
+ return encoder_left_mode;
+ } else {
+ return encoder_right_mode;
+ }
+}
+
+void cycle_encoder_mode(bool left, bool reverse) {
+ encoder_mode_t mode = get_encoder_mode(left);
+ if (reverse) {
+ mode = (mode == 0) ? (_ENC_MODE_LAST - 1) : (mode - 1);
+ } else {
+ mode = (mode == (_ENC_MODE_LAST - 1)) ? 0 : (mode + 1);
+ }
+ set_encoder_mode(left, mode);
+}
+
+void encoder_action_volume(uint8_t clockwise) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+}
+
+void encoder_action_word_nav(uint8_t clockwise) {
+ if (clockwise) {
+ tap_code16(C(KC_RIGHT));
+ } else {
+ tap_code16(C(KC_LEFT));
+ }
+}
+
+void encoder_action_left_right(uint8_t clockwise) {
+ if (clockwise) {
+ tap_code(KC_RIGHT);
+ } else {
+ tap_code(KC_LEFT);
+ }
+}
+
+void encoder_action_up_down(uint8_t clockwise) {
+ if (clockwise) {
+ tap_code(KC_UP);
+ } else {
+ tap_code(KC_DOWN);
+ }
+}
+
+void encoder_action_paging(uint8_t clockwise) {
+ if (clockwise) {
+ tap_code(KC_PGUP);
+ } else {
+ tap_code(KC_PGDN);
+ }
+}
+
+void encoder_action(encoder_mode_t mode, uint8_t clockwise) {
+ switch (mode) {
+ case ENC_MODE_VOLUME:
+ encoder_action_volume(clockwise);
+ break;
+ case ENC_MODE_WORD_NAV:
+ encoder_action_word_nav(clockwise);
+ break;
+ case ENC_MODE_LEFT_RIGHT:
+ encoder_action_left_right(clockwise);
+ break;
+ case ENC_MODE_UP_DOWN:
+ encoder_action_up_down(clockwise);
+ break;
+ case ENC_MODE_PAGING:
+ encoder_action_paging(clockwise);
+ break;
+ default:
+ encoder_action_volume(clockwise);
+ }
+}
diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.h b/keyboards/kyria/keymaps/gotham/encoder_utils.h
new file mode 100644
index 000000000000..60db6c6bd851
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/encoder_utils.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include
+
+#include "quantum.h"
+
+typedef enum {
+ ENC_MODE_VOLUME = 0,
+ ENC_MODE_WORD_NAV,
+ ENC_MODE_LEFT_RIGHT,
+ ENC_MODE_UP_DOWN,
+ ENC_MODE_PAGING,
+ _ENC_MODE_LAST // Do not use, except for looping through enum values
+} encoder_mode_t;
+
+encoder_mode_t encoder_left_mode;
+encoder_mode_t encoder_right_mode;
+
+void encoder_utils_init(void);
+
+void set_encoder_mode(bool left, encoder_mode_t mode);
+
+encoder_mode_t get_encoder_mode(bool left);
+
+void cycle_encoder_mode(bool left, bool reverse);
+
+void encoder_action_volume(uint8_t clockwise);
+
+void encoder_action_word_nav(uint8_t clockwise);
+
+void encoder_action_left_right(uint8_t clockwise);
+
+void encoder_action_up_down(uint8_t clockwise);
+
+void encoder_action_paging(uint8_t clockwise);
+
+void encoder_action(encoder_mode_t mode, uint8_t clockwise);
diff --git a/keyboards/kyria/keymaps/gotham/keycodes.h b/keyboards/kyria/keymaps/gotham/keycodes.h
new file mode 100644
index 000000000000..0730d49250d5
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/keycodes.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "quantum.h"
+
+enum layers { _QWERTY = 0, _LOWER, _RAISE, _ADJUST };
+
+enum custom_keycodes {
+ ENC_MODE_L = SAFE_RANGE,
+ ENC_MODE_R,
+ TMB_MODE,
+};
+
+#define ESC_RAISE LT(_RAISE, KC_ESC)
+#define BSLS_RAISE LT(_RAISE, KC_BSLS)
+#define SFT_QUOT MT(MOD_RSFT, KC_QUOT)
+#define CTL_MINS MT(MOD_RCTL, KC_MINS)
diff --git a/keyboards/kyria/keymaps/gotham/keymap.c b/keyboards/kyria/keymaps/gotham/keymap.c
new file mode 100644
index 000000000000..572ea067ebd2
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/keymap.c
@@ -0,0 +1,126 @@
+/* Copyright 2019 Thomas Baart
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+#include "keycodes.h"
+
+#ifdef ENCODER_ENABLE
+# include "encoder_utils.h"
+#endif
+
+#ifdef OLED_DRIVER_ENABLE
+# include "oled_utils.h"
+#endif
+
+#ifdef THUMBSTICK_ENABLE
+# include "thumbstick.h"
+#endif
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/*
+ * Base Layer: QWERTY
+*/
+ [_QWERTY] = LAYOUT(
+ ESC_RAISE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS_RAISE,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_QUOT,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_NO, TMB_MODE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_MINS,
+ ENC_MODE_L, KC_LALT, LT(_LOWER, KC_SPC), LT(_RAISE, KC_TAB), KC_LSFT, KC_EQL, LT(_RAISE, KC_ENT), LT(_LOWER, KC_BSPC), KC_DEL, ENC_MODE_R
+ ),
+/*
+ * Lower Layer: Symbols, Navigation
+ */
+ [_LOWER] = LAYOUT(
+ _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_PIPE,
+ _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, KC_PGUP, KC_LEFT, KC_UP, KC_RGHT, _______, KC_QUOT,
+ _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_DOWN, KC_END, _______, KC_MINS,
+ _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______
+ ),
+/*
+ * Raise Layer: Number keys, media, more symbols
+ */
+ [_RAISE] = LAYOUT(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_PERC, _______,
+ _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_AMPR, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+/*
+ * Adjust Layer: Function keys, RGB
+ */
+ [_ADJUST] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
+ _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______,
+ _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+// clang-format on
+
+void matrix_init_user(void) {
+#ifdef ENCODER_ENABLE
+ encoder_utils_init();
+#endif
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+#ifdef ENCODER_ENABLE
+ case ENC_MODE_L:
+ if (record->event.pressed) {
+ cycle_encoder_mode(true, false);
+ }
+ break;
+ case ENC_MODE_R:
+ if (record->event.pressed) {
+ cycle_encoder_mode(false, false);
+ }
+ break;
+#endif
+#ifdef THUMBSTICK_ENABLE
+ case TMB_MODE:
+ if (record->event.pressed) {
+ thumbstick_mode_cycle(false);
+ }
+#endif
+ }
+ return true;
+}
+
+#ifdef OLED_DRIVER_ENABLE
+oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
+
+void oled_task_user(void) { render_status(); }
+#endif
+
+#ifdef ENCODER_ENABLE
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ encoder_action(get_encoder_mode(true), clockwise);
+# ifdef OLED_DRIVER_ENABLE
+ oled_on();
+# endif
+ } else if (index == 1) {
+ encoder_action(get_encoder_mode(false), clockwise);
+# ifdef OLED_DRIVER_ENABLE
+ oled_on();
+# endif
+ }
+}
+#endif
diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.c b/keyboards/kyria/keymaps/gotham/oled_utils.c
new file mode 100644
index 000000000000..9d76c974916a
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/oled_utils.c
@@ -0,0 +1,103 @@
+#include "oled_utils.h"
+
+ void render_qmk_logo(void) {
+ static const char PROGMEM qmk_logo[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
+ 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
+ };
+
+ oled_write_P(qmk_logo, false);
+ }
+
+void render_layer(void) {
+ oled_write_P(PSTR("\nLayer: "), false);
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case _LOWER:
+ oled_write_P(PSTR("Lower\n"), false);
+ break;
+ case _RAISE:
+ oled_write_P(PSTR("Raise\n"), false);
+ break;
+ case _ADJUST:
+ oled_write_P(PSTR("Adjust\n"), false);
+ break;
+ default:
+ oled_write_P(PSTR("???\n"), false);
+ }
+}
+
+#ifdef ENCODER_ENABLE
+void render_encoder(encoder_mode_t mode) {
+ switch (mode) {
+ case ENC_MODE_VOLUME:
+ oled_write_P(PSTR("Volume\n"), false);
+ break;
+ case ENC_MODE_WORD_NAV:
+ oled_write_P(PSTR("Word Nav\n"), false);
+ break;
+ case ENC_MODE_LEFT_RIGHT:
+ oled_write_P(PSTR("Left / Right\n"), false);
+ break;
+ case ENC_MODE_UP_DOWN:
+ oled_write_P(PSTR("Up / Down\n"), false);
+ break;
+ case ENC_MODE_PAGING:
+ oled_write_P(PSTR("PgUp / PgDwn\n"), false);
+ break;
+ default:
+ oled_write_P(PSTR("???\n"), false);
+ }
+}
+#endif
+
+#ifdef THUMBSTICK_ENABLE
+void render_thumbstick(thumbstick_mode_t mode) {
+ switch (mode) {
+ case THUMBSTICK_MODE_MOUSE:
+ oled_write_P(PSTR("Mouse"), false);
+ break;
+ case THUMBSTICK_MODE_ARROWS:
+ oled_write_P(PSTR("Arrows"), false);
+ break;
+ case THUMBSTICK_MODE_SCROLL:
+ oled_write_P(PSTR("Scroll"), false);
+ break;
+ default:
+ oled_write_P(PSTR("???\n"), false);
+ }
+}
+#endif
+
+void render_status(void) {
+ if (is_keyboard_master()) {
+ // Host Keyboard Layer Status
+ render_layer();
+#ifdef ENCODER_ENABLE
+ // Encoder state
+ oled_write_P(PSTR("L-Enc: "), false);
+ render_encoder(encoder_left_mode);
+ oled_write_P(PSTR("R-Enc: "), false);
+ render_encoder(encoder_right_mode);
+#endif
+#ifdef THUMBSTICK_ENABLE
+ if (!isLeftHand) {
+ // Thumbstick state
+ oled_write_P(PSTR("Joystick: "), false);
+ render_thumbstick(thumbstick_state.config.mode);
+ }
+#endif
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
+ } else {
+ // QMK Logo and version information
+ render_qmk_logo();
+ oled_write_P(PSTR("\n Kyria v1.0\n"), false);
+ }
+}
diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.h b/keyboards/kyria/keymaps/gotham/oled_utils.h
new file mode 100644
index 000000000000..7e3bf44c82cd
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/oled_utils.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "keycodes.h"
+
+#ifdef ENCODER_ENABLE
+# include "encoder_utils.h"
+#endif
+
+#ifdef THUMBSTICK_ENABLE
+# include "thumbstick.h"
+#endif
+
+void render_kyria_logo(void);
+
+void render_layer(void);
+
+#ifdef ENCODER_ENABLE
+void render_encoder(encoder_mode_t mode);
+#endif
+
+#ifdef THUMBSTICK_ENABLE
+void render_thumbstick(thumbstick_mode_t mode);
+#endif
+
+void render_status(void);
diff --git a/keyboards/kyria/keymaps/gotham/rules.mk b/keyboards/kyria/keymaps/gotham/rules.mk
new file mode 100644
index 000000000000..0bd8badb4d48
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/rules.mk
@@ -0,0 +1,21 @@
+CONSOLE_ENABLE = yes # Console for debug
+ENCODER_ENABLE = yes # ENables the use of one or more encoders
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MOUSEKEY_ENABLE = no # Mouse keys
+OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
+THUMBSTICK_ENABLE = yes # Enables analog thumbstick code
+
+ifeq ($(strip $(ENCODER_ENABLE)), yes)
+ SRC += encoder_utils.c
+endif
+
+ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
+ SRC += oled_utils.c
+endif
+
+ifeq ($(strip $(THUMBSTICK_ENABLE)), yes)
+ POINTING_DEVICE_ENABLE = yes
+ OPT_DEFS += -DTHUMBSTICK_ENABLE
+ SRC += analog.c
+ SRC += thumbstick.c
+endif
diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.c b/keyboards/kyria/keymaps/gotham/thumbstick.c
new file mode 100644
index 000000000000..ec08fb07d4c9
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/thumbstick.c
@@ -0,0 +1,195 @@
+#include "thumbstick.h"
+
+void thumbstick_init(void) {
+ thumbstickTimer = 0;
+ thumbstickScrollTimer = 0;
+
+ thumbstick_state.config.mode = THUMBSTICK_MODE_MOUSE;
+ thumbstick_state.config.deadZone = THUMBSTICK_DEAD_ZONE;
+ thumbstick_state.config.fineZone = THUMBSTICK_FINE_ZONE;
+ thumbstick_state.config.speed = THUMBSTICK_SPEED;
+ thumbstick_state.config.fineSpeed = THUMBSTICK_FINE_SPEED;
+ thumbstick_state.config.axisSeparation = THUMBSTICK_AXIS_SEPARATION;
+ thumbstick_state.config.eightAxis = THUMBSTICK_EIGHT_AXIS;
+
+#if defined THUMBSTICK_DEBUG
+ rawX = 0;
+ rawY = 0;
+ distX = 0;
+ distY = 0;
+ thumbstickLogTimer = 0;
+#endif
+}
+
+// Axis-level wrapper to read raw value, do logging and calculate speed
+int16_t thumbstick_get_component(uint8_t pin) {
+ uint16_t analogValue = analogReadPin(pin);
+ // Compute direction
+ bool directionIsPositive = (analogValue > THUMBSTICK_RANGE_CENTER);
+ // Compute distance from the center
+ uint16_t distance = directionIsPositive ? (analogValue - THUMBSTICK_RANGE_CENTER) : (THUMBSTICK_RANGE_CENTER - analogValue);
+#if defined THUMBSTICK_DEBUG
+ if (pin == THUMBSTICK_PIN_X) {
+ rawX = analogValue;
+ distX = distance;
+ } else {
+ rawY = analogValue;
+ distY = distance;
+ }
+#endif
+ // Compute component (range of [0 to 1023])
+ return directionIsPositive ? distance : -(int16_t)distance;
+}
+
+void thumbstick_mode_set(thumbstick_mode_t mode) { thumbstick_state.config.mode = mode; }
+
+thumbstick_mode_t thumbstick_mode_get(void) { return thumbstick_state.config.mode; }
+
+void thumbstick_mode_cycle(bool reverse) {
+ thumbstick_mode_t mode = thumbstick_mode_get();
+ if (reverse) {
+ mode = (mode == 0) ? (_THUMBSTICK_MODE_LAST - 1) : (mode - 1);
+ } else {
+ mode = (mode == (_THUMBSTICK_MODE_LAST - 1)) ? 0 : (mode + 1);
+ }
+ thumbstick_mode_set(mode);
+}
+
+// Get mouse speed
+int16_t thumbstick_get_mouse_speed(int16_t component) {
+ int16_t maxSpeed;
+ uint16_t distance = abs(component);
+ if (distance > THUMBSTICK_FINE_ZONE) {
+ maxSpeed = THUMBSTICK_SPEED;
+ } else if (distance > THUMBSTICK_DEAD_ZONE) {
+ maxSpeed = THUMBSTICK_FINE_SPEED;
+ } else {
+ return 0;
+ }
+ return (float)maxSpeed * component / THUMBSTICK_RANGE_CENTER;
+}
+
+// Fix direction within one of 8 axes (or 4 if 8-axis is disabled)
+thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis) {
+ thumbstick_direction_t direction;
+ uint16_t absX = abs(vector.x);
+ uint16_t absY = abs(vector.y);
+ uint16_t maxComponent = (absX > absY) ? absX : absY;
+ bool insideDeadZone = (maxComponent <= THUMBSTICK_DEAD_ZONE);
+ bool outsideDiagonalZone = ((abs(absX - absY) / (float)maxComponent) >= axisSeparation);
+ if (insideDeadZone) {
+ direction.up = direction.down = direction.left = direction.right = false;
+ } else {
+ direction.up = (vector.y < 0);
+ direction.down = (vector.y > 0);
+ direction.left = (vector.x < 0);
+ direction.right = (vector.x > 0);
+ // Let only the dominant direction remain under the right conditions
+ if (outsideDiagonalZone || !eightAxis) {
+ if (absX > absY) {
+ direction.up = direction.down = false;
+ } else {
+ direction.left = direction.right = false;
+ }
+ }
+ }
+ return direction;
+}
+
+thumbstick_direction_t scrollDirection; // Declaring global to save stack space
+void thumbstick_process(void) {
+ if (timer_elapsed(thumbstickTimer) > THUMBSTICK_TIMEOUT) {
+ thumbstickTimer = timer_read();
+#ifndef THUMBSTICK_FLIP_X
+ thumbstick_state.vector.x = thumbstick_get_component(THUMBSTICK_PIN_X);
+#else
+ thumbstick_state.vector.x = -thumbstick_get_component(THUMBSTICK_PIN_X);
+#endif
+#ifndef THUMBSTICK_FLIP_Y
+ thumbstick_state.vector.y = thumbstick_get_component(THUMBSTICK_PIN_Y);
+#else
+ thumbstick_state.vector.y = -thumbstick_get_component(THUMBSTICK_PIN_Y);
+#endif
+ switch (thumbstick_state.config.mode) {
+ case THUMBSTICK_MODE_MOUSE:
+ thumbstick_state.report.x = thumbstick_get_mouse_speed(thumbstick_state.vector.x);
+ thumbstick_state.report.y = thumbstick_get_mouse_speed(thumbstick_state.vector.y);
+ break;
+ case THUMBSTICK_MODE_ARROWS:
+ thumbstick_state.direction = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, thumbstick_state.config.eightAxis);
+ break;
+ case THUMBSTICK_MODE_SCROLL:
+ if (timer_elapsed(thumbstickScrollTimer) > THUMBSTICK_SCROLL_TIMEOUT) {
+ thumbstickScrollTimer = timer_read();
+ scrollDirection = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, false);
+ thumbstick_state.report.v = (scrollDirection.up || scrollDirection.down) ? (scrollDirection.up ? THUMBSTICK_SCROLL_SPEED : -THUMBSTICK_SCROLL_SPEED) : 0;
+ thumbstick_state.report.h = (scrollDirection.left || scrollDirection.right) ? (scrollDirection.left ? -THUMBSTICK_SCROLL_SPEED : THUMBSTICK_SCROLL_SPEED) : 0;
+ } else {
+ thumbstick_state.report.v = thumbstick_state.report.h = 0;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void update_keycode_status(uint16_t keycode, bool last, bool current) {
+ if (last != current) {
+ if (current) {
+ register_code16(keycode);
+ } else {
+ unregister_code16(keycode);
+ }
+ }
+}
+
+void pointing_device_init(void) { thumbstick_init(); }
+
+void pointing_device_task(void) {
+ report_mouse_t report = pointing_device_get_report();
+
+ if (!isLeftHand) {
+ thumbstick_process();
+ switch (thumbstick_state.config.mode) {
+ case THUMBSTICK_MODE_MOUSE:
+ report.x = thumbstick_state.report.x;
+ report.y = thumbstick_state.report.y;
+#ifdef THUMBSTICK_DEBUG
+ if (timer_elapsed(thumbstickLogTimer) > 100) {
+ thumbstickLogTimer = timer_read();
+ uprintf("Raw (%d, %d); Dist (%u, %u); Vec (%d, %d);\n", rawX, rawY, distX, distY, thumbstick_state.vector.x, thumbstick_state.vector.y);
+ }
+#endif
+ break;
+ case THUMBSTICK_MODE_ARROWS:
+ update_keycode_status(KC_UP, thumbstick_state.lastDirection.up, thumbstick_state.direction.up);
+ update_keycode_status(KC_DOWN, thumbstick_state.lastDirection.down, thumbstick_state.direction.down);
+ update_keycode_status(KC_LEFT, thumbstick_state.lastDirection.left, thumbstick_state.direction.left);
+ update_keycode_status(KC_RIGHT, thumbstick_state.lastDirection.right, thumbstick_state.direction.right);
+ thumbstick_state.lastDirection = thumbstick_state.direction;
+#ifdef THUMBSTICK_DEBUG
+ if (timer_elapsed(thumbstickLogTimer) > 100) {
+ thumbstickLogTimer = timer_read();
+ uprintf("Up %d; Down %d; Left: %d; Right %d; Vec (%d, %d);\n", direction.up, direction.down, direction.left, direction.right, thumbstick_state.vector.x, thumbstick_state.vector.y);
+ }
+#endif
+ break;
+ case THUMBSTICK_MODE_SCROLL:
+ report.v = thumbstick_state.report.v;
+ report.h = thumbstick_state.report.h;
+#ifdef THUMBSTICK_DEBUG
+ if (timer_elapsed(thumbstickLogTimer) > 100) {
+ thumbstickLogTimer = timer_read();
+ uprintf("Scroll (%d, %d)\n", report.h, report.v);
+ }
+#endif
+ break;
+ default:
+ break;
+ }
+ }
+
+ pointing_device_set_report(report);
+ pointing_device_send();
+}
diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.h b/keyboards/kyria/keymaps/gotham/thumbstick.h
new file mode 100644
index 000000000000..aff939c746cf
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/thumbstick.h
@@ -0,0 +1,98 @@
+#pragma once
+
+typedef enum {
+ THUMBSTICK_MODE_MOUSE = 0,
+ THUMBSTICK_MODE_ARROWS,
+ THUMBSTICK_MODE_SCROLL,
+ _THUMBSTICK_MODE_LAST // Do not use, except for looping through enum values
+} thumbstick_mode_t;
+
+// Parameters
+#define THUMBSTICK_DEAD_ZONE 90 // Values below this are ignored (deadzone)
+#define THUMBSTICK_FINE_ZONE 180 // Values below this enable fine movement
+
+#define THUMBSTICK_MODE THUMBSTICK_MODE_MOUSE
+#define THUMBSTICK_SPEED 256
+#define THUMBSTICK_FINE_SPEED 96
+#define THUMBSTICK_SCROLL_SPEED 1
+
+#define THUMBSTICK_EIGHT_AXIS true
+#define THUMBSTICK_AXIS_SEPARATION 0.5f
+
+// Implicit and derived constants
+#define THUMBSTICK_TIMEOUT 10 // Mouse report throttling time in ms
+#define THUMBSTICK_SCROLL_TIMEOUT 200 // Mouse scroll throttling time in ms
+#define THUMBSTICK_RANGE_START 0
+#define THUMBSTICK_RANGE_STOP 1023
+#define THUMBSTICK_RANGE_CENTER (THUMBSTICK_RANGE_STOP - THUMBSTICK_RANGE_START + 1) / 2
+#define THUMBSTICK_RANGE_MOVEMENT (THUMBSTICK_RANGE_CENTER - THUMBSTICK_DEAD_ZONE)
+
+#include "timer.h"
+#include "analog.h"
+#include "split_util.h"
+#include "pointing_device.h"
+
+#if defined THUMBSTICK_DEBUG
+# include "print.h"
+uint16_t rawX;
+uint16_t rawY;
+uint16_t distX;
+uint16_t distY;
+uint16_t thumbstickLogTimer;
+#endif
+
+typedef struct {
+ thumbstick_mode_t mode;
+ uint16_t deadZone;
+ uint16_t fineZone;
+ uint16_t speed;
+ uint16_t fineSpeed;
+ float axisSeparation;
+ bool eightAxis;
+} thumbstick_config_t;
+
+typedef struct {
+ int16_t x;
+ int16_t y;
+} thumbstick_vector_t;
+
+typedef struct {
+ bool up;
+ bool right;
+ bool down;
+ bool left;
+} thumbstick_direction_t;
+
+typedef struct {
+ thumbstick_config_t config;
+ thumbstick_vector_t vector;
+ thumbstick_direction_t direction;
+ thumbstick_direction_t lastDirection;
+ report_mouse_t report;
+} thumbstick_state_t;
+
+uint16_t thumbstickTimer;
+uint16_t thumbstickScrollTimer;
+
+thumbstick_state_t thumbstick_state;
+
+void thumbstick_mode_set(thumbstick_mode_t mode);
+
+thumbstick_mode_t thumbstick_mode_get(void);
+
+void thumbstick_mode_cycle(bool reverse);
+
+void thumbstick_init(void);
+
+// Axis-level wrapper to read raw value, do logging and calculate speed
+int16_t thumbstick_get_component(uint8_t pin);
+
+// Get mouse speed
+int16_t thumbstick_get_mouse_speed(int16_t component);
+
+// Fix direction within one of 8 axes (or 4 if 8-axis is disabled)
+thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis);
+
+void thumbstick_process(void);
+
+void update_keycode_status(uint16_t keycode, bool last, bool current);
From d1730ec760360b38fd6f5d162a5eb1f22e893b0f Mon Sep 17 00:00:00 2001
From: Callum Oakley
Date: Sat, 13 Jun 2020 12:11:28 +0100
Subject: [PATCH 07/36] [keymap] upstreaming a minor keymap update (#9366)
---
keyboards/planck/keymaps/callum/keymap.c | 23 ++++++++++++++++-------
keyboards/planck/keymaps/callum/readme.md | 8 --------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 34ef05248747..4db54577b01a 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -75,11 +75,20 @@
#define tabr G(S(KC_RBRC))
#define fwd G(KC_RBRC)
#define back G(KC_LBRC)
-#define dtl C(KC_LEFT)
-#define dtr C(KC_RGHT)
#define slup S(A(KC_UP))
#define sldn S(A(KC_DOWN))
+#define ctl1 C(KC_1)
+#define ctl2 C(KC_2)
+#define ctl3 C(KC_3)
+#define ctl4 C(KC_4)
+#define ctl5 C(KC_5)
+#define ctl6 C(KC_6)
+#define ctl7 C(KC_7)
+#define ctl8 C(KC_8)
+#define ctl9 C(KC_9)
+#define ctl0 C(KC_0)
+
#define f1 KC_F1
#define f2 KC_F2
#define f3 KC_F3
@@ -105,8 +114,8 @@
#define next KC_MNXT
#define play KC_MPLY
#define prev KC_MPRV
-#define vold KC_F11
-#define volu KC_F12
+#define vold KC_VOLD
+#define volu KC_VOLU
#define symb MO(SYMB)
#define move MO(MOVE)
@@ -168,9 +177,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[MOVE] = LAYOUT_planck_grid(
- esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, caps,
- del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, xxxx,
- ____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____,
+ esc, ctl1, ctl2, ctl3, ctl4, xxxx, xxxx, home, up, end, ctl7, caps,
+ del, ctl5, slup, tabl, tabr, xxxx, xxxx, left, down, rght, ctl8, xxxx,
+ ____, ctl6, sldn, back, fwd, xxxx, xxxx, pgdn, pgup, ctl0, ctl9, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
),
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index 3eae9ad3cead..561901b48e56 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -26,13 +26,5 @@ This is a layout for the grid planck, built with a few ideals in mind:
higher ones. (number arrangement borrowed from [dustypomeleau's minidox
layout][].
-Layout rendered with [keyboard-layout-editor.com][]:
-
-![](https://callumoakley.net/images/keymap.png)
-
-The only behaviour not captured in this graphic is: pressing both cmd keys will
-send cmd+ctrl. See [keymap.c][] for details.
-
[dustypomeleau's minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau
-[keyboard-layout-editor.com]: http://www.keyboard-layout-editor.com
[keymap.c]: keymap.c
From 867fded9801a84e901bc381d8f523e45544b6119 Mon Sep 17 00:00:00 2001
From: Maarten Dekkers
Date: Sat, 13 Jun 2020 20:41:53 +0200
Subject: [PATCH 08/36] [Keyboard] Add OmronTKL (#9346)
* Add OmronTKL
* Fix column pins
---
keyboards/maartenwut/omrontkl/config.h | 220 +++++++++++++
keyboards/maartenwut/omrontkl/info.json | 299 ++++++++++++++++++
.../omrontkl/keymaps/default/keymap.c | 42 +++
keyboards/maartenwut/omrontkl/omrontkl.c | 16 +
keyboards/maartenwut/omrontkl/omrontkl.h | 79 +++++
keyboards/maartenwut/omrontkl/readme.md | 13 +
keyboards/maartenwut/omrontkl/rules.mk | 32 ++
7 files changed, 701 insertions(+)
create mode 100644 keyboards/maartenwut/omrontkl/config.h
create mode 100644 keyboards/maartenwut/omrontkl/info.json
create mode 100644 keyboards/maartenwut/omrontkl/keymaps/default/keymap.c
create mode 100644 keyboards/maartenwut/omrontkl/omrontkl.c
create mode 100644 keyboards/maartenwut/omrontkl/omrontkl.h
create mode 100644 keyboards/maartenwut/omrontkl/readme.md
create mode 100644 keyboards/maartenwut/omrontkl/rules.mk
diff --git a/keyboards/maartenwut/omrontkl/config.h b/keyboards/maartenwut/omrontkl/config.h
new file mode 100644
index 000000000000..a07500edfb0a
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/config.h
@@ -0,0 +1,220 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4705
+#define PRODUCT_ID 0xEA78
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Maartenwut
+#define PRODUCT OmronTKL
+#define DESCRIPTION A TKL PCB for Omron switches
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+/*
+ * 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 {D0,D1,D2,D3,D4,B7}
+#define MATRIX_COL_PINS {F0,C7,F1,C6,F4,B6,F5,B5,F6,B4,F7,D7,D6,D5,B3,B1,B2}
+#define UNUSED_PINS {E6,B0}
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN D0
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 12
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// /*== customize breathing effect ==*/
+// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
+// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
+// /*==== use exp() and sin() ====*/
+// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
+// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* 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
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * 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.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/maartenwut/omrontkl/info.json b/keyboards/maartenwut/omrontkl/info.json
new file mode 100644
index 000000000000..faf9569644b2
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/info.json
@@ -0,0 +1,299 @@
+{
+ "keyboard_name": "OmronTKL",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 18.25,
+ "height": 6.25,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25},
+ {"x":14, "y":1.25},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25},
+ {"x":13.75, "y":3.25, "w":1.25},
+
+ {"x":0, "y":4.25, "w":1.25},
+ {"x":1.25, "y":4.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":1.75},
+ {"x":14, "y":4.25},
+ {"x":16.25, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.5},
+ {"x":1.5, "y":5.25, "w":1.25},
+ {"x":2.75, "y":5.25, "w":1.5},
+ {"x":4.25, "y":5.25, "w":6.5},
+ {"x":10.75, "y":5.25, "w":1.5},
+ {"x":12.25, "y":5.25, "w":1.25},
+ {"x":13.5, "y":5.25, "w":1.5},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25}
+ ]
+ },
+ "LAYOUT_ansi": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25, "w":2.25},
+
+ {"x":0, "y":4.25, "w":2.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":2.75},
+ {"x":16.25, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.5},
+ {"x":1.5, "y":5.25, "w":1.25},
+ {"x":2.75, "y":5.25, "w":1.5},
+ {"x":4.25, "y":5.25, "w":6.5},
+ {"x":10.75, "y":5.25, "w":1.5},
+ {"x":12.25, "y":5.25, "w":1.25},
+ {"x":13.5, "y":5.25, "w":1.5},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25}
+ ]
+ },
+ "LAYOUT_iso": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25},
+ {"x":13.75, "y":2.25, "w":1.25, "h":2},
+
+ {"x":0, "y":4.25, "w":1.25},
+ {"x":1.25, "y":4.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":2.75},
+ {"x":16.25, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.5},
+ {"x":1.5, "y":5.25, "w":1.25},
+ {"x":2.75, "y":5.25, "w":1.5},
+ {"x":4.25, "y":5.25, "w":6.5},
+ {"x":10.75, "y":5.25, "w":1.5},
+ {"x":12.25, "y":5.25, "w":1.25},
+ {"x":13.5, "y":5.25, "w":1.5},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c b/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c
new file mode 100644
index 000000000000..7d8304ed74f8
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c
@@ -0,0 +1,42 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#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 _MA 0 //Main layer
+#define _FN 1 //Main layer
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_MA] = LAYOUT_all(
+ 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,
+ 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_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
+ 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, MO(_FN), KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT),
+[_FN] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+};
\ No newline at end of file
diff --git a/keyboards/maartenwut/omrontkl/omrontkl.c b/keyboards/maartenwut/omrontkl/omrontkl.c
new file mode 100644
index 000000000000..e8748ea61219
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/omrontkl.c
@@ -0,0 +1,16 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#include "omrontkl.h"
diff --git a/keyboards/maartenwut/omrontkl/omrontkl.h b/keyboards/maartenwut/omrontkl/omrontkl.h
new file mode 100644
index 000000000000..c8292def401e
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/omrontkl.h
@@ -0,0 +1,79 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+#define XXX KC_NO
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k0d, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4f, \
+ k50, k51, k52, k56, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, XXX, XXX }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \
+ { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \
+}
+
+#define LAYOUT_ansi( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4f, \
+ k50, k51, k52, k56, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e, k0f, k0g }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, XXX, XXX }, \
+ { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \
+ { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \
+}
+
+#define LAYOUT_iso( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4f, \
+ k50, k51, k52, k56, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e, k0f, k0g }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, k2e, k2f, k2g }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, XXX, XXX }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \
+ { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \
+}
diff --git a/keyboards/maartenwut/omrontkl/readme.md b/keyboards/maartenwut/omrontkl/readme.md
new file mode 100644
index 000000000000..2141fbc8e29a
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/readme.md
@@ -0,0 +1,13 @@
+# OmronTKL
+
+## Support
+* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut)
+* Hardware Supported: OmronTKL
+* Hardware Availability: none
+
+## Build
+Make example for this keyboard (after setting up your build environment):
+
+ make maartenwut/omrontkl: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).
\ No newline at end of file
diff --git a/keyboards/maartenwut/omrontkl/rules.mk b/keyboards/maartenwut/omrontkl/rules.mk
new file mode 100644
index 000000000000..8fc9b9c73d44
--- /dev/null
+++ b/keyboards/maartenwut/omrontkl/rules.mk
@@ -0,0 +1,32 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = qmk-dfu
+
+# Build Options
+# change yes to no to disable
+#
+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 = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
From b1609133095509e9929d6f9bf7a581a67b077fbd Mon Sep 17 00:00:00 2001
From: mechlovin <57231893+mechlovin@users.noreply.github.com>
Date: Sun, 14 Jun 2020 01:43:04 +0700
Subject: [PATCH 09/36] [Keyboard] Add new PCB Infinity87 (#9287)
* Add new PCB Infinity87
* Update keymap.c
* Update readme.md
* Update rules.mk
* update
* Update info.json
---
keyboards/mechlovin/infinity87/config.h | 73 ++++++++++++
keyboards/mechlovin/infinity87/infinity87.c | 38 +++++++
keyboards/mechlovin/infinity87/infinity87.h | 37 ++++++
keyboards/mechlovin/infinity87/info.json | 106 ++++++++++++++++++
.../infinity87/keymaps/default/keymap.c | 27 +++++
.../infinity87/keymaps/default/readme.md | 1 +
.../mechlovin/infinity87/keymaps/via/keymap.c | 52 +++++++++
.../infinity87/keymaps/via/readme.md | 1 +
.../mechlovin/infinity87/keymaps/via/rules.mk | 1 +
keyboards/mechlovin/infinity87/readme.md | 15 +++
keyboards/mechlovin/infinity87/rules.mk | 21 ++++
11 files changed, 372 insertions(+)
create mode 100644 keyboards/mechlovin/infinity87/config.h
create mode 100644 keyboards/mechlovin/infinity87/infinity87.c
create mode 100644 keyboards/mechlovin/infinity87/infinity87.h
create mode 100644 keyboards/mechlovin/infinity87/info.json
create mode 100644 keyboards/mechlovin/infinity87/keymaps/default/keymap.c
create mode 100644 keyboards/mechlovin/infinity87/keymaps/default/readme.md
create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/keymap.c
create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/readme.md
create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/rules.mk
create mode 100644 keyboards/mechlovin/infinity87/readme.md
create mode 100644 keyboards/mechlovin/infinity87/rules.mk
diff --git a/keyboards/mechlovin/infinity87/config.h b/keyboards/mechlovin/infinity87/config.h
new file mode 100644
index 000000000000..6c1545024c3a
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/config.h
@@ -0,0 +1,73 @@
+/*
+Copyright 2020 Team Mechlovin'
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4D4C // ML
+#define PRODUCT_ID 0x8701
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Team.Mechlovin
+#define PRODUCT Infinity 87
+#define DESCRIPTION Team.Mechlovin Infinity 87
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+/*
+ * 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 { A10, B13, B12, B11, C14, C15 }
+#define MATRIX_COL_PINS { C13, B9, B4, B7, B8, B5, B6, A9, A5, A6, A7,B1, B2, B10, B3, B14, B15 }
+
+#define DIODE_DIRECTION COL2ROW
+
+
+#define BACKLIGHT_PIN B0
+#define BACKLIGHT_BREATHING
+#define BACKLIGHT_PWM_DRIVER PWMD3
+#define BACKLIGHT_PWM_CHANNEL 3
+
+#define RGB_DI_PIN A15
+#define RGBLED_NUM 26
+#define RGBLIGHT_LIMIT_VAL 255
+#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+/*== all animations enable ==*/
+#define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
\ No newline at end of file
diff --git a/keyboards/mechlovin/infinity87/infinity87.c b/keyboards/mechlovin/infinity87/infinity87.c
new file mode 100644
index 000000000000..2de528bc366a
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/infinity87.c
@@ -0,0 +1,38 @@
+/* Copyright 2020 Team Mechlovin'
+ *
+ * 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 .
+ */
+
+#include "infinity87.h"
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+ led_init_ports();
+}
+
+void led_init_ports(void) {
+ setPinOutput(A3);
+ writePinLow(A3);
+ setPinOutput(A4);
+ writePinLow(A4);
+}
+
+bool led_update_kb(led_t led_state) {
+ if(led_update_user(led_state)) {
+ writePin(A4, led_state.caps_lock);
+ writePin(A3, led_state.num_lock);
+ }
+
+ return true;
+}
diff --git a/keyboards/mechlovin/infinity87/infinity87.h b/keyboards/mechlovin/infinity87/infinity87.h
new file mode 100644
index 000000000000..4810d9d86a4f
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/infinity87.h
@@ -0,0 +1,37 @@
+/* Copyright 2020 Team Mechlovin'
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_all( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K0D, K1E, K1F, K1G, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \
+ K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \
+ { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \
+}
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
\ No newline at end of file
diff --git a/keyboards/mechlovin/infinity87/info.json b/keyboards/mechlovin/infinity87/info.json
new file mode 100644
index 000000000000..78d6a29bc872
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/info.json
@@ -0,0 +1,106 @@
+{
+ "keyboard_name": "infinity87",
+ "url": "",
+ "maintainer": "Team Mechlovin'",
+ "width": 18.25,
+ "height": 6.25,
+ "layouts": {
+ "LAYOUT_all": {
+ "key_count": 91,
+ "layout": [
+ {"label":"K00 (B0,B6)", "x":0, "y":0},
+ {"label":"K01 (B0,F4)", "x":2, "y":0},
+ {"label":"K02 (B0,C0)", "x":3, "y":0},
+ {"label":"K03 (B0,C1)", "x":4, "y":0},
+ {"label":"K04 (B0,C2)", "x":5, "y":0},
+ {"label":"K05 (B0,C3)", "x":6.5, "y":0},
+ {"label":"K06 (B0,C4)", "x":7.5, "y":0},
+ {"label":"K07 (B0,C5)", "x":8.5, "y":0},
+ {"label":"K08 (B0,C6)", "x":9.5, "y":0},
+ {"label":"K09 (B0,C7)", "x":11, "y":0},
+ {"label":"K0A (B0,D0)", "x":12, "y":0},
+ {"label":"K0B (B0,D1)", "x":13, "y":0},
+ {"label":"K0C (B0,D2)", "x":14, "y":0},
+ {"label":"K0E (B0,D4)", "x":15.25, "y":0},
+ {"label":"K0F (B0,D5)", "x":16.25, "y":0},
+ {"label":"K0G (B0,D6)", "x":17.25, "y":0},
+ {"label":"K10 (B1,B6)", "x":0, "y":1.25},
+ {"label":"K11 (B1,F4)", "x":1, "y":1.25},
+ {"label":"K12 (B1,C0)", "x":2, "y":1.25},
+ {"label":"K13 (B1,C1)", "x":3, "y":1.25},
+ {"label":"K14 (B1,C2)", "x":4, "y":1.25},
+ {"label":"K15 (B1,C3)", "x":5, "y":1.25},
+ {"label":"K16 (B1,C4)", "x":6, "y":1.25},
+ {"label":"K17 (B1,C5)", "x":7, "y":1.25},
+ {"label":"K18 (B1,C6)", "x":8, "y":1.25},
+ {"label":"K19 (B1,C7)", "x":9, "y":1.25},
+ {"label":"K1A (B1,D0)", "x":10, "y":1.25},
+ {"label":"K1B (B1,D1)", "x":11, "y":1.25},
+ {"label":"K1C (B1,D2)", "x":12, "y":1.25},
+ {"label":"K1D (B1,D3)", "x":13, "y":1.25},
+ {"label":"K0D (B0,D3)", "x":14, "y":1.25},
+ {"label":"K1E (B1,D4)", "x":15.25, "y":1.25},
+ {"label":"K1F (B1,D5)", "x":16.25, "y":1.25},
+ {"label":"K1G (B1,D6)", "x":17.25, "y":1.25},
+ {"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5},
+ {"label":"K21 (B2,F4)", "x":1.5, "y":2.25},
+ {"label":"K22 (B2,C0)", "x":2.5, "y":2.25},
+ {"label":"K23 (B2,C1)", "x":3.5, "y":2.25},
+ {"label":"K24 (B2,C2)", "x":4.5, "y":2.25},
+ {"label":"K25 (B2,C3)", "x":5.5, "y":2.25},
+ {"label":"K26 (B2,C4)", "x":6.5, "y":2.25},
+ {"label":"K27 (B2,C5)", "x":7.5, "y":2.25},
+ {"label":"K28 (B2,C6)", "x":8.5, "y":2.25},
+ {"label":"K29 (B2,C7)", "x":9.5, "y":2.25},
+ {"label":"K2A (B2,D0)", "x":10.5, "y":2.25},
+ {"label":"K2B (B2,D1)", "x":11.5, "y":2.25},
+ {"label":"K2C (B2,D2)", "x":12.5, "y":2.25},
+ {"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5},
+ {"label":"K2E (B2,D4)", "x":15.25, "y":2.25},
+ {"label":"K2F (B2,D5)", "x":16.25, "y":2.25},
+ {"label":"K2G (B2,D6)", "x":17.25, "y":2.25},
+ {"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75},
+ {"label":"K31 (B3,F4)", "x":1.75, "y":3.25},
+ {"label":"K32 (B3,C0)", "x":2.75, "y":3.25},
+ {"label":"K33 (B3,C1)", "x":3.75, "y":3.25},
+ {"label":"K34 (B3,C2)", "x":4.75, "y":3.25},
+ {"label":"K35 (B3,C3)", "x":5.75, "y":3.25},
+ {"label":"K36 (B3,C4)", "x":6.75, "y":3.25},
+ {"label":"K37 (B3,C5)", "x":7.75, "y":3.25},
+ {"label":"K38 (B3,C6)", "x":8.75, "y":3.25},
+ {"label":"K39 (B3,C7)", "x":9.75, "y":3.25},
+ {"label":"K3A (B3,D0)", "x":10.75, "y":3.25},
+ {"label":"K3B (B3,D1)", "x":11.75, "y":3.25},
+ {"label":"K3C (B3,D2)", "x":12.75, "y":3.25},
+ {"label":"K3D (B3,D3)", "x":13.75, "y":3.25, "w":1.25},
+ {"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25},
+ {"label":"K41 (B4,F4)", "x":1.25, "y":4.25},
+ {"label":"K42 (B4,C0)", "x":2.25, "y":4.25},
+ {"label":"K43 (B4,C1)", "x":3.25, "y":4.25},
+ {"label":"K44 (B4,C2)", "x":4.25, "y":4.25},
+ {"label":"K45 (B4,C3)", "x":5.25, "y":4.25},
+ {"label":"K46 (B4,C4)", "x":6.25, "y":4.25},
+ {"label":"K47 (B4,C5)", "x":7.25, "y":4.25},
+ {"label":"K48 (B4,C6)", "x":8.25, "y":4.25},
+ {"label":"K49 (B4,C7)", "x":9.25, "y":4.25},
+ {"label":"K4A (B4,D0)", "x":10.25, "y":4.25},
+ {"label":"K4B (B4,D1)", "x":11.25, "y":4.25},
+ {"label":"K4C (B4,D2)", "x":12.25, "y":4.25, "w":1.75},
+ {"label":"K4D (B4,D3)", "x":14, "y":4.25},
+ {"label":"K4F (B4,D5)", "x":16.25, "y":4.25},
+ {"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25},
+ {"label":"K51 (B5,F4)", "x":1.25, "y":5.25, "w":1.25},
+ {"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25},
+ {"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25},
+ {"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25},
+ {"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25},
+ {"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25},
+ {"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25},
+ {"label":"K5E (B5,D4)", "x":15.25, "y":5.25},
+ {"label":"K5F (B5,D5)", "x":16.25, "y":5.25},
+ {"label":"K5G (B5,D6)", "x":17.25, "y":5.25}
+ ]
+ }
+ }
+ ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
+}
diff --git a/keyboards/mechlovin/infinity87/keymaps/default/keymap.c b/keyboards/mechlovin/infinity87/keymaps/default/keymap.c
new file mode 100644
index 000000000000..a98abef90c8b
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/keymaps/default/keymap.c
@@ -0,0 +1,27 @@
+/* Copyright 2020 Team Mechlovin'
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ 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,
+ 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_DEL, KC_INS, KC_HOME, KC_PGUP,
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HASH, KC_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI,MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+};
diff --git a/keyboards/mechlovin/infinity87/keymaps/default/readme.md b/keyboards/mechlovin/infinity87/keymaps/default/readme.md
new file mode 100644
index 000000000000..01ef555056b7
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for infinity87
diff --git a/keyboards/mechlovin/infinity87/keymaps/via/keymap.c b/keyboards/mechlovin/infinity87/keymaps/via/keymap.c
new file mode 100644
index 000000000000..22250ad0e633
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/keymaps/via/keymap.c
@@ -0,0 +1,52 @@
+/* Copyright 2020 Team Mechlovin'
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ 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,
+ 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_DEL, KC_INS, KC_HOME, KC_PGUP,
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HASH, KC_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [2] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [3] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+};
diff --git a/keyboards/mechlovin/infinity87/keymaps/via/readme.md b/keyboards/mechlovin/infinity87/keymaps/via/readme.md
new file mode 100644
index 000000000000..8867d290cdfb
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/keymaps/via/readme.md
@@ -0,0 +1 @@
+# The via keymap for infinity87
diff --git a/keyboards/mechlovin/infinity87/keymaps/via/rules.mk b/keyboards/mechlovin/infinity87/keymaps/via/rules.mk
new file mode 100644
index 000000000000..036bd6d1c3ec
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/mechlovin/infinity87/readme.md b/keyboards/mechlovin/infinity87/readme.md
new file mode 100644
index 000000000000..892cecef1d71
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/readme.md
@@ -0,0 +1,15 @@
+# infinity87
+
+![infinity87](https://i.imgur.com/QuK1EnN.png)
+
+A replacement PCB for TKL keyboard. A87 form factor,south-facing stabilisers.
+
+* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
+* Hardware Supported: Infinity87 rev.1 (1.6mm & 1.2mm).
+* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=105853.0), [Reddit GB](https://www.reddit.com/r/mechmarket/comments/g4vf2w/gb_team_mechlovin_infinity_87_a87_form_factor/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mechlovin/infinity87: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).
diff --git a/keyboards/mechlovin/infinity87/rules.mk b/keyboards/mechlovin/infinity87/rules.mk
new file mode 100644
index 000000000000..00676c2ecb42
--- /dev/null
+++ b/keyboards/mechlovin/infinity87/rules.mk
@@ -0,0 +1,21 @@
+# MCU name
+MCU = STM32F303
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
From 1f2807c2deb0f90222090537feca38682c9aa5b5 Mon Sep 17 00:00:00 2001
From: elmo-space
Date: Sat, 13 Jun 2020 20:45:03 +0200
Subject: [PATCH 10/36] Add ANSI and ISO layout for KBD67mkII soldered PCB
(#9340)
* add ansi and iso layouts
* fix iso map mistake
* fix mistake again...
* Update keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c
* rename layout macros to the blocker variants and add ansi_split_bs
* Apply suggestions from code review
---
.../kbdfans/kbd67/mkii_soldered/info.json | 354 ++++++++++++++----
.../kbd67/mkii_soldered/keymaps/ansi/keymap.c | 33 ++
.../mkii_soldered/keymaps/ansi/readme.md | 3 +
.../keymaps/ansi_split_bs/keymap.c | 33 ++
.../keymaps/ansi_split_bs/readme.md | 3 +
.../mkii_soldered/keymaps/default/keymap.c | 7 -
.../kbd67/mkii_soldered/keymaps/iso/keymap.c | 32 ++
.../kbd67/mkii_soldered/keymaps/iso/readme.md | 3 +
.../kbd67/mkii_soldered/mkii_soldered.h | 46 ++-
9 files changed, 435 insertions(+), 79 deletions(-)
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c
create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json
index 6440a007eeb2..72c851e35af9 100644
--- a/keyboards/kbdfans/kbd67/mkii_soldered/info.json
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json
@@ -7,77 +7,289 @@
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0},
- {"label":"!", "x":1, "y":0},
- {"label":"@", "x":2, "y":0},
- {"label":"#", "x":3, "y":0},
- {"label":"$", "x":4, "y":0},
- {"label":"%", "x":5, "y":0},
- {"label":"^", "x":6, "y":0},
- {"label":"&", "x":7, "y":0},
- {"label":"*", "x":8, "y":0},
- {"label":"(", "x":9, "y":0},
- {"label":")", "x":10, "y":0},
- {"label":"_", "x":11, "y":0},
- {"label":"+", "x":12, "y":0},
- {"label":"Back Space", "x":13, "y":0},
- {"label":"Delete", "x":14, "y":0},
- {"label":"Home", "x":15, "y":0},
- {"label":"Tab", "x":0, "y":1, "w":1.5},
- {"label":"Q", "x":1.5, "y":1},
- {"label":"W", "x":2.5, "y":1},
- {"label":"E", "x":3.5, "y":1},
- {"label":"R", "x":4.5, "y":1},
- {"label":"T", "x":5.5, "y":1},
- {"label":"Y", "x":6.5, "y":1},
- {"label":"U", "x":7.5, "y":1},
- {"label":"I", "x":8.5, "y":1},
- {"label":"O", "x":9.5, "y":1},
- {"label":"P", "x":10.5, "y":1},
- {"label":"{", "x":11.5, "y":1},
- {"label":"}", "x":12.5, "y":1},
- {"label":"|", "x":13.5, "y":1, "w":1.5},
- {"label":"End", "x":15, "y":1},
- {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
- {"label":"A", "x":1.75, "y":2},
- {"label":"S", "x":2.75, "y":2},
- {"label":"D", "x":3.75, "y":2},
- {"label":"F", "x":4.75, "y":2},
- {"label":"G", "x":5.75, "y":2},
- {"label":"H", "x":6.75, "y":2},
- {"label":"J", "x":7.75, "y":2},
- {"label":"K", "x":8.75, "y":2},
- {"label":"L", "x":9.75, "y":2},
- {"label":":", "x":10.75, "y":2},
- {"label":"\"", "x":11.75, "y":2},
- {"label":"Enter", "x":12.75, "y":2, "w":2.25},
- {"label":"PgUp", "x":15, "y":2},
- {"label":"Shift", "x":0, "y":3, "w":1.25},
- {"label":"Hi", "x":1.25, "y":3},
- {"label":"Z", "x":2.25, "y":3},
- {"label":"X", "x":3.25, "y":3},
- {"label":"C", "x":4.25, "y":3},
- {"label":"V", "x":5.25, "y":3},
- {"label":"B", "x":6.25, "y":3},
- {"label":"N", "x":7.25, "y":3},
- {"label":"M", "x":8.25, "y":3},
- {"label":"<", "x":9.25, "y":3},
- {"label":">", "x":10.25, "y":3},
- {"label":"?", "x":11.25, "y":3},
- {"label":"Shift", "x":12.25, "y":3, "w":1.75},
- {"label":"↑", "x":14, "y":3},
- {"label":"PgDn", "x":15, "y":3},
- {"label":"Ctrl", "x":0, "y":4, "w":1.25},
- {"label":"Win", "x":1.25, "y":4, "w":1.25},
- {"label":"Alt", "x":2.5, "y":4, "w":1.25},
- {"x":3.75, "y":4, "w":2.25},
- {"x":6, "y":4, "w":1.25},
- {"x":7.25, "y":4, "w":2.75},
- {"label":"Alt", "x":10, "y":4, "w":1.25},
- {"label":"Win", "x":11.25, "y":4, "w":1.25},
- {"label":"←", "x":13, "y":4},
- {"label":"↓", "x":14, "y":4},
- {"label":"→", "x":15, "y":4}
- ]
+ {"label":"!", "x":1, "y":0},
+ {"label":"@", "x":2, "y":0},
+ {"label":"#", "x":3, "y":0},
+ {"label":"$", "x":4, "y":0},
+ {"label":"%", "x":5, "y":0},
+ {"label":"^", "x":6, "y":0},
+ {"label":"&", "x":7, "y":0},
+ {"label":"*", "x":8, "y":0},
+ {"label":"(", "x":9, "y":0},
+ {"label":")", "x":10, "y":0},
+ {"label":"_", "x":11, "y":0},
+ {"label":"+", "x":12, "y":0},
+ {"label":"Back Space", "x":13, "y":0},
+ {"label":"Delete", "x":14, "y":0},
+ {"label":"Home", "x":15, "y":0},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"{", "x":11.5, "y":1},
+ {"label":"}", "x":12.5, "y":1},
+ {"label":"|", "x":13.5, "y":1, "w":1.5},
+ {"label":"End", "x":15, "y":1},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":":", "x":10.75, "y":2},
+ {"label":"\"", "x":11.75, "y":2},
+ {"label":"Enter", "x":12.75, "y":2, "w":2.25},
+ {"label":"PgUp", "x":15, "y":2},
+ {"label":"Shift", "x":0, "y":3, "w":1.25},
+ {"label":"Hi", "x":1.25, "y":3},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":"<", "x":9.25, "y":3},
+ {"label":">", "x":10.25, "y":3},
+ {"label":"?", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"↑", "x":14, "y":3},
+ {"label":"PgDn", "x":15, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"Win", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":2.25},
+ {"x":6, "y":4, "w":1.25},
+ {"x":7.25, "y":4, "w":2.75},
+ {"label":"Alt", "x":10, "y":4, "w":1.25},
+ {"label":"Win", "x":11.25, "y":4, "w":1.25},
+ {"label":"←", "x":13, "y":4},
+ {"label":"↓", "x":14, "y":4},
+ {"label":"→", "x":15, "y":4}
+ ]
+ },
+ "LAYOUT_65_ansi_blocker": {
+ "layout": [{"label":"Esc", "x":0, "y":0},
+ {"label":"!", "x":1, "y":0},
+ {"label":"@", "x":2, "y":0},
+ {"label":"#", "x":3, "y":0},
+ {"label":"$", "x":4, "y":0},
+ {"label":"%", "x":5, "y":0},
+ {"label":"^", "x":6, "y":0},
+ {"label":"&", "x":7, "y":0},
+ {"label":"*", "x":8, "y":0},
+ {"label":"(", "x":9, "y":0},
+ {"label":")", "x":10, "y":0},
+ {"label":"_", "x":11, "y":0},
+ {"label":"+", "x":12, "y":0},
+ {"label":"Backspace", "x":13, "y":0, "w":2},
+ {"label":"Home", "x":15, "y":0},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"{", "x":11.5, "y":1},
+ {"label":"}", "x":12.5, "y":1},
+ {"label":"|", "x":13.5, "y":1, "w":1.5},
+ {"label":"End", "x":15, "y":1},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":":", "x":10.75, "y":2},
+ {"label":"\"", "x":11.75, "y":2},
+ {"label":"Enter", "x":12.75, "y":2, "w":2.25},
+ {"label":"PgUp", "x":15, "y":2},
+ {"label":"Shift", "x":0, "y":3, "w":2.25},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":"<", "x":9.25, "y":3},
+ {"label":">", "x":10.25, "y":3},
+ {"label":"?", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"\u2191", "x":14, "y":3},
+ {"label":"PgDn", "x":15, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"Win", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":6.25},
+ {"label":"Alt", "x":10, "y":4, "w":1.25},
+ {"label":"Ctrl", "x":11.25, "y":4, "w":1.25},
+ {"label":"\u2190", "x":13, "y":4},
+ {"label":"\u2193", "x":14, "y":4},
+ {"label":"\u2192", "x":15, "y":4}
+ ]
+ },
+ "LAYOUT_65_iso_blocker": {
+ "layout": [{"label":"Esc", "x":0, "y":0},
+ {"label":"!", "x":1, "y":0},
+ {"label":"@", "x":2, "y":0},
+ {"label":"#", "x":3, "y":0},
+ {"label":"$", "x":4, "y":0},
+ {"label":"%", "x":5, "y":0},
+ {"label":"^", "x":6, "y":0},
+ {"label":"&", "x":7, "y":0},
+ {"label":"*", "x":8, "y":0},
+ {"label":"(", "x":9, "y":0},
+ {"label":")", "x":10, "y":0},
+ {"label":"_", "x":11, "y":0},
+ {"label":"+", "x":12, "y":0},
+ {"label":"Backspace", "x":13, "y":0, "w":2},
+ {"label":"Home", "x":15, "y":0},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"{", "x":11.5, "y":1},
+ {"label":"}", "x":12.5, "y":1},
+ {"label":"End", "x":15, "y":1},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":":", "x":10.75, "y":2},
+ {"label":"\"", "x":11.75, "y":2},
+ {"label":"~", "x":12.75, "y":2},
+ {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
+ {"label":"PgUp", "x":15, "y":2},
+ {"label":"Shift", "x":0, "y":3, "w":1.25},
+ {"label":"|", "x":1.25, "y":3},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":"<", "x":9.25, "y":3},
+ {"label":">", "x":10.25, "y":3},
+ {"label":"?", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"\u2191", "x":14, "y":3},
+ {"label":"PgDn", "x":15, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"Win", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":6.25},
+ {"label":"Alt", "x":10, "y":4, "w":1.25},
+ {"label":"Ctrl", "x":11.25, "y":4, "w":1.25},
+ {"label":"\u2190", "x":13, "y":4},
+ {"label":"\u2193", "x":14, "y":4},
+ {"label":"\u2192", "x":15, "y":4}
+ ]
+ },
+ "LAYOUT_65_ansi_blocker_split_bs": {
+ "layout": [{"label":"Esc", "x":0, "y":0},
+ {"label":"!", "x":1, "y":0},
+ {"label":"@", "x":2, "y":0},
+ {"label":"#", "x":3, "y":0},
+ {"label":"$", "x":4, "y":0},
+ {"label":"%", "x":5, "y":0},
+ {"label":"^", "x":6, "y":0},
+ {"label":"&", "x":7, "y":0},
+ {"label":"*", "x":8, "y":0},
+ {"label":"(", "x":9, "y":0},
+ {"label":")", "x":10, "y":0},
+ {"label":"_", "x":11, "y":0},
+ {"label":"+", "x":12, "y":0},
+ {"label":"|", "x":13, "y":0},
+ {"label":"Del", "x":14, "y":0},
+ {"label":"Home", "x":15, "y":0},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"{", "x":11.5, "y":1},
+ {"label":"}", "x":12.5, "y":1},
+ {"label":"Backspace", "x":13.5, "y":1, "w":1.5},
+ {"label":"End", "x":15, "y":1},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":":", "x":10.75, "y":2},
+ {"label":"\"", "x":11.75, "y":2},
+ {"label":"Enter", "x":12.75, "y":2, "w":2.25},
+ {"label":"PgUp", "x":15, "y":2},
+ {"label":"Shift", "x":0, "y":3, "w":2.25},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":"<", "x":9.25, "y":3},
+ {"label":">", "x":10.25, "y":3},
+ {"label":"?", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"\u2191", "x":14, "y":3},
+ {"label":"PgDn", "x":15, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"Win", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":6.25},
+ {"label":"Alt", "x":10, "y":4, "w":1.25},
+ {"label":"Win", "x":11.25, "y":4, "w":1.25},
+ {"label":"\u2190", "x":13, "y":4},
+ {"label":"\u2193", "x":14, "y":4},
+ {"label":"\u2192", "x":15, "y":4}
+ ]
}
}
}
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c
new file mode 100644
index 000000000000..1f093baab842
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c
@@ -0,0 +1,33 @@
+/* Copyright 2020 elmo-space
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_65_ansi_blocker( /* Base */
+ KC_ESC, 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_HOME,
+ 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_END,
+ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_65_ansi_blocker( /* FN */
+ RESET, 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_DEL, BL_INC,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
+ )
+};
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md
new file mode 100644
index 000000000000..051a9ce16446
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md
@@ -0,0 +1,3 @@
+# The default ANSI keymap for KBD67 MKII
+
+A basic 65% keymap.
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c
new file mode 100644
index 000000000000..1c443ae7342a
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c
@@ -0,0 +1,33 @@
+/* Copyright 2020 elmo-space
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_65_ansi_blocker_split_bs( /* Base */
+ KC_ESC, 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_BSLS, KC_DEL, KC_HOME,
+ 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_BSPC, KC_END,
+ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_65_ansi_blocker_split_bs( /* FN */
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_INC,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
+ )
+};
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md
new file mode 100644
index 000000000000..1f3f3633560e
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md
@@ -0,0 +1,3 @@
+# The default ANSI with Split Backspace keymap for KBD67 MKII
+
+A basic 65% keymap.
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c
index 6dcbf00dd257..61f3aa8c5fbf 100644
--- a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c
@@ -15,13 +15,6 @@
*/
#include QMK_KEYBOARD_H
-/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \
- * K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
- * K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \
- * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
- * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \
- */
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_ESC, 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_DEL, KC_HOME,
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c
new file mode 100644
index 000000000000..c49da957280f
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c
@@ -0,0 +1,32 @@
+/* Copyright 2019 Ryota Goto
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_65_iso_blocker( /* Base */
+ KC_ESC, 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_HOME,
+ 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_END,
+ MO(1), 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_PGUP,
+ 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_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_65_iso_blocker( /* FN */
+ RESET, 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_DEL, BL_INC,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
+ )
+};
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md
new file mode 100644
index 000000000000..e2dd061075dd
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md
@@ -0,0 +1,3 @@
+# The default ISO keymap for KBD67 MKII
+
+A basic 65% keymap.
diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h
index 7eb11f1ff07c..6b80aa20b6ba 100644
--- a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h
+++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h
@@ -37,7 +37,51 @@
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
- { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
+ { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
}
+#define LAYOUT_65_ansi_blocker( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ K400, K401, K402, K405, K409, K410, K411, K413, K414 \
+) \
+{ \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
+ { K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
+}
+
+#define LAYOUT_65_ansi_blocker_split_bs( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ K400, K401, K402, K405, K409, K410, K411, K413, K414 \
+) \
+{ \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
+ { K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
+}
+
+#define LAYOUT_65_iso_blocker( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
+ K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ K400, K401, K402, K405, K409, K410, K411, K413, K414 \
+) \
+{ \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
+ { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
+}
From 897c4cd1753cb831f8ca74b6d6feaeecd20fd869 Mon Sep 17 00:00:00 2001
From: qunguyentk <40719920+qunguyentk@users.noreply.github.com>
Date: Sun, 14 Jun 2020 01:48:48 +0700
Subject: [PATCH 11/36] [Keyboard] Add Batpad 2x4 PCB (#9295)
* Add files via upload
* Update config.h
* Update config.h
* Update keyboards/Yncognito/batpad/batpad.c
* Update batpad.c
* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c
* Update keyboards/Yncognito/batpad/batpad.h
* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c
* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c
* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c
* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c
* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c
* Update keyboards/Yncognito/batpad/batpad.c
* Rename keyboards/Yncognito/batpad/rules.mk to keyboards/yncognito/batpad/rules.mk
* Rename keyboards/Yncognito/batpad/readme.md to keyboards/yncognito/batpad/readme.md
* Rename keyboards/Yncognito/batpad/info.json to keyboards/yncognito/batpad/info.json
* Rename keyboards/Yncognito/batpad/config.h to keyboards/yncognito/batpad/config.h
* Rename keyboards/Yncognito/batpad/batpad.h to keyboards/yncognito/batpad/batpad.h
* Rename keyboards/Yncognito/batpad/batpad.c to keyboards/yncognito/batpad/batpad.c
* Rename keyboards/Yncognito/batpad/keymaps/default/readme.md to keyboards/yncognito/batpad/keymaps/default/readme.md
* Rename keyboards/Yncognito/batpad/keymaps/default/keymap.c to keyboards/yncognito/batpad/keymaps/default/keymap.c
* Rename keyboards/Yncognito/batpad/keymaps/default/config.h to keyboards/yncognito/batpad/keymaps/default/config.h
* Rename keyboards/Yncognito/batpad/keymaps/via/rules.mk to keyboards/yncognito/batpad/keymaps/via/rules.mk
* Rename keyboards/Yncognito/batpad/keymaps/via/keymap.c to keyboards/yncognito/batpad/keymaps/via/keymap.c
* Rename keyboards/Yncognito/batpad/keymaps/via/config.h to keyboards/yncognito/batpad/keymaps/via/config.h
* Update keyboards/yncognito/batpad/readme.md
* Update keyboards/yncognito/batpad/readme.md
* Update keyboards/yncognito/batpad/rules.mk
* Delete config.h
* Delete config.h
* Update readme.md
* Update keyboards/yncognito/batpad/batpad.c
* Update keyboards/yncognito/batpad/readme.md
* Update keyboards/yncognito/batpad/keymaps/via/keymap.c
* Update keyboards/yncognito/batpad/info.json
* Update keyboards/yncognito/batpad/batpad.h
---
keyboards/yncognito/batpad/batpad.c | 35 +++++++++++
keyboards/yncognito/batpad/batpad.h | 29 +++++++++
keyboards/yncognito/batpad/config.h | 60 +++++++++++++++++++
keyboards/yncognito/batpad/info.json | 23 +++++++
.../yncognito/batpad/keymaps/default/keymap.c | 34 +++++++++++
.../batpad/keymaps/default/readme.md | 1 +
.../yncognito/batpad/keymaps/via/keymap.c | 36 +++++++++++
.../yncognito/batpad/keymaps/via/rules.mk | 1 +
keyboards/yncognito/batpad/readme.md | 14 +++++
keyboards/yncognito/batpad/rules.mk | 35 +++++++++++
10 files changed, 268 insertions(+)
create mode 100644 keyboards/yncognito/batpad/batpad.c
create mode 100644 keyboards/yncognito/batpad/batpad.h
create mode 100644 keyboards/yncognito/batpad/config.h
create mode 100644 keyboards/yncognito/batpad/info.json
create mode 100644 keyboards/yncognito/batpad/keymaps/default/keymap.c
create mode 100644 keyboards/yncognito/batpad/keymaps/default/readme.md
create mode 100644 keyboards/yncognito/batpad/keymaps/via/keymap.c
create mode 100644 keyboards/yncognito/batpad/keymaps/via/rules.mk
create mode 100644 keyboards/yncognito/batpad/readme.md
create mode 100644 keyboards/yncognito/batpad/rules.mk
diff --git a/keyboards/yncognito/batpad/batpad.c b/keyboards/yncognito/batpad/batpad.c
new file mode 100644
index 000000000000..d7292533fbb8
--- /dev/null
+++ b/keyboards/yncognito/batpad/batpad.c
@@ -0,0 +1,35 @@
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include "batpad.h"
+
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config ={
+ {
+ {4 ,5 ,6 ,7 },
+ {0 ,1 ,2 ,3 }
+ },
+ {
+ {0,0},{75,0},{145,0},{224,0},
+ {0,64},{75,64},{145,64},{224,64}
+ },
+ {
+ 0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04
+ }
+};
+
+#endif
diff --git a/keyboards/yncognito/batpad/batpad.h b/keyboards/yncognito/batpad/batpad.h
new file mode 100644
index 000000000000..c7c9c3595bd3
--- /dev/null
+++ b/keyboards/yncognito/batpad/batpad.h
@@ -0,0 +1,29 @@
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ortho_2x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+}
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h
new file mode 100644
index 000000000000..31dab82dc5dd
--- /dev/null
+++ b/keyboards/yncognito/batpad/config.h
@@ -0,0 +1,60 @@
+/*
+Copyright 2020 Yncognito
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x7979
+#define PRODUCT_ID 0x6602
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Yncognito
+#define PRODUCT Batpad
+#define DESCRIPTION A bat with 8 keys
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 4
+
+/*
+ * 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 { F4, C7 }
+#define MATRIX_COL_PINS { F1, F0, D5, D3 }
+
+#define DIODE_DIRECTION COL2ROW
+
+#define RGB_DI_PIN B5
+#define DRIVER_LED_TOTAL 8
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_DISABLE_AFTER_TIMEOUT 0
+#define RGB_DISABLE_WHEN_USB_SUSPENDED false
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
+
+
diff --git a/keyboards/yncognito/batpad/info.json b/keyboards/yncognito/batpad/info.json
new file mode 100644
index 000000000000..7a0c8173a802
--- /dev/null
+++ b/keyboards/yncognito/batpad/info.json
@@ -0,0 +1,23 @@
+{
+ "keyboard_name": "batpad",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 2,
+ "layouts": {
+ "LAYOUT_ortho_2x4": {
+ "key_count": 8,
+ "layout": [
+ {"label":"K00 (F4,F1)", "x":0, "y":0},
+ {"label":"K01 (F4,F0)", "x":1, "y":0},
+ {"label":"K02 (F4,D5)", "x":2, "y":0},
+ {"label":"K03 (F4,D3)", "x":3, "y":0},
+ {"label":"K10 (C7,F1)", "x":0, "y":1},
+ {"label":"K11 (C7,F0)", "x":1, "y":1},
+ {"label":"K12 (C7,D5)", "x":2, "y":1},
+ {"label":"K13 (C7,D3)", "x":3, "y":1}
+ ]
+ }
+ }
+ ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
+}
diff --git a/keyboards/yncognito/batpad/keymaps/default/keymap.c b/keyboards/yncognito/batpad/keymaps/default/keymap.c
new file mode 100644
index 000000000000..8b8809c9c606
--- /dev/null
+++ b/keyboards/yncognito/batpad/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_2x4(
+
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [1] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [2] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+
+
+};
diff --git a/keyboards/yncognito/batpad/keymaps/default/readme.md b/keyboards/yncognito/batpad/keymaps/default/readme.md
new file mode 100644
index 000000000000..ecc5d913a81c
--- /dev/null
+++ b/keyboards/yncognito/batpad/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for batpad
diff --git a/keyboards/yncognito/batpad/keymaps/via/keymap.c b/keyboards/yncognito/batpad/keymaps/via/keymap.c
new file mode 100644
index 000000000000..1d109624efed
--- /dev/null
+++ b/keyboards/yncognito/batpad/keymaps/via/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [1] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [2] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [3] = LAYOUT_ortho_2x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+
+};
diff --git a/keyboards/yncognito/batpad/keymaps/via/rules.mk b/keyboards/yncognito/batpad/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/yncognito/batpad/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/yncognito/batpad/readme.md b/keyboards/yncognito/batpad/readme.md
new file mode 100644
index 000000000000..356f06024043
--- /dev/null
+++ b/keyboards/yncognito/batpad/readme.md
@@ -0,0 +1,14 @@
+# Batpad
+
+![batpad](https://i.imgur.com/CZ3m0jhl.jpg)
+
+A 8 keys macropad!
+
+* Keyboard Maintainer: Yncognito
+* Hardware Supported: Batpad/Atmega32u4
+
+Make example for this keyboard (after setting up your build environment):
+
+ make yncognito/batpad: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).
diff --git a/keyboards/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk
new file mode 100644
index 000000000000..dabad7e1e8f6
--- /dev/null
+++ b/keyboards/yncognito/batpad/rules.mk
@@ -0,0 +1,35 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGB_MATRIX_ENABLE = WS2812
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+
+# generated by KBFirmware JSON to QMK Parser
+# https://noroadsleft.github.io/kbf_qmk_converter/
From f68abbf6c8668d68e5eab0be9c537fe1ca5fa79f Mon Sep 17 00:00:00 2001
From: QMK Bot
Date: Sat, 13 Jun 2020 18:51:08 +0000
Subject: [PATCH 12/36] format code according to conventions [skip ci]
---
keyboards/yncognito/batpad/batpad.c | 70 +++++-----
keyboards/yncognito/batpad/batpad.h | 58 ++++-----
keyboards/yncognito/batpad/config.h | 120 +++++++++---------
keyboards/yncognito/batpad/info.json | 46 +++----
.../yncognito/batpad/keymaps/default/keymap.c | 68 +++++-----
.../yncognito/batpad/keymaps/via/keymap.c | 72 +++++------
keyboards/yncognito/batpad/rules.mk | 70 +++++-----
7 files changed, 252 insertions(+), 252 deletions(-)
diff --git a/keyboards/yncognito/batpad/batpad.c b/keyboards/yncognito/batpad/batpad.c
index d7292533fbb8..caafd5727895 100644
--- a/keyboards/yncognito/batpad/batpad.c
+++ b/keyboards/yncognito/batpad/batpad.c
@@ -1,35 +1,35 @@
-/* Copyright 2020 Yncognito
- *
- * 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 .
- */
-#include "batpad.h"
-
-
-#ifdef RGB_MATRIX_ENABLE
-led_config_t g_led_config ={
- {
- {4 ,5 ,6 ,7 },
- {0 ,1 ,2 ,3 }
- },
- {
- {0,0},{75,0},{145,0},{224,0},
- {0,64},{75,64},{145,64},{224,64}
- },
- {
- 0x04,0x04,0x04,0x04,
- 0x04,0x04,0x04,0x04
- }
-};
-
-#endif
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include "batpad.h"
+
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config ={
+ {
+ {4 ,5 ,6 ,7 },
+ {0 ,1 ,2 ,3 }
+ },
+ {
+ {0,0},{75,0},{145,0},{224,0},
+ {0,64},{75,64},{145,64},{224,64}
+ },
+ {
+ 0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04
+ }
+};
+
+#endif
diff --git a/keyboards/yncognito/batpad/batpad.h b/keyboards/yncognito/batpad/batpad.h
index c7c9c3595bd3..1cc79edf814c 100644
--- a/keyboards/yncognito/batpad/batpad.h
+++ b/keyboards/yncognito/batpad/batpad.h
@@ -1,29 +1,29 @@
-/* Copyright 2020 Yncognito
- *
- * 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 .
- */
-#pragma once
-
-#include "quantum.h"
-
-#define LAYOUT_ortho_2x4( \
- K00, K01, K02, K03, \
- K10, K11, K12, K13 \
-) { \
- { K00, K01, K02, K03 }, \
- { K10, K11, K12, K13 }, \
-}
-
-// generated by KBFirmware JSON to QMK Parser
-// https://noroadsleft.github.io/kbf_qmk_converter/
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ortho_2x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+}
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h
index 31dab82dc5dd..379fc886d77b 100644
--- a/keyboards/yncognito/batpad/config.h
+++ b/keyboards/yncognito/batpad/config.h
@@ -1,60 +1,60 @@
-/*
-Copyright 2020 Yncognito
-
-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 .
-*/
-
-#pragma once
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x7979
-#define PRODUCT_ID 0x6602
-#define DEVICE_VER 0x0001
-#define MANUFACTURER Yncognito
-#define PRODUCT Batpad
-#define DESCRIPTION A bat with 8 keys
-
-/* key matrix size */
-#define MATRIX_ROWS 2
-#define MATRIX_COLS 4
-
-/*
- * 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 { F4, C7 }
-#define MATRIX_COL_PINS { F1, F0, D5, D3 }
-
-#define DIODE_DIRECTION COL2ROW
-
-#define RGB_DI_PIN B5
-#define DRIVER_LED_TOTAL 8
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false
-#define RGB_MATRIX_LED_FLUSH_LIMIT 16
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-
-
+/*
+Copyright 2020 Yncognito
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x7979
+#define PRODUCT_ID 0x6602
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Yncognito
+#define PRODUCT Batpad
+#define DESCRIPTION A bat with 8 keys
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 4
+
+/*
+ * 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 { F4, C7 }
+#define MATRIX_COL_PINS { F1, F0, D5, D3 }
+
+#define DIODE_DIRECTION COL2ROW
+
+#define RGB_DI_PIN B5
+#define DRIVER_LED_TOTAL 8
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_DISABLE_AFTER_TIMEOUT 0
+#define RGB_DISABLE_WHEN_USB_SUSPENDED false
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
+
+
diff --git a/keyboards/yncognito/batpad/info.json b/keyboards/yncognito/batpad/info.json
index 7a0c8173a802..2c0fd0d2ebf0 100644
--- a/keyboards/yncognito/batpad/info.json
+++ b/keyboards/yncognito/batpad/info.json
@@ -1,23 +1,23 @@
-{
- "keyboard_name": "batpad",
- "url": "",
- "maintainer": "qmk",
- "width": 4,
- "height": 2,
- "layouts": {
- "LAYOUT_ortho_2x4": {
- "key_count": 8,
- "layout": [
- {"label":"K00 (F4,F1)", "x":0, "y":0},
- {"label":"K01 (F4,F0)", "x":1, "y":0},
- {"label":"K02 (F4,D5)", "x":2, "y":0},
- {"label":"K03 (F4,D3)", "x":3, "y":0},
- {"label":"K10 (C7,F1)", "x":0, "y":1},
- {"label":"K11 (C7,F0)", "x":1, "y":1},
- {"label":"K12 (C7,D5)", "x":2, "y":1},
- {"label":"K13 (C7,D3)", "x":3, "y":1}
- ]
- }
- }
- ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
-}
+{
+ "keyboard_name": "batpad",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 2,
+ "layouts": {
+ "LAYOUT_ortho_2x4": {
+ "key_count": 8,
+ "layout": [
+ {"label":"K00 (F4,F1)", "x":0, "y":0},
+ {"label":"K01 (F4,F0)", "x":1, "y":0},
+ {"label":"K02 (F4,D5)", "x":2, "y":0},
+ {"label":"K03 (F4,D3)", "x":3, "y":0},
+ {"label":"K10 (C7,F1)", "x":0, "y":1},
+ {"label":"K11 (C7,F0)", "x":1, "y":1},
+ {"label":"K12 (C7,D5)", "x":2, "y":1},
+ {"label":"K13 (C7,D3)", "x":3, "y":1}
+ ]
+ }
+ }
+ ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
+}
diff --git a/keyboards/yncognito/batpad/keymaps/default/keymap.c b/keyboards/yncognito/batpad/keymaps/default/keymap.c
index 8b8809c9c606..6cf40a182ec9 100644
--- a/keyboards/yncognito/batpad/keymaps/default/keymap.c
+++ b/keyboards/yncognito/batpad/keymaps/default/keymap.c
@@ -1,34 +1,34 @@
-/* Copyright 2020 Yncognito
- *
- * 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 .
- */
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_ortho_2x4(
-
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
- [1] = LAYOUT_ortho_2x4(
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
- [2] = LAYOUT_ortho_2x4(
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
-
-
-};
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_2x4(
+
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [1] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [2] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+
+
+};
diff --git a/keyboards/yncognito/batpad/keymaps/via/keymap.c b/keyboards/yncognito/batpad/keymaps/via/keymap.c
index 1d109624efed..6e02a719349f 100644
--- a/keyboards/yncognito/batpad/keymaps/via/keymap.c
+++ b/keyboards/yncognito/batpad/keymaps/via/keymap.c
@@ -1,36 +1,36 @@
-/* Copyright 2020 Yncognito
- *
- * 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 .
- */
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_ortho_2x4(
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
- [1] = LAYOUT_ortho_2x4(
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
- [2] = LAYOUT_ortho_2x4(
- KC_Q, KC_W, KC_E, KC_R,
- KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
- ),
- [3] = LAYOUT_ortho_2x4(
- _______, _______, _______, _______,
- _______, _______, _______, _______
- ),
-
-};
+/* Copyright 2020 Yncognito
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [1] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [2] = LAYOUT_ortho_2x4(
+ KC_Q, KC_W, KC_E, KC_R,
+ KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD
+ ),
+ [3] = LAYOUT_ortho_2x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+
+};
diff --git a/keyboards/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk
index dabad7e1e8f6..71cf8ef3e9b4 100644
--- a/keyboards/yncognito/batpad/rules.mk
+++ b/keyboards/yncognito/batpad/rules.mk
@@ -1,35 +1,35 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# ATmega32A bootloadHID
-# ATmega328P USBasp
-BOOTLOADER = atmel-dfu
-
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE = yes # USB Nkey Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGB_MATRIX_ENABLE = WS2812
-MIDI_ENABLE = no # MIDI support
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
-FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
-
-# generated by KBFirmware JSON to QMK Parser
-# https://noroadsleft.github.io/kbf_qmk_converter/
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGB_MATRIX_ENABLE = WS2812
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+
+# generated by KBFirmware JSON to QMK Parser
+# https://noroadsleft.github.io/kbf_qmk_converter/
From 307013a2f868593784446b55f5c29ef9b6072f5c Mon Sep 17 00:00:00 2001
From: Sid Carter
Date: Sat, 13 Jun 2020 15:03:11 -0400
Subject: [PATCH 13/36] [Keymap] Personal keymaps for Prime_E, Corne, Space65
and updates (#9234)
* initial draft maps
* updates to the keymap to enable LED
* does one still have to do these shenanigans?
* update keymap with lights
* update OLED stuff
* update corne config
* update singav3 pcb config
* update ilpse config and map
* update prime keymap as well
* update the keymap for prime_e
* update tapping term and keymap
* switch numbers to the raise layer
* move nav to lower
* add mousekeys as well
* some fixes
* update keymap
* add my layout for space65
* update map
* update keymap
* add grave key
* update config for my keymap
* update keymap
* switch to newer mechanisms
* grave on capslock
* cleanup
* udpate config
* update keymap
* Update keyboards/gray_studio/space65/keymaps/madhatter/rules.mk
* Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c
* Update keyboards/crkbd/keymaps/madhatter/rules.mk
* Update keyboards/crkbd/keymaps/madhatter/rules.mk
* Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/primekb/prime_e/keymaps/madhatter/config.h
* Update keyboards/gray_studio/space65/keymaps/madhatter/config.h
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/gray_studio/space65/keymaps/madhatter/config.h
* Update keyboards/primekb/prime_e/keymaps/madhatter/config.h
* Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/crkbd/keymaps/madhatter/keymap.c
* Update keyboards/primekb/prime_e/keymaps/madhatter/keymap.c
* Update keyboards/crkbd/keymaps/madhatter/readme.md
* remove file I don't use
---
keyboards/crkbd/keymaps/madhatter/config.h | 18 ++
keyboards/crkbd/keymaps/madhatter/keymap.c | 215 ++++++++++++++++++
keyboards/crkbd/keymaps/madhatter/rules.mk | 11 +
.../space65/keymaps/madhatter/config.h | 4 +
.../space65/keymaps/madhatter/keymap.c | 43 ++++
.../space65/keymaps/madhatter/rules.mk | 5 +
.../prime_e/keymaps/madhatter/config.h | 6 +
.../prime_e/keymaps/madhatter/keymap.c | 160 +++++++++++++
.../wt75_b/keymaps/madhatter/config.h | 4 +
.../wt75_b/keymaps/madhatter/keymap.c | 2 +-
10 files changed, 467 insertions(+), 1 deletion(-)
create mode 100644 keyboards/crkbd/keymaps/madhatter/config.h
create mode 100644 keyboards/crkbd/keymaps/madhatter/keymap.c
create mode 100644 keyboards/crkbd/keymaps/madhatter/rules.mk
create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/config.h
create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/keymap.c
create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/rules.mk
create mode 100644 keyboards/primekb/prime_e/keymaps/madhatter/config.h
create mode 100644 keyboards/primekb/prime_e/keymaps/madhatter/keymap.c
create mode 100644 keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h
diff --git a/keyboards/crkbd/keymaps/madhatter/config.h b/keyboards/crkbd/keymaps/madhatter/config.h
new file mode 100644
index 000000000000..9a4d85dfce9c
--- /dev/null
+++ b/keyboards/crkbd/keymaps/madhatter/config.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#define EE_HANDS
+
+#define SSD1306OLED
+
+#ifdef RGBLIGHT_ENABLE
+# undef RGBLED_NUM
+# define RGBLIGHT_ANIMATIONS
+# define RGBLED_NUM 27
+# define RGBLIGHT_LIMIT_VAL 120
+# define RGBLIGHT_HUE_STEP 10
+# define RGBLIGHT_SAT_STEP 17
+# define RGBLIGHT_VAL_STEP 17
+#endif
+
+#undef PRODUCT
+#define PRODUCT MadHatter Hacked Corne Keyboard
diff --git a/keyboards/crkbd/keymaps/madhatter/keymap.c b/keyboards/crkbd/keymaps/madhatter/keymap.c
new file mode 100644
index 000000000000..9f52d3b540d3
--- /dev/null
+++ b/keyboards/crkbd/keymaps/madhatter/keymap.c
@@ -0,0 +1,215 @@
+#include QMK_KEYBOARD_H
+
+
+#ifdef OLED_DRIVER_ENABLE
+# define KEYLOGGER_LENGTH 5
+static uint32_t oled_timer = 0;
+static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
+static uint16_t log_timer = 0;
+// clang-format off
+static const char PROGMEM code_to_name[0xFF] = {
+// 0 1 2 3 4 5 6 7 8 9 A B c D E F
+ ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
+ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
+ '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
+ ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
+ ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
+ 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
+};
+
+void add_keylog(uint16_t keycode);
+#endif
+
+extern uint8_t is_master;
+
+enum corny_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+ RGBRST
+};
+
+#define LY_LWR MO(_LOWER)
+#define LY_RSE MO(_RAISE)
+
+#define KY_CESC LCTL_T(KC_ESC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT(
+ //,-----------------------------------------------------. ,-----------------------------------------------------.
+ 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_LCTL, 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,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
+ //`--------------------------' `--------------------------'
+
+ ),
+
+ [_LOWER] = LAYOUT(
+ //,-----------------------------------------------------. ,-----------------------------------------------------.
+ KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
+ //`--------------------------' `--------------------------'
+ ),
+
+ [_RAISE] = LAYOUT(
+ //,-----------------------------------------------------. ,-----------------------------------------------------.
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LCTL, XXXXXXX, KC_PGUP, KC_HOME, KC_END,KC_PGDN, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
+ //`--------------------------' `--------------------------'
+ ),
+
+ [_ADJUST] = LAYOUT(
+ //,-----------------------------------------------------. ,-----------------------------------------------------.
+ RESET, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ XXXXXXX, RGBRST, EEP_RST, AG_TOGG, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX,
+ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
+ //`--------------------------' `--------------------------'
+ )
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+int RGB_current_mode;
+
+// Setting ADJUST layer RGB back to default
+void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+ if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+ layer_on(layer3);
+ } else {
+ layer_off(layer3);
+ }
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_get_mode();
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_layer_state(void);
+const char *read_logo(void);
+void set_keylog(uint16_t keycode, keyrecord_t *record);
+const char *read_keylog(void);
+const char *read_keylogs(void);
+
+// const char *read_mode_icon(bool swap);
+// const char *read_host_led_state(void);
+// void set_timelog(void);
+// const char *read_timelog(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ // If you want to change the display of OLED, you need to change here
+ matrix_write_ln(matrix, read_layer_state());
+ matrix_write_ln(matrix, read_keylog());
+ //matrix_write_ln(matrix, read_keylogs());
+ //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
+ //matrix_write_ln(matrix, read_host_led_state());
+ //matrix_write_ln(matrix, read_timelog());
+ } else {
+ matrix_write(matrix, read_logo());
+ }
+}
+
+void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+#ifdef SSD1306OLED
+ set_keylog(keycode, record);
+#endif
+ // set_timelog();
+ }
+
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/crkbd/keymaps/madhatter/rules.mk b/keyboards/crkbd/keymaps/madhatter/rules.mk
new file mode 100644
index 000000000000..dfee5a0bf87a
--- /dev/null
+++ b/keyboards/crkbd/keymaps/madhatter/rules.mk
@@ -0,0 +1,11 @@
+BOOTLOADER = atmel-dfu # Elite-C
+
+MOUSEKEY_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./lib/glcdfont.c \
+ ./lib/rgb_state_reader.c \
+ ./lib/layer_state_reader.c \
+ ./lib/logo_reader.c \
+ ./lib/keylogger.c
diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/config.h b/keyboards/gray_studio/space65/keymaps/madhatter/config.h
new file mode 100644
index 000000000000..e297ebedc54c
--- /dev/null
+++ b/keyboards/gray_studio/space65/keymaps/madhatter/config.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#undef PRODUCT
+#define PRODUCT MadHatter\x27s Custom Spacc
diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c b/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c
new file mode 100644
index 000000000000..2fa47f427b3b
--- /dev/null
+++ b/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 Khader Syed
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+enum keyboard_layers {
+ _QWERTY,
+ _FNM
+};
+
+#define FNM MO(_FNM)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = LAYOUT(
+ KC_GESC, 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_BSLS, KC_DEL, KC_HOME,
+ 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_BSPC, KC_PGUP,
+ KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, FNM, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+[_FNM] = LAYOUT(
+ KC_GESC, 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_VOLD, KC_VOLU, KC_MFFD,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, RESET, KC_MRWD,
+ KC_TRNS, RGB_M_P, RGB_M_G, RGB_M_K, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS,
+ AG_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
+ ),
+
+};
diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk b/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk
new file mode 100644
index 000000000000..1e9835b3bd66
--- /dev/null
+++ b/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk
@@ -0,0 +1,5 @@
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no
+SLEEP_LED_ENABLE = no
+NKRO_ENABLE = yes
diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/config.h b/keyboards/primekb/prime_e/keymaps/madhatter/config.h
new file mode 100644
index 000000000000..8075bb73d554
--- /dev/null
+++ b/keyboards/primekb/prime_e/keymaps/madhatter/config.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#define TAPPING_TERM 150
+
+#undef PRODUCT
+#define PRODUCT MadHatter\x27s Custom Ilpse
diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c
new file mode 100644
index 000000000000..7b08d0ecf458
--- /dev/null
+++ b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c
@@ -0,0 +1,160 @@
+/* Copyright 2018 Holten Campbell
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+#define BLINK_DURATION 512
+#define CAPS_LED_PIN B1
+#define NUM_LED_PIN B2
+#define SCROLL_LED_PIN B3
+
+uint8_t CAPS;
+uint16_t BLINK_TIMER = 0;
+uint8_t CAPS_LED_STATE = 0;
+
+// Init togg_indicator so the compiler doesn't complain when I declare it last.
+static void togg_indicator(uint8_t *state, uint8_t pin);
+
+enum ilpse_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum skank_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT(
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LALT, LOWER, KC_LCMD, LT(_RAISE, KC_SPC), KC_LALT, KC_RGUI, KC_RCTL
+ ),
+
+ [_LOWER] = LAYOUT(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_DEL,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ [_RAISE] = LAYOUT(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
+ KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ [_ADJUST] = LAYOUT(
+ RESET, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ AG_TOGG, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
+
+void matrix_init_user(void) {
+ // set CapsLock LED to output and low
+ setPinOutput(CAPS_LED_PIN);
+ writePinLow(CAPS_LED_PIN);
+ // set NumLock LED to output and low
+ setPinOutput(NUM_LED_PIN);
+ writePinLow(NUM_LED_PIN);
+ // set ScrollLock LED to output and low
+ setPinOutput(SCROLL_LED_PIN);
+ writePinLow(SCROLL_LED_PIN);
+}
+
+void matrix_scan_user(void) {
+ if (CAPS == 1) {
+ // Blink the first led when capslock is active
+ if (BLINK_TIMER >= BLINK_DURATION) {
+ togg_indicator(&CAPS_LED_STATE, CAPS_LED_PIN);
+ BLINK_TIMER = 0;
+ }
+ BLINK_TIMER++;
+ }
+}
+
+//function for layer indicator LED
+layer_state_t layer_state_set_user(layer_state_t state) {
+ if (layer_state_cmp(state, 1)) {
+ writePinHigh(CAPS_LED_PIN);
+ } else {
+ writePinLow(CAPS_LED_PIN);
+ }
+ if (layer_state_cmp(state, 2)) {
+ writePinHigh(NUM_LED_PIN);
+ } else {
+ writePinLow(NUM_LED_PIN);
+ }
+ if (layer_state_cmp(state, 3)) {
+ writePinHigh(SCROLL_LED_PIN);
+ } else {
+ writePinLow(SCROLL_LED_PIN);
+ }
+ return state;
+}
+
+void led_set_user(uint8_t usb_led) {
+ CAPS = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
+}
+
+void togg_indicator(uint8_t *state, uint8_t pin) {
+ // Toggles a pin based on the current state
+ if (*state == 0){
+ *state = 1;
+ writePinHigh(pin);
+ }
+ else if (*state == 1){
+ *state = 0;
+ writePinLow(pin);
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h
new file mode 100644
index 000000000000..afb1d86d6c68
--- /dev/null
+++ b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#undef PRODUCT
+#define PRODUCT MadHatter\x27s Custom Singa V3
diff --git a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c
index b2fe74df7bb7..8b650dee3543 100644
--- a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c
+++ b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c
@@ -1,6 +1,6 @@
#include QMK_KEYBOARD_H
-enum my_layers {
+enum singav3_layers {
_QWERTY,
_FNMS
};
From ba7f52aaeba878544973952ca3fcce27ab4bb92d Mon Sep 17 00:00:00 2001
From: cole smith <38364556+daysgobye@users.noreply.github.com>
Date: Sat, 13 Jun 2020 12:08:54 -0700
Subject: [PATCH 14/36] Boardsource 3x4 info json fix (#9266)
* added bordsource 3x4 macro pad
* added bordsource 3x4 macro pad
* Update keyboards/boardsource/3x4/3x4.h
* Update keyboards/boardsource/3x4/3x4.c
* Update keyboards/boardsource/3x4/config.h
* Update keyboards/boardsource/3x4/config.h
* Update keyboards/boardsource/3x4/config.h
* Update keyboards/boardsource/3x4/config.h
* added link to readme
* Update keyboards/boardsource/3x4/keymaps/default/keymap.c
* Apply suggestions from code review
* changed the layout to refelect the keyboard
* Update keyboards/boardsource/3x4/info.json
Oh your right my bad. In the future is there an easier way for me to test the info.json and the confiscator before doing my pr?
* Apply suggestions from code review
* got 3x4 building again
* Apply suggestions from code review
* applied requested change on readme
* Update keyboards/boardsource/3x4/readme.md
* Apply suggestions from code review
---
keyboards/boardsource/3x4/info.json | 21 ++++++++++---------
.../boardsource/3x4/keymaps/default/keymap.c | 9 ++++----
keyboards/boardsource/3x4/readme.md | 3 ++-
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/keyboards/boardsource/3x4/info.json b/keyboards/boardsource/3x4/info.json
index 4ef02873e3ff..ea7a981032b6 100644
--- a/keyboards/boardsource/3x4/info.json
+++ b/keyboards/boardsource/3x4/info.json
@@ -5,23 +5,24 @@
"width": 4,
"height": 3,
"layouts": {
+
"LAYOUT": {
+
"layout": [
{ "label": "K01", "x": 0, "y": 0 },
{ "label": "K02", "x": 1, "y": 0 },
{ "label": "K03", "x": 2, "y": 0 },
+ { "label": "K04", "x": 3, "y": 0 },
- { "label": "K04", "x": 0, "y": 1 },
- { "label": "K05", "x": 1, "y": 1 },
- { "label": "K06", "x": 2, "y": 1 },
-
- { "label": "K07", "x": 0, "y": 2 },
- { "label": "K08", "x": 1, "y": 2 },
- { "label": "K09", "x": 2, "y": 2 },
+ { "label": "K05", "x": 0, "y": 1 },
+ { "label": "K06", "x": 1, "y": 1 },
+ { "label": "K07", "x": 2, "y": 1 },
+ { "label": "K08", "x": 3, "y": 1 },
- { "label": "K10", "x": 0, "y": 3 },
- { "label": "K11", "x": 1, "y": 3 },
- { "label": "K12", "x": 2, "y": 3 }
+ { "label": "K09", "x": 0, "y": 2 },
+ { "label": "K10", "x": 1, "y": 2 },
+ { "label": "K11", "x": 2, "y": 2 },
+ { "label": "K12", "x": 3, "y": 2 }
]
}
}
diff --git a/keyboards/boardsource/3x4/keymaps/default/keymap.c b/keyboards/boardsource/3x4/keymaps/default/keymap.c
index 3add4f7fbf18..67133735fa1f 100644
--- a/keyboards/boardsource/3x4/keymaps/default/keymap.c
+++ b/keyboards/boardsource/3x4/keymaps/default/keymap.c
@@ -1,9 +1,10 @@
-
#include QMK_KEYBOARD_H
-#define _MAIN 0
-#define _RAISE 1
-#define _LOWER 2
+enum layers {
+ _MAIN,
+ _RAISE,
+ _LOWER,
+};
// Readability keycodes
#define LOWER MO(_LOWER)
diff --git a/keyboards/boardsource/3x4/readme.md b/keyboards/boardsource/3x4/readme.md
index 67a22ed4c0bf..9d7ef895c6dc 100644
--- a/keyboards/boardsource/3x4/readme.md
+++ b/keyboards/boardsource/3x4/readme.md
@@ -1,5 +1,6 @@
# 3x4
-![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hh.jpg)
+
+![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hhl.jpg)
this macro pad / small 12 key was inspired by the plaid look
From 622e94c6cdf6a307ee87b6add974def647979f15 Mon Sep 17 00:00:00 2001
From: George Mao
Date: Sat, 13 Jun 2020 23:39:57 -0700
Subject: [PATCH 15/36] [Keyboard] Add S7 Elephant Rev2 Support (#9398)
* Add S7 Elephant Rev2 Support
* Apply suggestions from code review
I tested the changes on my board as well, thanks for the suggestions!
* Added a default folder in the makefile so that this would no longer be a breaking change
---
keyboards/s7_elephant/readme.md | 11 +-
keyboards/s7_elephant/{ => rev1}/config.h | 14 +-
keyboards/s7_elephant/{ => rev1}/info.json | 0
.../{ => rev1}/keymaps/default/config.h | 0
.../{ => rev1}/keymaps/default/keymap.c | 0
.../{ => rev1}/keymaps/default/readme.md | 0
keyboards/s7_elephant/rev1/readme.md | 17 ++
keyboards/s7_elephant/rev1/rev1.c | 1 +
.../{s7_elephant.h => rev1/rev1.h} | 4 +-
keyboards/s7_elephant/rev1/rules.mk | 25 +++
keyboards/s7_elephant/rev2/config.h | 83 +++++++++
keyboards/s7_elephant/rev2/info.json | 167 ++++++++++++++++++
.../s7_elephant/rev2/keymaps/default/keymap.c | 65 +++++++
.../rev2/keymaps/default/readme.md | 35 ++++
.../s7_elephant/rev2/keymaps/via/keymap.c | 92 ++++++++++
.../s7_elephant/rev2/keymaps/via/readme.md | 35 ++++
.../s7_elephant/rev2/keymaps/via/rules.mk | 1 +
keyboards/s7_elephant/rev2/readme.md | 17 ++
keyboards/s7_elephant/rev2/rev2.c | 19 ++
keyboards/s7_elephant/rev2/rev2.h | 61 +++++++
keyboards/s7_elephant/rev2/rules.mk | 33 ++++
keyboards/s7_elephant/rules.mk | 26 +--
keyboards/s7_elephant/s7_elephant.c | 1 -
23 files changed, 670 insertions(+), 37 deletions(-)
rename keyboards/s7_elephant/{ => rev1}/config.h (79%)
rename keyboards/s7_elephant/{ => rev1}/info.json (100%)
rename keyboards/s7_elephant/{ => rev1}/keymaps/default/config.h (100%)
rename keyboards/s7_elephant/{ => rev1}/keymaps/default/keymap.c (100%)
rename keyboards/s7_elephant/{ => rev1}/keymaps/default/readme.md (100%)
create mode 100644 keyboards/s7_elephant/rev1/readme.md
create mode 100644 keyboards/s7_elephant/rev1/rev1.c
rename keyboards/s7_elephant/{s7_elephant.h => rev1/rev1.h} (99%)
create mode 100644 keyboards/s7_elephant/rev1/rules.mk
create mode 100644 keyboards/s7_elephant/rev2/config.h
create mode 100644 keyboards/s7_elephant/rev2/info.json
create mode 100644 keyboards/s7_elephant/rev2/keymaps/default/keymap.c
create mode 100644 keyboards/s7_elephant/rev2/keymaps/default/readme.md
create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/keymap.c
create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/readme.md
create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/rules.mk
create mode 100644 keyboards/s7_elephant/rev2/readme.md
create mode 100644 keyboards/s7_elephant/rev2/rev2.c
create mode 100644 keyboards/s7_elephant/rev2/rev2.h
create mode 100644 keyboards/s7_elephant/rev2/rules.mk
delete mode 100644 keyboards/s7_elephant/s7_elephant.c
diff --git a/keyboards/s7_elephant/readme.md b/keyboards/s7_elephant/readme.md
index 466e3f7316de..76838be218a8 100644
--- a/keyboards/s7_elephant/readme.md
+++ b/keyboards/s7_elephant/readme.md
@@ -4,13 +4,16 @@
A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack.
-Keyboard Maintainer: QMK Community
-Hardware Supported: S7 Elephant
-Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0)
+**Firmware files are SPECIFIC to each revision. Firmware files from rev1 will not work on rev2 and vice versa.** Please use the `.hex` appropriate for your board.
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: S7 Elephant rev1, rev2
+* Hardware Availability: [The GB has had 2 rounds with little chance to run again.](https://geekhack.org/index.php?topic=96434.0)
Make example for this keyboard (after setting up your build environment):
- make s7_elephant:default:dfu
+ make s7_elephant/rev1:default # 2018 run
+ make s7_elephant/rev2:default # 2019 run
To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer.
diff --git a/keyboards/s7_elephant/config.h b/keyboards/s7_elephant/rev1/config.h
similarity index 79%
rename from keyboards/s7_elephant/config.h
rename to keyboards/s7_elephant/rev1/config.h
index c4f57178d83f..d2770d117b60 100644
--- a/keyboards/s7_elephant/config.h
+++ b/keyboards/s7_elephant/rev1/config.h
@@ -3,7 +3,7 @@
#include "config_common.h"
/* USB Device descriptor parameter */
-#define VENDOR_ID 0xFEED
+#define VENDOR_ID 0xA13B // Hexidecimal A13B will be Jacky's vendor ID
#define PRODUCT_ID 0x0007
#define DEVICE_VER 0x0001
#define MANUFACTURER jacky
@@ -22,9 +22,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
-/* 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
@@ -40,3 +37,12 @@
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP
#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
diff --git a/keyboards/s7_elephant/info.json b/keyboards/s7_elephant/rev1/info.json
similarity index 100%
rename from keyboards/s7_elephant/info.json
rename to keyboards/s7_elephant/rev1/info.json
diff --git a/keyboards/s7_elephant/keymaps/default/config.h b/keyboards/s7_elephant/rev1/keymaps/default/config.h
similarity index 100%
rename from keyboards/s7_elephant/keymaps/default/config.h
rename to keyboards/s7_elephant/rev1/keymaps/default/config.h
diff --git a/keyboards/s7_elephant/keymaps/default/keymap.c b/keyboards/s7_elephant/rev1/keymaps/default/keymap.c
similarity index 100%
rename from keyboards/s7_elephant/keymaps/default/keymap.c
rename to keyboards/s7_elephant/rev1/keymaps/default/keymap.c
diff --git a/keyboards/s7_elephant/keymaps/default/readme.md b/keyboards/s7_elephant/rev1/keymaps/default/readme.md
similarity index 100%
rename from keyboards/s7_elephant/keymaps/default/readme.md
rename to keyboards/s7_elephant/rev1/keymaps/default/readme.md
diff --git a/keyboards/s7_elephant/rev1/readme.md b/keyboards/s7_elephant/rev1/readme.md
new file mode 100644
index 000000000000..702be4c3a786
--- /dev/null
+++ b/keyboards/s7_elephant/rev1/readme.md
@@ -0,0 +1,17 @@
+# S7 Elephant
+
+![S7 Elephant](https://i.imgur.com/CaHxKBJ.jpg)
+
+A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack.
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: S7 Elephant
+* Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make s7_elephant/rev1:default
+
+To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer.
+
+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).
diff --git a/keyboards/s7_elephant/rev1/rev1.c b/keyboards/s7_elephant/rev1/rev1.c
new file mode 100644
index 000000000000..520a869e57ba
--- /dev/null
+++ b/keyboards/s7_elephant/rev1/rev1.c
@@ -0,0 +1 @@
+#include "rev1.h"
diff --git a/keyboards/s7_elephant/s7_elephant.h b/keyboards/s7_elephant/rev1/rev1.h
similarity index 99%
rename from keyboards/s7_elephant/s7_elephant.h
rename to keyboards/s7_elephant/rev1/rev1.h
index c351ffdb91bb..958ba0fae0af 100644
--- a/keyboards/s7_elephant/s7_elephant.h
+++ b/keyboards/s7_elephant/rev1/rev1.h
@@ -1,5 +1,4 @@
-#ifndef S7_ELEPHANT_H
-#define S7_ELEPHANT_H
+#pragma once
#include "quantum.h"
@@ -852,4 +851,3 @@ K400, K401, K402, K403, K407, K410, K4
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \
{ K400, K401, K402, K403, ____, ____, ____, K407, ____, ____, K410, ____, ____, K413, K414, K415 } \
}
-#endif
diff --git a/keyboards/s7_elephant/rev1/rules.mk b/keyboards/s7_elephant/rev1/rules.mk
new file mode 100644
index 000000000000..91fe85c3dfb1
--- /dev/null
+++ b/keyboards/s7_elephant/rev1/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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
+RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
diff --git a/keyboards/s7_elephant/rev2/config.h b/keyboards/s7_elephant/rev2/config.h
new file mode 100644
index 000000000000..5c5b526aa7cf
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/config.h
@@ -0,0 +1,83 @@
+/*
+Copyright 2020 MudkipMao
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xA13B // Hexidecimal A13B will be Jacky's vendor ID
+#define PRODUCT_ID 0x0008 // 8 for S7++
+#define DEVICE_VER 0x0002
+#define MANUFACTURER Jacky
+#define PRODUCT Jacky S7 Elephant Rev 2
+#define DESCRIPTION A high-end 70% custom keyboard
+
+/* Don't remove this without also removing LTO_ENABLE=yes in rules.mk */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+/*
+ * 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)
+ *
+ *
+ * 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 }
+#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0, E6 }
+
+/* Setting the matrix value of top left key for bootmagic lite */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 15
+
+#define DIODE_DIRECTION ROW2COL
+
+#define BACKLIGHT_PIN B6
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 15
+
+#define RGB_DI_PIN E2
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 2
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+#endif // RGB_DI_PIN
+
+/* 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
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/s7_elephant/rev2/info.json b/keyboards/s7_elephant/rev2/info.json
new file mode 100644
index 000000000000..5c811cd47df8
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/info.json
@@ -0,0 +1,167 @@
+{
+ "keyboard_name": "S7 Elephant Rev2",
+ "url": "https://geekhack.org/index.php?topic=103148.0",
+ "maintainer": "qmk",
+ "width": 17.25,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "key_count": 75,
+ "layout": [
+ {"label":"K0F (B0,E6)", "x":0, "y":0},
+ {"label":"K00 (B0,D0)", "x":1.25, "y":0},
+ {"label":"K01 (B0,D1)", "x":2.25, "y":0},
+ {"label":"K02 (B0,D2)", "x":3.25, "y":0},
+ {"label":"K03 (B0,D3)", "x":4.25, "y":0},
+ {"label":"K04 (B0,D5)", "x":5.25, "y":0},
+ {"label":"K05 (B0,D4)", "x":6.25, "y":0},
+ {"label":"K06 (B0,D6)", "x":7.25, "y":0},
+ {"label":"K07 (B0,D7)", "x":8.25, "y":0},
+ {"label":"K08 (B0,B4)", "x":9.25, "y":0},
+ {"label":"K09 (B0,F7)", "x":10.25, "y":0},
+ {"label":"K0A (B0,F6)", "x":11.25, "y":0},
+ {"label":"K0B (B0,F5)", "x":12.25, "y":0},
+ {"label":"K0C (B0,F4)", "x":13.25, "y":0},
+ {"label":"K0D (B0,F1)", "x":14.25, "y":0},
+ {"label":"K0E (B0,F0)", "x":15.25, "y":0},
+ {"label":"K4E (B7,F0)", "x":16.25, "y":0},
+ {"label":"K1F (B1,E6)", "x":0, "y":1},
+ {"label":"K10 (B1,D0)", "x":1.25, "y":1, "w":1.5},
+ {"label":"K11 (B1,D1)", "x":2.75, "y":1},
+ {"label":"K12 (B1,D2)", "x":3.75, "y":1},
+ {"label":"K13 (B1,D3)", "x":4.75, "y":1},
+ {"label":"K14 (B1,D5)", "x":5.75, "y":1},
+ {"label":"K15 (B1,D4)", "x":6.75, "y":1},
+ {"label":"K16 (B1,D6)", "x":7.75, "y":1},
+ {"label":"K17 (B1,D7)", "x":8.75, "y":1},
+ {"label":"K18 (B1,B4)", "x":9.75, "y":1},
+ {"label":"K19 (B1,F7)", "x":10.75, "y":1},
+ {"label":"K1A (B1,F6)", "x":11.75, "y":1},
+ {"label":"K1B (B1,F5)", "x":12.75, "y":1},
+ {"label":"K1C (B1,F4)", "x":13.75, "y":1},
+ {"label":"K2C (B2,F4)", "x":14.75, "y":1, "w":1.5},
+ {"label":"K1E (B1,F0)", "x":16.25, "y":1},
+ {"label":"K2F (B2,E6)", "x":0, "y":2},
+ {"label":"K20 (B2,D0)", "x":1.25, "y":2, "w":1.75},
+ {"label":"K21 (B2,D1)", "x":3, "y":2},
+ {"label":"K22 (B2,D2)", "x":4, "y":2},
+ {"label":"K23 (B2,D3)", "x":5, "y":2},
+ {"label":"K24 (B2,D5)", "x":6, "y":2},
+ {"label":"K25 (B2,D4)", "x":7, "y":2},
+ {"label":"K26 (B2,D6)", "x":8, "y":2},
+ {"label":"K27 (B2,D7)", "x":9, "y":2},
+ {"label":"K28 (B2,B4)", "x":10, "y":2},
+ {"label":"K29 (B2,F7)", "x":11, "y":2},
+ {"label":"K2A (B2,F6)", "x":12, "y":2},
+ {"label":"K2B (B2,F5)", "x":13, "y":2},
+ {"label":"K1D (B1,F1)", "x":14, "y":2, "w":2.25},
+ {"label":"K2E (B2,F0)", "x":16.25, "y":2},
+ {"label":"K3F (B3,E6)", "x":0, "y":3},
+ {"label":"K30 (B3,D0)", "x":1.25, "y":3, "w":1.25},
+ {"label":"K31 (B3,D1)", "x":2.5, "y":3},
+ {"label":"K32 (B3,D2)", "x":3.5, "y":3},
+ {"label":"K33 (B3,D3)", "x":4.5, "y":3},
+ {"label":"K34 (B3,D5)", "x":5.5, "y":3},
+ {"label":"K35 (B3,D4)", "x":6.5, "y":3},
+ {"label":"K36 (B3,D6)", "x":7.5, "y":3},
+ {"label":"K37 (B3,D7)", "x":8.5, "y":3},
+ {"label":"K38 (B3,B4)", "x":9.5, "y":3},
+ {"label":"K39 (B3,F7)", "x":10.5, "y":3},
+ {"label":"K3A (B3,F6)", "x":11.5, "y":3},
+ {"label":"K3B (B3,F5)", "x":12.5, "y":3},
+ {"label":"K3C (B3,F4)", "x":13.5, "y":3, "w":1.75},
+ {"label":"K3D (B3,F1)", "x":15.25, "y":3},
+ {"label":"K3E (B3,F0)", "x":16.25, "y":3},
+ {"label":"K4F (B7,E6)", "x":0, "y":4},
+ {"label":"K40 (B7,D0)", "x":1.25, "y":4, "w":1.25},
+ {"label":"K41 (B7,D1)", "x":2.5, "y":4, "w":1.25},
+ {"label":"K42 (B7,D2)", "x":3.75, "y":4, "w":1.25},
+ {"label":"K46 (B7,D6)", "x":5, "y":4, "w":6.25},
+ {"label":"K48 (B7,B4)", "x":11.25, "y":4},
+ {"label":"K49 (B7,F7)", "x":12.25, "y":4},
+ {"label":"K4A (B7,F6)", "x":13.25, "y":4},
+ {"label":"K4B (B7,F5)", "x":14.25, "y":4},
+ {"label":"K4C (B7,F4)", "x":15.25, "y":4},
+ {"label":"K4D (B7,F1)", "x":16.25, "y":4}
+ ]
+ },
+ "LAYOUT_ansi_1u": {
+ "key_count": 73,
+ "layout": [
+ {"label":"K0F", "x":0, "y":0},
+ {"label":"K00", "x":1.25, "y":0},
+ {"label":"K01", "x":2.25, "y":0},
+ {"label":"K02", "x":3.25, "y":0},
+ {"label":"K03", "x":4.25, "y":0},
+ {"label":"K04", "x":5.25, "y":0},
+ {"label":"K05", "x":6.25, "y":0},
+ {"label":"K06", "x":7.25, "y":0},
+ {"label":"K07", "x":8.25, "y":0},
+ {"label":"K08", "x":9.25, "y":0},
+ {"label":"K09", "x":10.25, "y":0},
+ {"label":"K0A", "x":11.25, "y":0},
+ {"label":"K0B", "x":12.25, "y":0},
+ {"label":"K0C", "x":13.25, "y":0},
+ {"label":"K0E", "x":14.25, "y":0, "w":2},
+ {"label":"K4E", "x":16.25, "y":0},
+ {"label":"K1F", "x":0, "y":1},
+ {"label":"K10", "x":1.25, "y":1, "w":1.5},
+ {"label":"K11", "x":2.75, "y":1},
+ {"label":"K12", "x":3.75, "y":1},
+ {"label":"K13", "x":4.75, "y":1},
+ {"label":"K14", "x":5.75, "y":1},
+ {"label":"K15", "x":6.75, "y":1},
+ {"label":"K16", "x":7.75, "y":1},
+ {"label":"K17", "x":8.75, "y":1},
+ {"label":"K18", "x":9.75, "y":1},
+ {"label":"K19", "x":10.75, "y":1},
+ {"label":"K1A", "x":11.75, "y":1},
+ {"label":"K1B", "x":12.75, "y":1},
+ {"label":"K1C", "x":13.75, "y":1},
+ {"label":"K2C", "x":14.75, "y":1, "w":1.5},
+ {"label":"K1E", "x":16.25, "y":1},
+ {"label":"K2F", "x":0, "y":2},
+ {"label":"K20", "x":1.25, "y":2, "w":1.75},
+ {"label":"K21", "x":3, "y":2},
+ {"label":"K22", "x":4, "y":2},
+ {"label":"K23", "x":5, "y":2},
+ {"label":"K24", "x":6, "y":2},
+ {"label":"K25", "x":7, "y":2},
+ {"label":"K26", "x":8, "y":2},
+ {"label":"K27", "x":9, "y":2},
+ {"label":"K28", "x":10, "y":2},
+ {"label":"K29", "x":11, "y":2},
+ {"label":"K2A", "x":12, "y":2},
+ {"label":"K2B", "x":13, "y":2},
+ {"label":"K1D", "x":14, "y":2, "w":2.25},
+ {"label":"K2E", "x":16.25, "y":2},
+ {"label":"K3F", "x":0, "y":3},
+ {"label":"K30", "x":1.25, "y":3, "w":2.25},
+ {"label":"K32", "x":3.5, "y":3},
+ {"label":"K33", "x":4.5, "y":3},
+ {"label":"K34", "x":5.5, "y":3},
+ {"label":"K35", "x":6.5, "y":3},
+ {"label":"K36", "x":7.5, "y":3},
+ {"label":"K37", "x":8.5, "y":3},
+ {"label":"K38", "x":9.5, "y":3},
+ {"label":"K39", "x":10.5, "y":3},
+ {"label":"K3A", "x":11.5, "y":3},
+ {"label":"K3B", "x":12.5, "y":3},
+ {"label":"K3C", "x":13.5, "y":3, "w":1.75},
+ {"label":"K3D", "x":15.25, "y":3},
+ {"label":"K3E", "x":16.25, "y":3},
+ {"label":"K4F", "x":0, "y":4},
+ {"label":"K40", "x":1.25, "y":4, "w":1.25},
+ {"label":"K41", "x":2.5, "y":4, "w":1.25},
+ {"label":"K42", "x":3.75, "y":4, "w":1.25},
+ {"label":"K46", "x":5, "y":4, "w":6.25},
+ {"label":"K48", "x":11.25, "y":4},
+ {"label":"K49", "x":12.25, "y":4},
+ {"label":"K4A", "x":13.25, "y":4},
+ {"label":"K4B", "x":14.25, "y":4},
+ {"label":"K4C", "x":15.25, "y":4},
+ {"label":"K4D", "x":16.25, "y":4}
+ ]
+ }
+ }
+}
diff --git a/keyboards/s7_elephant/rev2/keymaps/default/keymap.c b/keyboards/s7_elephant/rev2/keymaps/default/keymap.c
new file mode 100644
index 000000000000..b1fbd3830d63
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/keymaps/default/keymap.c
@@ -0,0 +1,65 @@
+#include QMK_KEYBOARD_H
+
+enum custom_layers {
+ _QWERTY,
+ _FN
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Home|
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | End |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F5 | | Ctrl | Gui | Alt | Space | RAlt | FN | RCtrl | L | D | R |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+
+ [_QWERTY] = LAYOUT_ansi_1u(
+ KC_F1, KC_GESC, 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_F2, 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_F3, 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_ENT, KC_HOME,
+ KC_F4, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
+ KC_F5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+/* FN
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * |Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause|
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | |PgDn |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * |EEPRST| | | | | | | | | | | |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+
+ [_FN] = LAYOUT_ansi_1u(
+ RESET, 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,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_PGUP,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN,
+ EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
+bool led_update_user(led_t led_state) {
+ // Turn LEDs On/Off for Caps Lock
+ if (led_state.caps_lock) {
+ rgblight_enable_noeeprom();
+ rgblight_sethsv_noeeprom(0, 0, 80);
+ } else {
+ rgblight_sethsv_noeeprom(0, 0, 80);
+ rgblight_disable_noeeprom();
+ }
+ return false;
+}
diff --git a/keyboards/s7_elephant/rev2/keymaps/default/readme.md b/keyboards/s7_elephant/rev2/keymaps/default/readme.md
new file mode 100644
index 000000000000..c4fe30acdd58
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/keymaps/default/readme.md
@@ -0,0 +1,35 @@
+# Default keymap for S7 Elephant
+
+**Features**
+
+* LEDs are functioning as Caps-Lock indicators
+
+## QWERTY (Normal) Layer
+```
+,------. ,-------------------------------------------------------------------------------------------------.
+| F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home |
+|------| |-------------------------------------------------------------------------------------------------|
+| F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End |
+|------| |-------------------------------------------------------------------------------------------------|
+| F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins |
+|------| |-------------------------------------------------------------------------------------------------|
+| F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del |
+|------| |-------------------------------------------------------------------------------------------------|
+| F5 | | Ctrl | Gui | Alt | Space | FN | RAlt | RCtrl | L | D | R |
+`------' `-------------------------------------------------------------------------------------------------'
+```
+
+## FN Layer
+```
+,------. ,-------------------------------------------------------------------------------------------------.
+|Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause|
+|------| |-------------------------------------------------------------------------------------------------|
+| | | | | | | | | | | | | | | | | |
+|------| |-------------------------------------------------------------------------------------------------|
+| | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp |
+|------| |-------------------------------------------------------------------------------------------------|
+| | | | | | | | | | | | | | | |PgDn |
+|------| |-------------------------------------------------------------------------------------------------|
+|EPRM | | | | | | | | | | | |
+`------' `-------------------------------------------------------------------------------------------------'
+```
diff --git a/keyboards/s7_elephant/rev2/keymaps/via/keymap.c b/keyboards/s7_elephant/rev2/keymaps/via/keymap.c
new file mode 100644
index 000000000000..b81777b12ad7
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/keymaps/via/keymap.c
@@ -0,0 +1,92 @@
+#include QMK_KEYBOARD_H
+
+// For readability
+enum layer_names {
+ _BASE,
+ _FN1,
+ _FN2,
+ _FN3,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Default layer
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | F1 | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |Home |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | End |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F5 | | Ctrl | Gui | Alt | Space | RAlt | FN | RCtrl | L | D | R |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+ [_BASE] = LAYOUT_ansi_1u(
+ KC_F1, KC_ESC, 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_F2, 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_F3, 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_ENT, KC_HOME,
+ KC_F4, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
+ KC_F5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ /* Fn1 Layer
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | F6 | | `~ | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F7 | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F8 | | |VolD |VolU |Mute | | | | | | | | | |PgUp |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F9 | | |Prev |Play |Next | | | | | | | | | |PgDn |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | F10 | | | | | | | | | | | |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+ [_FN1] = LAYOUT_ansi_1u(
+ KC_F6, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_F7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_F8, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP,
+ KC_F9, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN,
+ KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Fn2 Layer
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+ [_FN2] = LAYOUT_ansi_1u(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Fn3 Layer
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+ [_FN3] = LAYOUT_ansi_1u(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+};
diff --git a/keyboards/s7_elephant/rev2/keymaps/via/readme.md b/keyboards/s7_elephant/rev2/keymaps/via/readme.md
new file mode 100644
index 000000000000..c4fe30acdd58
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/keymaps/via/readme.md
@@ -0,0 +1,35 @@
+# Default keymap for S7 Elephant
+
+**Features**
+
+* LEDs are functioning as Caps-Lock indicators
+
+## QWERTY (Normal) Layer
+```
+,------. ,-------------------------------------------------------------------------------------------------.
+| F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home |
+|------| |-------------------------------------------------------------------------------------------------|
+| F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End |
+|------| |-------------------------------------------------------------------------------------------------|
+| F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins |
+|------| |-------------------------------------------------------------------------------------------------|
+| F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del |
+|------| |-------------------------------------------------------------------------------------------------|
+| F5 | | Ctrl | Gui | Alt | Space | FN | RAlt | RCtrl | L | D | R |
+`------' `-------------------------------------------------------------------------------------------------'
+```
+
+## FN Layer
+```
+,------. ,-------------------------------------------------------------------------------------------------.
+|Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause|
+|------| |-------------------------------------------------------------------------------------------------|
+| | | | | | | | | | | | | | | | | |
+|------| |-------------------------------------------------------------------------------------------------|
+| | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp |
+|------| |-------------------------------------------------------------------------------------------------|
+| | | | | | | | | | | | | | | |PgDn |
+|------| |-------------------------------------------------------------------------------------------------|
+|EPRM | | | | | | | | | | | |
+`------' `-------------------------------------------------------------------------------------------------'
+```
diff --git a/keyboards/s7_elephant/rev2/keymaps/via/rules.mk b/keyboards/s7_elephant/rev2/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/s7_elephant/rev2/readme.md b/keyboards/s7_elephant/rev2/readme.md
new file mode 100644
index 000000000000..04cbafd96f53
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/readme.md
@@ -0,0 +1,17 @@
+# S7 Elephant
+
+![S7 Elephant](https://i.imgur.com/CaHxKBJ.jpg)
+
+A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack.
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: S7 Elephant
+* Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make s7_elephant/rev2:default
+
+To enter the bootloader, either short the pins on the PCB next to CAPSLOCK or the press the RESET button on the FN layer.
+
+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).
diff --git a/keyboards/s7_elephant/rev2/rev2.c b/keyboards/s7_elephant/rev2/rev2.c
new file mode 100644
index 000000000000..3e84aedd5267
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/rev2.c
@@ -0,0 +1,19 @@
+/* Copyright 2020 MudkipMao
+ *
+ * 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 .
+ */
+#include "rev2.h"
+
+// generated by KBFirmware JSON to QMK Parser
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/s7_elephant/rev2/rev2.h b/keyboards/s7_elephant/rev2/rev2.h
new file mode 100644
index 000000000000..16fe50aadbff
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/rev2.h
@@ -0,0 +1,61 @@
+#pragma once
+
+#include "quantum.h"
+
+#define ___ KC_NO
+
+/* ALL: This is an odd layout that the JSON file comes preloaded with. Split left-shift and ansi enter
+ * ,------. ,-------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | | |
+ * |------| |-------------------------------------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * `------' `-------------------------------------------------------------------------------------------------'
+ */
+
+#define LAYOUT_all( \
+ K0F, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \
+ K1F, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \
+ K2F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \
+ K3F, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K4F, K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___, K2E, K2F }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
+ { K40, K41, K42, ___, ___, ___, K46, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F } \
+}
+
+/* ANSI
+ * ,---. ,---------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | | | |
+ * |---| |---------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | | |
+ * |---| |---------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |---| |---------------------------------------------------------------|
+ * | | | | | | | | | | | | | | | | |
+ * |---| |---------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * `---' `---------------------------------------------------------------'
+ */
+
+#define LAYOUT_ansi_1u( \
+ K0F, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K4E, \
+ K1F, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \
+ K2F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \
+ K3F, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K4F, K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, ___, K0E, K0F }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___, K2E, K2F }, \
+ { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
+ { K40, K41, K42, ___, ___, ___, K46, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F } \
+}
diff --git a/keyboards/s7_elephant/rev2/rules.mk b/keyboards/s7_elephant/rev2/rules.mk
new file mode 100644
index 000000000000..cbf45a2b9be9
--- /dev/null
+++ b/keyboards/s7_elephant/rev2/rules.mk
@@ -0,0 +1,33 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+LTO_ENABLE = yes
diff --git a/keyboards/s7_elephant/rules.mk b/keyboards/s7_elephant/rules.mk
index 91fe85c3dfb1..318b6ee209ca 100644
--- a/keyboards/s7_elephant/rules.mk
+++ b/keyboards/s7_elephant/rules.mk
@@ -1,25 +1 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# ATmega32A bootloadHID
-# ATmega328P USBasp
-BOOTLOADER = atmel-dfu
-
-# Build Options
-# comment out to disable the options.
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # 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
-RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
+DEFAULT_FOLDER = s7_elephant/rev1
\ No newline at end of file
diff --git a/keyboards/s7_elephant/s7_elephant.c b/keyboards/s7_elephant/s7_elephant.c
deleted file mode 100644
index a869f46dbe57..000000000000
--- a/keyboards/s7_elephant/s7_elephant.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "s7_elephant.h"
From 294cfd8d33aea0b2846fd57c0fdfb6475e093c98 Mon Sep 17 00:00:00 2001
From: jems-lee <30412555+jems-lee@users.noreply.github.com>
Date: Sun, 14 Jun 2020 12:49:36 -0400
Subject: [PATCH 16/36] Delete trailing period in documentation (#9416)
---
docs/feature_leader_key.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md
index 828d6557d3e6..0803a411c6c1 100644
--- a/docs/feature_leader_key.md
+++ b/docs/feature_leader_key.md
@@ -5,7 +5,7 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
That's what `KC_LEAD` does. Here's an example:
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
-2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. .
+2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low.
* By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
3. Within your `matrix_scan_user` function, add something like this:
From c029c5b187508755b2030354906a55d1c5349a9e Mon Sep 17 00:00:00 2001
From: Maarten Dekkers
Date: Mon, 15 Jun 2020 11:09:24 +0200
Subject: [PATCH 17/36] [Keyboard] Add Eon75 (#9333)
Co-authored-by: Drashna Jaelre
Co-authored-by: Maarten Dekkers
---
keyboards/maartenwut/eon75/config.h | 221 ++++++++++++++
keyboards/maartenwut/eon75/eon75.c | 45 +++
keyboards/maartenwut/eon75/eon75.h | 97 ++++++
keyboards/maartenwut/eon75/info.json | 289 ++++++++++++++++++
.../maartenwut/eon75/keymaps/default/keymap.c | 34 +++
.../maartenwut/eon75/keymaps/via/keymap.c | 47 +++
.../maartenwut/eon75/keymaps/via/rules.mk | 2 +
keyboards/maartenwut/eon75/readme.md | 13 +
keyboards/maartenwut/eon75/rules.mk | 32 ++
9 files changed, 780 insertions(+)
create mode 100644 keyboards/maartenwut/eon75/config.h
create mode 100644 keyboards/maartenwut/eon75/eon75.c
create mode 100644 keyboards/maartenwut/eon75/eon75.h
create mode 100644 keyboards/maartenwut/eon75/info.json
create mode 100644 keyboards/maartenwut/eon75/keymaps/default/keymap.c
create mode 100644 keyboards/maartenwut/eon75/keymaps/via/keymap.c
create mode 100644 keyboards/maartenwut/eon75/keymaps/via/rules.mk
create mode 100644 keyboards/maartenwut/eon75/readme.md
create mode 100644 keyboards/maartenwut/eon75/rules.mk
diff --git a/keyboards/maartenwut/eon75/config.h b/keyboards/maartenwut/eon75/config.h
new file mode 100644
index 000000000000..41be76245b7a
--- /dev/null
+++ b/keyboards/maartenwut/eon75/config.h
@@ -0,0 +1,221 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4705
+#define PRODUCT_ID 0x5C62
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Maartenwut
+#define PRODUCT Eon75
+#define DESCRIPTION A 75% PCB
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 8
+
+/*
+ * 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 {D1,D0,D3,D2,D6,D4,D7,B4,B5,B6,C6,C7}
+#define MATRIX_COL_PINS {E6,F0,F1,F4,F5,F6,F7,B3}
+#define UNUSED_PINS {B2,B1}
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN D0
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 12
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// /*== customize breathing effect ==*/
+// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
+// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
+// /*==== use exp() and sin() ====*/
+// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
+// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* 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
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * 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.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
+
diff --git a/keyboards/maartenwut/eon75/eon75.c b/keyboards/maartenwut/eon75/eon75.c
new file mode 100644
index 000000000000..86b462dd9ecc
--- /dev/null
+++ b/keyboards/maartenwut/eon75/eon75.c
@@ -0,0 +1,45 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#include "eon75.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ matrix_init_user();
+ led_init_ports();
+};
+
+void led_init_ports(void) {
+ // * Set our LED pins as output and high
+ setPinOutput(D5);
+ writePinHigh(D5);
+
+ setPinOutput(B7);
+ writePinHigh(B7);
+
+ setPinOutput(B0);
+ writePinHigh(B0);
+}
+
+bool led_update_kb(led_t led_state) {
+ if(led_update_user(led_state)) {
+ writePin(D5, !led_state.caps_lock);
+ writePin(B7, !led_state.num_lock);
+ writePin(B0, !led_state.scroll_lock);
+ }
+
+ return true;
+}
diff --git a/keyboards/maartenwut/eon75/eon75.h b/keyboards/maartenwut/eon75/eon75.h
new file mode 100644
index 000000000000..5ce932a6467f
--- /dev/null
+++ b/keyboards/maartenwut/eon75/eon75.h
@@ -0,0 +1,97 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+#define XXX KC_NO
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+
+#define LAYOUT_all( \
+ k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \
+ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \
+ k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \
+ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, \
+ k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \
+ ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07 }, \
+ { k10, k11, XXX, k13, k14, k15, k16, k17 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37 }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47 }, \
+ { k50, k51, k52, k53, k54, k55, XXX, k57 }, \
+ { k60, k61, k62, k63, k64, k65, k66, XXX }, \
+ { k70, k71, k72, k73, k74, k75, k76, k77 }, \
+ { k80, k81, k82, k83, k84, k85, k86, k87 }, \
+ { k90, k91, k92, k93, k94, k95, XXX, k97 }, \
+ { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \
+ { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \
+}
+
+#define LAYOUT_ansi( \
+ k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \
+ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, \
+ k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \
+ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \
+ k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \
+ ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07 }, \
+ { k10, k11, XXX, k13, k14, k15, k16, k17 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27 }, \
+ { k30, k31, k32, k33, k34, k35, XXX, k37 }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47 }, \
+ { k50, k51, k52, k53, k54, k55, XXX, k57 }, \
+ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \
+ { k70, k71, k72, k73, k74, k75, k76, k77 }, \
+ { k80, k81, k82, k83, k84, k85, k86, k87 }, \
+ { XXX, k91, k92, k93, k94, k95, XXX, k97 }, \
+ { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \
+ { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \
+}
+
+#define LAYOUT_iso( \
+ k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \
+ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, \
+ k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k57, \
+ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, \
+ k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \
+ ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07 }, \
+ { k10, k11, XXX, k13, k14, k15, k16, k17 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27 }, \
+ { k30, k31, k32, k33, k34, k35, XXX, k37 }, \
+ { k40, k41, k42, k43, k44, k45, k46, XXX }, \
+ { k50, k51, k52, k53, k54, k55, XXX, k57 }, \
+ { k60, k61, k62, k63, k64, k65, k66, XXX }, \
+ { k70, k71, k72, k73, k74, k75, k76, k77 }, \
+ { k80, k81, k82, k83, k84, k85, k86, k87 }, \
+ { k90, k91, k92, k93, k94, k95, XXX, k97 }, \
+ { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \
+ { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \
+}
diff --git a/keyboards/maartenwut/eon75/info.json b/keyboards/maartenwut/eon75/info.json
new file mode 100644
index 000000000000..9066542a1f36
--- /dev/null
+++ b/keyboards/maartenwut/eon75/info.json
@@ -0,0 +1,289 @@
+{
+ "keyboard_name": "Eon75",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16.5,
+ "height": 6.5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1.5, "y":0},
+ {"x":2.5, "y":0},
+ {"x":3.5, "y":0},
+ {"x":4.5, "y":0},
+ {"x":5.75, "y":0},
+ {"x":6.75, "y":0},
+ {"x":7.75, "y":0},
+ {"x":8.75, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14.5, "y":0},
+ {"x":15.5, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25},
+ {"x":14, "y":1.25},
+ {"x":15.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.5, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25},
+ {"x":13.75, "y":3.25, "w":1.25},
+ {"x":15.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":1.25},
+ {"x":1.25, "y":4.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":1.75},
+ {"x":14.25, "y":4.5},
+ {"x":15.5, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25},
+ {"x":11, "y":5.25},
+ {"x":12, "y":5.25},
+ {"x":13.25, "y":5.5},
+ {"x":14.25, "y":5.5},
+ {"x":15.25, "y":5.5}
+ ]
+ },
+ "LAYOUT_ansi": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1.5, "y":0},
+ {"x":2.5, "y":0},
+ {"x":3.5, "y":0},
+ {"x":4.5, "y":0},
+ {"x":5.75, "y":0},
+ {"x":6.75, "y":0},
+ {"x":7.75, "y":0},
+ {"x":8.75, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14.5, "y":0},
+ {"x":15.5, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.5, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25, "w":2.25},
+ {"x":15.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":2.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":1.75},
+ {"x":14.25, "y":4.5},
+ {"x":15.5, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25},
+ {"x":11, "y":5.25},
+ {"x":12, "y":5.25},
+ {"x":13.25, "y":5.5},
+ {"x":14.25, "y":5.5},
+ {"x":15.25, "y":5.5}
+ ]
+ },
+ "LAYOUT_iso": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1.5, "y":0},
+ {"x":2.5, "y":0},
+ {"x":3.5, "y":0},
+ {"x":4.5, "y":0},
+ {"x":5.75, "y":0},
+ {"x":6.75, "y":0},
+ {"x":7.75, "y":0},
+ {"x":8.75, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14.5, "y":0},
+ {"x":15.5, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":15.5, "y":2.25},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25},
+ {"x":13.75, "y":2.25, "w":1.25, "h":2},
+ {"x":15.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":1.25},
+ {"x":1.25, "y":4.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":1.75},
+ {"x":14.25, "y":4.5},
+ {"x":15.5, "y":4.25},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25},
+ {"x":11, "y":5.25},
+ {"x":12, "y":5.25},
+ {"x":13.25, "y":5.5},
+ {"x":14.25, "y":5.5},
+ {"x":15.25, "y":5.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/maartenwut/eon75/keymaps/default/keymap.c b/keyboards/maartenwut/eon75/keymaps/default/keymap.c
new file mode 100644
index 000000000000..fcfba4c866db
--- /dev/null
+++ b/keyboards/maartenwut/eon75/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_all(
+ 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_HOME, KC_END,
+ 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_BSLS, KC_BSPC, KC_INS,
+ 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_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_PGUP,
+ 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_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+[1] = LAYOUT_all(
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+};
\ No newline at end of file
diff --git a/keyboards/maartenwut/eon75/keymaps/via/keymap.c b/keyboards/maartenwut/eon75/keymaps/via/keymap.c
new file mode 100644
index 000000000000..070d38b09faa
--- /dev/null
+++ b/keyboards/maartenwut/eon75/keymaps/via/keymap.c
@@ -0,0 +1,47 @@
+/* Copyright 2019 Maarten Dekkers
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_all(
+ 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_HOME, KC_END,
+ 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_BSLS, KC_BSPC, KC_INS,
+ 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_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_PGUP,
+ 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_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+[1] = LAYOUT_all(
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+[2] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+[3] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
+};
\ No newline at end of file
diff --git a/keyboards/maartenwut/eon75/keymaps/via/rules.mk b/keyboards/maartenwut/eon75/keymaps/via/rules.mk
new file mode 100644
index 000000000000..36b7ba9cbc98
--- /dev/null
+++ b/keyboards/maartenwut/eon75/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/maartenwut/eon75/readme.md b/keyboards/maartenwut/eon75/readme.md
new file mode 100644
index 000000000000..8c697c1c6886
--- /dev/null
+++ b/keyboards/maartenwut/eon75/readme.md
@@ -0,0 +1,13 @@
+# Eon75
+
+## Support
+* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut)
+* Hardware Supported: Eon75
+* Hardware Availability: None
+
+## Build
+Make example for this keyboard (after setting up your build environment):
+
+ make maartenwut/eon75: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).
\ No newline at end of file
diff --git a/keyboards/maartenwut/eon75/rules.mk b/keyboards/maartenwut/eon75/rules.mk
new file mode 100644
index 000000000000..264e0ea67d2d
--- /dev/null
+++ b/keyboards/maartenwut/eon75/rules.mk
@@ -0,0 +1,32 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
From da76734fe0aba64140d4d127161cc4390776ffd7 Mon Sep 17 00:00:00 2001
From: Josh Johnson
Date: Mon, 15 Jun 2020 19:17:30 +1000
Subject: [PATCH 18/36] [Keyboard] Hub16 keymap bugfix (#9345)
---
keyboards/hub16/config.h | 3 +--
keyboards/hub16/keymaps/default/keymap.c | 32 +++++++++++++++++-------
keyboards/hub16/readme.md | 4 +--
3 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h
index c7dec995ebc2..ed14178d6011 100755
--- a/keyboards/hub16/config.h
+++ b/keyboards/hub16/config.h
@@ -81,8 +81,7 @@ along with this program. If not, see .
#define DEBOUNCE 20
/* ENCODER THINGS */
-
-// #define NUMBER_OF_ENCODERS 2
+// #define ENCODER_DIRECTION_FLIP
#define ENCODERS_PAD_A \
{ F6, B4 }
#define ENCODERS_PAD_B \
diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c
index 2d12dba0d4f0..d3cad67ae114 100755
--- a/keyboards/hub16/keymaps/default/keymap.c
+++ b/keyboards/hub16/keymaps/default/keymap.c
@@ -21,16 +21,18 @@
// Keyboard Layers
enum keyboard_layers{
_BASE = 0,
- _CONTROL
+ _CTRL
};
// Tap Dance Declarations
-enum tap_dance { TD_TO_LED = 0, TD_TO_DEFAULT = 1 };
+void td_ctrl (qk_tap_dance_state_t *state, void *user_data);
+
+enum tap_dance { CTRL = 0, BASE = 1 };
qk_tap_dance_action_t tap_dance_actions[] = {
- // Tap once for standard key, twice to toggle to control layer
- [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _CONTROL),
- [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _BASE)};
+ // Tap once for standard key on base layer, twice to toggle to control layer
+ [CTRL] = ACTION_TAP_DANCE_FN(td_ctrl),
+ [BASE] = ACTION_TAP_DANCE_LAYER_MOVE(_______, _BASE)};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT( /* Base */
@@ -38,19 +40,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_A, KC_B, KC_C, KC_D,
KC_E, KC_F, KC_G, KC_H,
KC_I, KC_J, KC_K, KC_L,
- KC_M, KC_N, KC_O, TD(TD_TO_LED)
+ KC_M, KC_N, KC_O, TD(CTRL)
),
- [_CONTROL] = LAYOUT( /* LED Control */
+ [_CTRL] = LAYOUT( /* Control */
KC_NO, KC_NO,
_______, RGB_MOD, RGB_RMOD, RGB_TOG,
RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI,
RGB_SAD, RGB_SAI, _______, _______,
- _______, _______, RESET, TD(TD_TO_DEFAULT)
+ _______, _______, RESET, TD(BASE)
),
};
-// Keyboard is setup to 'warp' the pressed key with F24,
+// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key,
// allowing for easy differentiation from a real keyboard.
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
@@ -99,3 +101,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
+
+// Below works around TD() not running key press through process_record_user.
+// Fixes bug of CTRL layer move key not being wrapped in by modifier on single tap
+void td_ctrl (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code(KC_WRAP);
+ tap_code(KC_P);
+ unregister_code(KC_WRAP);
+ } else if (state->count == 2) {
+ layer_move(_CTRL);
+ }
+}
\ No newline at end of file
diff --git a/keyboards/hub16/readme.md b/keyboards/hub16/readme.md
index 996fa4463506..1409af5bbed4 100755
--- a/keyboards/hub16/readme.md
+++ b/keyboards/hub16/readme.md
@@ -1,8 +1,8 @@
# Hub16
-Hub16 is a 16 Key Macro Pad with inbuilt USB 2.0 hub and dual rotary encoders.
+Hub16 is a 16 Key Macro Pad with an inbuilt USB 2.0 hub and dual rotary encoders.
-For more information regarding the keyboard, please visit the [Hub16 Webpage](https://www.joshajohnson.com/hub16-keyboard/) or [GitHub Repo](https://github.com/joshajohnson/Hub16).
+For more information regarding the keyboard, please visit the [Hub16 Website](https://www.joshajohnson.com/hub16-keyboard/) or [GitHub Repo](https://github.com/joshajohnson/Hub16).
* Keyboard Maintainer: [Josh Johnson](https://github.com/joshajohnson)
* Hardware Supported: Hub16 PCB (atmega32u4)
From 8e0af2f5ba1e094149ce5ce2ac4e25c462f98f23 Mon Sep 17 00:00:00 2001
From: Reed
Date: Mon, 15 Jun 2020 05:55:00 -0400
Subject: [PATCH 19/36] [Docs] Fix link to mod_tap.md in the one_shot_keys.md
file (#9380)
---
docs/one_shot_keys.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md
index 73d78b415027..aa3db5acb211 100644
--- a/docs/one_shot_keys.md
+++ b/docs/one_shot_keys.md
@@ -15,7 +15,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
```
-* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
+* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
From 44d93285d1e5ae0fdaaaab33aa15ffab456b9434 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Mon, 15 Jun 2020 20:06:10 +1000
Subject: [PATCH 20/36] Change ?= to = in keyboard rules.mk (#9390)
---
keyboards/alu84/rules.mk | 20 ++++++-------
keyboards/amj40/rules.mk | 24 ++++++++--------
keyboards/ckeys/nakey/rules.mk | 26 ++++++++---------
keyboards/fc660c/rules.mk | 10 +++----
keyboards/gh80_3000/rules.mk | 20 ++++++-------
keyboards/handwired/magicforce61/rules.mk | 24 ++++++++--------
keyboards/handwired/not_so_minidox/rules.mk | 28 +++++++++----------
.../handwired/onekey/blackpill_f401/rules.mk | 2 +-
.../handwired/onekey/blackpill_f411/rules.mk | 2 +-
keyboards/handwired/woodpad/rules.mk | 28 +++++++++----------
keyboards/katana60/rules.mk | 26 ++++++++---------
keyboards/knops/mini/rules.mk | 26 ++++++++---------
keyboards/kona_classic/rules.mk | 24 ++++++++--------
keyboards/mt40/rules.mk | 24 ++++++++--------
keyboards/noxary/268/rules.mk | 20 ++++++-------
keyboards/omnikey_bh/rules.mk | 20 ++++++-------
keyboards/paladin64/rules.mk | 26 ++++++++---------
keyboards/primekb/prime_r/rules.mk | 20 ++++++-------
keyboards/sx60/rules.mk | 22 +++++++--------
keyboards/toad/rules.mk | 20 ++++++-------
keyboards/uk78/rules.mk | 20 ++++++-------
keyboards/wilba_tech/zeal60/rules.mk | 2 +-
keyboards/xmmx/rules.mk | 20 ++++++-------
23 files changed, 227 insertions(+), 227 deletions(-)
diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk
index b5f249057481..81dbad070b6a 100755
--- a/keyboards/alu84/rules.mk
+++ b/keyboards/alu84/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= yes # 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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= yes
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk
index 5d6cff98916c..cd894dac12ef 100755
--- a/keyboards/amj40/rules.mk
+++ b/keyboards/amj40/rules.mk
@@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # 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
-NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no # MIDI controls
-AUDIO_ENABLE ?= no
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+BOOTMAGIC_ENABLE = no # 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
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk
index 95fd5e4621e6..7c0477bcf95b 100644
--- a/keyboards/ckeys/nakey/rules.mk
+++ b/keyboards/ckeys/nakey/rules.mk
@@ -14,20 +14,20 @@ BOOTLOADER = halfkay
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
LAYOUTS = numpad_5x4
diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk
index 3a3ac4e5d279..54fadc826457 100644
--- a/keyboards/fc660c/rules.mk
+++ b/keyboards/fc660c/rules.mk
@@ -15,11 +15,11 @@ BOOTLOADER = atmel-dfu
# comment out to disable the options.
#
# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
-NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk
index 524303ec24e3..d6cb5fcfa5fe 100644
--- a/keyboards/gh80_3000/rules.mk
+++ b/keyboards/gh80_3000/rules.mk
@@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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
LAYOUTS = fullsize_ansi fullsize_iso
diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk
index d1ed63f65b3f..b72fff09602b 100644
--- a/keyboards/handwired/magicforce61/rules.mk
+++ b/keyboards/handwired/magicforce61/rules.mk
@@ -14,17 +14,17 @@ BOOTLOADER = halfkay
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI controls
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk
index ae5cb83b7bf9..6e87d7545cba 100644
--- a/keyboards/handwired/not_so_minidox/rules.mk
+++ b/keyboards/handwired/not_so_minidox/rules.mk
@@ -15,21 +15,21 @@ BOOTLOADER = caterina
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= no # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
-NKRO_ENABLE ?= no # 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
-MIDI_ENABLE ?= no # MIDI controls
-AUDIO_ENABLE ?= no # Audio output on port C6
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight.
-USE_I2C ?= no
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # 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
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+USE_I2C = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes
SRC += matrix.c \
diff --git a/keyboards/handwired/onekey/blackpill_f401/rules.mk b/keyboards/handwired/onekey/blackpill_f401/rules.mk
index 36093820c988..609262049cad 100644
--- a/keyboards/handwired/onekey/blackpill_f401/rules.mk
+++ b/keyboards/handwired/onekey/blackpill_f401/rules.mk
@@ -20,7 +20,7 @@ MCU = cortex-m4
ARMV = 7
USE_FPU = yes
# Address of the booloader in system memory
-STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
+STM32_BOOTLOADER_ADDRESS = 0x1FFF0000
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
diff --git a/keyboards/handwired/onekey/blackpill_f411/rules.mk b/keyboards/handwired/onekey/blackpill_f411/rules.mk
index 18fb92dbe883..f2e0f2b4f956 100644
--- a/keyboards/handwired/onekey/blackpill_f411/rules.mk
+++ b/keyboards/handwired/onekey/blackpill_f411/rules.mk
@@ -20,7 +20,7 @@ MCU = cortex-m4
ARMV = 7
USE_FPU = yes
# Address of the booloader in system memory
-STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
+STM32_BOOTLOADER_ADDRESS = 0x1FFF0000
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk
index 7725131978e4..a3a1e5ffe9a3 100644
--- a/keyboards/handwired/woodpad/rules.mk
+++ b/keyboards/handwired/woodpad/rules.mk
@@ -14,19 +14,19 @@ BOOTLOADER = caterina
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
-RGBLIGHT_ENABLE ?= no
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk
index 62a038091e94..e41c168c4fc3 100644
--- a/keyboards/katana60/rules.mk
+++ b/keyboards/katana60/rules.mk
@@ -14,18 +14,18 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk
index 312bfb4fdc7d..1d0be651643a 100644
--- a/keyboards/knops/mini/rules.mk
+++ b/keyboards/knops/mini/rules.mk
@@ -14,18 +14,18 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk
index 2640360f26e5..8c5740b51b3d 100644
--- a/keyboards/kona_classic/rules.mk
+++ b/keyboards/kona_classic/rules.mk
@@ -14,17 +14,17 @@ BOOTLOADER = halfkay
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI controls
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk
index c81f35f656df..2b8e18a95ca1 100644
--- a/keyboards/mt40/rules.mk
+++ b/keyboards/mt40/rules.mk
@@ -12,18 +12,18 @@ MCU = atmega32a
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # Commands for debug and configuration
-NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no # MIDI controls
-AUDIO_ENABLE ?= no # Audio output on port C6
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight.
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
WS2812_DRIVER = i2c
TAP_DANCE_ENABLE = no
diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk
index b57e64fcecdb..f2d381510d0c 100644
--- a/keyboards/noxary/268/rules.mk
+++ b/keyboards/noxary/268/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/omnikey_bh/rules.mk b/keyboards/omnikey_bh/rules.mk
index 59f163e2f4c1..739bea3932e8 100644
--- a/keyboards/omnikey_bh/rules.mk
+++ b/keyboards/omnikey_bh/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = halfkay
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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
diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk
index 6caa47e90787..739e00613c08 100755
--- a/keyboards/paladin64/rules.mk
+++ b/keyboards/paladin64/rules.mk
@@ -14,18 +14,18 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes # Console for debug
-COMMAND_ENABLE ?= no # 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 ?= yes
-#PS2_MOUSE_ENABLE ?= yes
-#PS2_USE_USART ?= yes
-#PS2_USE_INT ?= yes
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # 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 = yes
+#PS2_MOUSE_ENABLE = yes
+#PS2_USE_USART = yes
+#PS2_USE_INT = yes
LAYOUTS = 60_ansi
diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk
index fb3fd385e3b0..6f7dd47059de 100644
--- a/keyboards/primekb/prime_r/rules.mk
+++ b/keyboards/primekb/prime_r/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk
index 64b2f2b2c29a..3fa616a27e13 100755
--- a/keyboards/sx60/rules.mk
+++ b/keyboards/sx60/rules.mk
@@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no
-CUSTOM_MATRIX ?= yes
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+CUSTOM_MATRIX = yes
# project specific files
SRC = twimaster.c \
diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk
index 731b405c0528..94733eeaf02c 100644
--- a/keyboards/toad/rules.mk
+++ b/keyboards/toad/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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
diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk
index 40fc506aa006..7bcfa4ef146a 100644
--- a/keyboards/uk78/rules.mk
+++ b/keyboards/uk78/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= yes
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk
index 31c960c22ee8..172ebaf6b5ef 100644
--- a/keyboards/wilba_tech/zeal60/rules.mk
+++ b/keyboards/wilba_tech/zeal60/rules.mk
@@ -34,7 +34,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CIE1931_CURVE = yes
diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk
index 731b405c0528..94733eeaf02c 100644
--- a/keyboards/xmmx/rules.mk
+++ b/keyboards/xmmx/rules.mk
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= no # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= no # Console for debug
-COMMAND_ENABLE ?= no # 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
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # 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
From a8d073368f0e4cc51109fab50f7c9cb88d843940 Mon Sep 17 00:00:00 2001
From: James Young <18669334+noroadsleft@users.noreply.github.com>
Date: Mon, 15 Jun 2020 03:09:48 -0700
Subject: [PATCH 21/36] [Keyboard] Fix Configurator layout data for
acheron/elongate (#9392)
---
keyboards/acheron/elongate/info.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/keyboards/acheron/elongate/info.json b/keyboards/acheron/elongate/info.json
index 65e312259b1c..46784164b4a5 100644
--- a/keyboards/acheron/elongate/info.json
+++ b/keyboards/acheron/elongate/info.json
@@ -5,7 +5,7 @@
"width": 15.5,
"height": 4.25,
"layouts": {
- "LAYOUT_all": {
+ "LAYOUT": {
"layout": [
{"label":"Tab", "x":0, "y":0},
{"label":"Q", "x":1, "y":0},
@@ -33,7 +33,7 @@
{"label":"J", "x":7.25, "y":1},
{"label":"K", "x":8.25, "y":1},
{"label":"L", "x":9.25, "y":1},
- {"label":"Enter", "x":10.25, "y":1.75},
+ {"label":"Enter", "x":10.25, "y":1, "w":1.75},
{"label":"4", "x":12.5, "y":1},
{"label":"5", "x":13.5, "y":1},
{"label":"6", "x":14.5, "y":1},
@@ -47,7 +47,7 @@
{"label":"N", "x":6.75, "y":2},
{"label":"M", "x":7.75, "y":2},
{"label":"<", "x":8.75, "y":2},
- {"label":"Fn1", "x":9.75, "y":2},
+ {"label":"Fn1", "x":9.75, "y":2, "w":1.25},
{"label":"Up", "x":11.25, "y":2.25},
{"label":"1", "x":12.5, "y":2},
{"label":"2", "x":13.5, "y":2},
From d8e3294aeaf6d0b2e9400aefdd5bf2ff63d4d981 Mon Sep 17 00:00:00 2001
From: James Young <18669334+noroadsleft@users.noreply.github.com>
Date: Mon, 15 Jun 2020 03:10:15 -0700
Subject: [PATCH 22/36] [Keyboard] Fix Configurator layout data for
handwired/1800fl (#9393)
---
keyboards/handwired/p1800fl/info.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/handwired/p1800fl/info.json
index 1509b59d96ab..93f4e8aaebc7 100644
--- a/keyboards/handwired/p1800fl/info.json
+++ b/keyboards/handwired/p1800fl/info.json
@@ -75,11 +75,11 @@
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"Up", "x":14.25, "y":3.25},
{"label":"1", "x":15.5, "y":3},
{"label":"2", "x":16.5, "y":3},
{"label":"3", "x":17.5, "y":3},
{"label":"Enter", "x":18.5, "y":3},
- {"label":"Up", "x":14.25, "y":3.25},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
@@ -87,12 +87,12 @@
{"label":"Ctrl", "x":10, "y":4},
{"label":"Win", "x":11, "y":4},
{"label":"Alt", "x":12, "y":4},
- {"label":"0", "x":16.5, "y":4},
- {"label":".", "x":17.5, "y":4},
- {"label":"Enter", "x":18.5, "y":4},
{"label":"Left", "x":13.25, "y":4.25},
{"label":"Down", "x":14.25, "y":4.25},
- {"label":"Right", "x":15.25, "y":4.25}
+ {"label":"Right", "x":15.25, "y":4.25},
+ {"label":"0", "x":16.5, "y":4},
+ {"label":".", "x":17.5, "y":4},
+ {"label":"Enter", "x":18.5, "y":4}
]
}
}
From b008a9afe6f216cebe4c664d5ce59cd6bfe755c3 Mon Sep 17 00:00:00 2001
From: James Young <18669334+noroadsleft@users.noreply.github.com>
Date: Mon, 15 Jun 2020 03:11:19 -0700
Subject: [PATCH 23/36] HID Liberation Device Refactor and Configurator layout
support (#9394)
---
keyboards/hid_liber/hid_liber.c | 36 ++-----
keyboards/hid_liber/hid_liber.h | 7 +-
keyboards/hid_liber/info.json | 101 ++++++++++++++++++
keyboards/hid_liber/keymaps/default/config.h | 1 -
keyboards/hid_liber/keymaps/default/keymap.c | 55 ++++------
keyboards/hid_liber/keymaps/default/readme.md | 10 +-
keyboards/hid_liber/keymaps/default/rules.mk | 1 -
keyboards/hid_liber/readme.md | 14 +--
keyboards/hid_liber/rules.mk | 2 +-
9 files changed, 143 insertions(+), 84 deletions(-)
create mode 100644 keyboards/hid_liber/info.json
delete mode 100755 keyboards/hid_liber/keymaps/default/config.h
delete mode 100755 keyboards/hid_liber/keymaps/default/rules.mk
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c
index 6517c9206224..2d2130743f1c 100755
--- a/keyboards/hid_liber/hid_liber.c
+++ b/keyboards/hid_liber/hid_liber.c
@@ -24,34 +24,16 @@ void matrix_init_kb(void) {
matrix_init_user();
}
-void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
-
- matrix_scan_user();
-}
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
-
- return process_record_user(keycode, record);
-}
-
void led_init_ports(void) {
- DDRB |= (1<<5) | (1<<6); // OUT
+ setPinOutput(B5);
+ setPinOutput(B6);
}
-void led_set_kb(uint8_t usb_led) {
- if (usb_led & (1<.
*/
-#ifndef HID_LIBER_H
-#define HID_LIBER_H
+#pragma once
#include "quantum.h"
@@ -69,7 +68,3 @@
/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
}
-
-
-
-#endif
diff --git a/keyboards/hid_liber/info.json b/keyboards/hid_liber/info.json
new file mode 100644
index 000000000000..581ac55a2c81
--- /dev/null
+++ b/keyboards/hid_liber/info.json
@@ -0,0 +1,101 @@
+{
+ "keyboard_name": "bpiphany HIDLiberation",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 18.25,
+ "height": 6.5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"KG1", "x":0, "y":0},
+ {"label":"KH7", "x":2, "y":0},
+ {"label":"KJ7", "x":3, "y":0},
+ {"label":"KJ6", "x":4, "y":0},
+ {"label":"KJ1", "x":5, "y":0},
+ {"label":"KO5", "x":6.5, "y":0},
+ {"label":"KL1", "x":7.5, "y":0},
+ {"label":"KA6", "x":8.5, "y":0},
+ {"label":"KA7", "x":9.5, "y":0},
+ {"label":"KD7", "x":11, "y":0},
+ {"label":"KD5", "x":12, "y":0},
+ {"label":"KD1", "x":13, "y":0},
+ {"label":"KD2", "x":14, "y":0},
+ {"label":"KB5", "x":15.25, "y":0},
+ {"label":"KB3", "x":16.25, "y":0},
+ {"label":"KO3", "x":17.25, "y":0},
+ {"label":"KG7", "x":0, "y":1.5},
+ {"label":"KG5", "x":1, "y":1.5},
+ {"label":"KH5", "x":2, "y":1.5},
+ {"label":"KJ5", "x":3, "y":1.5},
+ {"label":"KI5", "x":4, "y":1.5},
+ {"label":"KI7", "x":5, "y":1.5},
+ {"label":"KK7", "x":6, "y":1.5},
+ {"label":"KK5", "x":7, "y":1.5},
+ {"label":"KL5", "x":8, "y":1.5},
+ {"label":"KA5", "x":9, "y":1.5},
+ {"label":"KC5", "x":10, "y":1.5},
+ {"label":"KC7", "x":11, "y":1.5},
+ {"label":"KL7", "x":12, "y":1.5},
+ {"label":"KD6", "x":13, "y":1.5, "w":2},
+ {"label":"KQ7", "x":15.25, "y":1.5},
+ {"label":"KN7", "x":16.25, "y":1.5},
+ {"label":"KM7", "x":17.25, "y":1.5},
+ {"label":"KG6", "x":0, "y":2.5, "w":1.5},
+ {"label":"KG3", "x":1.5, "y":2.5},
+ {"label":"KH3", "x":2.5, "y":2.5},
+ {"label":"KJ3", "x":3.5, "y":2.5},
+ {"label":"KI3", "x":4.5, "y":2.5},
+ {"label":"KI6", "x":5.5, "y":2.5},
+ {"label":"KK6", "x":6.5, "y":2.5},
+ {"label":"KK3", "x":7.5, "y":2.5},
+ {"label":"KL3", "x":8.5, "y":2.5},
+ {"label":"KA3", "x":9.5, "y":2.5},
+ {"label":"KC3", "x":10.5, "y":2.5},
+ {"label":"KC6", "x":11.5, "y":2.5},
+ {"label":"KL6", "x":12.5, "y":2.5},
+ {"label":"KD4", "x":13.5, "y":2.5, "w":1.5},
+ {"label":"KP7", "x":15.25, "y":2.5},
+ {"label":"KN5", "x":16.25, "y":2.5},
+ {"label":"KM5", "x":17.25, "y":2.5},
+ {"label":"KH6", "x":0, "y":3.5, "w":1.75},
+ {"label":"KG4", "x":1.75, "y":3.5},
+ {"label":"KH4", "x":2.75, "y":3.5},
+ {"label":"KJ4", "x":3.75, "y":3.5},
+ {"label":"KI4", "x":4.75, "y":3.5},
+ {"label":"KI1", "x":5.75, "y":3.5},
+ {"label":"KK1", "x":6.75, "y":3.5},
+ {"label":"KK4", "x":7.75, "y":3.5},
+ {"label":"KL4", "x":8.75, "y":3.5},
+ {"label":"KA4", "x":9.75, "y":3.5},
+ {"label":"KC4", "x":10.75, "y":3.5},
+ {"label":"KC1", "x":11.75, "y":3.5},
+ {"label":"KD0", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"KF6", "x":0, "y":4.5, "w":1.25},
+ {"label":"KH1", "x":1.25, "y":4.5},
+ {"label":"KG0", "x":2.25, "y":4.5},
+ {"label":"KH0", "x":3.25, "y":4.5},
+ {"label":"KJ0", "x":4.25, "y":4.5},
+ {"label":"KI0", "x":5.25, "y":4.5},
+ {"label":"KI2", "x":6.25, "y":4.5},
+ {"label":"KK2", "x":7.25, "y":4.5},
+ {"label":"KK0", "x":8.25, "y":4.5},
+ {"label":"KL0", "x":9.25, "y":4.5},
+ {"label":"KA0", "x":10.25, "y":4.5},
+ {"label":"KC2", "x":11.25, "y":4.5},
+ {"label":"KF4", "x":12.25, "y":4.5, "w":2.75},
+ {"label":"KN1", "x":16.25, "y":4.5},
+ {"label":"KO7", "x":0, "y":5.5, "w":1.25},
+ {"label":"KE6", "x":1.25, "y":5.5, "w":1.25},
+ {"label":"KB1", "x":2.5, "y":5.5, "w":1.25},
+ {"label":"KP1", "x":3.75, "y":5.5, "w":6.25},
+ {"label":"KB2", "x":10, "y":5.5, "w":1.25},
+ {"label":"KR4", "x":11.25, "y":5.5, "w":1.25},
+ {"label":"KA2", "x":12.5, "y":5.5, "w":1.25},
+ {"label":"KO0", "x":13.75, "y":5.5, "w":1.25},
+ {"label":"KN2", "x":15.25, "y":5.5},
+ {"label":"KP2", "x":16.25, "y":5.5},
+ {"label":"KQ2", "x":17.25, "y":5.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/hid_liber/keymaps/default/config.h b/keyboards/hid_liber/keymaps/default/config.h
deleted file mode 100755
index 7b9637ef9c2c..000000000000
--- a/keyboards/hid_liber/keymaps/default/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
\ No newline at end of file
diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c
index 1102b0b96b75..60ff8d11b007 100755
--- a/keyboards/hid_liber/keymaps/default/keymap.c
+++ b/keyboards/hid_liber/keymaps/default/keymap.c
@@ -16,45 +16,26 @@
*/
#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 _BL 0 // Base Layer
-#define _FL 1 // Media Layer
+enum layer_names {
+ _BL, // Base Layer
+ _FL, // Media Layer
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BL] = LAYOUT( \
- 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_BRK, \
- 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, \
- 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- 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_UP, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ [_BL] = LAYOUT(
+ 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_BRK,
+ 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,
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ 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_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [_FL] = LAYOUT( \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ [_FL] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
-
-void matrix_init_user(void) {
-
-}
-
-void matrix_scan_user(void) {
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
-}
diff --git a/keyboards/hid_liber/keymaps/default/readme.md b/keyboards/hid_liber/keymaps/default/readme.md
index 963524389ee9..2bae07e5484d 100755
--- a/keyboards/hid_liber/keymaps/default/readme.md
+++ b/keyboards/hid_liber/keymaps/default/readme.md
@@ -1,4 +1,4 @@
-# ANSI Keymap for the HID Liberation Device
+# The default keymap for the HID Liberation Device
A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
@@ -19,9 +19,9 @@ This keymap has two layers. To access the functions on the second layer, hold do
|-----------------------------------------------------------| '-----------'
|Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
|-----------------------------------------------------------| ,---.
- |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
+ |Sft |ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
|-----------------------------------------------------------| ,-----------.
- |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
+ |Ctl |Gui |Alt | Space |Alt |Gui |Fn |Ctl | |Lef|Dow|Rig|
`-----------------------------------------------------------' `-----------'
### Layer 2: Media Layer
@@ -35,7 +35,7 @@ This keymap has two layers. To access the functions on the second layer, hold do
|-----------------------------------------------------------| '-----------'
| | | | | | | | | | | | | |
|-----------------------------------------------------------| ,---.
- | | | | | | | | | | | | | | |
+ | | | | | | | | | | | | | | | |
|-----------------------------------------------------------| ,-----------.
- | | | | | | | | | | | | |
+ | | | | | | | | | | | | |
`-----------------------------------------------------------' `-----------'
diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk
deleted file mode 100755
index 15b7f725b26d..000000000000
--- a/keyboards/hid_liber/keymaps/default/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-CONSOLE_ENABLE = yes
diff --git a/keyboards/hid_liber/readme.md b/keyboards/hid_liber/readme.md
index bc16c165bed9..d70ace123d5f 100755
--- a/keyboards/hid_liber/readme.md
+++ b/keyboards/hid_liber/readme.md
@@ -1,15 +1,17 @@
-HID Liberation Device
-=====================
-DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities.
-The PCB was engineered by bpiphany.
+# HID Liberation Device
+
+DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. The PCB was engineered by bpiphany.
## Wiki on Deskthority.net
- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions)
- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions)
-## Build
+* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
+* Hardware Supported: HID Liberation Device (ATmega32U4)
+* Hardware Availability: Discontinued
+
Make example for this keyboard (after setting up your build environment):
make hid_liber: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.
+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).
diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk
index a0f881731a79..f4d7618ec051 100755
--- a/keyboards/hid_liber/rules.mk
+++ b/keyboards/hid_liber/rules.mk
@@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
+CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
CUSTOM_MATRIX = yes # Custom matrix file
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
From 7f5656996ca2f5a62a148ef9165d0681ba806f07 Mon Sep 17 00:00:00 2001
From: William Lindvall
Date: Mon, 15 Jun 2020 03:26:58 -0700
Subject: [PATCH 24/36] [Keymap] Add "shwilliam" Preonic keymap (#9409)
Co-authored-by: Ryan
---
keyboards/preonic/keymaps/shwilliam/config.h | 19 ++
keyboards/preonic/keymaps/shwilliam/keymap.c | 299 ++++++++++++++++++
keyboards/preonic/keymaps/shwilliam/readme.md | 40 +++
keyboards/preonic/keymaps/shwilliam/rules.mk | 1 +
4 files changed, 359 insertions(+)
create mode 100644 keyboards/preonic/keymaps/shwilliam/config.h
create mode 100644 keyboards/preonic/keymaps/shwilliam/keymap.c
create mode 100644 keyboards/preonic/keymaps/shwilliam/readme.md
create mode 100644 keyboards/preonic/keymaps/shwilliam/rules.mk
diff --git a/keyboards/preonic/keymaps/shwilliam/config.h b/keyboards/preonic/keymaps/shwilliam/config.h
new file mode 100644
index 000000000000..959f94fe2b4b
--- /dev/null
+++ b/keyboards/preonic/keymaps/shwilliam/config.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PREONIC_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/* prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features */
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/preonic/keymaps/shwilliam/keymap.c b/keyboards/preonic/keymaps/shwilliam/keymap.c
new file mode 100644
index 000000000000..c9d6cbab4236
--- /dev/null
+++ b/keyboards/preonic/keymaps/shwilliam/keymap.c
@@ -0,0 +1,299 @@
+/* Copyright 2020 William Lindvall
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+enum custom_keycodes {
+ LIQUOT = SAFE_RANGE,
+ RIQUOT,
+ LQUOT,
+ RQUOT,
+ LTITLE,
+ RTITLE,
+ TBULLET,
+ FBULLET,
+ FN_ARROW,
+ MAIL,
+ GITHUB,
+ HEART,
+ E_LCRY,
+ E_FLOWER,
+ E_SHEART,
+ E_KISS,
+ E_PHEART,
+ E_NOGOOD,
+ E_PARTY,
+ E_ROCKET,
+ E_SHRUG,
+ E_WIZARD,
+ E_OKBUST,
+ E_OKHAND,
+ E_SLEEP,
+ E_HUNNED,
+ E_2HEART
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LIQUOT:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("300a"));
+ }
+ return false;
+ case RIQUOT:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("300b"));
+ }
+ return false;
+ case LQUOT:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("300c"));
+ }
+ return false;
+ case RQUOT:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("300d"));
+ }
+ return false;
+ case LTITLE:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("3010"));
+ }
+ return false;
+ case RTITLE:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("3011"));
+ }
+ return false;
+ case TBULLET:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("2023"));
+ }
+ return false;
+ case FBULLET:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("2055"));
+ }
+ return false;
+ case MAIL:
+ if (record->event.pressed) {
+ SEND_STRING("w-lindvall@outlook.com");
+ }
+ return false;
+ case GITHUB:
+ if (record->event.pressed) {
+ SEND_STRING("https://github.com/shwilliam");
+ }
+ return false;
+ case FN_ARROW:
+ if (record->event.pressed) {
+ SEND_STRING("=>");
+ }
+ return false;
+ case HEART:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("2661"));
+ }
+ return false;
+ case E_LCRY:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE02"));
+ }
+ return false;
+ case E_FLOWER:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83C+DF38"));
+ }
+ return false;
+ case E_SHEART:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DC96"));
+ }
+ return false;
+ case E_KISS:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE18"));
+ }
+ return false;
+ case E_PHEART:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DC9C"));
+ }
+ return false;
+ case E_NOGOOD:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE45"));
+ }
+ return false;
+ case E_PARTY:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83C+DF8A"));
+ }
+ return false;
+ case E_ROCKET:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE80"));
+ }
+ return false;
+ case E_SHRUG:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83E+DD37"));
+ }
+ return false;
+ case E_WIZARD:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83E+DDD9"));
+ }
+ return false;
+ case E_OKBUST:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE46"));
+ }
+ return false;
+ case E_OKHAND:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DC4C"));
+ }
+ return false;
+ case E_SLEEP:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DE34"));
+ }
+ return false;
+ case E_HUNNED:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DCAF"));
+ }
+ return false;
+ case E_2HEART:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LALT("D83D+DC95"));
+ }
+ return false;
+ }
+ return true;
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | q | w | e | r | t | y | u | i | o | p | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | H/Esc| a | s | d | f | g | h | j | k | l | ' | Enter|
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| z | x | c | v | b | n | m | , | . | / | ; |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | PDown| PUp | Alt | OS | Opt | Raise| Space| Lower| Left | Down | Up | Right|
+ * `-----------------------------------------------------------------------------------'
+ */
+
+ [0] = LAYOUT_preonic_grid(
+ KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DEL,
+ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSPC,
+ C_S_T(KC_ESC),KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_K ,KC_L ,KC_QUOT ,KC_ENT,
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_SCLN,
+ KC_PGDN ,KC_PGUP ,KC_LALT ,KC_LGUI ,KC_LCTL ,MO(1) ,KC_SPC ,MO(2) ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ ),
+
+ /* raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |SRight|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Q | W | E | R | T | Y | U | I | O | P | SLeft|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | A | S | D | F | G | H | J | K | L | " | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Emoji| Z | X | C | V | B | N | M | < | > | ? | : |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | End | Home | ShAlt| ShOS | ShOpt|~~~~~~| Space| | | BDown| BUp | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+ [1] = LAYOUT_preonic_grid(
+ KC_TILD ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,KC_CIRC ,KC_AMPR ,KC_ASTR ,KC_LPRN ,KC_RPRN ,SGUI(KC_RGHT),
+ KC_NO ,LSFT(KC_Q),LSFT(KC_W) ,LSFT(KC_E) ,LSFT(KC_R) ,LSFT(KC_T),LSFT(KC_Y),LSFT(KC_U),LSFT(KC_I),LSFT(KC_O),LSFT(KC_P),SGUI(KC_LEFT),
+ KC_NO ,LSFT(KC_A),LSFT(KC_S) ,LSFT(KC_D) ,LSFT(KC_F) ,LSFT(KC_G),LSFT(KC_H),LSFT(KC_J),LSFT(KC_K),LSFT(KC_L),KC_DQUO ,KC_BSLS,
+ OSL(3) ,LSFT(KC_Z),LSFT(KC_X) ,LSFT(KC_C) ,LSFT(KC_V) ,LSFT(KC_B),LSFT(KC_N),LSFT(KC_M),KC_LT ,KC_GT ,KC_QUES ,KC_COLN,
+ KC_END ,KC_HOME ,LSFT(KC_LALT),LSFT(KC_LGUI),LSFT(KC_LCTL),KC_TRNS ,KC_SPC ,KC_TRNS ,KC_NO ,KC_BRID ,KC_BRIU ,KC_NO
+ ),
+
+ /* lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ♡ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ‣ | CLeft| MUp |CRight|MWDown| 【 | - | _ | | | = | + | DLeft|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | MLeft| MDown|MRight| MWUp | 】 | Left | Down | Up | Right| ( | ) |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | 《 | 》 | 「 | 」 | ⁕ | | { | } | [ | ] | => |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Mail |GitHub| | | | | Space|~~~~~~| VMute| VDown| VUp | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+ [2] = LAYOUT_preonic_grid(
+ HEART ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_NO,
+ TBULLET ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_WH_D ,LTITLE ,KC_MINS ,KC_UNDS ,KC_PIPE ,KC_EQL ,KC_PLUS ,LGUI(KC_BSPC),
+ KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_U ,RTITLE ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,KC_LPRN ,KC_RPRN,
+ KC_NO ,LIQUOT ,RIQUOT ,LQUOT ,RQUOT ,FBULLET ,KC_NO ,KC_LCBR ,KC_RCBR ,KC_LBRC ,KC_RBRC ,FN_ARROW,
+ MAIL ,GITHUB ,KC_NO ,KC_NO ,KC_NO ,KC_TRNS ,KC_BSPC ,KC_TRNS ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO
+ ),
+
+ /* emoji
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | w | | r | | y | | | o | p | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | s | | f | | h | | k | l | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | z | | c | | | n | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ *
+ * mnemonics:
+ *
+ * 100 - 💯
+ * 2 hearts - 💕
+ * cry - 😂
+ * flower - 🌸
+ * heart - 💖
+ * kiss - 😘
+ * love - 💜
+ * no - 🙅
+ * ok - 🙆
+ * party - 🎊
+ * rocket - 🚀
+ * shrug - 🤷
+ * wizard - 🧙
+ * yes - 👌
+ * zzz - 😴
+ *
+ */
+
+ [3] = LAYOUT_preonic_grid(
+ KC_NO ,E_HUNNED,E_2HEART,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO,
+ KC_NO ,KC_NO ,E_WIZARD,KC_NO ,E_ROCKET,KC_NO ,E_OKHAND,KC_NO ,KC_NO ,E_OKBUST,E_PARTY ,KC_NO,
+ KC_NO ,KC_NO ,E_SHRUG ,KC_NO ,E_FLOWER,KC_NO ,E_SHEART,KC_NO ,E_KISS ,E_PHEART,KC_NO ,KC_NO,
+ KC_NO ,E_SLEEP ,KC_NO ,E_LCRY ,KC_NO ,KC_NO ,E_NOGOOD,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO,
+ KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ )
+
+};
diff --git a/keyboards/preonic/keymaps/shwilliam/readme.md b/keyboards/preonic/keymaps/shwilliam/readme.md
new file mode 100644
index 000000000000..bb0f2e1797ba
--- /dev/null
+++ b/keyboards/preonic/keymaps/shwilliam/readme.md
@@ -0,0 +1,40 @@
+# [@shwilliam](https://github.com/shwilliam)'s Preonic Layout
+
+![shwilliam's preonic layout image](https://user-images.githubusercontent.com/38357771/84585088-dc536380-adc0-11ea-8378-6fb8ffbc6a8d.png)
+
+## Overview
+
+- Shift, backspace, raise and lower on thumbs
+- Arrows on Vim keys
+- Function arrow key (`=>`)
+- Common parens one key from home-row
+- Brightness/volume control
+- Tap caps-lock for escape, hold for left control and left shift
+- Alternative punctuation
+ - Corner brackets
+ - Double-angle brackets
+ - Lenticular brackets
+- Select to left and right keys
+- Emoji layer
+
+## Layers
+
+### QWERTY
+
+- Base layer; similar to default Preonic keymap
+
+### Raise
+
+- Mostly shifted QWERTY layer with alternative actions
+- Brightness control
+
+### Lower
+
+- Common parentheses
+- Arrows on Vim keys
+- Mouse controls on WASD
+- Volume control
+
+### Emoji
+
+- Emoji layout based on mnemonics
diff --git a/keyboards/preonic/keymaps/shwilliam/rules.mk b/keyboards/preonic/keymaps/shwilliam/rules.mk
new file mode 100644
index 000000000000..dcf16bef3994
--- /dev/null
+++ b/keyboards/preonic/keymaps/shwilliam/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
From 357a888d805c21c9cb4917f55d558195e8b85db5 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Mon, 15 Jun 2020 03:41:28 -0700
Subject: [PATCH 25/36] [Keymap] Drashna's Keymap Update - Display Edition
(#9282)
OLED Display fixes
Add support for RGBLIGHT Layers
Add gaming layer to corn and kyria
RGBLight Startup Animation fixes and improvements (uses matrix_scan now!)
Pimoroni Trackball support added (IT'S RGB!!!)
Fix issues due to code changes
---
keyboards/crkbd/keymaps/drashna/keymap.c | 12 +-
keyboards/kyria/keymaps/drashna/config.h | 1 +
keyboards/kyria/keymaps/drashna/keymap.c | 48 ++++-
keyboards/kyria/keymaps/drashna/rules.mk | 6 +-
layouts/community/ergodox/drashna/config.h | 5 +-
layouts/community/ergodox/drashna/keymap.c | 58 +++++-
layouts/community/ergodox/drashna/rules.mk | 14 +-
layouts/community/ortho_5x12/drashna/rules.mk | 11 +-
users/drashna/.gitlab-ci.yml | 5 +-
users/drashna/config.h | 7 +-
users/drashna/drashna.c | 6 +-
users/drashna/drashna.h | 3 +
users/drashna/oled_stuff.c | 17 +-
users/drashna/pimoroni_trackball.c | 114 +++++++++++
users/drashna/pimoroni_trackball.h | 18 ++
users/drashna/process_records.c | 2 +-
users/drashna/rgb_matrix_stuff.c | 6 +-
users/drashna/rgb_stuff.c | 177 ++++--------------
users/drashna/rules.mk | 10 +-
19 files changed, 332 insertions(+), 188 deletions(-)
create mode 100644 users/drashna/pimoroni_trackball.c
create mode 100644 users/drashna/pimoroni_trackball.h
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c
index 0769edf3b94d..d9c1605ce983 100644
--- a/keyboards/crkbd/keymaps/drashna/keymap.c
+++ b/keyboards/crkbd/keymaps/drashna/keymap.c
@@ -121,7 +121,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
#ifdef OLED_DRIVER_ENABLE
-oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+# ifndef SPLIT_KEYBOARD
+ if (is_master) {
+# endif
+ return OLED_ROTATION_270;
+# ifndef SPLIT_KEYBOARD
+ } else {
+ return rotation;
+ }
+# endif
+}
#endif
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h
index f93069ac00ef..5e9d8b010eba 100644
--- a/keyboards/kyria/keymaps/drashna/config.h
+++ b/keyboards/kyria/keymaps/drashna/config.h
@@ -32,6 +32,7 @@
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_SPLIT
+# define RGBLIGHT_LAYERS
#endif
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
index 5e97ca55adb4..98afff19f9f5 100644
--- a/keyboards/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -23,7 +23,7 @@ uint8_t is_master;
LAYOUT_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
- OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, MEH(KC_MINS), TG(_DIABLO), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
+ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), MEH(KC_MINS), TG(_DIABLO), KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
)
/* Re-pass though to allow templates to be used */
@@ -85,6 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT,
_______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______
),
+
+ [_GAMEPAD] = LAYOUT_wrapper(
+ KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
+ KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
+ KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, _______, _______, _______, LALT(KC_PSCR), _______, _______, _______, _______, _______, _______,
+ _______, MAGIC_TOGGLE_NKRO, KC_V, KC_SPC, KC_H, _______, _______, _______, _______, _______
+ ),
+
[_DIABLO] = LAYOUT_wrapper(
KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
@@ -172,3 +180,41 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
#endif
+
+#ifdef RGBLIGHT_LAYERS
+const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS(
+ { 8, 1, 120, 255, 255},
+ { 18, 1, 120, 255, 255}
+);
+const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS(
+ { 6, 1, 0, 255, 255},
+ { 16, 1, 0, 255, 255}
+);
+const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS(
+ { 2, 1, 240, 255, 255},
+ { 17, 1, 250, 255, 255}
+);
+const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS(
+ { 7, 1, 51, 255, 255},
+ { 12, 1, 51, 255, 255}
+);
+
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ shift_layers,
+ control_layers,
+ alt_layers,
+ gui_layers
+);
+
+void keyboard_post_init_keymap(void) {
+ rgblight_layers = my_rgb_layers;
+}
+
+void matrix_scan_keymap(void) {
+ uint8_t mods = mod_config(get_mods()|get_oneshot_mods());
+ rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT);
+ rgblight_set_layer_state(1, mods & MOD_MASK_CTRL);
+ rgblight_set_layer_state(2, mods & MOD_MASK_ALT);
+ rgblight_set_layer_state(3, mods & MOD_MASK_GUI);
+}
+#endif
diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk
index 2486ecd5d5d9..0604c84bdd86 100644
--- a/keyboards/kyria/keymaps/drashna/rules.mk
+++ b/keyboards/kyria/keymaps/drashna/rules.mk
@@ -1,17 +1,17 @@
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
ENCODER_ENABLE = yes # ENables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-RGBLIGHT_STARTUP_ANIMATION = no
+RGBLIGHT_STARTUP_ANIMATION = yes
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
-MOUSEKEY_ENABLE = no # Mouse keys
+MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support
-UNICODE_ENABLE = yes # Unicode
+UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 8f1c9f6a2a61..8ad589f93815 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -15,7 +15,7 @@
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity
#undef DEBOUNCE
-#define DEBOUNCE 60
+#define DEBOUNCE 15
#define TAPPING_TERM_PER_KEY
@@ -30,3 +30,6 @@
# undef RGBLIGHT_SLEEP
# endif
#endif
+
+#define PIMORONI_TRACKBALL_INVERT_X
+#define PIMORONI_TRACKBALL_INVERT_Y
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index cb256e5e57b8..8f5aaf6cdc57 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -10,7 +10,11 @@
extern rgblight_config_t rgblight_config;
#endif
-enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
+enum more_custom_keycodes {
+ KC_SWAP_NUM = NEW_SAFE_RANGE,
+ PM_SCROLL,
+ PM_PRECISION,
+};
// define layer change stuff for underglow indicator
bool skip_leds = false;
@@ -33,7 +37,7 @@ bool skip_leds = false;
LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
- KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
+ KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
KC_APP, KC_MENU, \
KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \
@@ -281,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
KC_MAKE, _______, _______, _______, _______, _______, UC_MOD, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
- VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
+ VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST,
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL,
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS),
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -293,6 +297,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
+#ifdef PIMORONI_TRACKBALL_ENABLE
+void run_trackball_cleanup(void) {
+ if (trackball_is_scrolling()) {
+ trackball_set_rgbw(RGB_CYAN, 0x00);
+ } else if (trackball_get_precision() != 1.0) {
+ trackball_set_rgbw(RGB_GREEN, 0x00);
+ } else {
+ trackball_set_rgbw(RGB_MAGENTA, 0x00);
+ }
+}
+
+void keyboard_post_init_keymap(void) {
+ // trackball_set_precision(1.5);
+ trackball_set_rgbw(RGB_MAGENTA, 0x00);
+}
+void shutdown_keymap(void) {
+ trackball_set_rgbw(RGB_RED, 0x00);
+}
+#endif
+
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_1:
@@ -321,6 +345,34 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
eeconfig_update_user(userspace_config.raw);
}
break;
+#ifdef PIMORONI_TRACKBALL_ENABLE
+ case PM_SCROLL:
+ trackball_set_scrolling(record->event.pressed);
+ run_trackball_cleanup();
+ break;
+ case PM_PRECISION:
+ if (record->event.pressed) {
+ trackball_set_precision(1.5);
+ } else {
+ trackball_set_precision(1);
+ }
+ run_trackball_cleanup();
+ break;
+#if !defined(MOUSEKEY_ENABLE) && defined(POINTING_DEVICE_ENABLE)
+ case KC_BTN1 ... KC_BTN3:
+ {
+ report_mouse_t currentReport = pointing_device_get_report();
+ if (record->event.pressed) {
+ currentReport.buttons |= (1 << (keycode - KC_BTN1)); // this is defined in report.h
+ } else {
+ currentReport.buttons &= ~(1 << (keycode - KC_BTN1));
+ }
+ pointing_device_set_report(currentReport);
+ pointing_device_send();
+ break;
+ }
+# endif
+#endif
}
// switch (keycode) {
// case KC_P00:
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk
index 387bd20f68d6..51b4c9a6010f 100644
--- a/layouts/community/ergodox/drashna/rules.mk
+++ b/layouts/community/ergodox/drashna/rules.mk
@@ -1,18 +1,20 @@
BOOTMAGIC_ENABLE = lite
TAP_DANCE_ENABLE = yes
COMMAND_ENABLE = no # Commands for debug and configuration
-CONSOLE_ENABLE =
+CONSOLE_ENABLE = no
SPACE_CADET_ENABLE = no
ifeq ($(strip $(KEYBOARD)), ergodox_ez)
- RGBLIGHT_ENABLE = yes
- RGB_MATRIX_ENABLE = yes
- RGBLIGHT_TWINKLE = no
- INDICATOR_LIGHTS = no
+ RGBLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = yes
+ RGBLIGHT_TWINKLE = no
+ INDICATOR_LIGHTS = no
RGBLIGHT_STARTUP_ANIMATION = yes
+ PIMORONI_TRACKBALL_ENABLE = yes
+ MOUSEKEY_ENABLE = no
endif
-UNICODE_ENABLE = yes
+UNICODE_ENABLE = no
UNICDOEMAP_ENABLE = no
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk
index b5d55a681d8d..2c59c614fea4 100644
--- a/layouts/community/ortho_5x12/drashna/rules.mk
+++ b/layouts/community/ortho_5x12/drashna/rules.mk
@@ -7,9 +7,10 @@ TAP_DANCE_ENABLE = no
NKRO_ENABLE = yes
ifeq ($(strip $(KEYBOARD)), fractal)
- RGB_MATRIX_ENABLE = no
- AUDIO_ENABLE = yes
- RGBLIGHT_ENABLE = yes
- RGBLIGHT_TWINKLE = yes
- BOOTLOADER = qmk-dfu
+ RGB_MATRIX_ENABLE = no
+ AUDIO_ENABLE = yes
+ RGBLIGHT_ENABLE = yes
+ RGBLIGHT_TWINKLE = yes
+ RGBLIGHT_STARTUP_ANIMATION = yes
+ BOOTLOADER = qmk-dfu
endif
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
index 7218a21bec48..71d216267fbb 100644
--- a/users/drashna/.gitlab-ci.yml
+++ b/users/drashna/.gitlab-ci.yml
@@ -7,16 +7,15 @@ QMK Firmware:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- linux
- image: ubuntu:18.10
+ image: qmkfm/base_container
before_script:
- apt-get update -qy
- apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip
- avr-gcc --version
- uname -a
script:
- - make test:all
- make planck/rev6:default planck/rev5:default
- - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j2 --output-sync
+ - make all:drashna -j2
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 64b4b64ab792..7d83c7884443 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -1,7 +1,7 @@
#pragma once
// Use custom magic number so that when switching branches, EEPROM always gets reset
-#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1338
+#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
/* Set Polling rate to 1000Hz */
#define USB_POLLING_INTERVAL_MS 1
@@ -98,8 +98,9 @@
# define ONESHOT_TIMEOUT 3000
#endif // !ONESHOT_TIMEOUT
-#ifndef QMK_KEYS_PER_SCAN
-# define QMK_KEYS_PER_SCAN 4
+#ifdef QMK_KEYS_PER_SCAN
+# undef QMK_KEYS_PER_SCAN
+# define QMK_KEYS_PER_SCAN 1
#endif // !QMK_KEYS_PER_SCAN
// this makes it possible to do rolling combos (zx) with keys that
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index ba19d4803fd8..5c0f180278e7 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -113,13 +113,9 @@ void shutdown_user(void) {
rgblight_setrgb_red();
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
-# ifdef __AVR__
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
-# else
- rgb_matrix_sethsv_noeeprom(0, 255, 255);
- rgb_matrix_mode_noeeprom(1);
-# endif
+
#endif // RGB_MATRIX_ENABLE
shutdown_keymap();
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index c10ea5114a0d..dd2b0225841a 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -34,6 +34,9 @@ along with this program. If not, see .
#if defined(OLED_DRIVER_ENABLE)
# include "oled_stuff.h"
#endif
+#if defined(PIMORONI_TRACKBALL_ENABLE)
+# include "pimoroni_trackball.h"
+#endif
/* Define layer names */
enum userspace_layers {
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 7580de1d33b2..6503b970e258 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -170,6 +170,13 @@ void render_bootmagic_status(void) {
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
+ bool is_bootmagic_on;
+ #ifdef OLED_DISPLAY_128X64
+ is_bootmagic_on = !keymap_config.swap_lctl_lgui;
+ #else
+ is_bootmagic_on = keymap_config.swap_lctl_lgui;
+ #endif
+
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false);
#ifdef OLED_DISPLAY_128X64
if (keymap_config.swap_lctl_lgui)
@@ -177,11 +184,11 @@ void render_bootmagic_status(void) {
oled_write_P(PSTR(" "), false);
#endif
{
- oled_write_P(logo[1][0], false);
+ oled_write_P(logo[1][0], is_bootmagic_on);
#ifdef OLED_DISPLAY_128X64
} else {
#endif
- oled_write_P(logo[0][0], false);
+ oled_write_P(logo[0][0], !is_bootmagic_on);
}
oled_write_P(PSTR(" "), false);
#ifdef OLED_DISPLAY_128X64
@@ -192,11 +199,11 @@ void render_bootmagic_status(void) {
if (keymap_config.swap_lctl_lgui)
#endif
{
- oled_write_P(logo[1][1], false);
+ oled_write_P(logo[1][1], is_bootmagic_on);
#ifdef OLED_DISPLAY_128X64
} else {
#endif
- oled_write_P(logo[0][1], false);
+ oled_write_P(logo[0][1], !is_bootmagic_on);
}
oled_write_P(PSTR(" "), false);
#ifdef OLED_DISPLAY_128X64
@@ -233,7 +240,7 @@ __attribute__((weak)) void oled_driver_render_logo(void) {
}
void render_status_secondary(void) {
-#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DRIVER_128x64)
+#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64)
oled_driver_render_logo();
#endif
#ifdef SPLIT_TRANSPORT_MIRROR
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
new file mode 100644
index 000000000000..c5bb560b354c
--- /dev/null
+++ b/users/drashna/pimoroni_trackball.c
@@ -0,0 +1,114 @@
+#include "pimoroni_trackball.h"
+#include "i2c_master.h"
+
+static uint8_t scrolling = 0;
+static int16_t x_offset = 0;
+static int16_t y_offset = 0;
+static int16_t h_offset = 0;
+static int16_t v_offset = 0;
+static float precisionSpeed = 1;
+
+#ifndef I2C_TIMEOUT
+# define I2C_TIMEOUT 100
+#endif
+#ifndef MOUSE_DEBOUNCE
+# define MOUSE_DEBOUNCE 5
+#endif
+
+void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
+ uint8_t data[] = {0x00, red, green, blue, white};
+ i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT);
+}
+
+int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
+ int16_t offset = (int16_t)positive - (int16_t)negative;
+ int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed);
+ return offset < 0 ? -magnitude : magnitude;
+}
+
+void update_member(int8_t* member, int16_t* offset) {
+ if (*offset > 127) {
+ *member = 127;
+ *offset -= 127;
+ } else if (*offset < -127) {
+ *member = -127;
+ *offset += 127;
+ } else {
+ *member = *offset;
+ *offset = 0;
+ }
+}
+
+__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) {
+ if (pressed) {
+ mouse->buttons |= MOUSE_BTN1;
+ } else {
+ mouse->buttons &= ~MOUSE_BTN1;
+ }
+}
+
+float trackball_get_precision(void) { return precisionSpeed; }
+void trackball_set_precision(float precision) { precisionSpeed = precision; }
+bool trackball_is_scrolling(void) { return scrolling; }
+void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
+
+__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00,0x00,0x00,0x4F); }
+
+void pointing_device_task(void) {
+ static bool debounce;
+ static uint16_t debounce_timer;
+ uint8_t state[5] = {};
+ if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
+ if (!state[4] && !debounce) {
+ if (scrolling) {
+#ifdef PIMORONI_TRACKBALL_INVERT_X
+ h_offset += mouse_offset(state[2], state[3], 1);
+#else
+ h_offset -= mouse_offset(state[2], state[3], 1);
+#endif
+#ifdef PIMORONI_TRACKBALL_INVERT_Y
+ v_offset += mouse_offset(state[1], state[0], 1);
+#else
+ v_offset -= mouse_offset(state[1], state[0], 1);
+#endif
+ } else {
+#ifdef PIMORONI_TRACKBALL_INVERT_X
+ x_offset -= mouse_offset(state[2], state[3], 5);
+#else
+ x_offset += mouse_offset(state[2], state[3], 5);
+#endif
+#ifdef PIMORONI_TRACKBALL_INVERT_Y
+ y_offset -= mouse_offset(state[1], state[0], 5);
+#else
+ y_offset += mouse_offset(state[1], state[0], 5);
+#endif
+ }
+ } else {
+ if (state[4]) {
+ debounce = true;
+ debounce_timer = timer_read();
+ }
+ }
+ }
+
+ if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
+
+ report_mouse_t mouse = pointing_device_get_report();
+
+ trackball_check_click(state[4] & (1 << 7), &mouse);
+
+
+#ifndef PIMORONI_TRACKBALL_ROTATE
+ update_member(&mouse.x, &x_offset);
+ update_member(&mouse.y, &y_offset);
+ update_member(&mouse.h, &h_offset);
+ update_member(&mouse.v, &v_offset);
+#else
+ update_member(&mouse.x, &y_offset);
+ update_member(&mouse.y, &x_offset);
+ update_member(&mouse.h, &v_offset);
+ update_member(&mouse.v, &h_offset);
+#endif
+ pointing_device_set_report(mouse);
+ pointing_device_send();
+}
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h
new file mode 100644
index 000000000000..7e8a7cc8163a
--- /dev/null
+++ b/users/drashna/pimoroni_trackball.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "quantum.h"
+#include "pointing_device.h"
+
+#ifndef TRACKBALL_ADDRESS
+# define TRACKBALL_ADDRESS 0x0A
+#endif
+#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE)
+#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ)
+
+void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
+void trackball_check_click(bool pressed, report_mouse_t *mouse);
+
+float trackball_get_precision(void);
+void trackball_set_precision(float precision);
+bool trackball_is_scrolling(void);
+void trackball_set_scrolling(bool scroll);
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 101b3d95ceaa..8e3d3356eefe 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -51,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
clear_mods();
clear_oneshot_mods();
#endif
- send_string_with_delay_P(PSTR("bin/qmk"), TAP_CODE_DELAY);
+ send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY);
#ifndef MAKE_BOOTLOADER
if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
#endif
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 0914aab14447..c9c3224fa56d 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -12,14 +12,14 @@ static uint32_t hypno_timer;
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) {
HSV hsv = {hue, sat, val};
- if (hsv.v > rgb_matrix_config.hsv.v) {
- hsv.v = rgb_matrix_config.hsv.v;
+ if (hsv.v > rgb_matrix_get_val()) {
+ hsv.v = rgb_matrix_get_val();
}
switch (mode) {
case 1: // breathing
{
- uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8);
+ uint16_t time = scale16by8(g_rgb_timer, speed / 8);
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index 06b1e3c0c411..defee9ac1827 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -2,136 +2,13 @@
#include "rgb_stuff.h"
#include "eeprom.h"
-extern rgblight_config_t rgblight_config;
-bool has_initialized;
+bool has_initialized;
-void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); }
-
-/* Custom indicators for modifiers.
- * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback.
- * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up.
- */
-#ifdef INDICATOR_LIGHTS
-void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
- if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) {
- if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) {
-# ifdef SHFT_LED1
- rgblight_sethsv_at(120, 255, 255, SHFT_LED1);
-# endif // SHFT_LED1
-# ifdef SHFT_LED2
- rgblight_sethsv_at(120, 255, 255, SHFT_LED2);
-# endif // SHFT_LED2
- } else {
-# ifdef SHFT_LED1
- rgblight_sethsv_default_helper(SHFT_LED1);
-# endif // SHFT_LED1
-# ifdef SHFT_LED2
- rgblight_sethsv_default_helper(SHFT_LED2);
-# endif // SHFT_LED2
- }
- if ((this_mod | this_osm) & MOD_MASK_CTRL) {
-# ifdef CTRL_LED1
- rgblight_sethsv_at(0, 255, 255, CTRL_LED1);
-# endif // CTRL_LED1
-# ifdef CTRL_LED2
- rgblight_sethsv_at(0, 255, 255, CTRL_LED2);
-# endif // CTRL_LED2
- } else {
-# ifdef CTRL_LED1
- rgblight_sethsv_default_helper(CTRL_LED1);
-# endif // CTRL_LED1
-# ifdef CTRL_LED2
- rgblight_sethsv_default_helper(CTRL_LED2);
-# endif // CTRL_LED2
- }
- if ((this_mod | this_osm) & MOD_MASK_GUI) {
-# ifdef GUI_LED1
- rgblight_sethsv_at(51, 255, 255, GUI_LED1);
-# endif // GUI_LED1
-# ifdef GUI_LED2
- rgblight_sethsv_at(51, 255, 255, GUI_LED2);
-# endif // GUI_LED2
- } else {
-# ifdef GUI_LED1
- rgblight_sethsv_default_helper(GUI_LED1);
-# endif // GUI_LED1
-# ifdef GUI_LED2
- rgblight_sethsv_default_helper(GUI_LED2);
-# endif // GUI_LED2
- }
- if ((this_mod | this_osm) & MOD_MASK_ALT) {
-# ifdef ALT_LED1
- rgblight_sethsv_at(240, 255, 255, ALT_LED1);
-# endif // ALT_LED1
-# ifdef GUI_LED2
- rgblight_sethsv_at(240, 255, 255, ALT_LED2);
-# endif // GUI_LED2
- } else {
-# ifdef GUI_LED1
- rgblight_sethsv_default_helper(ALT_LED1);
-# endif // GUI_LED1
-# ifdef GUI_LED2
- rgblight_sethsv_default_helper(ALT_LED2);
-# endif // GUI_LED2
- }
- }
-}
-
-/* Function for the indicators */
-void matrix_scan_indicator(void) {
- if (has_initialized) {
- set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
- }
-}
-#endif // INDICATOR_LIGHTS
+void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); }
#ifdef RGBLIGHT_TWINKLE
static rgblight_fadeout lights[RGBLED_NUM];
-__attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; }
-
-/* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */
-bool rgblight_twinkle_is_led_used(uint8_t index) {
- switch (index) {
-# ifdef INDICATOR_LIGHTS
-# ifdef SHFT_LED1
- case SHFT_LED1:
- return true;
-# endif // SHFT_LED1
-# ifdef SHFT_LED2
- case SHFT_LED2:
- return true;
-# endif // SHFT_LED2
-# ifdef CTRL_LED1
- case CTRL_LED1:
- return true;
-# endif // CTRL_LED1
-# ifdef CTRL_LED2
- case CTRL_LED2:
- return true;
-# endif // CTRL_LED2
-# ifdef GUI_LED1
- case GUI_LED1:
- return true;
-# endif // GUI_LED1
-# ifdef GUI_LED2
- case GUI_LED2:
- return true;
-# endif // GUI_LED2
-# ifdef ALT_LED1
- case ALT_LED1:
- return true;
-# endif // ALT_LED1
-# ifdef ALT_LED2
- case ALT_LED2:
- return true;
-# endif // ALT_LED2
-# endif // INDICATOR_LIGHTS
- default:
- return rgblight_twinkle_is_led_used_keymap(index);
- }
-}
-
/* Handler for fading/twinkling effect */
void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive
bool litup = false;
@@ -170,9 +47,6 @@ void start_rgb_light(void) {
uint8_t min_life_index = -1;
for (uint8_t index = 0; index < RGBLED_NUM; ++index) {
- if (rgblight_twinkle_is_led_used(index)) {
- continue;
- }
if (lights[index].enabled) {
if (min_life_index == -1 || lights[index].life < min_life) {
min_life = lights[index].life;
@@ -197,7 +71,7 @@ void start_rgb_light(void) {
light->timer = timer_read();
light->life = 0xC0 + rand() % 0x40;
- light->hue = rgblight_config.hue + (rand() % 0xB4) - 0x54;
+ light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54;
rgblight_sethsv_at(light->hue, 255, light->life, light_index);
}
@@ -227,39 +101,52 @@ bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) {
return true;
}
+#if defined(RGBLIGHT_STARTUP_ANIMATION)
+static bool is_enabled;
+static bool is_rgblight_startup;
+static uint8_t old_hue;
+static uint16_t rgblight_startup_loop_timer;
+#endif
+
void keyboard_post_init_rgb_light(void) {
#if defined(RGBLIGHT_STARTUP_ANIMATION)
- bool is_enabled = rgblight_config.enable;
+ is_enabled = rgblight_is_enabled();
if (userspace_config.rgb_layer_change) {
rgblight_enable_noeeprom();
}
- if (rgblight_config.enable) {
+ if (rgblight_is_enabled()) {
layer_state_set_rgb_light(layer_state);
- uint16_t old_hue = rgblight_config.hue;
+ old_hue = rgblight_get_hue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
- for (uint16_t i = 255; i > 0; i--) {
- rgblight_sethsv_noeeprom((i + old_hue) % 255, 255, 255);
- matrix_scan();
- wait_ms(10);
- }
+ is_rgblight_startup = true;
}
- if (!is_enabled) {
- rgblight_disable_noeeprom();
- }
-
#endif
layer_state_set_rgb_light(layer_state);
}
void matrix_scan_rgb_light(void) {
-#ifdef RGBLIGHT_ENABLE
# ifdef RGBLIGHT_TWINKLE
scan_rgblight_fadeout();
# endif // RGBLIGHT_ENABLE
-# ifdef INDICATOR_LIGHTS
- matrix_scan_indicator();
-# endif
+#if defined(RGBLIGHT_STARTUP_ANIMATION)
+ if (is_rgblight_startup && is_keyboard_master()) {
+ if (timer_elapsed(rgblight_startup_loop_timer) > 10) {
+ static uint8_t counter;
+ counter++;
+ rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255);
+ rgblight_startup_loop_timer = timer_read();
+ if (counter == 255) {
+ is_rgblight_startup = false;
+ if (!is_enabled) {
+ rgblight_disable_noeeprom();
+ }
+ if (userspace_config.rgb_layer_change) {
+ layer_state_set_rgb_light(layer_state);
+ }
+ }
+ }
+ }
#endif
}
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 051368ff5ea5..b7523a436cad 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -22,9 +22,6 @@ endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_stuff.c
- ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
- OPT_DEFS += -DINDICATOR_LIGHTS
- endif
ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
OPT_DEFS += -DRGBLIGHT_TWINKLE
endif
@@ -62,3 +59,10 @@ endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_stuff.c
endif
+
+ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
+ POINTING_DEVICE_ENABLE := yes
+ OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
+ SRC += pimoroni_trackball.c
+ QUANTUM_LIB_SRC += i2c_master.c
+endif
From e8a02afc8cb2c29f522ec05bbf89a8bcd32dbe26 Mon Sep 17 00:00:00 2001
From: Thomas Lim
Date: Mon, 15 Jun 2020 06:45:56 -0400
Subject: [PATCH 26/36] Add VIA support to keebio/nyquist (#9399)
---
keyboards/keebio/nyquist/keymaps/via/keymap.c | 48 +++++++++++++++++++
keyboards/keebio/nyquist/keymaps/via/rules.mk | 2 +
2 files changed, 50 insertions(+)
create mode 100644 keyboards/keebio/nyquist/keymaps/via/keymap.c
create mode 100644 keyboards/keebio/nyquist/keymaps/via/rules.mk
diff --git a/keyboards/keebio/nyquist/keymaps/via/keymap.c b/keyboards/keebio/nyquist/keymaps/via/keymap.c
new file mode 100644
index 000000000000..43ce83bb14f5
--- /dev/null
+++ b/keyboards/keebio/nyquist/keymaps/via/keymap.c
@@ -0,0 +1,48 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[0] = LAYOUT(
+ 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
+ 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 ,
+ KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[1] = LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[2] = LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[3] = LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+
+};
+
diff --git a/keyboards/keebio/nyquist/keymaps/via/rules.mk b/keyboards/keebio/nyquist/keymaps/via/rules.mk
new file mode 100644
index 000000000000..43061db1dd46
--- /dev/null
+++ b/keyboards/keebio/nyquist/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
\ No newline at end of file
From 7576f6162e662c23a174ed8730c93e22a985e7c9 Mon Sep 17 00:00:00 2001
From: csc027
Date: Mon, 15 Jun 2020 10:48:21 +0000
Subject: [PATCH 27/36] [Keymap] csc027/keymap-updates (#9420)
---
keyboards/keebio/iris/keymaps/csc027/keymap.c | 12 ++---
keyboards/planck/keymaps/csc027/keymap.c | 46 ++++------------
keyboards/planck/keymaps/csc027/rules.mk | 2 +-
users/csc027/csc027.h | 2 +-
users/csc027/defines.h | 52 +++++++++++++++++--
users/csc027/usb_led.c | 18 +++----
6 files changed, 74 insertions(+), 58 deletions(-)
diff --git a/keyboards/keebio/iris/keymaps/csc027/keymap.c b/keyboards/keebio/iris/keymaps/csc027/keymap.c
index 82a07739141a..f81e8f848a06 100644
--- a/keyboards/keebio/iris/keymaps/csc027/keymap.c
+++ b/keyboards/keebio/iris/keymaps/csc027/keymap.c
@@ -52,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______
),
- [_GW] = LAYOUT(
- KC_Y, KC_GRV, KC_1, KC_2, KC_3, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_B, KC_TAB, KC_T, KC_W, KC_4, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
- KC_M, MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- KC_I, KC_LCTL, KC_Z, KC_LALT, KC_V, KC_SPC, KC_SPC, _______, KC_N, KC_M, KC_COMM, KC_DOT, TO(_CS), TO(_QW),
- KC_X, KC_C, KC_SPC, _______, KC_M, KC_B
+ [_GG] = LAYOUT(
+ KC_5, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_G, MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_B, KC_LCTL, KC_Z, KC_X, KC_C, KC_SPC, KC_SPC, _______, KC_N, KC_M, KC_COMM, KC_DOT, TO(_CS), TO(_QW),
+ KC_LALT, KC_V, KC_SPC, _______, KC_M, KC_B
),
[_CS] = LAYOUT(
diff --git a/keyboards/planck/keymaps/csc027/keymap.c b/keyboards/planck/keymaps/csc027/keymap.c
index e39be03eb045..38e3e074135d 100644
--- a/keyboards/planck/keymaps/csc027/keymap.c
+++ b/keyboards/planck/keymaps/csc027/keymap.c
@@ -46,43 +46,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
___________________CONVENIENCE_L4__________________, ___________________CONVENIENCE_R4__________________
),
- /* Guild Wars 2 Layer
- *
- * ,-----------------------------------------------------------------------.
- * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc|
- * |-----------------------------------------------------------------------|
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
- * |-----------------------------------------------------------------------|
- * |Sf/Ec| A | S | D | F | G | H | J | K | L | ; |Enter|
- * |-----------------------------------------------------------------------|
- * | Ctl | Z | Alt | X | C |Space|Space| M | B | . |Nxt L|Rst L|
- * `-----------------------------------------------------------------------'
- */
-
- [_GW] = LAYOUT_ortho_4x12(
- 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
- MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT ,
- KC_LCTL, KC_Z, KC_LALT, KC_X, KC_C, KC_SPC, KC_SPC, KC_M, KC_B, KC_DOT, TO(_CS), TO(_QW)
+ [_GG] = LAYOUT_wrapper(
+ ________________General_Game_4x12_L1_______________, ________________General_Game_4x12_R1_______________,
+ ________________General_Game_4x12_L2_______________, ________________General_Game_4x12_R2_______________,
+ ________________General_Game_4x12_L3_______________, ________________General_Game_4x12_R3_______________,
+ ________________General_Game_4x12_L4_______________, ________________General_Game_4x12_R4_______________
),
- /* CS:GO Layer
- *
- * ,-----------------------------------------------------------------------.
- * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc|
- * |-----------------------------------------------------------------------|
- * | Tab | Q | W | E | R | T | Y | 4 | 5 | 6 | |NmLck|
- * |-----------------------------------------------------------------------|
- * |Shift| A | S | D | F | G | H | 1 | 2 | 3 |Enter| Esc |
- * |-----------------------------------------------------------------------|
- * | Ctl | Z | Alt | X | B |Space|Space| 0 | 0 | . |Nxt L|Rst L|
- * `-----------------------------------------------------------------------'
- */
-
- [_CS] = LAYOUT_ortho_4x12(
- XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK,
- KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC ,
- KC_LCTL, KC_Z, KC_LALT, KC_X, KC_B, KC_SPC, KC_SPC, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW)
+ [_CS] = LAYOUT_wrapper(
+ ___________________CSGO_4x12_L1____________________, ___________________CSGO_4x12_R1____________________,
+ ___________________CSGO_4x12_L2____________________, ___________________CSGO_4x12_R2____________________,
+ ___________________CSGO_4x12_L3____________________, ___________________CSGO_4x12_R3____________________,
+ ___________________CSGO_4x12_L4____________________, ___________________CSGO_4x12_R4____________________
)
};
diff --git a/keyboards/planck/keymaps/csc027/rules.mk b/keyboards/planck/keymaps/csc027/rules.mk
index 801031fb1edc..cf92d56749b0 100644
--- a/keyboards/planck/keymaps/csc027/rules.mk
+++ b/keyboards/planck/keymaps/csc027/rules.mk
@@ -2,5 +2,5 @@ BOOTMAGIC_ENABLE = no
COMMAND_ENABLE = no
CONSOLE_ENABLE = no
EXTRAKEY_ENABLE = no
-LTO_ENABLE = yes
+LTO_ENABLE = no
RGBLIGHT_ENABLE = no
diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h
index 96bf7dc0eb09..6daae2a30a53 100644
--- a/users/csc027/csc027.h
+++ b/users/csc027/csc027.h
@@ -24,6 +24,6 @@ enum custom_layers {
_MS, // Mouse
_GT, // Git
_CN, // Convenience
- _GW, // Guild Wars 2
+ _GG, // General Gaming
_CS // Counter-Strike: Global Offensive
};
diff --git a/users/csc027/defines.h b/users/csc027/defines.h
index 4f52938f1f68..3f599ad654ae 100644
--- a/users/csc027/defines.h
+++ b/users/csc027/defines.h
@@ -20,10 +20,6 @@
* QWERTY layer.
* - The "Git" one shot function goes to the macro layer which has Git
* commands implemented.
- * - The "Convc" momentary function goes to the Convenience layer which has a
- * tenkey. Note: The tenkey will operate using the secondary functions if
- * the Number Lock is not enabled (e.g., Left and Right instead of 4 and
- * 6).
* - The Right Shift key also doubles as an Enter key if it is tapped rather
* than held.
*
@@ -46,7 +42,7 @@
#define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC
#define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
#define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE
-#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX
+#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GG), XXXXXXX
/* Raise Layer
*
@@ -213,6 +209,52 @@
#define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
#define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+/* General Game Layer
+ *
+ * ,-----------------------------------. ,-----------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |BkSpc|
+ * |-----------------------------------| |-----------------------------------|
+ * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
+ * |-----------------------------------| |-----------------------------------|
+ * |Sf/Ec| A | S | D | F | G | | H | J | K | L | ; |Enter|
+ * |-----------------------------------| |-----------------------------------|
+ * | Ctl | Z | Alt | X | C |Space| |Space| M | B | . |Nxt L|Rst L|
+ * `-----------------------------------' `-----------------------------------'
+ */
+
+#define ________________General_Game_4x12_L1_______________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
+#define ________________General_Game_4x12_L2_______________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
+#define ________________General_Game_4x12_L3_______________ MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_G
+#define ________________General_Game_4x12_L4_______________ KC_LCTL, KC_Z, KC_LALT, KC_X, KC_C, KC_SPC
+
+#define ________________General_Game_4x12_R1_______________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC
+#define ________________General_Game_4x12_R2_______________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
+#define ________________General_Game_4x12_R3_______________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT
+#define ________________General_Game_4x12_R4_______________ KC_SPC, KC_M, KC_B, KC_DOT, TO(_CS), TO(_QW)
+
+/* CS:GO Layer
+ *
+ * ,-----------------------------------. ,-----------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |BkSpc|
+ * |-----------------------------------| |-----------------------------------|
+ * | Tab | Q | W | E | R | T | | Y | 4 | 5 | 6 | |NmLck|
+ * |-----------------------------------| |-----------------------------------|
+ * |Shift| A | S | D | F | G | | H | 1 | 2 | 3 |Enter| Esc |
+ * |-----------------------------------| |-----------------------------------|
+ * | Ctl | Z | Alt | X | B |Space| |Space| 0 | 0 | . |Nxt L|Rst L|
+ * `-----------------------------------' `-----------------------------------'
+ */
+
+#define ___________________CSGO_4x12_L1____________________ XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5
+#define ___________________CSGO_4x12_L2____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
+#define ___________________CSGO_4x12_L3____________________ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G
+#define ___________________CSGO_4x12_L4____________________ KC_LCTL, KC_Z, KC_LALT, KC_X, KC_B, KC_SPC
+
+#define ___________________CSGO_4x12_R1____________________ KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC
+#define ___________________CSGO_4x12_R2____________________ KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK
+#define ___________________CSGO_4x12_R3____________________ KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC
+#define ___________________CSGO_4x12_R4____________________ KC_SPC, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW)
+
/* Convenience macros
*
* These are accelerator macros for simplifying declaration of PROGMEM strings
diff --git a/users/csc027/usb_led.c b/users/csc027/usb_led.c
index 1418e32cad92..473b153a1718 100644
--- a/users/csc027/usb_led.c
+++ b/users/csc027/usb_led.c
@@ -10,21 +10,21 @@
#if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE)
-bool led_update_user(led_t usb_led) {
- static led_t old_usb_led = {
+bool led_update_user(led_t new_led) {
+ static led_t old_led = {
.num_lock = false,
.caps_lock = false,
.scroll_lock = false
};
- if(old_usb_led.caps_lock != usb_led.caps_lock) {
- usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off();
- } else if(old_usb_led.num_lock != usb_led.num_lock) {
- usb_led.num_lock ? on_usb_led_on() : on_usb_led_off();
- } else if(old_usb_led.scroll_lock != usb_led.scroll_lock) {
- usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off();
+ if(old_led.caps_lock != new_led.caps_lock) {
+ new_led.caps_lock ? on_usb_led_on() : on_usb_led_off();
+ } else if(old_led.num_lock != new_led.num_lock) {
+ new_led.num_lock ? on_usb_led_on() : on_usb_led_off();
+ } else if(old_led.scroll_lock != new_led.scroll_lock) {
+ new_led.scroll_lock ? on_usb_led_on() : on_usb_led_off();
}
- old_usb_led = usb_led;
+ old_led = new_led;
return true;
}
From 3814dacf27a11e398fe426c4b03b860137b10676 Mon Sep 17 00:00:00 2001
From: MURAMATSU Atshshi
Date: Tue, 16 Jun 2020 13:46:12 +0900
Subject: [PATCH 28/36] [Keymap] Add froggy keymap with 106/109 (JP) settings
for helix keyboard (#8967)
* initial commit for froggy 106 key mode
* add mode indicator on OLED
* use #pragma once instead of include guard
* remove unusable codes
* remove audio codes, because helix rev.2 has no audio feature
* use set_single_persistent_default_layer
* remove eeprom update check
---
.../helix/rev2/keymaps/froggy_106/config.h | 41 +
.../helix/rev2/keymaps/froggy_106/helixfont.h | 235 +++++
.../helix/rev2/keymaps/froggy_106/keymap.c | 822 ++++++++++++++++++
.../helix/rev2/keymaps/froggy_106/readme.md | 85 ++
.../helix/rev2/keymaps/froggy_106/rules.mk | 23 +
5 files changed, 1206 insertions(+)
create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/config.h
create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/helixfont.h
create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/keymap.c
create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/readme.md
create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/rules.mk
diff --git a/keyboards/helix/rev2/keymaps/froggy_106/config.h b/keyboards/helix/rev2/keymaps/froggy_106/config.h
new file mode 100644
index 000000000000..36c3f2a7999e
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/froggy_106/config.h
@@ -0,0 +1,41 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+
+#pragma once
+
+#undef TAPPING_TERM
+#define TAPPING_TERM 200
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
+#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
+
+// If you need more program area, try select and reduce rgblight modes to use.
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ #define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ #define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ #define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/helix/rev2/keymaps/froggy_106/helixfont.h b/keyboards/helix/rev2/keymaps/froggy_106/helixfont.h
new file mode 100644
index 000000000000..3a79a1937ba7
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/froggy_106/helixfont.h
@@ -0,0 +1,235 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#pragma once
+
+#include "progmem.h"
+
+// Standard ASCII 5x7 font
+
+static const unsigned char font[] PROGMEM = {
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82,
+0x82, 0x82, 0x82, 0xC2, 0x82, 0x02,
+0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
+0x02, 0x62, 0x62, 0x62, 0x62, 0xE2,
+0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC,
+0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC,
+0xFC, 0x00, 0xFC, 0xFC, 0xF0, 0x80,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
+0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x20, 0x00, 0x00, 0x24, 0xA4,
+0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00,
+0x00, 0x00, 0x24, 0xA4, 0x24, 0x24,
+0x3C, 0x04, 0x04, 0x00, 0x00, 0x00,
+0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00,
+0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC,
+0x00, 0x44, 0x44, 0x44, 0xDC, 0x44,
+0x04, 0x3C, 0x00, 0x00, 0x00, 0x00,
+0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E,
+0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE,
+0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
+0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E,
+0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41,
+0x41, 0x41, 0x41, 0x41, 0x41, 0x40,
+0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
+0x40, 0x40, 0x40, 0x40, 0x40, 0x41,
+0x40, 0x40, 0x43, 0x40, 0x40, 0x7F,
+0x00, 0x20, 0x3C, 0x3E, 0x3E, 0x3E,
+0x3E, 0x00, 0x3E, 0x3E, 0x3E, 0x3E,
+0x38, 0x00, 0x00, 0xF0, 0xFB, 0xFB,
+0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C,
+0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8,
+0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x04, 0x1B, 0x04, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x57, 0x50,
+0x57, 0x54, 0x57, 0x10, 0x50, 0x00,
+0x00, 0x00, 0x97, 0x94, 0x97, 0x94,
+0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00,
+0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
+0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E,
+0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F,
+0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
+0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E,
+0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62,
+0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02,
+0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
+0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82,
+0x82, 0x82, 0x82, 0x02, 0x02, 0xFE,
+0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
+0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
+0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
+0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E,
+0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D,
+0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x20, 0x50,
+0x8C, 0x50, 0x20, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x09, 0x09,
+0x06, 0x09, 0x09, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x1C, 0x12, 0x12, 0x12,
+0x1E, 0x10, 0x10, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xFF, 0x00, 0x73,
+0x84, 0xE7, 0x94, 0x94, 0x94, 0x67,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E,
+0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE,
+0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
+0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E,
+0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE,
+0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
+0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
+0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFC,
+0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0x80,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
+0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46,
+0x47, 0x46, 0x46, 0x46, 0x43, 0x40,
+0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
+0x40, 0x41, 0x43, 0x47, 0x4F, 0x41,
+0x41, 0x41, 0x41, 0x40, 0x40, 0x3F,
+0x00, 0x00, 0x00, 0x3E, 0x73, 0x60,
+0x70, 0x3E, 0x07, 0x03, 0x67, 0x3E,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+0x06, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
+0x36, 0x08, 0x08, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E,
+0x10, 0x1C, 0x12, 0x12, 0x12, 0x12,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79,
+0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F,
+0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
+0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E,
+0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F,
+0x00, 0x00, 0x00, 0x03, 0x03, 0x03,
+0x03, 0x3F, 0x63, 0x63, 0x63, 0x3F,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+0x00, 0x00, 0x07, 0x1F, 0x3F, 0x0F,
+0x07, 0x0F, 0x3F, 0x3F, 0x0F, 0x00,
+0x03, 0x06, 0x00, 0xF0, 0xFB, 0xFB,
+};
diff --git a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c
new file mode 100644
index 000000000000..d32c4fa0ca51
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c
@@ -0,0 +1,822 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern uint8_t is_master;
+
+#define DELAY_TIME 75
+static uint16_t key_timer;
+static uint16_t tap_timer;
+static uint16_t delay_registered_code;
+static uint8_t delay_registered_layer;
+static uint8_t delay_mat_row;
+static uint8_t delay_mat_col;
+static bool delay_key_stat;
+static bool delay_key_pressed;
+static bool tapping_key;
+
+// 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.
+enum layer_number {
+ _BASE = 0,
+ _BASE_106,
+ _OPT,
+ _OPT_106,
+ _SYM,
+ _SYM_106,
+ _NUM,
+ _NUM_106,
+ _FUNC,
+ _LAYER_NUM,
+};
+bool RGBAnimation = false; //Flag for LED Layer color Refresh.
+
+typedef union {
+ uint32_t raw;
+ struct {
+ bool mac_mode:1;
+ };
+} user_config_t;
+user_config_t user_config;
+
+#define IS_MODE_106() ((default_layer_state & (1UL << _BASE_106)) != 0)
+#define IS_MODE_MAC() (user_config.mac_mode)
+#ifndef MAX
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
+#endif
+#ifndef MIN
+#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
+#endif
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ EISU,
+ KANA,
+ RGBRST,
+ RGBOFF,
+ RGB1,
+ RGB2,
+ RGB3,
+ OPT_TAP_SP,
+ DESKTOP,
+ MAC,
+ WIN,
+ L_SYM,
+ L_NUM,
+ TO_106,
+ TO_101,
+};
+
+enum macro_keycodes {
+ KC_SAMPLEMACRO,
+};
+
+//Macros
+#define M_SAMPLE M(KC_SAMPLEMACRO)
+
+#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Base
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | C+z | ; | [ | ( | < | { | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | KANA | P | K | R | A | F | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | BS | D | T | H | E | O | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Shift| Y | S | N | I | U |Space | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_BASE] = LAYOUT( \
+ LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \
+ KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
+ KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
+ OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
+ OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ [_BASE_106] = LAYOUT( \
+ LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \
+ KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
+ KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
+ OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
+ OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Opt
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | Esc | : | ] | ) | > | } | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | EISU| J | M | B | ' | Tab | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | . | V | C | L | Z | Q | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | X | G | W | - | Del | Esc | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | , | DTOP | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_OPT] = LAYOUT( \
+ KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \
+ EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
+ KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
+ _______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ [_OPT_106] = LAYOUT( \
+ KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \
+ EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
+ KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
+ _______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Sym
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | Ins | GRV | | PU | PD | ^ | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | \ | # | = | ? | % | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | $ | upA | @ | ! | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | CL | <- | dwA | -> | _ | & | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | PS | | ~ | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_SYM] = LAYOUT( \
+ KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \
+ _______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \
+ _______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ [_SYM_106] = LAYOUT( \
+ KC_INS, JP_GRV, _______, KC_PGUP, KC_PGDN, JP_CIRC, _______, _______, _______, _______, _______, _______, \
+ _______, JP_BSLS, JP_HASH, JP_EQL, JP_QUES, JP_PERC, _______, _______, _______, _______, _______, _______, \
+ _______, JP_DLR, KC_UP, JP_AT, JP_EXLM, JP_PIPE, _______, _______, _______, _______, _______, _______, \
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,JP_UNDS, JP_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, KC_PSCR, _______, JP_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Raise
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | Func | home | End | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | * | 7 | 8 | 9 | - | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | . | / | 4 | 5 | 6 | + | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | . | , | | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_NUM] = LAYOUT( \
+ _______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
+ _______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \
+ KC_DOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \
+ KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ [_NUM_106] = LAYOUT( \
+ _______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
+ _______, JP_ASTR, KC_P7, KC_P8, KC_P9, JP_MINS, _______, _______, _______, _______, _______, _______, \
+ KC_DOT, JP_SLSH, KC_P4, KC_P5, KC_P6, JP_PLUS, _______, _______, _______, _______, _______, _______, \
+ KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, KC_PDOT, JP_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Func
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * |RGBRST| Hue |To101 | RST | Mac | Win | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | RGB1 | VAL+ | F7 | F8 | F9 |To106 | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |RGBOFF| | | | | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_FUNC] = LAYOUT( \
+ RGBRST,RGB_HUI, TO_101, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \
+ RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, TO_106, _______, _______, _______, _______, _______, _______, \
+ RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \
+ RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \
+ RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ )
+};
+#else
+#error "undefined keymaps"
+#endif
+
+void set_mac_mode(bool enable) {
+ if(enable){
+ user_config.mac_mode = true;
+ keymap_config.swap_lalt_lgui = false;
+ keymap_config.swap_ralt_rgui = false;
+ }else{
+ user_config.mac_mode = false;
+ keymap_config.swap_lalt_lgui = true;
+ keymap_config.swap_ralt_rgui = true;
+ }
+ eeconfig_update_user(user_config.raw);
+}
+
+void eeconfig_init_user(void) {
+ user_config.raw = 0;
+ eeconfig_update_user(user_config.raw);
+}
+
+void keyboard_post_init_user(void) {
+ user_config.raw = eeconfig_read_user();
+ set_mac_mode(user_config.mac_mode);
+}
+
+bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){
+ int base_keymap = IS_MODE_106() ? _BASE_106 : _BASE;
+ for(uint8_t i=0; ievent.key.col;
+ row = record->event.key.row;
+ if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) {
+ int end = keybuf_end;
+ keybufs[end].col = col;
+ keybufs[end].row = row % 5;
+ keybufs[end].frame = 0;
+ keybuf_end ++;
+ }
+ #endif
+
+ if(tap_timer&&keycode!=OPT_TAP_SP){
+ tapping_key = true;
+ }
+
+ if(keycode==delay_registered_code){
+ if (!record->event.pressed){
+ unregister_delay_code();
+ }
+ }
+
+ switch (keycode) {
+ case KC_SCLN:
+ case KC_LBRC:
+ case KC_LPRN:
+ case KC_LT:
+ case KC_LCBR:
+ case KC_P:
+ case KC_K:
+ case KC_R:
+ case KC_A:
+ case KC_F:
+ case KC_BSPC:
+ case KC_D:
+ case KC_T:
+ case KC_H:
+ case KC_E:
+ case KC_O:
+ case KC_Y:
+ case KC_S:
+ case KC_N:
+ case KC_I:
+ case KC_U:
+ case LCTL(KC_Z):
+ case KC_SPC:
+ //case JP_SCLN: // == KC_SCLN
+ case JP_LBRC:
+ case JP_LPRN:
+ //case JP_LT: // == KC_LT
+ case JP_LCBR:
+ if (IS_MODE_106()) {
+ if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR)
+ break;
+ }else{
+ if (keycode == JP_LBRC || keycode == JP_LPRN || keycode == JP_LCBR)
+ break;
+ }
+ if (record->event.pressed) {
+ if (IS_MODE_106())
+ register_delay_code(_BASE_106);
+ else
+ register_delay_code(_BASE);
+ if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){
+ key_timer = timer_read();
+ delay_key_stat = true;
+ delay_key_pressed = true;
+ }
+ }else{
+ delay_key_pressed = false;
+ }
+ return false;
+ break;
+ case L_SYM:
+ if (record->event.pressed) {
+ if (IS_MODE_106()) {
+ register_delay_code(_SYM_106);
+ layer_on(_SYM_106);
+ }else{
+ register_delay_code(_SYM);
+ layer_on(_SYM);
+ }
+ }else{
+ layer_off(_SYM);
+ layer_off(_SYM_106);
+ if(delay_registered_layer == _SYM || delay_registered_layer == _SYM_106) {
+ unregister_delay_code();
+ }
+ }
+ return false;
+ break;
+ case L_NUM:
+ if (record->event.pressed) {
+ if (IS_MODE_106()) {
+ register_delay_code(_NUM_106);
+ layer_on(_NUM_106);
+ }else{
+ register_delay_code(_NUM);
+ layer_on(_NUM);
+ }
+ }else{
+ layer_off(_NUM);
+ layer_off(_NUM_106);
+ if(delay_registered_layer == _NUM || delay_registered_layer == _NUM_106) {
+ unregister_delay_code();
+ }
+ }
+ return false;
+ break;
+ case OPT_TAP_SP:
+ if (record->event.pressed) {
+ tapping_key = false;
+ if (IS_MODE_106()) {
+ register_delay_code(_OPT_106);
+ layer_on(_OPT_106);
+ }else{
+ register_delay_code(_OPT);
+ layer_on(_OPT);
+ }
+ tap_timer = timer_read();
+ }else{
+ layer_off(_OPT);
+ layer_off(_OPT_106);
+ if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){
+ SEND_STRING(" ");
+ }else if(delay_registered_layer == _OPT || delay_registered_layer == _OPT_106) {
+ unregister_delay_code();
+ }
+ tap_timer = 0;
+ }
+ return false;
+ break;
+ case EISU:
+ if (record->event.pressed) {
+ if(IS_MODE_MAC()){
+ register_code(KC_LANG2);
+ }else{
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ return false;
+ break;
+ case KANA:
+ if (record->event.pressed) {
+ if(IS_MODE_MAC()){
+ register_code(KC_LANG1);
+ }else{
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG1);
+ }
+ return false;
+ break;
+ case DESKTOP:
+ if (record->event.pressed) {
+ if(IS_MODE_MAC()){
+ register_code(KC_F11);
+ }else{
+ SEND_STRING(SS_LGUI("d"));
+ }
+ } else {
+ unregister_code(KC_F11);
+ }
+ return false;
+ break;
+ case RGBRST:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGBAnimation = false;
+ }
+ #endif
+ break;
+ case RGBOFF:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ rgblight_disable();
+ }
+ #endif
+ break;
+ case RGB1:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ RGBAnimation = true;
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
+ }
+ #endif
+ break;
+ case RGB2:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ RGBAnimation = true;
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
+ }
+ #endif
+ break;
+ case RGB3:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ RGBAnimation = true;
+ rgblight_mode(RGBLIGHT_MODE_KNIGHT);
+ }
+ #endif
+ break;
+ case MAC:
+ if (record->event.pressed) {
+ set_mac_mode(true);
+ }
+ break;
+ case WIN:
+ if (record->event.pressed) {
+ set_mac_mode(false);
+ }
+ break;
+ case TO_101:
+ if (record->event.pressed) {
+ if (IS_MODE_106()) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ }
+ break;
+ case TO_106:
+ if (record->event.pressed) {
+ if (!IS_MODE_106()) {
+ set_single_persistent_default_layer(_BASE_106);
+ }
+ }
+ break;
+ }
+ return true;
+}
+
+
+//keyboard start-up code. Runs once when the firmware starts up.
+void matrix_init_user(void) {
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+// LED Effect
+#ifdef RGBLIGHT_ENABLE
+unsigned char rgb[7][5][3];
+void led_ripple_effect(char r, char g, char b) {
+ static int scan_count = -10;
+ static int keys[] = { 6, 6, 6, 7, 7 };
+ static int keys_sum[] = { 0, 6, 12, 18, 25 };
+
+ if (scan_count == -1) {
+ rgblight_enable_noeeprom();
+ rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
+ } else if (scan_count >= 0 && scan_count < 5) {
+ for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
+ int i = c;
+ // FIXME:
+
+ int y = scan_count;
+ int dist_y = abs(y - keybufs[i].row);
+ for (int x=0; x= 6 && scan_count <= 10) {
+ int y = scan_count - 6;
+ for (int x=0; x= 12) { scan_count = 0; }
+}
+#endif
+
+layer_state_t layer_state_old;
+
+//runs every scan cycle (a lot)
+void matrix_scan_user(void) {
+ #ifdef SSD1306OLED
+ iota_gfx_task(); // this is what updates the display continuously
+ #endif
+
+ if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){
+ if (IS_MODE_106())
+ register_delay_code(_BASE_106);
+ else
+ register_delay_code(_BASE);
+ if(!delay_key_pressed){
+ unregister_delay_code();
+ }
+ }
+
+ if(layer_state_old != layer_state){
+ for (int8_t i = _LAYER_NUM-1; i > _BASE_106; i--) {
+ if(IS_LAYER_ON(i)){
+ register_delay_code(i);
+ break;
+ }
+ }
+ layer_state_old = layer_state;
+ }
+
+ #ifdef RGBLIGHT_ENABLE
+ if(!RGBAnimation){
+ if(IS_LAYER_ON(_FUNC)){
+ #ifdef RGBLED_BACK
+ led_ripple_effect(127,23,0);
+ #else
+ rgblight_setrgb(127,23,0);
+ #endif
+ }else if(IS_LAYER_ON(_NUM)||IS_LAYER_ON(_NUM_106)){
+ #ifdef RGBLED_BACK
+ led_ripple_effect(127,0,61);
+ #else
+ rgblight_setrgb(127,0,61);
+ #endif
+ }else if(IS_LAYER_ON(_SYM)||IS_LAYER_ON(_SYM_106)){
+ #ifdef RGBLED_BACK
+ led_ripple_effect(0,127,0);
+ #else
+ rgblight_setrgb(0,127,0);
+ #endif
+ }else if(IS_LAYER_ON(_OPT)||IS_LAYER_ON(_OPT_106)){
+ #ifdef RGBLED_BACK
+ led_ripple_effect(127,0,100);
+ #else
+ rgblight_setrgb(127,0,100);
+ #endif
+ } else {
+ #ifdef RGBLED_BACK
+ led_ripple_effect(0,112,127);
+ #else
+ rgblight_setrgb(0,112,127);
+ #endif
+ }
+ }
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+// Render to OLED
+void render_status(struct CharacterMatrix *matrix) {
+
+ // froggy logo
+ static char logo[4][17]=
+ {
+ {0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0},
+ {0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0},
+ {0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0},
+ {0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0},
+ };
+
+ static char modectl[4][2][4]=
+ {
+ {
+ {0x65,0x66,0x67,0}, //WIN
+ {0x85,0x86,0x87,0}, //WIN
+ },
+ {
+ {0xa5,0xa6,0xa7,0}, //US(101)
+ {0xc5,0xc6,0xc7,0}, //US(101)
+ },
+ {
+ {0xbd,0xbe,0xbf,0}, //MAC
+ {0xdd,0xde,0xdf,0}, //MAC
+ },
+ {
+ {0xba,0xbb,0xbc,0}, //JP(106)
+ {0xda,0xdb,0xdc,0}, //JP(106)
+ },
+ };
+
+ static char indctr[8][2][4]=
+ {
+ // white icon
+ {
+ {0x60,0x61,0x62,0}, //NUM
+ {0x63,0x64,0} //FUNC
+ },
+ {
+ {0x80,0x81,0x82,0}, //NUM
+ {0x83,0x84,0} //FUNC
+ },
+ {
+ {0xa0,0xa1,0xa2,0}, //CAPS
+ {0xa3,0xa4,0} //SCLK
+ },
+ {
+ {0xc0,0xc1,0xc2,0}, //CAPS
+ {0xc3,0xc4,0} //SCLK
+ },
+ // Black icon
+ {
+ {0x75,0x76,0x77,0}, //NUM
+ {0x78,0x79,0} //FUNC
+ },
+ {
+ {0x95,0x96,0x97,0}, //NUM
+ {0x98,0x99,0} //FUNC
+ },
+ {
+ {0xb5,0xb6,0xb7,0}, //CAPS
+ {0xb8,0xb9,0} //SCLK
+ },
+ {
+ {0xd5,0xd6,0xd7,0}, //CAPS
+ {0xd8,0xd9,0} //SCLK
+ },
+ };
+
+ int rown = 0;
+ int rowf = 0;
+ int rowa = 0;
+ int rows = 0;
+ int rowm = 0;
+ int rowj = 1;
+
+ //Set Indicator icon
+ if (host_keyboard_leds() & (1< | } |
+|------+------+------+------+------+------|
+| EISU | J | M | B | ' | Tab |
+|------+------+------+------+------+------|
+| . | V | C | L | Z | Q |
+|------+------+------+------+------+------+------.
+| | X | G | W | - | Del | Esc |
+|------+------+------+------+------+------+------|
+| | | | , | DTOP | | |
+`------------------------------------------------'
+```
+
+### Num
+```
+,-----------------------------------------.
+| | | Func | home | End | |
+|------+------+------+------+------+------|
+| | * | 7 | 8 | 9 | - |
+|------+------+------+------+------+------|
+| . | / | 4 | 5 | 6 | + |
+|------+------+------+------+------+------+------.
+| LN | 0 | 1 | 2 | 3 |C+S+F1| |
+|------+------+------+------+------+------+------|
+| | | | , | | | |
+`------------------------------------------------'
+```
+
+### Sym
+```
+,-----------------------------------------.
+| Ins | GRV | | PU | PD | ^ |
+|------+------+------+------+------+------|
+| | \ | # | = | ? | % |
+|------+------+------+------+------+------|
+| | $ | upA | @ | ! | | |
+|------+------+------+------+------+------+------.
+| CL | <- | dwA | -> | _ | & | |
+|------+------+------+------+------+------+------|
+| | | PS | | ~ | | |
+ `-----------------------------------------------'
+```
+
+### Func
+```
+,-----------------------------------------.
+|RGBRST| Hue | to101| RST | Mac | Win |
+|------+------+------+------+------+------|
+| RGB1 | VAL+ | F7 | F8 | F9 | to106|
+|------+------+------+------+------+------|
+| RGB2 | VAL- | F4 | F5 | F6 | F12 |
+|------+------+------+------+------+------+------.
+| RGB3 | F10 | F1 | F2 | F3 | F11 | |
+|------+------+------+------+------+------+------|
+|RGBOFF| | | | | | |
+`------------------------------------------------'
+```
diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk
new file mode 100644
index 000000000000..bea059ca16d5
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk
@@ -0,0 +1,23 @@
+# QMK Standard Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
+# See TOP/docs/config_options.md for more information.
+#
+LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option
+
+# Helix Spacific Build Options
+# you can uncomment and edit follows 7 Variables
+# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+OLED_ENABLE = yes # OLED_ENABLE
+LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
+LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
+LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+
+# convert Helix-specific options (that represent combinations of standard options)
+# into QMK standard options.
+include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
From 80b2b710da1795940ec519909594bd19872346ec Mon Sep 17 00:00:00 2001
From: cole smith <38364556+daysgobye@users.noreply.github.com>
Date: Tue, 16 Jun 2020 12:08:30 -0700
Subject: [PATCH 29/36] added 4x12 (#9411)
Co-authored-by: Ryan
Co-authored-by: Drashna Jaelre
---
keyboards/boardsource/4x12/4x12.c | 1 +
keyboards/boardsource/4x12/4x12.h | 14 ++
keyboards/boardsource/4x12/config.h | 142 ++++++++++++++++++
keyboards/boardsource/4x12/info.json | 64 ++++++++
.../boardsource/4x12/keymaps/default/keymap.c | 36 +++++
keyboards/boardsource/4x12/readme.md | 12 ++
keyboards/boardsource/4x12/rules.mk | 32 ++++
7 files changed, 301 insertions(+)
create mode 100644 keyboards/boardsource/4x12/4x12.c
create mode 100644 keyboards/boardsource/4x12/4x12.h
create mode 100644 keyboards/boardsource/4x12/config.h
create mode 100644 keyboards/boardsource/4x12/info.json
create mode 100644 keyboards/boardsource/4x12/keymaps/default/keymap.c
create mode 100644 keyboards/boardsource/4x12/readme.md
create mode 100644 keyboards/boardsource/4x12/rules.mk
diff --git a/keyboards/boardsource/4x12/4x12.c b/keyboards/boardsource/4x12/4x12.c
new file mode 100644
index 000000000000..2aec6900ad82
--- /dev/null
+++ b/keyboards/boardsource/4x12/4x12.c
@@ -0,0 +1 @@
+#include "4x12.h"
diff --git a/keyboards/boardsource/4x12/4x12.h b/keyboards/boardsource/4x12/4x12.h
new file mode 100644
index 000000000000..52c23708fa08
--- /dev/null
+++ b/keyboards/boardsource/4x12/4x12.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "quantum.h"
+
+#define LAYOUT_ortho_4x12( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, \
+ K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
+ K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, \
+ K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47 \
+ ) { \
+ {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11}, \
+ {K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23}, \
+ {K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35}, \
+ {K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47} \
+ }
diff --git a/keyboards/boardsource/4x12/config.h b/keyboards/boardsource/4x12/config.h
new file mode 100644
index 000000000000..e8f858586cc6
--- /dev/null
+++ b/keyboards/boardsource/4x12/config.h
@@ -0,0 +1,142 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xF7E0
+#define PRODUCT_ID 0x0412
+#define DEVICE_VER 0x0000
+#define MANUFACTURER Boardsource
+#define PRODUCT 4x12
+#define DESCRIPTION 40 percent ortho keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+#define MATRIX_ROW_PINS { D2, D3, D1, D0}
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7 }
+
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * 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.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
diff --git a/keyboards/boardsource/4x12/info.json b/keyboards/boardsource/4x12/info.json
new file mode 100644
index 000000000000..d5f40fd3b282
--- /dev/null
+++ b/keyboards/boardsource/4x12/info.json
@@ -0,0 +1,64 @@
+{
+ "keyboard_name": "Boardsource 4x12",
+ "url": "https://boardsource.xyz",
+ "maintainer": "Boardsource",
+ "width": 12,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "layout": [
+ { "label": "K01", "x": 0, "y": 0 },
+ { "label": "K02", "x": 1, "y": 0 },
+ { "label": "K03", "x": 2, "y": 0 },
+ { "label": "K04", "x": 3, "y": 0 },
+ { "label": "K05", "x": 4, "y": 0 },
+ { "label": "K06", "x": 5, "y": 0 },
+ { "label": "K07", "x": 6, "y": 0 },
+ { "label": "K08", "x": 7, "y": 0 },
+ { "label": "K09", "x": 8, "y": 0 },
+ { "label": "K010", "x": 9, "y": 0 },
+ { "label": "K011", "x": 10, "y": 0 },
+ { "label": "K012", "x": 11, "y": 0 },
+
+ { "label": "K11", "x": 0, "y": 1 },
+ { "label": "K12", "x": 1, "y": 1 },
+ { "label": "K13", "x": 2, "y": 1 },
+ { "label": "K14", "x": 3, "y": 1 },
+ { "label": "K15", "x": 4, "y": 1 },
+ { "label": "K16", "x": 5, "y": 1 },
+ { "label": "K17", "x": 6, "y": 1 },
+ { "label": "K18", "x": 7, "y": 1 },
+ { "label": "K19", "x": 8, "y": 1 },
+ { "label": "K110", "x": 9, "y": 1 },
+ { "label": "K111", "x": 10, "y": 1 },
+ { "label": "K112", "x": 11, "y": 1 },
+
+ { "label": "K21", "x": 0, "y": 2 },
+ { "label": "K22", "x": 1, "y": 2 },
+ { "label": "K23", "x": 2, "y": 2 },
+ { "label": "K24", "x": 3, "y": 2 },
+ { "label": "K25", "x": 4, "y": 2 },
+ { "label": "K26", "x": 5, "y": 2 },
+ { "label": "K27", "x": 6, "y": 2 },
+ { "label": "K28", "x": 7, "y": 2 },
+ { "label": "K29", "x": 8, "y": 2 },
+ { "label": "K210", "x": 9, "y": 2 },
+ { "label": "K211", "x": 10, "y": 2 },
+ { "label": "K212", "x": 11, "y": 2 },
+
+ { "label": "K31", "x": 0, "y": 3 },
+ { "label": "K32", "x": 1, "y": 3 },
+ { "label": "K33", "x": 2, "y": 3 },
+ { "label": "K34", "x": 3, "y": 3 },
+ { "label": "K35", "x": 4, "y": 3 },
+ { "label": "K36", "x": 5, "y": 3 },
+ { "label": "K37", "x": 6, "y": 3 },
+ { "label": "K38", "x": 7, "y": 3 },
+ { "label": "K39", "x": 8, "y": 3 },
+ { "label": "K310", "x": 9, "y": 3 },
+ { "label": "K311", "x": 10, "y": 3 },
+ { "label": "K312", "x": 11, "y": 3 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/boardsource/4x12/keymaps/default/keymap.c b/keyboards/boardsource/4x12/keymaps/default/keymap.c
new file mode 100644
index 000000000000..d9a0c47a6b39
--- /dev/null
+++ b/keyboards/boardsource/4x12/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _MAIN,
+ _RAISE,
+ _LOWER,
+};
+
+// Readability keycodes
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_MAIN] = LAYOUT_ortho_4x12(
+ 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 ,
+ KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ [_RAISE] = LAYOUT_ortho_4x12(
+ 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,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
+
+ [_LOWER] = LAYOUT_ortho_4x12(
+ 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, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ )
+
+};
diff --git a/keyboards/boardsource/4x12/readme.md b/keyboards/boardsource/4x12/readme.md
new file mode 100644
index 000000000000..17cf01ed025f
--- /dev/null
+++ b/keyboards/boardsource/4x12/readme.md
@@ -0,0 +1,12 @@
+# 4x12
+![boardsource 4x12](https://i.imgur.com/rVtAEq5.jpg)
+
+* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye)
+* Hardware Supported: 4x12 v1
+* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5ecb7dad86879c9a0c22db32)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make boardsource/4x12: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).
\ No newline at end of file
diff --git a/keyboards/boardsource/4x12/rules.mk b/keyboards/boardsource/4x12/rules.mk
new file mode 100644
index 000000000000..0999b9d62b84
--- /dev/null
+++ b/keyboards/boardsource/4x12/rules.mk
@@ -0,0 +1,32 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+LAYOUTS = ortho_4x12
From 0b7b74f56a68bdae82e74c61de22f9eae42488d7 Mon Sep 17 00:00:00 2001
From: yiancar
Date: Tue, 16 Jun 2020 22:02:01 +0100
Subject: [PATCH 30/36] Nebula65 (#9368)
* Initial nebula65 commit
* Use PWM driver
* Polishing
* Remove random rgblight settings
* Spelling fix
* Update keyboards/nebula65/keymaps/default/readme.md
Co-authored-by: Ryan
* Update keyboards/nebula65/keymaps/via/readme.md
Co-authored-by: Ryan
* Update keyboards/nebula65/readme.md
Co-authored-by: Ryan
* Update keyboards/nebula65/readme.md
Co-authored-by: Ryan
* Clean includes in .h file
* Update keyboards/nebula65/readme.md
Co-authored-by: Drashna Jaelre
* Further cleanup
Co-authored-by: Ryan
Co-authored-by: Drashna Jaelre
---
keyboards/nebula65/chconf.h | 714 +++++++++++++++++++
keyboards/nebula65/config.h | 163 +++++
keyboards/nebula65/halconf.h | 525 ++++++++++++++
keyboards/nebula65/info.json | 85 +++
keyboards/nebula65/keymaps/default/keymap.c | 46 ++
keyboards/nebula65/keymaps/default/readme.md | 7 +
keyboards/nebula65/keymaps/via/keymap.c | 46 ++
keyboards/nebula65/keymaps/via/readme.md | 7 +
keyboards/nebula65/keymaps/via/rules.mk | 1 +
keyboards/nebula65/mcuconf.h | 273 +++++++
keyboards/nebula65/nebula65.c | 20 +
keyboards/nebula65/nebula65.h | 37 +
keyboards/nebula65/readme.md | 32 +
keyboards/nebula65/rules.mk | 34 +
keyboards/wilba_tech/wt_rgb_backlight.c | 164 +++--
15 files changed, 2091 insertions(+), 63 deletions(-)
create mode 100644 keyboards/nebula65/chconf.h
create mode 100755 keyboards/nebula65/config.h
create mode 100644 keyboards/nebula65/halconf.h
create mode 100755 keyboards/nebula65/info.json
create mode 100755 keyboards/nebula65/keymaps/default/keymap.c
create mode 100755 keyboards/nebula65/keymaps/default/readme.md
create mode 100755 keyboards/nebula65/keymaps/via/keymap.c
create mode 100755 keyboards/nebula65/keymaps/via/readme.md
create mode 100755 keyboards/nebula65/keymaps/via/rules.mk
create mode 100644 keyboards/nebula65/mcuconf.h
create mode 100755 keyboards/nebula65/nebula65.c
create mode 100755 keyboards/nebula65/nebula65.h
create mode 100755 keyboards/nebula65/readme.md
create mode 100755 keyboards/nebula65/rules.mk
diff --git a/keyboards/nebula65/chconf.h b/keyboards/nebula65/chconf.h
new file mode 100644
index 000000000000..aac33037058e
--- /dev/null
+++ b/keyboards/nebula65/chconf.h
@@ -0,0 +1,714 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+#define CHCONF_H
+
+#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_ST_RESOLUTION)
+#define CH_CFG_ST_RESOLUTION 32
+#endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+#if !defined(CH_CFG_ST_FREQUENCY)
+#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+#if !defined(CH_CFG_ST_TIMEDELTA)
+#define CH_CFG_ST_TIMEDELTA 2
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+#if !defined(CH_CFG_TIME_QUANTUM)
+#define CH_CFG_TIME_QUANTUM 0
+#endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+#if !defined(CH_CFG_MEMCORE_SIZE)
+#define CH_CFG_MEMCORE_SIZE 0
+#endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+#if !defined(CH_CFG_NO_IDLE_THREAD)
+#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
+#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_TM)
+#define CH_CFG_USE_TM TRUE
+#endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_REGISTRY)
+#define CH_CFG_USE_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_WAITEXIT)
+#define CH_CFG_USE_WAITEXIT TRUE
+#endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_SEMAPHORES)
+#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MUTEXES)
+#define CH_CFG_USE_MUTEXES TRUE
+#endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+#if !defined(CH_CFG_USE_CONDVARS)
+#define CH_CFG_USE_CONDVARS TRUE
+#endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_EVENTS)
+#define CH_CFG_USE_EVENTS TRUE
+#endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MESSAGES)
+#define CH_CFG_USE_MESSAGES TRUE
+#endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+#if !defined(CH_CFG_USE_MAILBOXES)
+#define CH_CFG_USE_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MEMCORE)
+#define CH_CFG_USE_MEMCORE TRUE
+#endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+#if !defined(CH_CFG_USE_HEAP)
+#define CH_CFG_USE_HEAP TRUE
+#endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MEMPOOLS)
+#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+#if !defined(CH_CFG_USE_DYNAMIC)
+#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_DBG_STATISTICS)
+#define CH_DBG_STATISTICS FALSE
+#endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_DBG_ENABLE_CHECKS)
+#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_DBG_ENABLE_ASSERTS)
+#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#if !defined(CH_DBG_TRACE_MASK)
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
+#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_DBG_FILL_THREADS)
+#define CH_DBG_FILL_THREADS FALSE
+#endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+#if !defined(CH_DBG_THREADS_PROFILING)
+#define CH_DBG_THREADS_PROFILING FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+#define CH_CFG_THREAD_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+#define CH_CFG_THREAD_INIT_HOOK(tp) { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
+ /* Add threads finalization code here.*/ \
+}
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
+ /* Context switch code here.*/ \
+}
+
+/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
+}
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
+}
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+#define CH_CFG_IDLE_LOOP_HOOK() { \
+ /* Idle loop code here.*/ \
+}
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+#define CH_CFG_SYSTEM_TICK_HOOK() { \
+ /* System tick event code here.*/ \
+}
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
+ /* System halt code here.*/ \
+}
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/nebula65/config.h b/keyboards/nebula65/config.h
new file mode 100755
index 000000000000..efd413328714
--- /dev/null
+++ b/keyboards/nebula65/config.h
@@ -0,0 +1,163 @@
+/*
+Copyright 2020 Yiancar
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x8968
+#define PRODUCT_ID 0x5336
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Yiancar-Designs
+#define PRODUCT NEBULA65
+#define DESCRIPTION "A 65-percent, tool-free RGB keyboard"
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 }
+#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 }
+// To enable debugger set A13 A14 -> A5 A7
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * 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.
+ *
+ */
+
+#define WS2812_PWM_DRIVER PWMD3 // default: PWMD2
+#define WS2812_PWM_CHANNEL 2 // default: 2
+#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+
+#define RGB_DI_PIN A7
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 10
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
+ #define RGBLIGHT_LIMIT_VAL 210 /* The maximum brightness level */
+ #define RGBLIGHT_ANIMATIONS
+#endif
+
+/* Bootmagic Lite key configuration */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+
+/* Backlight options */
+
+#define RGB_BACKLIGHT_ENABLED 1
+
+#define RGB_BACKLIGHT_NEBULA65
+
+// they aren't really used if RGB_BACKLIGHT_NEBULA65 defined
+#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
+#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
+#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
+#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
+#define RGB_BACKLIGHT_USE_ISO_ENTER 0
+#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
+
+// disable backlight when USB suspended (PC sleep/hibernate/shutdown)
+#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
+
+// disable backlight after timeout in minutes, 0 = no timeout
+#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
+// the default effect (RGB test)
+#define RGB_BACKLIGHT_EFFECT 6
+
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
+#define DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL 128
+
+// These define which keys in the matrix are alphas/mods
+// Used for backlight effects so colors are different for
+// alphas vs. mods
+// Each value is for a row, bit 0 is column 0
+// Alpha=0 Mod=1
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111
+
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
+// Backlight config starts after VIA's EEPROM usage,
+// dynamic keymaps start after this.
+#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32
+
+// VIA lighting is handled by the keyboard-level code
+#define VIA_CUSTOM_LIGHTING_ENABLE
+#define VIA_QMK_RGBLIGHT_ENABLE
diff --git a/keyboards/nebula65/halconf.h b/keyboards/nebula65/halconf.h
new file mode 100644
index 000000000000..e4952ece8720
--- /dev/null
+++ b/keyboards/nebula65/halconf.h
@@ -0,0 +1,525 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
+#include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+#define HAL_USE_PAL TRUE
+#endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+#define HAL_USE_ADC FALSE
+#endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+#define HAL_USE_CAN FALSE
+#endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
+#endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
+#endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+#define HAL_USE_GPT TRUE
+#endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+#define HAL_USE_I2C TRUE
+#endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+#define HAL_USE_I2S FALSE
+#endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+#define HAL_USE_ICU FALSE
+#endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+#define HAL_USE_MAC FALSE
+#endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_MMC_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+#define HAL_USE_PWM TRUE
+#endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC FALSE
+#endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+#define HAL_USE_SDC FALSE
+#endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL FALSE
+#endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
+#endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
+#endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART FALSE
+#endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+#define HAL_USE_USB TRUE
+#endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
+#endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+#define ADC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+#define MAC_USE_ZERO_COPY FALSE
+#endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+#define MAC_USE_EVENTS TRUE
+#endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+#define MMC_NICE_WAITING TRUE
+#endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+#define SDC_INIT_RETRY 100
+#endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+#define SDC_MMC_SUPPORT FALSE
+#endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
+#endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+#define SERIAL_DEFAULT_BITRATE 38400
+#endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE 16
+#endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
+#endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#endif
+
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+#endif /* HALCONF_H */
+
+/** @} */
diff --git a/keyboards/nebula65/info.json b/keyboards/nebula65/info.json
new file mode 100755
index 000000000000..c68e11ddad00
--- /dev/null
+++ b/keyboards/nebula65/info.json
@@ -0,0 +1,85 @@
+{
+ "keyboard_name": "NEBULA65",
+ "url": "",
+ "maintainer": "yiancar",
+ "width": 17.25,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_68_ansi": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6, "y":0},
+ {"x":7, "y":0},
+ {"x":8, "y":0},
+ {"x":9, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0, "w":2},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+
+ {"x":0, "y":1, "w":1.5},
+ {"x":1.5, "y":1},
+ {"x":2.5, "y":1},
+ {"x":3.5, "y":1},
+ {"x":4.5, "y":1},
+ {"x":5.5, "y":1},
+ {"x":6.5, "y":1},
+ {"x":7.5, "y":1},
+ {"x":8.5, "y":1},
+ {"x":9.5, "y":1},
+ {"x":10.5, "y":1},
+ {"x":11.5, "y":1},
+ {"x":12.5, "y":1},
+ {"x":13.5, "y":1, "w":1.5},
+ {"x":15.25, "y":1},
+ {"x":16.25, "y":1},
+
+ {"x":0, "y":2, "w":1.75},
+ {"x":1.75, "y":2},
+ {"x":2.75, "y":2},
+ {"x":3.75, "y":2},
+ {"x":4.75, "y":2},
+ {"x":5.75, "y":2},
+ {"x":6.75, "y":2},
+ {"x":7.75, "y":2},
+ {"x":8.75, "y":2},
+ {"x":9.75, "y":2},
+ {"x":10.75, "y":2},
+ {"x":11.75, "y":2},
+ {"x":12.75, "y":2, "w":2.25},
+
+ {"x":0, "y":3, "w":2.25},
+ {"x":2.25, "y":3},
+ {"x":3.25, "y":3},
+ {"x":4.25, "y":3},
+ {"x":5.25, "y":3},
+ {"x":6.25, "y":3},
+ {"x":7.25, "y":3},
+ {"x":8.25, "y":3},
+ {"x":9.25, "y":3},
+ {"x":10.25, "y":3},
+ {"x":11.25, "y":3},
+ {"x":12.25, "y":3, "w":2.75},
+ {"x":15.25, "y":3},
+
+ {"x":0, "y":4, "w":1.25},
+ {"x":1.25, "y":4, "w":1.25},
+ {"x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":6.25},
+ {"x":10, "y":4, "w":1.25},
+ {"x":11.25, "y":4, "w":1.25},
+ {"x":12.5, "y":4, "w":1.25},
+ {"x":14.25, "y":4},
+ {"x":15.25, "y":4},
+ {"x":16.25, "y":4}
+ ]
+ }
+ }
+}
diff --git a/keyboards/nebula65/keymaps/default/keymap.c b/keyboards/nebula65/keymaps/default/keymap.c
new file mode 100755
index 000000000000..da4479f89be0
--- /dev/null
+++ b/keyboards/nebula65/keymaps/default/keymap.c
@@ -0,0 +1,46 @@
+/* Copyright 2020 Yiancar
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_68_ansi( /* Base */
+ KC_GESC, 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_PGUP,
+ 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_PGDN,
+ 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_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+[1] = LAYOUT_68_ansi( /* FN */
+ KC_GRV, 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_DEL, KC_INS, KC_PGUP,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_DEL, KC_PGDN,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS,
+ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+[2] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+[3] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+};
diff --git a/keyboards/nebula65/keymaps/default/readme.md b/keyboards/nebula65/keymaps/default/readme.md
new file mode 100755
index 000000000000..324676b64e03
--- /dev/null
+++ b/keyboards/nebula65/keymaps/default/readme.md
@@ -0,0 +1,7 @@
+# The default keymap for Nebula65. VIA support disabled.
+
+![Layer 0](https://i.imgur.com/dXyRwb1.png)
+
+![Layer 1](https://i.imgur.com/4izTAFa.png)
+
+Default layer is normal ANSI 65%
diff --git a/keyboards/nebula65/keymaps/via/keymap.c b/keyboards/nebula65/keymaps/via/keymap.c
new file mode 100755
index 000000000000..da4479f89be0
--- /dev/null
+++ b/keyboards/nebula65/keymaps/via/keymap.c
@@ -0,0 +1,46 @@
+/* Copyright 2020 Yiancar
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_68_ansi( /* Base */
+ KC_GESC, 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_PGUP,
+ 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_PGDN,
+ 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_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+[1] = LAYOUT_68_ansi( /* FN */
+ KC_GRV, 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_DEL, KC_INS, KC_PGUP,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_DEL, KC_PGDN,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS,
+ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+[2] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+[3] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+};
diff --git a/keyboards/nebula65/keymaps/via/readme.md b/keyboards/nebula65/keymaps/via/readme.md
new file mode 100755
index 000000000000..d15266ea7c1e
--- /dev/null
+++ b/keyboards/nebula65/keymaps/via/readme.md
@@ -0,0 +1,7 @@
+# The default keymap for Nebula65. VIA support enabled.
+
+![Layer 0](https://i.imgur.com/dXyRwb1.png)
+
+![Layer 1](https://i.imgur.com/4izTAFa.png)
+
+Default layer is normal ANSI 65%
diff --git a/keyboards/nebula65/keymaps/via/rules.mk b/keyboards/nebula65/keymaps/via/rules.mk
new file mode 100755
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/nebula65/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/nebula65/mcuconf.h b/keyboards/nebula65/mcuconf.h
new file mode 100644
index 000000000000..3b1301f085bb
--- /dev/null
+++ b/keyboards/nebula65/mcuconf.h
@@ -0,0 +1,273 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * STM32F3xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI_ENABLED TRUE
+#define STM32_LSI_ENABLED TRUE
+#define STM32_HSE_ENABLED TRUE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSE
+#define STM32_PREDIV_VALUE 1
+#define STM32_PLLMUL_VALUE 9
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE1 STM32_PPRE1_DIV2
+#define STM32_PPRE2 STM32_PPRE2_DIV2
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
+#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
+#define STM32_USART1SW STM32_USART1SW_PCLK
+#define STM32_USART2SW STM32_USART2SW_PCLK
+#define STM32_USART3SW STM32_USART3SW_PCLK
+#define STM32_UART4SW STM32_UART4SW_PCLK
+#define STM32_UART5SW STM32_UART5SW_PCLK
+#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
+#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
+#define STM32_TIM1SW STM32_TIM1SW_PCLK2
+#define STM32_TIM8SW STM32_TIM8SW_PCLK2
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+#define STM32_USB_CLOCK_REQUIRED TRUE
+#define STM32_USBPRE STM32_USBPRE_DIV1P5
+
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_DUAL_MODE FALSE
+#define STM32_ADC_COMPACT_SAMPLES FALSE
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_USE_ADC2 FALSE
+#define STM32_ADC_USE_ADC3 FALSE
+#define STM32_ADC_USE_ADC4 FALSE
+#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
+#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_ADC2_DMA_PRIORITY 2
+#define STM32_ADC_ADC3_DMA_PRIORITY 2
+#define STM32_ADC_ADC4_DMA_PRIORITY 2
+#define STM32_ADC_ADC12_IRQ_PRIORITY 5
+#define STM32_ADC_ADC3_IRQ_PRIORITY 5
+#define STM32_ADC_ADC4_IRQ_PRIORITY 5
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
+#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 TRUE
+#define STM32_DAC_USE_DAC1_CH2 TRUE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM3 FALSE
+#define STM32_GPT_USE_TIM4 TRUE
+#define STM32_GPT_USE_TIM6 TRUE
+#define STM32_GPT_USE_TIM7 TRUE
+#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY 7
+#define STM32_GPT_TIM2_IRQ_PRIORITY 7
+#define STM32_GPT_TIM3_IRQ_PRIORITY 7
+#define STM32_GPT_TIM4_IRQ_PRIORITY 7
+#define STM32_GPT_TIM6_IRQ_PRIORITY 7
+#define STM32_GPT_TIM7_IRQ_PRIORITY 7
+#define STM32_GPT_TIM8_IRQ_PRIORITY 7
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 TRUE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_IRQ_PRIORITY 10
+#define STM32_I2C_I2C2_IRQ_PRIORITY 10
+#define STM32_I2C_USE_DMA TRUE
+#define STM32_I2C_I2C1_DMA_PRIORITY 1
+#define STM32_I2C_I2C2_DMA_PRIORITY 1
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM3 FALSE
+#define STM32_ICU_USE_TIM4 FALSE
+#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
+#define STM32_ICU_TIM1_IRQ_PRIORITY 7
+#define STM32_ICU_TIM2_IRQ_PRIORITY 7
+#define STM32_ICU_TIM3_IRQ_PRIORITY 7
+#define STM32_ICU_TIM4_IRQ_PRIORITY 7
+#define STM32_ICU_TIM8_IRQ_PRIORITY 7
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM3 TRUE
+#define STM32_PWM_USE_TIM4 FALSE
+#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
+#define STM32_PWM_TIM1_IRQ_PRIORITY 7
+#define STM32_PWM_TIM2_IRQ_PRIORITY 7
+#define STM32_PWM_TIM3_IRQ_PRIORITY 7
+#define STM32_PWM_TIM4_IRQ_PRIORITY 7
+#define STM32_PWM_TIM8_IRQ_PRIORITY 7
+
+/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_USART3 FALSE
+#define STM32_SERIAL_USE_UART4 FALSE
+#define STM32_SERIAL_USE_UART5 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 12
+#define STM32_SERIAL_USART2_PRIORITY 12
+#define STM32_SERIAL_USART3_PRIORITY 12
+#define STM32_SERIAL_UART4_PRIORITY 12
+#define STM32_SERIAL_UART5_PRIORITY 12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI2_DMA_PRIORITY 1
+#define STM32_SPI_SPI3_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 10
+#define STM32_SPI_SPI2_IRQ_PRIORITY 10
+#define STM32_SPI_SPI3_IRQ_PRIORITY 10
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 8
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USE_USART3 FALSE
+#define STM32_UART_USART1_IRQ_PRIORITY 12
+#define STM32_UART_USART2_IRQ_PRIORITY 12
+#define STM32_UART_USART3_IRQ_PRIORITY 12
+#define STM32_UART_USART1_DMA_PRIORITY 0
+#define STM32_UART_USART2_DMA_PRIORITY 0
+#define STM32_UART_USART3_DMA_PRIORITY 0
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+#endif /* MCUCONF_H */
diff --git a/keyboards/nebula65/nebula65.c b/keyboards/nebula65/nebula65.c
new file mode 100755
index 000000000000..b3e7cc66399b
--- /dev/null
+++ b/keyboards/nebula65/nebula65.c
@@ -0,0 +1,20 @@
+/* Copyright 2020 Yiancar
+ *
+ * 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 .
+ */
+#ifndef RGB_BACKLIGHT_NEBULA65
+#error RGB_BACKLIGHT_NEBULA65 not defined, recheck config.h
+#endif
+
+#include "nebula65.h"
diff --git a/keyboards/nebula65/nebula65.h b/keyboards/nebula65/nebula65.h
new file mode 100755
index 000000000000..db9c7f26cb6b
--- /dev/null
+++ b/keyboards/nebula65/nebula65.h
@@ -0,0 +1,37 @@
+/* Copyright 2020 Yiancar
+ *
+ * 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 .
+ */
+#pragma once
+
+#define XXX KC_NO
+
+#include "quantum.h"
+#include "../wilba_tech/wt_rgb_backlight_keycodes.h"
+
+// This a shortcut to help you visually see your layout.
+
+#define LAYOUT_68_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K3E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+ K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
+ { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \
+}
diff --git a/keyboards/nebula65/readme.md b/keyboards/nebula65/readme.md
new file mode 100755
index 000000000000..5189c049c37e
--- /dev/null
+++ b/keyboards/nebula65/readme.md
@@ -0,0 +1,32 @@
+# Nebula65
+
+This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and underglow RGB.
+
+* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar)
+* Hardware Supported: A 65% keyboard with STM32F303CC
+* Hardware Availability: https://spaceholdings.net/
+
+## Instructions
+
+### Build
+
+Make example for this keyboard (after setting up your build environment):
+
+ make nebula65:via
+
+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).
+
+### Reset
+
+- Unplug
+- Hold Escape
+- Plug In
+- Unplug
+- Release Escape
+
+### Flash
+
+- Unplug
+- Hold Escape
+- Plug In
+- Flash using QMK Toolbox or dfu-util (`make nebula65::flash`)
diff --git a/keyboards/nebula65/rules.mk b/keyboards/nebula65/rules.mk
new file mode 100755
index 000000000000..399385b3e0e6
--- /dev/null
+++ b/keyboards/nebula65/rules.mk
@@ -0,0 +1,34 @@
+# MCU name
+MCU = STM32F303
+
+# Do not put the microcontroller into power saving mode
+# when we get USB suspend event. We want it to keep updating
+# backlight effects.
+OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no # Audio output on port C6
+NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+RGBLIGHT_ENABLE = yes # Underglow RGB
+WS2812_DRIVER = pwm # Underglow RGB Driver
+
+CIE1931_CURVE = yes
+
+LAYOUTS = 68_ansi
+
+# project specific files
+SRC += keyboards/wilba_tech/wt_main.c \
+ keyboards/wilba_tech/wt_rgb_backlight.c \
+ drivers/issi/is31fl3733.c \
+ quantum/color.c
+QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 1a8bd8981a51..221d924c4c4c 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -21,6 +21,7 @@
defined(RGB_BACKLIGHT_KOYU) || \
defined(RGB_BACKLIGHT_HS60) || \
defined(RGB_BACKLIGHT_NK65) || \
+ defined(RGB_BACKLIGHT_NEBULA65) || \
defined(RGB_BACKLIGHT_U80_A) || \
defined(RGB_BACKLIGHT_DAWN60) || \
defined(RGB_BACKLIGHT_WT60_B) || \
@@ -43,7 +44,7 @@
#include "wt_rgb_backlight_api.h"
#include "wt_rgb_backlight_keycodes.h"
-#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65)
+#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65)
#include
#include "drivers/avr/i2c_master.h"
#else
@@ -74,7 +75,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL];
#elif defined(RGB_BACKLIGHT_HS60)
#include "drivers/issi/is31fl3733.h"
#define BACKLIGHT_LED_COUNT 64
-#elif defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
#include "drivers/issi/is31fl3733.h"
#define BACKLIGHT_LED_COUNT 69
#else
@@ -211,7 +212,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_16, J_16, L_16}, //LA64
};
-#elif defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@@ -498,7 +499,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
* | | G location
* | | | B location
* | | | | */
- {0, C1_1, C3_2, C4_2}, //A1
+ {0, C1_1, C3_2, C4_2}, //A1
{0, C1_2, C2_2, C4_3}, //A2
{0, C1_3, C2_3, C3_3}, //A3
{0, C1_4, C2_4, C3_4}, //A4
@@ -564,7 +565,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_13, C8_13, C7_13}, //D13
{1, C9_14, C8_14, C7_14}, //D14
{1, C9_15, C8_15, C6_14}, //D15
- {1, C9_16, C7_15, C6_15} //D16
+ {1, C9_16, C7_15, C6_15} //D16
};
#elif !defined(RGB_BACKLIGHT_M6_B)
// This is a 7-bit address, that gets left-shifted and bit 0
@@ -808,7 +809,7 @@ const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
// LA0..LA17
{59,129}, {69,129}, {80,138}, {88,154}, {95,175}, {100,200}, {104,227}, {107,255}, {128,226},
- {59,255}, {64,255}, {69,255}, {75,255}, {80,255}, {84,255}, {88,255}, {91,255}, {95,255},
+ {59,255}, {64,255}, {69,255}, {75,255}, {80,255}, {84,255}, {88,255}, {91,255}, {95,255},
// LB0..LB17
{53,255}, {48,255}, {44,255}, {40,255}, {35,255}, {255,255}, {255,255}, {255,255}, {255,255},
{48,138}, {40,154}, {33,175}, {28,200}, {24,227}, {21,255}, {255,255}, {255,255}, {255,255},
@@ -819,7 +820,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
{0,26}, {0,60}, {0,94}, {0,128}, {0,162}, {0,218}, {227,193}, {234,245}, {255,255},
{195,128}, {205,135}, {214,149}, {221,169}, {255,255}, {210,244}, {213,255}, {218,255}, {222,255},
// LE0..LE17
- {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255},
+ {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255},
{70,255}, {66,255}, {62,255}, {59,255}, {56,255}, {73,255}, {76,255}, {79,255}, {84,255},
// LF0..LF17
{52,255}, {49,255}, {47,255}, {44,255}, {41,255}, {38,255}, {37,255}, {25,255}, {14,255},
@@ -883,7 +884,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
// LA1..LA50
{0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0},
- {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16},
+ {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16},
{108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16},
{156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16},
{255,255},// LA51 does not exit, dummy
@@ -896,7 +897,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
// LA1..LA50
{96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255},
{96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129},
- {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101},
+ {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101},
{222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238},
{255,255},// LA51 does not exit, dummy
// LA52..LA60
@@ -927,6 +928,29 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
//LA62..LB5
{221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}
};
+#elif defined(RGB_BACKLIGHT_NEBULA65)
+const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
+ // LA1..LA60
+ {0,0}, {4,16}, {6,31}, {10,47}, {16,0}, {24,16}, {27,31}, {35,47}, {31,0}, {39,16}, {43,31}, {51,47},
+ {47,0}, {55,16}, {59,31}, {67,47}, {63,0}, {71,16}, {75,31}, {82,47}, {79,0}, {86,16}, {90,31}, {98,47},
+ {94,0}, {102,16}, {106,31}, {114,47}, {110,0}, {118,16}, {122,31}, {130,47}, {126,0}, {133,16}, {137,31},
+ {145,47}, {141,0}, {149,16}, {153,31}, {161,47}, {157,0}, {165,16}, {169,31}, {177,47}, {173,0}, {181, 16}, {184,31},
+ {159,63}, {188,0}, {196,16}, {206,47}, {220,47}, {212,0}, {216,16}, {210,31}, {220,63}, {2,63}, {22,63}, {41,63}, {100,63},
+ {255,255},// LA61 does not exit, dummy
+ //LA62..LB5
+ {179,63}, {198,63}, {224,63}, {239,0}, {239,16}, {255,16}, {255,63}, {255,0}
+};
+const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
+ // LA1..LA60
+ {96,255}, {109,255}, {128,244}, {148,255}, {93,255}, {106,245}, {128,201}, {153,225}, {80,255}, {103,219}, {128,169}, {156,200},
+ {87,255}, {99,194}, {128,138}, {161,177}, {83,255}, {94,171}, {128,106}, {167,157}, {79,255}, {87,152}, {128,75}, {174,141}, {74,255},
+ {80,138}, {128,43}, {183,131}, {70,255}, {70,129}, {129,12}, {193,128}, {65,255}, {60,128}, {255,20}, {203,133}, {60,255},
+ {51,135}, {255,51}, {212,145}, {55,255}, {42,148}, {255,83}, {219,162}, {50,255}, {36,166}, {255,114},
+ {202,255}, {46,255}, {30,188}, {228,203}, {231,225}, {40,255}, {25,219}, {255,165}, {217,255}, {160,255}, {164,255}, {168,255}, {183,255},
+ {255,255},// LA61 does not exit, dummy
+ //LA62..LB5
+ {207,255}, {213,255}, {218,255}, {35,255}, {21,255}, {19,255}, {224,255}, {32,255}
+};
#elif defined(RGB_BACKLIGHT_M6_B)
// M6-B is really simple:
// 0 3 5
@@ -940,45 +964,45 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
#elif defined(RGB_BACKLIGHT_DAWN60)
const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
// LA1..LA16
- {104, 16}, {88 , 16}, {72 , 16}, {56 , 16}, {40 , 16}, {24 , 16}, {4 , 16}, {6 , 32},
- {112, 0}, {96 , 0}, {80 , 0}, {64 , 0}, {48 , 0}, {32 , 0}, {16 , 0}, {0 , 0},
+ {104, 16}, {88 , 16}, {72 , 16}, {56 , 16}, {40 , 16}, {24 , 16}, {4 , 16}, {6 , 32},
+ {112, 0}, {96 , 0}, {80 , 0}, {64 , 0}, {48 , 0}, {32 , 0}, {16 , 0}, {0 , 0},
// LB1..LB16
- {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {214, 32},
+ {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {214, 32},
{120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, {224, 48},
// LC1..LC16
- {100, 48}, {84 , 48}, {68 , 48}, {52 , 48}, {36 , 48}, {102, 64}, {42 , 64}, {22 , 64},
- {108, 32}, {92 , 32}, {76 , 32}, {60 , 32}, {44 , 32}, {28 , 32}, {10 , 48}, {2 , 64},
+ {100, 48}, {84 , 48}, {68 , 48}, {52 , 48}, {36 , 48}, {102, 64}, {42 , 64}, {22 , 64},
+ {108, 32}, {92 , 32}, {76 , 32}, {60 , 32}, {44 , 32}, {28 , 32}, {10 , 48}, {2 , 64},
// LD1..LD16
- {124, 32}, {140, 32}, {156, 32}, {172, 32}, {188, 32}, {180, 48}, {202, 48}, {224, 64},
+ {124, 32}, {140, 32}, {156, 32}, {172, 32}, {188, 32}, {180, 48}, {202, 48}, {224, 64},
{116, 48}, {132, 48}, {148, 48}, {164, 48}, {160, 64}, {176, 64}, {192, 64}, {208, 64},
- //RGB UNDERGLOW
- {27 , 3}, {64 , 3}, {100, 3}, {137, 3}, {173, 3}, {209, 3}, {242, 4}, {255, 8}, {255,32}, {255,64},
- {241,64}, {212,64}, {173,64}, {137,64}, {100,64}, {63 ,64}, {28 ,64}, {0 ,64}, {0 ,32}, {0 , 8}, //20
+ //RGB UNDERGLOW
+ {27 , 3}, {64 , 3}, {100, 3}, {137, 3}, {173, 3}, {209, 3}, {242, 4}, {255, 8}, {255,32}, {255,64},
+ {241,64}, {212,64}, {173,64}, {137,64}, {100,64}, {63 ,64}, {28 ,64}, {0 ,64}, {0 ,32}, {0 , 8}, //20
};
const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
- //LA1..LA16
- {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247},
- {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255},
- //LB1..LB16
- {58,255}, {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,233},
- {58,129}, {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {237,255},
- //LC1..LC16
- {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {188,255}, {170,255}, {165,255},
- {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {147,255}, {161,255},
- //LD1..LD16
- {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {228,201}, {235,255}, {224,255},
- {195,128}, {206,136}, {215,152}, {222,175}, {208,255}, {213,255}, {217, 255}, {222,225},
-
- //UNDERGLOW, {A,D}
- //1 - 10
- {91,255}, {84,255}, {74,255}, {60,255}, {48,255}, {39,255}, {32,255}, {27,255}, {0,255}, {236,255},
- //11 - 20
- {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255}
+ //LA1..LA16
+ {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247},
+ {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255},
+ //LB1..LB16
+ {58,255}, {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,233},
+ {58,129}, {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {237,255},
+ //LC1..LC16
+ {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {188,255}, {170,255}, {165,255},
+ {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {147,255}, {161,255},
+ //LD1..LD16
+ {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {228,201}, {235,255}, {224,255},
+ {195,128}, {206,136}, {215,152}, {222,175}, {208,255}, {213,255}, {217, 255}, {222,225},
+
+ //UNDERGLOW, {A,D}
+ //1 - 10
+ {91,255}, {84,255}, {74,255}, {60,255}, {48,255}, {39,255}, {32,255}, {27,255}, {0,255}, {236,255},
+ //11 - 20
+ {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255}
};
#endif
@@ -994,7 +1018,7 @@ void map_led_to_point( uint8_t index, Point *point )
point->x = pgm_read_byte(addr);
point->y = pgm_read_byte(addr+1);
-#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65)
+#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
return;
#endif
@@ -1181,7 +1205,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
{ 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 },
{ 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 }
};
-#elif defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
//
// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1,
// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2,
@@ -1207,15 +1231,15 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
// A16, A15, A14, A13, A12, A11, A10, A9, B1, B2, B3, B4, B5, B6,
// A7, A6, A5, A4, A3, A2, A1, B9, B10, B11, B12, B13, B14, B15,
// A8, C14, C13, C12, C11, C10, C9, D1, D2, D3, D4, D5, B8, B7,
-// C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, ---, D6, D7, B16,
-// C16, C8, C7, ---, ---, C6, ---, ---, ---, D13, D14, D15, D16, D8,
+// C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, ---, D6, D7, B16,
+// C16, C8, C7, ---, ---, C6, ---, ---, ---, D13, D14, D15, D16, D8,
const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
- { -1+16, -1+15, -1+14, -1+13, -1+12, -1+11, -1+10, -1+9 , 15+1 , 15+2 , 15+3 , 15+4 , 15+5 , 15+6 },
- { -1+7 , -1+6 , -1+5 , -1+4 , -1+3 , -1+2 , -1 +1, 15+9 , 15+10, 15+11, 15+12, 15+13, 15+14, 15+15},
- { -1+8 , 31+14, 31+13, 31+12, 31+11, 31+10, 31+9 , 47+1 , 47+2 , 47+3 , 47+4 , 47+5 , 15+8 , 15+7 },
- { 31+15, 31+5 , 31+4 , 31+3 , 31+2 , 31+1 , 47+9 , 47+10, 47+11, 47+12, 255 ,47+6 , 47+7 , 15+16},
- { 31+16, 31+8 , 31+7 , 255 , 255 , 31+6 , 255 , 255 , 255 , 47+13, 47+14, 47+15, 47+16, 47+8 }
-};
+ { -1+16, -1+15, -1+14, -1+13, -1+12, -1+11, -1+10, -1+9 , 15+1 , 15+2 , 15+3 , 15+4 , 15+5 , 15+6 },
+ { -1+7 , -1+6 , -1+5 , -1+4 , -1+3 , -1+2 , -1 +1, 15+9 , 15+10, 15+11, 15+12, 15+13, 15+14, 15+15},
+ { -1+8 , 31+14, 31+13, 31+12, 31+11, 31+10, 31+9 , 47+1 , 47+2 , 47+3 , 47+4 , 47+5 , 15+8 , 15+7 },
+ { 31+15, 31+5 , 31+4 , 31+3 , 31+2 , 31+1 , 47+9 , 47+10, 47+11, 47+12, 255 ,47+6 , 47+7 , 15+16},
+ { 31+16, 31+8 , 31+7 , 255 , 255 , 31+6 , 255 , 255 , 255 , 47+13, 47+14, 47+15, 47+16, 47+8 }
+};
#endif
void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led )
@@ -1234,7 +1258,7 @@ void backlight_update_pwm_buffers(void)
#elif defined(RGB_BACKLIGHT_HS60)
IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 );
IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 );
-#elif defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 );
IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 );
IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 );
@@ -1269,7 +1293,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
{
#if defined(RGB_BACKLIGHT_M6_B)
IS31FL3218_set_color( index, red, green, blue );
-#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
IS31FL3733_set_color( index, red, green, blue );
#elif defined(RGB_BACKLIGHT_DAWN60)
if( index < DRIVER_LED_TOTAL ) {
@@ -1278,7 +1302,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
g_ws2812_leds[index - DRIVER_LED_TOTAL].r = red;
g_ws2812_leds[index - DRIVER_LED_TOTAL].g = green;
g_ws2812_leds[index - DRIVER_LED_TOTAL].b = blue;
- ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
+ ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
}
#else
IS31FL3731_set_color( index, red, green, blue );
@@ -1289,7 +1313,7 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
{
#if defined(RGB_BACKLIGHT_M6_B)
IS31FL3218_set_color_all( red, green, blue );
-#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65)
+#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65)
// This is done to avoid indicator LEDs being set
for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) {
IS31FL3733_set_color(i, red, green, blue);
@@ -1301,7 +1325,7 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
g_ws2812_leds[i].g = green;
g_ws2812_leds[i].b = blue;
}
- ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
+ ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
#else
IS31FL3731_set_color_all( red, green, blue );
#endif
@@ -1316,7 +1340,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column)
g_any_key_hit = 0;
}
-#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65)
+#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65)
// This is (F_CPU/1024) / 20 Hz
// = 15625 Hz / 20 Hz
// = 781
@@ -1508,15 +1532,15 @@ void backlight_effect_alphas_mods(void)
}
}
}
-#if defined(RGB_BACKLIGHT_DAWN60)
- for (int i = 0; i < WS2812_LED_TOTAL; i++) {
- if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) ||
+#if defined(RGB_BACKLIGHT_DAWN60)
+ for (int i = 0; i < WS2812_LED_TOTAL; i++) {
+ if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) ||
(RGB_UNDERGLOW_ALPHA_BOT_START <= i && i <= RGB_UNDERGLOW_ALPHA_BOT_END)) {
backlight_set_color(i + DRIVER_LED_TOTAL, rgb1.r, rgb1.g, rgb1.b);
- } else {
+ } else {
backlight_set_color(i + DRIVER_LED_TOTAL, rgb2.r, rgb2.g, rgb2.b);
- }
- }
+ }
+ }
#endif
}
@@ -1611,7 +1635,7 @@ void backlight_effect_cycle_all(void)
for ( int i=0; i 5+64-1 ) ); //LB6-LB64
+ // This only caches it for later
+ IS31FL3733_set_led_control_register( index, enabled, enabled, enabled );
+ }
+ // This actually updates the LED drivers
+ IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 );
+ IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 );
#else
IS31FL3731_init( ISSI_ADDR_1 );
IS31FL3731_init( ISSI_ADDR_2 );
@@ -2430,7 +2468,7 @@ void backlight_init_drivers(void)
// This actually updates the LED drivers
IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 );
IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 );
-#if defined(RGB_BACKLIGHT_U80_A)
+#if defined(RGB_BACKLIGHT_U80_A)
IS31FL3731_update_led_control_registers( ISSI_ADDR_3, 2 );
#endif
#endif // !defined(RGB_BACKLIGHT_M6_B)
From f420741f9bf4dd2527d93962ec2c98e4a04545c2 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Wed, 17 Jun 2020 17:30:54 +1000
Subject: [PATCH 31/36] Fix error_log complaint about clueboard/66_hotswap/gen1
layout macro (#9400)
* Fix error_log complaint about clueboard/66_hotswap/gen1 layout macro
* Remove gen1 info.json in favour of higher level file
* Split into revision-specific info.json
---
keyboards/clueboard/66_hotswap/gen1/info.json | 168 +++++++++++-
keyboards/clueboard/66_hotswap/gen1/rules.mk | 2 +-
keyboards/clueboard/66_hotswap/info.json | 25 --
.../clueboard/66_hotswap/prototype/info.json | 245 ++++++++++++++++++
4 files changed, 407 insertions(+), 33 deletions(-)
delete mode 100644 keyboards/clueboard/66_hotswap/info.json
create mode 100644 keyboards/clueboard/66_hotswap/prototype/info.json
diff --git a/keyboards/clueboard/66_hotswap/gen1/info.json b/keyboards/clueboard/66_hotswap/gen1/info.json
index bab110f3d50c..76c2b44208c9 100644
--- a/keyboards/clueboard/66_hotswap/gen1/info.json
+++ b/keyboards/clueboard/66_hotswap/gen1/info.json
@@ -1,11 +1,165 @@
{
- "layouts": {
- "LAYOUT": {
- "layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}]
- },
+ "keyboard_name": "Clueboard 66% HotSwap Gen1",
+ "maintainer": "skullydazed",
+ "width": 16.5,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
- "LAYOUT_66_ansi": {
- "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}]
+ {"x": 15.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.5, "y": 1},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 2.25},
+
+ {"x": 14.5, "y": 3},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4, "w": 1.25},
+ {"x": 2.5, "y": 4, "w": 1.25},
+ {"x": 3.75, "y": 4, "w": 2.75},
+ {"x": 6.5, "y": 4, "w": 2.25},
+ {"x": 8.75, "y": 4, "w": 1.25},
+ {"x": 10, "y": 4, "w": 1.25},
+ {"x": 11.25, "y": 4},
+ {"x": 12.25, "y": 4, "w": 1.25},
+ {"x": 13.5, "y": 4},
+ {"x": 14.5, "y": 4},
+ {"x": 15.5, "y": 4}
+ ]
+ },
+ "LAYOUT_66_ansi": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
+
+ {"x": 15.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.5, "y": 1},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 2.25},
+
+ {"x": 14.5, "y": 3},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4, "w": 1.25},
+ {"x": 2.5, "y": 4, "w": 1.25},
+ {"x": 3.75, "y": 4, "w": 6.25},
+ {"x": 10, "y": 4, "w": 1.25},
+ {"x": 11.25, "y": 4},
+ {"x": 12.25, "y": 4, "w": 1.25},
+
+ {"x": 13.5, "y": 4},
+ {"x": 14.5, "y": 4},
+ {"x": 15.5, "y": 4}
+ ]
+ }
}
- }
}
diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk
index 1de003ce5a93..c013268455c0 100644
--- a/keyboards/clueboard/66_hotswap/gen1/rules.mk
+++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk
@@ -21,4 +21,4 @@ AUDIO_ENABLE = yes
# project specific files
SRC = led.c
-LAYOUTS += 66_ansi
+LAYOUTS = 66_ansi
diff --git a/keyboards/clueboard/66_hotswap/info.json b/keyboards/clueboard/66_hotswap/info.json
deleted file mode 100644
index 04a748764c4f..000000000000
--- a/keyboards/clueboard/66_hotswap/info.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "keyboard_name": "Clueboard 66% HotSwap",
- "width": 16.5,
- "height": 5,
- "layouts": {
- "LAYOUT": {
- "layout": [
- {"x": 0, "y": 0, "label": "GRAVE"}, {"x": 1, "y": 0, "label": "1"}, {"x": 2, "y": 0, "label": "2"}, {"x": 3, "y": 0, "label": "3"}, {"x": 4, "y": 0, "label": "4"}, {"x": 5, "y": 0, "label": "5"}, {"x": 6, "y": 0, "label": "6"}, {"x": 7, "y": 0, "label": "7"}, {"x": 8, "y": 0, "label": "8"}, {"x": 9, "y": 0, "label": "9"}, {"x": 10, "y": 0, "label": "0"}, {"x": 11, "y": 0, "label": "DASH"}, {"x": 12, "y": 0, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 2, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "label": "PAGEUP"},
- {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "label": "Q"}, {"x": 2.5, "y": 1, "label": "W"}, {"x": 3.5, "y": 1, "label": "E"}, {"x": 4.5, "y": 1, "label": "R"}, {"x": 5.5, "y": 1, "label": "T"}, {"x": 6.5, "y": 1, "label": "Y"}, {"x": 7.5, "y": 1, "label": "U"}, {"x": 8.5, "y": 1, "label": "I"}, {"x": 9.5, "y": 1, "label": "O"}, {"x": 10.5, "y": 1, "label": "P"}, {"x": 11.5, "y": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "label": "PAGEDOWN"},
- {"x": 0, "y": 2, "w": 1.75, "label": "CAPS LOCK"}, {"x": 1.75, "y": 2, "label": "A"}, {"x": 2.75, "y": 2, "label": "S"}, {"x": 3.75, "y": 2, "label": "D"}, {"x": 4.75, "y": 2, "label": "F"}, {"x": 5.75, "y": 2, "label": "G"}, {"x": 6.75, "y": 2, "label": "H"}, {"x": 7.75, "y": 2, "label": "J"}, {"x": 8.75, "y": 2, "label": "K"}, {"x": 9.75, "y": 2, "label": "L"}, {"x": 10.75, "y": 2, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 2.25, "label": "ENTER"},
- {"x": 0, "y": 3, "w": 2.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "label": "Z"}, {"x": 3.25, "y": 3, "label": "X"}, {"x": 4.25, "y": 3, "label": "C"}, {"x": 5.25, "y": 3, "label": "V"}, {"x": 6.25, "y": 3, "label": "B"}, {"x": 7.25, "y": 3, "label": "N"}, {"x": 8.25, "y": 3, "label": "M"}, {"x": 9.25, "y": 3, "label": "COMMA"}, {"x": 10.25, "y": 3, "label": "PERIOD"}, {"x": 11.25, "y": 3, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 2.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "label": "UP"},
- {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1.25, "label": "LGUI"}, {"x": 2.5, "y": 4, "w": 1.25, "label": "LALT"}, {"x": 3.75, "y": 4, "w": 2.75, "label": "SPACE1"}, {"x": 6.5, "y": 4, "w": 2.25, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "RGUI"}, {"x": 10, "y": 4, "w": 1.25, "label": "RALT"}, {"x": 11.25, "y": 4, "label": "FN"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "RCTRL"}, {"x": 13.5, "y": 4, "label": "LEFT"}, {"x": 14.5, "y": 4, "label": "DOWN"}, {"x": 15.5, "y": 4, "label": "RIGHT"}
- ]
- },
- "LAYOUT_66_ansi": {
- "layout": [
- {"label": "~", "x": 0, "y": 0}, {"label": "!", "x": 1, "y": 0}, {"label": "@", "x": 2, "y": 0}, {"label": "#", "x": 3, "y": 0}, {"label": "$", "x": 4, "y": 0}, {"label": "%", "x": 5, "y": 0}, {"label": "^", "x": 6, "y": 0}, {"label": "&", "x": 7, "y": 0}, {"label": "*", "x": 8, "y": 0}, {"label": "(", "x": 9, "y": 0}, {"label": ")", "x": 10, "y": 0}, {"label": "_", "x": 11, "y": 0}, {"label": "+", "x": 12, "y": 0}, {"label": "BACKSPACE", "x": 13, "y": 0, "w": 2}, {"label": "PAGEUP", "x": 15.5, "y": 0},
- {"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "|", "x": 13.5, "y": 1, "w": 1.5}, {"label": "PAGEDOWN", "x": 15.5, "y": 1},
- {"label": "CAPS LOCK", "x": 0, "y": 2, "w": 1.75}, {"label": "A", "x": 1.75, "y": 2}, {"label": "S", "x": 2.75, "y": 2}, {"label": "D", "x": 3.75, "y": 2}, {"label": "F", "x": 4.75, "y": 2}, {"label": "G", "x": 5.75, "y": 2}, {"label": "H", "x": 6.75, "y": 2}, {"label": "J", "x": 7.75, "y": 2}, {"label": "K", "x": 8.75, "y": 2}, {"label": "L", "x": 9.75, "y": 2}, {"label": "SEMICOLON", "x": 10.75, "y": 2}, {"label": "QUOTE", "x": 11.75, "y": 2}, {"label": "ENTER", "x": 12.75, "y": 2, "w": 2.25},
- {"label": "LSHIFT", "x": 0, "y": 3, "w": 2.25}, {"label": "Z", "x": 2.25, "y": 3}, {"label": "X", "x": 3.25, "y": 3}, {"label": "C", "x": 4.25, "y": 3}, {"label": "V", "x": 5.25, "y": 3}, {"label": "B", "x": 6.25, "y": 3}, {"label": "N", "x": 7.25, "y": 3}, {"label": "M", "x": 8.25, "y": 3}, {"label": "COMMA", "x": 9.25, "y": 3}, {"label": "PERIOD", "x": 10.25, "y": 3}, {"label": "SLASH", "x": 11.25, "y": 3}, {"label": "RSHIFT", "x": 12.25, "y": 3, "w": 2.25}, {"label": "UP", "x": 14.5, "y": 3},
- {"label": "LCTRL", "x": 0, "y": 4, "w": 1.25}, {"label": "LGUI", "x": 1.25, "y": 4, "w": 1.25}, {"label": "LALT", "x": 2.5, "y": 4, "w": 1.25}, {"label": "SPACE", "x": 3.75, "y": 4, "w": 6.25}, {"label": "RALT", "x": 10, "y": 4, "w": 1.25}, {"label": "RGUI", "x": 11.25, "y": 4}, {"label": "FN", "x": 12.25, "y": 4, "w": 1.25}, {"label": "LEFT", "x": 13.5, "y": 4}, {"label": "DOWN", "x": 14.5, "y": 4}, {"label": "RIGHT", "x": 15.5, "y": 4}
- ]
- }
- }
-}
diff --git a/keyboards/clueboard/66_hotswap/prototype/info.json b/keyboards/clueboard/66_hotswap/prototype/info.json
new file mode 100644
index 000000000000..32bd51d09833
--- /dev/null
+++ b/keyboards/clueboard/66_hotswap/prototype/info.json
@@ -0,0 +1,245 @@
+{
+ "keyboard_name": "Clueboard 66% HotSwap Prototype",
+ "maintainer": "skullydazed",
+ "width": 16.5,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
+
+ {"x": 15.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.5, "y": 1},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 0, "y": 3, "w": 1.25},
+ {"x": 1.25, "y": 3},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3},
+ {"x": 13.25, "y": 3, "w": 1.25},
+ {"x": 14.5, "y": 3},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4, "w": 1.25},
+ {"x": 2.5, "y": 4, "w": 1.25},
+ {"x": 3.75, "y": 4, "w": 2.75},
+ {"x": 6.5, "y": 4, "w": 2.25},
+ {"x": 8.75, "y": 4, "w": 1.25},
+ {"x": 10, "y": 4, "w": 1.25},
+ {"x": 11.25, "y": 4},
+ {"x": 12.25, "y": 4, "w": 1.25},
+ {"x": 13.5, "y": 4},
+ {"x": 14.5, "y": 4},
+ {"x": 15.5, "y": 4}
+ ]
+ },
+ "LAYOUT": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
+
+ {"x": 15.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.5, "y": 1},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 2.25},
+
+ {"x": 14.5, "y": 3},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4, "w": 1.25},
+ {"x": 2.5, "y": 4, "w": 1.25},
+ {"x": 3.75, "y": 4, "w": 2.75},
+ {"x": 6.5, "y": 4, "w": 2.25},
+ {"x": 8.75, "y": 4, "w": 1.25},
+ {"x": 10, "y": 4, "w": 1.25},
+ {"x": 11.25, "y": 4},
+ {"x": 12.25, "y": 4, "w": 1.25},
+ {"x": 13.5, "y": 4},
+ {"x": 14.5, "y": 4},
+ {"x": 15.5, "y": 4}
+ ]
+ },
+ "LAYOUT_66_ansi": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
+
+ {"x": 15.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.5, "y": 1},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 2.25},
+
+ {"x": 14.5, "y": 3},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4, "w": 1.25},
+ {"x": 2.5, "y": 4, "w": 1.25},
+ {"x": 3.75, "y": 4, "w": 6.25},
+ {"x": 10, "y": 4, "w": 1.25},
+ {"x": 11.25, "y": 4},
+ {"x": 12.25, "y": 4, "w": 1.25},
+
+ {"x": 13.5, "y": 4},
+ {"x": 14.5, "y": 4},
+ {"x": 15.5, "y": 4}
+ ]
+ }
+ }
+}
From a0bf235644064e6a63f4df51ae501269bbd68652 Mon Sep 17 00:00:00 2001
From: Erovia
Date: Wed, 17 Jun 2020 23:45:53 +0100
Subject: [PATCH 32/36] CLI: Add ATmega328 and ATtiny85 to supported CPUs
(#9371)
* CLI: Add ATmega328 to supported CPUs
Support for ATmega328 was added in #9043.
* Update lib/python/qmk/constants.py
---
lib/python/qmk/constants.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index f0d56c4430de..36a20adf4be1 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -12,4 +12,4 @@
ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303'
AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None
ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS
-VUSB_PROCESSORS = 'atmega328p', 'atmega32a'
+VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85'
From 1a159a38ed127fa80762a7c1b8150ba19ac34ddf Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 18 Jun 2020 10:10:35 +1000
Subject: [PATCH 33/36] Clean up Tap Dance docs (#9372)
* Clean up Tap Dance docs
* Add heading IDs for translation
---
docs/feature_tap_dance.md | 532 +++++++++++++++++++-------------------
1 file changed, 260 insertions(+), 272 deletions(-)
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md
index 2e8ab5350663..877c37336ec3 100644
--- a/docs/feature_tap_dance.md
+++ b/docs/feature_tap_dance.md
@@ -1,31 +1,24 @@
# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
-## Introduction
+## Introduction :id=introduction
+
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
-## Explanatory Comparison with `ACTION_FUNCTION_TAP`
-`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap.
-
-With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`.
-
-To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time.
+## How to Use Tap Dance :id=how-to-use
-## How to Use Tap Dance
-But enough of the generalities; lets look at how to actually use Tap Dance!
-
-First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
+First, you will need `TAP_DANCE_ENABLE = yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`:
-```
+```c
#define TAPPING_TERM 175
```
-The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead.
+The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead.
-Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array.
+Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that takes a number which will later be used as an index into the `tap_dance_actions` array.
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
@@ -43,11 +36,12 @@ The first option is enough for a lot of cases, that just want dual roles. For ex
Similar to the first option, the second option is good for simple layer-switching cases.
-For more complicated cases, use the third or fourth options (examples of each are listed below).
+For more complicated cases, use the third or fourth options (examples of each are listed below).
Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts.
-## Implementation Details
+## Implementation Details :id=implementation
+
Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works!
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer.
@@ -58,9 +52,9 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc
For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
-# Examples
+## Examples :id=examples
-## Simple Example
+### Simple Example :id=simple-example
Here's a simple example for a single definition:
@@ -69,23 +63,26 @@ Here's a simple example for a single definition:
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
```c
-//Tap Dance Declarations
+// Tap Dance declarations
enum {
- TD_ESC_CAPS = 0
+ TD_ESC_CAPS,
};
-//Tap Dance Definitions
+// Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = {
- //Tap once for Esc, twice for Caps Lock
- [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS)
-// Other declarations would go here, separated by commas, if you have them
+ // Tap once for Escape, twice for Caps Lock
+ [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
};
-//In Layer declaration, add tap dance item in place of a key code
-TD(TD_ESC_CAPS)
+// Add tap dance item in place of a key code
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ // ...
+ TD(TD_ESC_CAPS)
+ // ...
+};
```
-## Complex Examples
+### Complex Examples :id=complex-examples
This section details several complex tap dance examples.
All the enums used in the examples are declared like this:
@@ -93,104 +90,105 @@ All the enums used in the examples are declared like this:
```c
// Enums defined for all examples:
enum {
- CT_SE = 0,
- CT_CLN,
- CT_EGG,
- CT_FLSH,
- X_TAP_DANCE
+ CT_SE,
+ CT_CLN,
+ CT_EGG,
+ CT_FLSH,
+ X_TAP_DANCE
};
```
-### Example 1: Send `:` on Single Tap, `;` on Double Tap
+
+#### Example 1: Send `:` on Single Tap, `;` on Double Tap :id=example-1
+
```c
-void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- register_code (KC_RSFT);
- register_code (KC_SCLN);
- } else {
- register_code (KC_SCLN);
- }
+void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code16(KC_COLN);
+ } else {
+ register_code(KC_SCLN);
+ }
}
-void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- unregister_code (KC_RSFT);
- unregister_code (KC_SCLN);
- } else {
- unregister_code (KC_SCLN);
- }
+void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code16(KC_COLN);
+ } else {
+ unregister_code(KC_SCLN);
+ }
}
-//All tap dance functions would go here. Only showing this one.
+// All tap dance functions would go here. Only showing this one.
qk_tap_dance_action_t tap_dance_actions[] = {
- [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
+ [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset),
};
```
-### Example 2: Send "Safety Dance!" After 100 Taps
+
+#### Example 2: Send "Safety Dance!" After 100 Taps :id=example-2
+
```c
-void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 100) {
- SEND_STRING ("Safety dance!");
- reset_tap_dance (state);
- }
+void dance_egg(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count >= 100) {
+ SEND_STRING("Safety dance!");
+ reset_tap_dance(state);
+ }
}
qk_tap_dance_action_t tap_dance_actions[] = {
- [CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
+ [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
};
```
-### Example 3: Turn LED Lights On Then Off, One at a Time
+#### Example 3: Turn LED Lights On Then Off, One at a Time :id=example-3
```c
-// on each tap, light up one led, from right to left
-// on the forth tap, turn them off from right to left
+// On each tap, light up one LED, from right to left
+// On the fourth tap, turn them off from right to left
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
- switch (state->count) {
- case 1:
- ergodox_right_led_3_on();
- break;
- case 2:
- ergodox_right_led_2_on();
- break;
- case 3:
- ergodox_right_led_1_on();
- break;
- case 4:
- ergodox_right_led_3_off();
- _delay_ms(50);
- ergodox_right_led_2_off();
- _delay_ms(50);
- ergodox_right_led_1_off();
- }
+ switch (state->count) {
+ case 1:
+ ergodox_right_led_3_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ case 3:
+ ergodox_right_led_1_on();
+ break;
+ case 4:
+ ergodox_right_led_3_off();
+ wait_ms(50);
+ ergodox_right_led_2_off();
+ wait_ms(50);
+ ergodox_right_led_1_off();
+ }
}
-// on the fourth tap, set the keyboard on flash state
+// On the fourth tap, set the keyboard on flash state
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 4) {
- reset_keyboard();
- reset_tap_dance(state);
- }
+ if (state->count >= 4) {
+ reset_keyboard();
+ }
}
-// if the flash state didn't happen, then turn off LEDs, left to right
+// If the flash state didn't happen, then turn off LEDs, left to right
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
- ergodox_right_led_1_off();
- _delay_ms(50);
- ergodox_right_led_2_off();
- _delay_ms(50);
- ergodox_right_led_3_off();
+ ergodox_right_led_1_off();
+ wait_ms(50);
+ ergodox_right_led_2_off();
+ wait_ms(50);
+ ergodox_right_led_3_off();
}
-//All tap dances now put together. Example 3 is "CT_FLASH"
+// All tap dances now put together. Example 3 is "CT_FLASH"
qk_tap_dance_action_t tap_dance_actions[] = {
- [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
- ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
- ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
- ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
+ [CT_SE] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT),
+ [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset),
+ [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
+ [CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
};
```
-### Example 4: 'Quad Function Tap-Dance'
+#### Example 4: 'Quad Function Tap-Dance' :id=example-4
By [DanielGGordon](https://github.com/danielggordon)
@@ -201,40 +199,37 @@ Below is a specific example:
* Double Tap = Send `Escape`
* Double Tap and Hold = Send `Alt`
-## Setup
-
You will need a few things that can be used for 'Quad Function Tap-Dance'.
You'll need to add these to the top of your `keymap.c` file, before your keymap.
```c
typedef struct {
- bool is_press_action;
- int state;
+ bool is_press_action;
+ uint8_t state;
} tap;
enum {
- SINGLE_TAP = 1,
- SINGLE_HOLD = 2,
- DOUBLE_TAP = 3,
- DOUBLE_HOLD = 4,
- DOUBLE_SINGLE_TAP = 5, //send two single taps
- TRIPLE_TAP = 6,
- TRIPLE_HOLD = 7
+ SINGLE_TAP = 1,
+ SINGLE_HOLD,
+ DOUBLE_TAP,
+ DOUBLE_HOLD,
+ DOUBLE_SINGLE_TAP, // Send two single taps
+ TRIPLE_TAP,
+ TRIPLE_HOLD
};
-//Tap dance enums
+// Tap dance enums
enum {
- X_CTL = 0,
- SOME_OTHER_DANCE
+ X_CTL,
+ SOME_OTHER_DANCE
};
-int cur_dance (qk_tap_dance_state_t *state);
-
-//for the x tap dance. Put it here so it can be used in any keymap
-void x_finished (qk_tap_dance_state_t *state, void *user_data);
-void x_reset (qk_tap_dance_state_t *state, void *user_data);
+uint8_t cur_dance(qk_tap_dance_state_t *state);
+// For the x tap dance. Put it here so it can be used in any keymap
+void x_finished(qk_tap_dance_state_t *state, void *user_data);
+void x_reset(qk_tap_dance_state_t *state, void *user_data);
```
Now, at the bottom of your `keymap.c` file, you'll need to add the following:
@@ -267,65 +262,62 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
*
*/
-int cur_dance (qk_tap_dance_state_t *state) {
- if (state->count == 1) {
- if (state->interrupted || !state->pressed) return SINGLE_TAP;
- //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
- else return SINGLE_HOLD;
- }
- else if (state->count == 2) {
- /*
- * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
- * action when hitting 'pp'. Suggested use case for this return value is when you want to send two
- * keystrokes of the key, and not the 'double tap' action/macro.
- */
- if (state->interrupted) return DOUBLE_SINGLE_TAP;
- else if (state->pressed) return DOUBLE_HOLD;
- else return DOUBLE_TAP;
- }
- //Assumes no one is trying to type the same letter three times (at least not quickly).
- //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
- //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
- if (state->count == 3) {
- if (state->interrupted || !state->pressed) return TRIPLE_TAP;
- else return TRIPLE_HOLD;
- }
- else return 8; //magic number. At some point this method will expand to work for more presses
+uint8_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ // Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
+ else return SINGLE_HOLD;
+ } else if (state->count == 2) {
+ // DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
+ // action when hitting 'pp'. Suggested use case for this return value is when you want to send two
+ // keystrokes of the key, and not the 'double tap' action/macro.
+ if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ else if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+
+ // Assumes no one is trying to type the same letter three times (at least not quickly).
+ // If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
+ // an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
+ if (state->count == 3) {
+ if (state->interrupted || !state->pressed) return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ } else return 8; // Magic number. At some point this method will expand to work for more presses
}
-//instanalize an instance of 'tap' for the 'x' tap dance.
+// Create an instance of 'tap' for the 'x' tap dance.
static tap xtap_state = {
- .is_press_action = true,
- .state = 0
+ .is_press_action = true,
+ .state = 0
};
-void x_finished (qk_tap_dance_state_t *state, void *user_data) {
- xtap_state.state = cur_dance(state);
- switch (xtap_state.state) {
- case SINGLE_TAP: register_code(KC_X); break;
- case SINGLE_HOLD: register_code(KC_LCTRL); break;
- case DOUBLE_TAP: register_code(KC_ESC); break;
- case DOUBLE_HOLD: register_code(KC_LALT); break;
- case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X);
- //Last case is for fast typing. Assuming your key is `f`:
- //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
- //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
- }
+void x_finished(qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code(KC_X); break;
+ case SINGLE_HOLD: register_code(KC_LCTRL); break;
+ case DOUBLE_TAP: register_code(KC_ESC); break;
+ case DOUBLE_HOLD: register_code(KC_LALT); break;
+ // Last case is for fast typing. Assuming your key is `f`:
+ // For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
+ // In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
+ case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
+ }
}
-void x_reset (qk_tap_dance_state_t *state, void *user_data) {
- switch (xtap_state.state) {
- case SINGLE_TAP: unregister_code(KC_X); break;
- case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
- case DOUBLE_TAP: unregister_code(KC_ESC); break;
- case DOUBLE_HOLD: unregister_code(KC_LALT);
- case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
- }
- xtap_state.state = 0;
+void x_reset(qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code(KC_X); break;
+ case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
+ case DOUBLE_TAP: unregister_code(KC_ESC); break;
+ case DOUBLE_HOLD: unregister_code(KC_LALT);
+ case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
+ }
+ xtap_state.state = 0;
}
qk_tap_dance_action_t tap_dance_actions[] = {
- [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,x_finished, x_reset)
+ [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)
};
```
@@ -335,90 +327,91 @@ If you want to implement this in your userspace, then you may want to check out
> In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`).
-### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys
+#### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5
Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`.
Below your layers and custom keycodes, add the following:
```c
-// tapdance keycodes
+// Tap Dance keycodes
enum td_keycodes {
- ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
+ ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
};
-// define a type containing as many tapdance states as you need
+// Define a type containing as many tapdance states as you need
typedef enum {
- SINGLE_TAP,
- SINGLE_HOLD,
- DOUBLE_SINGLE_TAP
+ SINGLE_TAP,
+ SINGLE_HOLD,
+ DOUBLE_SINGLE_TAP
} td_state_t;
-// create a global instance of the tapdance state type
+// Create a global instance of the tapdance state type
static td_state_t td_state;
-// declare your tapdance functions:
+// Declare your tapdance functions:
-// function to determine the current tapdance state
-int cur_dance (qk_tap_dance_state_t *state);
+// Function to determine the current tapdance state
+uint8_t cur_dance(qk_tap_dance_state_t *state);
// `finished` and `reset` functions for each tapdance keycode
-void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
-void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
+void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
+void altlp_reset(qk_tap_dance_state_t *state, void *user_data);
```
Below your `LAYOUT`, define each of the tapdance functions:
```c
-// determine the tapdance state to return
-int cur_dance (qk_tap_dance_state_t *state) {
- if (state->count == 1) {
- if (state->interrupted || !state->pressed) { return SINGLE_TAP; }
- else { return SINGLE_HOLD; }
- }
- if (state->count == 2) { return DOUBLE_SINGLE_TAP; }
- else { return 3; } // any number higher than the maximum state value you return above
+// Determine the tapdance state to return
+uint8_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ else return SINGLE_HOLD;
+ }
+
+ if (state->count == 2) return DOUBLE_SINGLE_TAP;
+ else return 3; // Any number higher than the maximum state value you return above
}
-
-// handle the possible states for each tapdance keycode you define:
-
-void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
- td_state = cur_dance(state);
- switch (td_state) {
- case SINGLE_TAP:
- register_code16(KC_LPRN);
- break;
- case SINGLE_HOLD:
- register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here
- break;
- case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term
- tap_code16(KC_LPRN);
- register_code16(KC_LPRN);
- }
+
+// Handle the possible states for each tapdance keycode you define:
+
+void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
+ td_state = cur_dance(state);
+ switch (td_state) {
+ case SINGLE_TAP:
+ register_code16(KC_LPRN);
+ break;
+ case SINGLE_HOLD:
+ register_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here
+ break;
+ case DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
+ tap_code16(KC_LPRN);
+ register_code16(KC_LPRN);
+ }
}
-void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
- switch (td_state) {
- case SINGLE_TAP:
- unregister_code16(KC_LPRN);
- break;
- case SINGLE_HOLD:
- unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here
- break;
- case DOUBLE_SINGLE_TAP:
- unregister_code16(KC_LPRN);
- }
+void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
+ switch (td_state) {
+ case SINGLE_TAP:
+ unregister_code16(KC_LPRN);
+ break;
+ case SINGLE_HOLD:
+ unregister_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code16(KC_LPRN);
+ }
}
-// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
+// Define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
qk_tap_dance_action_t tap_dance_actions[] = {
- [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
+ [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
};
```
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
-### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys
+#### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys :id=example-6
Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap.
@@ -426,97 +419,92 @@ The first step is to include the following code towards the beginning of your `k
```c
typedef struct {
- bool is_press_action;
- int state;
+ bool is_press_action;
+ uint8_t state;
} tap;
-//Define a type for as many tap dance states as you need
+// Define a type for as many tap dance states as you need
enum {
- SINGLE_TAP = 1,
- SINGLE_HOLD = 2,
- DOUBLE_TAP = 3
+ SINGLE_TAP = 1,
+ SINGLE_HOLD,
+ DOUBLE_TAP
};
enum {
- QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum
+ QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum
};
-//Declare the functions to be used with your tap dance key(s)
+// Declare the functions to be used with your tap dance key(s)
-//Function associated with all tap dances
-int cur_dance (qk_tap_dance_state_t *state);
+// Function associated with all tap dances
+uint8_t cur_dance(qk_tap_dance_state_t *state);
-//Functions associated with individual tap dances
-void ql_finished (qk_tap_dance_state_t *state, void *user_data);
-void ql_reset (qk_tap_dance_state_t *state, void *user_data);
+// Functions associated with individual tap dances
+void ql_finished(qk_tap_dance_state_t *state, void *user_data);
+void ql_reset(qk_tap_dance_state_t *state, void *user_data);
```
Towards the bottom of your `keymap.c`, include the following code:
```c
-//Determine the current tap dance state
-int cur_dance (qk_tap_dance_state_t *state) {
- if (state->count == 1) {
- if (!state->pressed) {
- return SINGLE_TAP;
- } else {
- return SINGLE_HOLD;
- }
- } else if (state->count == 2) {
- return DOUBLE_TAP;
- }
- else return 8;
+// Determine the current tap dance state
+uint8_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (!state->pressed) return SINGLE_TAP;
+ else return SINGLE_HOLD;
+ } else if (state->count == 2) return DOUBLE_TAP;
+ else return 8;
}
-//Initialize tap structure associated with example tap dance key
+// Initialize tap structure associated with example tap dance key
static tap ql_tap_state = {
- .is_press_action = true,
- .state = 0
+ .is_press_action = true,
+ .state = 0
};
-//Functions that control what our tap dance key does
-void ql_finished (qk_tap_dance_state_t *state, void *user_data) {
- ql_tap_state.state = cur_dance(state);
- switch (ql_tap_state.state) {
- case SINGLE_TAP:
- tap_code(KC_QUOT);
- break;
- case SINGLE_HOLD:
- layer_on(_MY_LAYER);
- break;
- case DOUBLE_TAP:
- //check to see if the layer is already set
- if (layer_state_is(_MY_LAYER)) {
- //if already set, then switch it off
- layer_off(_MY_LAYER);
- } else {
- //if not already set, then switch the layer on
- layer_on(_MY_LAYER);
- }
- break;
- }
+// Functions that control what our tap dance key does
+void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
+ ql_tap_state.state = cur_dance(state);
+ switch (ql_tap_state.state) {
+ case SINGLE_TAP:
+ tap_code(KC_QUOT);
+ break;
+ case SINGLE_HOLD:
+ layer_on(_MY_LAYER);
+ break;
+ case DOUBLE_TAP:
+ // Check to see if the layer is already set
+ if (layer_state_is(_MY_LAYER)) {
+ // If already set, then switch it off
+ layer_off(_MY_LAYER);
+ } else {
+ // If not already set, then switch the layer on
+ layer_on(_MY_LAYER);
+ }
+ break;
+ }
}
-void ql_reset (qk_tap_dance_state_t *state, void *user_data) {
- //if the key was held down and now is released then switch off the layer
- if (ql_tap_state.state==SINGLE_HOLD) {
- layer_off(_MY_LAYER);
- }
- ql_tap_state.state = 0;
+void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
+ // If the key was held down and now is released then switch off the layer
+ if (ql_tap_state.state == SINGLE_HOLD) {
+ layer_off(_MY_LAYER);
+ }
+ ql_tap_state.state = 0;
}
-//Associate our tap dance key with its functionality
+// Associate our tap dance key with its functionality
qk_tap_dance_action_t tap_dance_actions[] = {
- [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
+ [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
};
```
-The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active.
+The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is(layer)` function which returns `true` if the given `layer` is active.
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
-The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `case:SINGLE_HOLD` works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `case:DOUBLE_TAP` works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
+The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
-`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
+`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`.
From 8018f4db2d6d2af506ba0f405b7ce0484799db02 Mon Sep 17 00:00:00 2001
From: Hybrid <62749953+Hybrid2288@users.noreply.github.com>
Date: Thu, 18 Jun 2020 03:32:02 +0200
Subject: [PATCH 34/36] [Keymap] new keymap for XD75 (#8675)
Co-authored-by: grousselle
---
keyboards/xd75/keymaps/hybrid/config.h | 20 ++
keyboards/xd75/keymaps/hybrid/keymap.c | 310 ++++++++++++++++++++++++
keyboards/xd75/keymaps/hybrid/readme.md | 13 +
keyboards/xd75/keymaps/hybrid/rules.mk | 21 ++
4 files changed, 364 insertions(+)
create mode 100644 keyboards/xd75/keymaps/hybrid/config.h
create mode 100644 keyboards/xd75/keymaps/hybrid/keymap.c
create mode 100644 keyboards/xd75/keymaps/hybrid/readme.md
create mode 100644 keyboards/xd75/keymaps/hybrid/rules.mk
diff --git a/keyboards/xd75/keymaps/hybrid/config.h b/keyboards/xd75/keymaps/hybrid/config.h
new file mode 100644
index 000000000000..8aa116d99398
--- /dev/null
+++ b/keyboards/xd75/keymaps/hybrid/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2017 Benjamin Kesselring
+ *
+ * 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 .
+ */
+
+#pragma once
+#define TAPPING_TERM 170
+//#define RGBLIGHT_LAYERS
+// place overrides here
diff --git a/keyboards/xd75/keymaps/hybrid/keymap.c b/keyboards/xd75/keymaps/hybrid/keymap.c
new file mode 100644
index 000000000000..e8b5a3536bcd
--- /dev/null
+++ b/keyboards/xd75/keymaps/hybrid/keymap.c
@@ -0,0 +1,310 @@
+/* Copyright 2020 Hybrid
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+
+enum layers {
+ _MAIN = 0,
+ _LY1,
+ _LY2,
+};
+
+enum {
+ TD_A,
+ TD_E,
+ TD_I,
+ TD_O,
+ TD_U,
+ TD_SLASH,
+ TD_UNDER,
+ TD_OP_ACCOL,
+ TD_CL_ACCOL,
+ TD_QUESTION,
+ TD_CEDILLE,
+ TD_DOT,
+};
+
+
+
+void dance_a_accent (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_0);
+ }
+ else {
+ tap_code (KC_Q);
+ }
+}
+void dance_e_accent (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_2);
+ }
+ else if (state->count == 3) {
+ tap_code (KC_7);
+ }
+ else {
+ tap_code (KC_E);
+ }
+}
+void dance_i_accent (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P2);
+ tap_code (KC_P3);
+ tap_code (KC_P8);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_I);
+
+ }
+}
+void dance_o_accent (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P2);
+ tap_code (KC_P4);
+ tap_code (KC_P4);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_O);
+ }
+}
+void dance_u_accent (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P2);
+ tap_code (KC_P4);
+ tap_code (KC_P9);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_U);
+ }
+
+}
+void dance_slash (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P9);
+ tap_code (KC_P2);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_PSLS);
+ }
+}
+void dance_under (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P9);
+ tap_code (KC_P5);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_6);
+ }
+}
+void dance_open_accol (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P1);
+ tap_code (KC_P2);
+ tap_code (KC_P3);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else if (state->count == 3) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P9);
+ tap_code (KC_P1);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_5);
+ }
+}
+void dance_close_accol (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P1);
+ tap_code (KC_P2);
+ tap_code (KC_P5);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+
+ }
+ else if (state->count == 3) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P9);
+ tap_code (KC_P3);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_MINS);
+ }
+}
+void dance_question (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P0);
+ tap_code (KC_P3);
+ tap_code (KC_P3);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+
+ }
+ else {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P0);
+ tap_code (KC_P6);
+ tap_code (KC_P3);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+
+ }
+}
+void dance_cedille (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_9);
+ }
+ else {
+ tap_code (KC_C);
+ }
+}
+void dance_dot (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P4);
+ tap_code (KC_P4);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+ else {
+ tap_code (KC_NLCK);
+ register_code (KC_LALT);
+ tap_code (KC_P0);
+ tap_code (KC_P4);
+ tap_code (KC_P6);
+ unregister_code (KC_LALT);
+ tap_code (KC_NLCK);
+ }
+}
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_A] = ACTION_TAP_DANCE_FN(dance_a_accent),
+ [TD_E] = ACTION_TAP_DANCE_FN(dance_e_accent),
+ [TD_I] = ACTION_TAP_DANCE_FN(dance_i_accent),
+ [TD_O] = ACTION_TAP_DANCE_FN(dance_o_accent),
+ [TD_U] = ACTION_TAP_DANCE_FN(dance_u_accent),
+ [TD_SLASH] = ACTION_TAP_DANCE_FN(dance_slash),
+ [TD_UNDER] = ACTION_TAP_DANCE_FN(dance_under),
+ [TD_OP_ACCOL] = ACTION_TAP_DANCE_FN(dance_open_accol),
+ [TD_CL_ACCOL] = ACTION_TAP_DANCE_FN(dance_close_accol),
+ [TD_QUESTION] = ACTION_TAP_DANCE_FN(dance_question),
+ [TD_CEDILLE] = ACTION_TAP_DANCE_FN(dance_cedille),
+ [TD_DOT] = ACTION_TAP_DANCE_FN(dance_dot),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+// red led layout
+ [_MAIN] = LAYOUT_ortho_5x15(
+ KC_ESC, KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, TD(TD_DOT), KC_6, KC_7, KC_8, KC_9, KC_0, DF(_LY1), KC_NO,
+ KC_TAB, TD(TD_A), KC_W, TD(TD_E), KC_R, KC_T, KC_Y, KC_ENT, TD(TD_U), TD(TD_I), TD(TD_O), KC_P, KC_NO, TD(TD_OP_ACCOL), TD(TD_CL_ACCOL),
+ KC_PGUP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_ENT, KC_J, KC_K, KC_L, KC_SCLN, KC_UP, KC_NO, KC_NO,
+ KC_PGDN, KC_Z, KC_X, TD(TD_CEDILLE), KC_V, KC_B, KC_N, KC_DOT, TD(TD_QUESTION), TD(TD_UNDER), TD(TD_SLASH), KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
+ KC_NO, KC_NO, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_HOME, KC_LGUI, KC_END, KC_BSPC, KC_RALT, KC_DEL, KC_PMNS, KC_NO, MO(1)
+ ),
+
+// green led layout
+ [_LY1] = LAYOUT_ortho_5x15(
+ KC_ESC, RGB_TOG, RGB_RMOD, RGB_M_P, RGB_M_B, RGB_M_SW, RGB_M_K, RGB_M_G, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_LY2), DF(_MAIN),
+ DEBUG, KC_PSCR, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ RESET, KC_NO, KC_S, KC_D, KC_F, KC_G, KC_Z, KC_J, KC_K, KC_L, KC_M, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_LSFT,
+ KC_NO, KC_X, KC_C, KC_V, KC_B, KC_N, KC_COMM, KC_SCLN, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PEQL, KC_LCBR,
+ KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_TRNS, KC_NO, KC_TRNS, KC_P0, KC_P1, KC_P2, KC_P3, KC_TRNS
+ ),
+
+// blue led layout
+ [_LY2] = LAYOUT_ortho_5x15(
+ KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, BL_ON, BL_OFF, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_RMOD, RGB_MOD, KC_NO, DF(_LY1),
+ KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_M_P, RGB_M_B,
+ KC_MPLY, KC_MSTP, KC_MUTE, KC_NO, KC_NO, BL_DEC, BL_INC, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, RGB_M_R, RGB_M_SW,
+ KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, BL_BRTG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, RGB_VAI, RGB_M_SN, RGB_M_K,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, RGB_SPD, RGB_SPI, RGB_M_X, RGB_M_G
+ )
+
+};
+
+
+//Define layer colors
+#define rgblight_setrgb_user_MAIN() rgblight_sethsv_red()
+#define rgblight_setrgb_user_LY1() rgblight_sethsv_green()
+#define rgblight_setrgb_user_LY2() rgblight_sethsv_blue()
+
+void matrix_init_user(void) {
+ rgblight_enable();
+ rgblight_mode(1);
+ rgblight_setrgb_user_MAIN();
+}
+
+
+//Set a color based on the layer
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (get_highest_layer(state)) {
+ case _LY1:
+ rgblight_setrgb_user_LY1();
+ break;
+ case _LY2:
+ rgblight_setrgb_user_LY2();
+ break;
+ default:
+ rgblight_setrgb_user_MAIN();
+ break;
+ }
+ return state;
+}
diff --git a/keyboards/xd75/keymaps/hybrid/readme.md b/keyboards/xd75/keymaps/hybrid/readme.md
new file mode 100644
index 000000000000..dbe41037c23d
--- /dev/null
+++ b/keyboards/xd75/keymaps/hybrid/readme.md
@@ -0,0 +1,13 @@
+#
+# My XD75 keyboard
+# The layouts are 100 % customizable by myself.
+# The layout 1 is almost finished (layer 2 and layer 3 are not finished, for testing purpose as far)
+# Layout 1 => rgb red
+# Layout 2 => rgb green
+# Layout 1 => rgb blue
+# (to memorize => rgb :) )
+#
+# I added some double tap dance for french accent (à é è î ô ù, not for every accents) and c & ç
+# Some double tap dance for useful mapping (- & _ , ({[ & )}], etc... )
+#
+#
diff --git a/keyboards/xd75/keymaps/hybrid/rules.mk b/keyboards/xd75/keymaps/hybrid/rules.mk
new file mode 100644
index 000000000000..403c3c65ce97
--- /dev/null
+++ b/keyboards/xd75/keymaps/hybrid/rules.mk
@@ -0,0 +1,21 @@
+# Copyright 2013 Jun Wako
+#
+# 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 .
+
+RGBLIGHT_ENABLE = yes
+TAP_DANCE_ENABLE = yes
+UNICODE_ENABLE = no
+SLEEP_LED_ENABLE = no
+BACKLIGHT_ENABLE = no
+
From 39ff121d7389fd6575e65ecb54b11bb87777ca38 Mon Sep 17 00:00:00 2001
From: Dan
Date: Wed, 17 Jun 2020 21:53:36 -0400
Subject: [PATCH 35/36] Implement game mode layer for dcompact on planck
(#9402)
---
keyboards/planck/keymaps/dcompact/keymap.c | 103 +++++++++++++++++++-
keyboards/planck/keymaps/dcompact/readme.md | 2 +-
2 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c
index 0e53d305d524..cb4cd3f5b9e1 100644
--- a/keyboards/planck/keymaps/dcompact/keymap.c
+++ b/keyboards/planck/keymaps/dcompact/keymap.c
@@ -34,6 +34,9 @@ enum planck_layers {
_RAISE,
_FUNC,
_PLOVER,
+ _GAME,
+ _LNUM,
+ _LFUN,
_ADJUST,
_MOUSE
};
@@ -41,12 +44,16 @@ enum planck_layers {
enum planck_keycodes {
BASE = SAFE_RANGE,
PLOVER,
+ GAME,
+ LNUM,
+ LFUN,
LOWER,
RAISE,
FUNC,
MOUSE,
ADJUST,
- EXT_PLV
+ EXT_PLV,
+ EXT_GM
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -59,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |Del/Sf| : ; | Q | J | K | X | B | M | W | V | Z | Bspc |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter |
+ * | Ctrl | Game | GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter |
* `-----------------------------------------------------------------------------------'
*/
[_BASE] = LAYOUT_planck_grid(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC,
- KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT
+ KC_LCTL, GAME, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT
),
/* Lower
@@ -123,6 +130,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
),
+/* Game
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | H | Z | I | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |Shift | A | S | D | U | X | P | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Ctrl | F | G | R | M | C | O | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | ~ | Alt |Space |Shift | LNUM | LFUN | | | | | Exit |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GAME] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_H, KC_Z, KC_I, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_U, KC_X, KC_P, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_LCTL, KC_F, KC_G, KC_R, KC_M, KC_C, KC_O, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_ESC, KC_TILD, KC_LALT, KC_SPC, KC_LSFT, LNUM, LFUN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EXT_GM
+),
+
+/* LNum
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | 1 | 2 | 3 | 4 | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |Shift | 5 | 6 | 7 | 8 | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Ctrl | 9 | 10 | , | . | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | | Alt |Space |Shift | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LNUM] = LAYOUT_planck_grid(
+ _______, KC_1, KC_2, KC_3, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_5, KC_6, KC_7, KC_8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_9, KC_0, KC_COMM, KC_DOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+/* LFun
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | F1 | F2 | F3 | F4 | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |Shift | F5 | F6 | F7 | F8 | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Ctrl | F9 | F10 | F11 | F12 | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | | Alt |Space |Shift | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LFUN] = LAYOUT_planck_grid(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+
/* Mouse (Not Reachable on Planck)
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | | | |
@@ -234,6 +296,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
+ case GAME:
+ if (!record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_SONG(plover_song);
+ #endif
+ layer_on(_GAME);
+ }
+ return false;
+ break;
+ case EXT_GM:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_GAME);
+ }
+ return false;
+ break;
+ case LNUM:
+ if (record->event.pressed) {
+ layer_on(_LNUM);
+ } else {
+ layer_off(_LNUM);
+ }
+ return false;
+ break;
+ case LFUN:
+ if (record->event.pressed) {
+ layer_on(_LFUN);
+ } else {
+ layer_off(_LFUN);
+ }
+ return false;
+ break;
case MOUSE:
if (record->event.pressed) {
layer_on(_MOUSE);
diff --git a/keyboards/planck/keymaps/dcompact/readme.md b/keyboards/planck/keymaps/dcompact/readme.md
index cd88c3fed34b..f3f3d8ca6ead 100644
--- a/keyboards/planck/keymaps/dcompact/readme.md
+++ b/keyboards/planck/keymaps/dcompact/readme.md
@@ -1,6 +1,6 @@
# DCompact Layout
-**Dvorak, Layered, Mouse-Enabled, Compact -- now with Plover~**
+**Dvorak, Layered, Mouse-Enabled, Compact -- now with Game Mode~**
_See [the layout source](keymap.c) for the actual layout_
From 157319fbd03e6f7a6618111fd03ab3e53317893e Mon Sep 17 00:00:00 2001
From: KgOfHedgehogs
Date: Thu, 18 Jun 2020 04:17:30 +0200
Subject: [PATCH 36/36] [Keyboard] Jian keyboard (#8914)
Co-authored-by: Joel Challis
Co-authored-by: Drashna Jaelre
Co-authored-by: Ryan
Co-authored-by: Nick Brassel
---
keyboards/jian/config.h | 21 +
keyboards/jian/handwired/config.h | 41 ++
keyboards/jian/handwired/handwired.c | 8 +
keyboards/jian/handwired/handwired.h | 30 ++
keyboards/jian/handwired/rules.mk | 19 +
keyboards/jian/info.json | 67 +++
keyboards/jian/jian.c | 1 +
keyboards/jian/jian.h | 19 +
keyboards/jian/keymaps/advanced/config.h | 27 ++
keyboards/jian/keymaps/advanced/keymap.c | 584 +++++++++++++++++++++++
keyboards/jian/keymaps/advanced/rules.mk | 5 +
keyboards/jian/keymaps/default/config.h | 22 +
keyboards/jian/keymaps/default/keymap.c | 120 +++++
keyboards/jian/keymaps/default/rules.mk | 2 +
keyboards/jian/nsrev2/config.h | 129 +++++
keyboards/jian/nsrev2/nsrev2.c | 74 +++
keyboards/jian/nsrev2/nsrev2.h | 39 ++
keyboards/jian/nsrev2/rules.mk | 20 +
keyboards/jian/readme.md | 16 +
keyboards/jian/rev1/config.h | 138 ++++++
keyboards/jian/rev1/rev1.c | 74 +++
keyboards/jian/rev1/rev1.h | 56 +++
keyboards/jian/rev1/rules.mk | 20 +
keyboards/jian/rev2/config.h | 136 ++++++
keyboards/jian/rev2/rev2.c | 74 +++
keyboards/jian/rev2/rev2.h | 39 ++
keyboards/jian/rev2/rules.mk | 20 +
keyboards/jian/rules.mk | 1 +
28 files changed, 1802 insertions(+)
create mode 100644 keyboards/jian/config.h
create mode 100644 keyboards/jian/handwired/config.h
create mode 100644 keyboards/jian/handwired/handwired.c
create mode 100644 keyboards/jian/handwired/handwired.h
create mode 100644 keyboards/jian/handwired/rules.mk
create mode 100644 keyboards/jian/info.json
create mode 100644 keyboards/jian/jian.c
create mode 100644 keyboards/jian/jian.h
create mode 100644 keyboards/jian/keymaps/advanced/config.h
create mode 100644 keyboards/jian/keymaps/advanced/keymap.c
create mode 100644 keyboards/jian/keymaps/advanced/rules.mk
create mode 100644 keyboards/jian/keymaps/default/config.h
create mode 100644 keyboards/jian/keymaps/default/keymap.c
create mode 100644 keyboards/jian/keymaps/default/rules.mk
create mode 100644 keyboards/jian/nsrev2/config.h
create mode 100644 keyboards/jian/nsrev2/nsrev2.c
create mode 100644 keyboards/jian/nsrev2/nsrev2.h
create mode 100644 keyboards/jian/nsrev2/rules.mk
create mode 100644 keyboards/jian/readme.md
create mode 100644 keyboards/jian/rev1/config.h
create mode 100644 keyboards/jian/rev1/rev1.c
create mode 100644 keyboards/jian/rev1/rev1.h
create mode 100644 keyboards/jian/rev1/rules.mk
create mode 100644 keyboards/jian/rev2/config.h
create mode 100644 keyboards/jian/rev2/rev2.c
create mode 100644 keyboards/jian/rev2/rev2.h
create mode 100644 keyboards/jian/rev2/rules.mk
create mode 100644 keyboards/jian/rules.mk
diff --git a/keyboards/jian/config.h b/keyboards/jian/config.h
new file mode 100644
index 000000000000..cfb6bf4ffccd
--- /dev/null
+++ b/keyboards/jian/config.h
@@ -0,0 +1,21 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
diff --git a/keyboards/jian/handwired/config.h b/keyboards/jian/handwired/config.h
new file mode 100644
index 000000000000..5b69621bcdac
--- /dev/null
+++ b/keyboards/jian/handwired/config.h
@@ -0,0 +1,41 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xC0DE
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0010
+#define MANUFACTURER KgOfHedgehogs
+#define PRODUCT Huma
+#define DESCRIPTION An ergo handwired keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 14
+#define DIODE_DIRECTION COL2ROW
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D3, D2, B5, B6 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B4, E6, D7, C6, D4, D0, D1 }
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
diff --git a/keyboards/jian/handwired/handwired.c b/keyboards/jian/handwired/handwired.c
new file mode 100644
index 000000000000..bcb7ec710298
--- /dev/null
+++ b/keyboards/jian/handwired/handwired.c
@@ -0,0 +1,8 @@
+#include "handwired.h"
+
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{13, 1}, {12, 1}, {11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{13, 2}, {12, 2}, {11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{13, 3}, {12, 3}, {11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+};
diff --git a/keyboards/jian/handwired/handwired.h b/keyboards/jian/handwired/handwired.h
new file mode 100644
index 000000000000..9b388b94ae23
--- /dev/null
+++ b/keyboards/jian/handwired/handwired.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "jian.h"
+
+#define XXX KC_NO
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \
+ L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \
+ L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, \
+ L34, L35, L36, R36, R35, R34 \
+) \
+{ \
+ {L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00}, \
+ {XXX, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, XXX}, \
+ {XXX, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, XXX}, \
+ {XXX, XXX, XXX, XXX, L34, L35, L36, R36, R35, R34, XXX, XXX, XXX, XXX} \
+}
+
+#define LAYOUT_symmetric( \
+ K00, K01, K02, K03, K04, K05, K06, \
+ K11, K12, K13, K14, K15, K16, \
+ K21, K22, K23, K24, K25, K26, \
+ K34, K35, K36 \
+) \
+{ \
+ {K00, K01, K02, K03, K04, K05, K06, K06, K05, K04, K03, K02, K01, K00}, \
+ {XXX, K11, K12, K13, K14, K15, K16, K16, K15, K14, K13, K12, K11, XXX}, \
+ {XXX, K21, K22, K23, K24, K25, K26, K26, K25, K24, K23, K22, K21, XXX}, \
+ {XXX, XXX, XXX, XXX, K34, K35, K36, K36, K35, K34, XXX, XXX, XXX, XXX} \
+}
diff --git a/keyboards/jian/handwired/rules.mk b/keyboards/jian/handwired/rules.mk
new file mode 100644
index 000000000000..61f40dfcbe1a
--- /dev/null
+++ b/keyboards/jian/handwired/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+SPLIT_KEYBOARD = no
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/jian/info.json b/keyboards/jian/info.json
new file mode 100644
index 000000000000..4503fb3b477c
--- /dev/null
+++ b/keyboards/jian/info.json
@@ -0,0 +1,67 @@
+{
+ "keyboard_name": "jian",
+ "url": "t.me/s/kgofhedgehogs",
+ "maintainer": "KGOH",
+ "width": 17,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ { "label": "Super", "x": 0, "y": 1.5 },
+ { "label": "~", "x": 1, "y": 0.75 },
+ { "label": "Q", "x": 2, "y": 0.625 },
+ { "label": "W", "x": 3, "y": 0.25 },
+ { "label": "E", "x": 4, "y": 0 },
+ { "label": "R", "x": 5, "y": 0.25 },
+ { "label": "T", "x": 6, "y": 0.375 },
+
+ { "label": "Y", "x": 10, "y": 0.375 },
+ { "label": "U", "x": 11, "y": 0.25 },
+ { "label": "I", "x": 12, "y": 0 },
+ { "label": "O", "x": 13, "y": 0.25 },
+ { "label": "P", "x": 14, "y": 0.625 },
+ { "label": "{[", "x": 15, "y": 0.75 },
+ { "label": "}]", "x": 16, "y": 1.5 },
+
+
+ { "label": "Ctrl", "x": 1, "y": 1.75 },
+ { "label": "A", "x": 2, "y": 1.625 },
+ { "label": "S", "x": 3, "y": 1.25 },
+ { "label": "D", "x": 4, "y": 1 },
+ { "label": "F", "x": 5, "y": 1.25 },
+ { "label": "G", "x": 6, "y": 1.375 },
+
+ { "label": "H", "x": 10, "y": 1.375 },
+ { "label": "J", "x": 11, "y": 1.25 },
+ { "label": "K", "x": 12, "y": 1 },
+ { "label": "L", "x": 13, "y": 1.25 },
+ { "label": ":;", "x": 14, "y": 1.625 },
+ { "label": "\"'", "x": 15, "y": 1.75 },
+
+
+ { "label": "Alt", "x": 1, "y": 2.75 },
+ { "label": "Z", "x": 2, "y": 2.625 },
+ { "label": "X", "x": 3, "y": 2.25 },
+ { "label": "C", "x": 4, "y": 2 },
+ { "label": "V", "x": 5, "y": 2.25 },
+ { "label": "B", "x": 6, "y": 2.375 },
+
+ { "label": "N", "x": 10, "y": 2.375 },
+ { "label": "M", "x": 11, "y": 2.25 },
+ { "label": "<,", "x": 12, "y": 2 },
+ { "label": ">.", "x": 13, "y": 2.25 },
+ { "label": "?/", "x": 14, "y": 2.625 },
+ { "label": "|\\", "x": 15, "y": 2.75 },
+
+
+ { "label": "Tab", "x": 5, "y": 3.25 },
+ { "label": "Spc", "x": 6, "y": 3.375 },
+ { "label": "Enter", "x": 7, "y": 3.5 },
+
+ { "label": "Esc", "x": 9, "y": 3.5 },
+ { "label": "Bscp", "x": 10, "y": 3.375 },
+ { "label": "Del", "x": 11, "y": 3.25 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/jian/jian.c b/keyboards/jian/jian.c
new file mode 100644
index 000000000000..e85b8554f039
--- /dev/null
+++ b/keyboards/jian/jian.c
@@ -0,0 +1 @@
+#include "jian.h"
diff --git a/keyboards/jian/jian.h b/keyboards/jian/jian.h
new file mode 100644
index 000000000000..d09d056e9b50
--- /dev/null
+++ b/keyboards/jian/jian.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "quantum.h"
+
+#ifdef KEYBOARD_jian_handwired
+ #include "handwired.h"
+#endif
+
+#ifdef KEYBOARD_jian_rev1
+ #include "rev1.h"
+#endif
+
+#ifdef KEYBOARD_jian_rev2
+#include "rev2.h"
+#endif
+
+#ifdef KEYBOARD_jian_nsrev2
+ #include "nsrev2.h"
+#endif
diff --git a/keyboards/jian/keymaps/advanced/config.h b/keyboards/jian/keymaps/advanced/config.h
new file mode 100644
index 000000000000..85b41c86d8d5
--- /dev/null
+++ b/keyboards/jian/keymaps/advanced/config.h
@@ -0,0 +1,27 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+//#define AUTO_SHIFT_TIMEOUT 150
+//#define NO_AUTO_SHIFT_NUMERIC
+//#define AUTO_SHIFT_MODIFIERS
+#define IGNORE_MOD_TAP_INTERRUPT
+#define ALT_LAYOUTS_ENABLE
+//#define TRAINING_HALFES_LOCK
diff --git a/keyboards/jian/keymaps/advanced/keymap.c b/keyboards/jian/keymaps/advanced/keymap.c
new file mode 100644
index 000000000000..417678f7e6ac
--- /dev/null
+++ b/keyboards/jian/keymaps/advanced/keymap.c
@@ -0,0 +1,584 @@
+#include QMK_KEYBOARD_H
+
+typedef union {
+ uint32_t raw;
+ struct {
+ bool thumb_alt :1;
+ bool iso :1;
+ };
+} user_config_t;
+
+user_config_t user_config;
+
+#ifdef STENO_ENABLE
+#include "keymap_steno.h"
+#endif // STENO_ENABLE
+
+
+#define QWERTY_base KC_GRV, 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_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
+#define DVORAK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, \
+ KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
+ KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z
+#define COLEMAK_base KC_GRV, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, \
+ KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH
+#define WORKMAN_base KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, \
+ KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, \
+ KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH
+#ifdef ALT_LAYOUTS_ENABLE
+#include "keymap_dvorak.h"
+#include "keymap_colemak.h"
+#include "keymap_workman.h"
+#define DVK2QWE_base DV_GRV, DV_Q, DV_W, DV_E, DV_R, DV_T, DV_Y, DV_U, DV_I, DV_O, DV_P, DV_LBRC, DV_RBRC, \
+ DV_A, DV_S, DV_D, DV_F, DV_G, DV_H, DV_J, DV_K, DV_L, DV_SCLN, DV_QUOT, \
+ DV_Z, DV_X, DV_C, DV_V, DV_B, DV_N, DV_M, DV_COMM, DV_DOT, DV_SLSH
+#define CMK2QWE_base KC_GRV, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_LBRC, KC_RBRC, \
+ CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, \
+ CM_Z, CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, CM_SLSH
+#define WMN2QWE_base KC_GRV, WK_Q, WK_W, WK_E, WK_R, WK_T, WK_Y, WK_U, WK_I, WK_O, WK_P, KC_LBRC, KC_RBRC, \
+ WK_A, WK_S, WK_D, WK_F, WK_G, WK_H, WK_J, WK_K, WK_L, WK_SCLN, KC_QUOT, \
+ WK_Z, WK_X, WK_C, WK_V, WK_B, WK_N, WK_M, KC_COMM, KC_DOT, KC_SLSH
+#define CMK2DVK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,CM_P, CM_Y, CM_F, CM_G, CM_C, CM_R, CM_L, KC_LBRC, KC_RBRC, \
+ CM_A, CM_O, CM_E, CM_U, CM_I, CM_D, CM_H, CM_T, CM_N, CM_S, CM_SLSH, \
+ CM_SCLN, CM_Q, CM_J, CM_K, CM_X, CM_B, CM_M, CM_W, CM_V, CM_Z
+#define WMN2DVK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,WK_P, WK_Y, WK_F, WK_G, WK_C, WK_R, WK_L, KC_LBRC, KC_RBRC, \
+ WK_A, WK_O, WK_E, WK_U, WK_I, WK_D, WK_H, WK_T, WK_N, WK_S, KC_SLSH, \
+ WK_SCLN, WK_Q, WK_J, WK_K, WK_X, WK_B, WK_M, WK_W, WK_V, WK_Z
+#define DVK2CMK_base DV_GRV, DV_Q, DV_W, DV_F, DV_P, DV_G, DV_J, DV_L, DV_U, DV_Y, DV_SCLN, DV_LBRC, DV_RBRC, \
+ DV_A, DV_R, DV_S, DV_T, DV_D, DV_H, DV_N, DV_E, DV_I, DV_O, DV_QUOT, \
+ DV_Z, DV_X, DV_C, DV_V, DV_B, DV_K, DV_M, DV_COMM, DV_DOT, DV_SLSH
+#define WMN2CMK_base KC_GRV, WK_Q, WK_W, WK_F, WK_P, WK_G, WK_J, WK_L, WK_U, WK_Y, WK_SCLN, KC_LBRC, KC_RBRC, \
+ WK_A, WK_R, WK_S, WK_T, WK_D, WK_H, WK_N, WK_E, WK_I, WK_O, KC_QUOT, \
+ WK_Z, WK_X, WK_C, WK_V, WK_B, WK_K, WK_M, KC_COMM, KC_DOT, KC_SLSH
+#define DVK2WMN_base DV_GRV, DV_Q, DV_D, DV_R, DV_W, DV_B, DV_J, DV_F, DV_U, DV_P, DV_SCLN, DV_LBRC, DV_RBRC, \
+ DV_A, DV_S, DV_H, DV_T, DV_G, DV_Y, DV_N, DV_E, DV_O, DV_I, DV_QUOT, \
+ DV_Z, DV_X, DV_M, DV_C, DV_V, DV_K, DV_L, DV_COMM, DV_DOT, DV_SLSH
+#define CMK2WMN_base KC_GRV, CM_Q, CM_D, CM_R, CM_W, CM_B, CM_J, CM_F, CM_U, CM_P, CM_SCLN, KC_LBRC, KC_RBRC, \
+ CM_A, CM_S, CM_H, CM_T, CM_G, CM_Y, CM_N, CM_E, CM_O, CM_I, KC_QUOT, \
+ CM_Z, CM_X, CM_M, CM_C, CM_V, CM_K, CM_L, CM_COMM, CM_DOT, CM_SLSH
+#endif // ALT_LAYOUTS_ENABLE
+
+enum jian_layers {
+ _QWERTY,
+#ifdef ALT_LAYOUTS_ENABLE
+ _DVORAK,
+ _COLEMAK,
+ _WORKMAN,
+ _DVK2QWE,
+ _DVK2CMK,
+ _DVK2WMN,
+ _CMK2QWE,
+ _CMK2DVK,
+ _CMK2WMN,
+ _WMN2QWE,
+ _WMN2DVK,
+ _WMN2CMK,
+#endif // ALT_LAYOUTS_ENABLE
+ _ISO,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _BCKLT_ADJ,
+ _THUMB_ALT,
+#ifdef TRAINING_HALFES_LOCK
+ _LEFT,
+ _RIGHT,
+#endif //TRAINING_HALFES_LOCK
+#ifdef DIPS_ENABLE
+ _DIPS,
+#endif // DIPS_ENABLE
+#ifdef STENO_ENABLE
+ _PLOVER
+#endif // STENO_ENABLE
+};
+
+enum jian_keycodes {
+ QWERTY = SAFE_RANGE,
+ PLOVER,
+ EXT_PLV,
+ EXT_RGB,
+ ISO,
+ THUMB_ALT,
+//ifdef ALT_LAYOUTS_ENABLE
+ CH_WMN,
+ CH_CMK,
+ CH_QWE,
+ CH_DVK,
+//endif // ALT_LAYOUTS_ENABLE
+#ifdef DIPS_ENABLE
+ LAYOUT0,
+ LAYOUT1,
+ LAYOUT2,
+ LAYOUT3,
+ DIP_ISO,
+ FLIP_TH,
+ DIP6,
+ DIP7,
+ DIP8,
+ DIP9,
+ DIP10,
+ DIP11,
+#endif // DIPS_ENABLE
+};
+
+#ifdef TRAINING_HALFES_LOCK
+static uint8_t lock_timeout = 1;
+static uint8_t lock_cooldown = 0;
+#endif //TRAINING_HALFES_LOCK
+#ifdef DIPS_ENABLE
+#ifdef ALT_LAYOUTS_ENABLE
+static uint8_t layout_conversion_dip_state = 0;
+#endif // ALT_LAYOUTS_ENABLE
+#endif // DIPS_ENABLE
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+#define BL_ADJ TG(_BCKLT_ADJ)
+#define TG_LWR TG(_LOWER)
+#define TG_RSE TG(_RAISE)
+
+#define RBR_RGU MT(MOD_RGUI, KC_RBRC)
+#define F12_RGU MT(MOD_RGUI, KC_F12)
+#define EQL_LCT MT(MOD_LCTL, KC_EQL)
+#define APP_LCT MT(MOD_LCTL, KC_APP)
+#define EQL_RCT MT(MOD_RCTL, KC_EQL)
+#define QUO_RCT MT(MOD_RCTL, KC_QUOT)
+#define APP_RCT MT(MOD_RCTL, KC_APP)
+#define MIN_RCT MT(MOD_RCTL, KC_MINS)
+#define PLS_LAL MT(MOD_LALT, KC_PPLS)
+#define BSL_RAL MT(MOD_RALT, KC_BSLS)
+
+#define NBS_LCT MT(MOD_LCTL, KC_NUBS)
+#define BSH_LAL MT(MOD_LALT, KC_BSLS)
+#define APP_RAL MT(MOD_RALT, KC_APP)
+
+#define BSP_LSH MT(MOD_LSFT, KC_BSPC)
+#define BSP_RSH MT(MOD_RSFT, KC_BSPC)
+#define SPC_LSH MT(MOD_LSFT, KC_SPC)
+#define SPC_RSH MT(MOD_RSFT, KC_SPC)
+#define DEL_RSE LT(_RAISE, KC_DEL)
+#define TAB_RSE LT(_RAISE, KC_TAB)
+#define ENT_LWR LT(_LOWER, KC_ENT)
+#define ESC_LWR LT(_LOWER, KC_ESC)
+
+#define RGU_RBR RGUI_T(KC_RBRC)
+#define RCT_QUO RCTL_T(KC_QUOT)
+
+#define LAYOUT_base( \
+ GRV, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, \
+ A, S, D, F, G, H, J, K, L, SCLN, QUOT, \
+ Z, X, C, V, B, N, M, COMM, DOT, SLSH \
+ ) \
+ LAYOUT( \
+ KC_LGUI, GRV, Q, W, E, R, T, Y, U, I, O, P, LBRC, RGU_RBR, \
+ KC_LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCT_QUO, \
+ KC_LALT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, BSL_RAL, \
+ TAB_RSE, SPC_LSH, ENT_LWR, ESC_LWR, BSP_RSH, DEL_RSE \
+ )
+#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)
+
+#ifdef SWAP_HANDS_ENABLE
+#define SW_TG SH_TG
+#else
+#define SW_TG _______
+#endif
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = LAYOUT_base_wrapper(QWERTY_base),
+
+#ifdef DIPS_ENABLE
+[_DIPS] = LAYOUT_DIPS(\
+ LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH, \
+ LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH \
+),
+#endif // DIPS_ENABLE
+
+[_LOWER] = LAYOUT(
+ _______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, F12_RGU,
+ EQL_LCT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, MIN_RCT,
+ PLS_LAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, _______, _______, _______, _______, _______
+),
+
+[_RAISE] = LAYOUT(
+ _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SLCK, KC_CAPS, _______,
+ EQL_LCT, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, APP_RCT,
+ _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______
+),
+
+[_ADJUST] = LAYOUT_symmetric(
+ RESET, DEBUG, KC_ASUP, CH_WMN, CH_CMK, CH_QWE, CH_DVK,
+ KC_ASRP, KC_ASTG, XXXXXXX, XXXXXXX, QWERTY, PLOVER,
+ BL_ADJ, KC_ASDN, XXXXXXX, XXXXXXX, ISO, THUMB_ALT,
+ _______, SW_TG, _______
+),
+#if defined(RGBLIGHT) | defined(BACKLIGHT_ENABLE)
+[_BCKLT_ADJ] = LAYOUT_symmetric(
+ XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, RGB_VAI, RGB_HUD, RGB_HUI,
+ XXXXXXX, XXXXXXX, BL_DEC, RGB_VAD, RGB_SAD, RGB_SAI,
+ BL_ADJ, BL_BRTG, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD,
+ _______, _______, _______
+),
+#endif // defined(RGBLIGHT) | defined(BACKLIGHT_ENABLE)
+#ifdef TRAINING_HALFES_LOCK
+[_LEFT] = LAYOUT_base(
+ _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+[_RIGHT] = LAYOUT_base(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______
+),
+#endif // TRAINING_HALFES_LOCK
+
+#ifdef STENO_ENABLE
+[_PLOVER] = LAYOUT(
+ EXT_PLV, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, EXT_PLV,
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+ XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ XXXXXXX, STN_A, STN_O, STN_E, STN_U, XXXXXXX
+),
+#endif // STENO_ENABLE
+
+[_THUMB_ALT] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ DEL_RSE, BSP_LSH, ESC_LWR, ENT_LWR, SPC_RSH, TAB_RSE
+),
+
+[_ISO] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ LCTL_T(KC_NUBS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ LALT_T(KC_NUHS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT,
+ _______, _______, _______, _______, _______, _______
+),
+
+#ifdef ALT_LAYOUTS_ENABLE
+[_DVORAK] = LAYOUT_base_wrapper(DVORAK_base),
+[_COLEMAK] = LAYOUT_base_wrapper(COLEMAK_base),
+[_WORKMAN] = LAYOUT_base_wrapper(WORKMAN_base),
+[_DVK2QWE] = LAYOUT_base_wrapper(DVK2QWE_base),
+[_CMK2QWE] = LAYOUT_base_wrapper(CMK2QWE_base),
+[_WMN2QWE] = LAYOUT_base_wrapper(WMN2QWE_base),
+[_CMK2DVK] = LAYOUT_base_wrapper(CMK2DVK_base),
+[_WMN2DVK] = LAYOUT_base_wrapper(WMN2DVK_base),
+[_DVK2CMK] = LAYOUT_base_wrapper(DVK2CMK_base),
+[_WMN2CMK] = LAYOUT_base_wrapper(WMN2CMK_base),
+[_DVK2WMN] = LAYOUT_base_wrapper(DVK2WMN_base),
+[_CMK2WMN] = LAYOUT_base_wrapper(CMK2WMN_base)
+#endif // ALT_LAYOUTS_ENABLE
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+#ifdef DIPS_ENABLE
+#ifdef ALT_LAYOUTS_ENABLE
+void layout_convert(uint8_t statuses) {
+ switch (0b1111 & statuses) {
+ case 0b0000:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b0001:
+ set_single_persistent_default_layer(_DVORAK);
+ break;
+ case 0b0010:
+ set_single_persistent_default_layer(_COLEMAK);
+ break;
+ case 0b0011:
+ set_single_persistent_default_layer(_WORKMAN);
+ break;
+ case 0b0100:
+ set_single_persistent_default_layer(_DVK2QWE);
+ break;
+ case 0b0101:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b0110:
+ set_single_persistent_default_layer(_DVK2CMK);
+ break;
+ case 0b0111:
+ set_single_persistent_default_layer(_DVK2WMN);
+ break;
+ case 0b1000:
+ set_single_persistent_default_layer(_CMK2QWE);
+ break;
+ case 0b1001:
+ set_single_persistent_default_layer(_CMK2DVK);
+ break;
+ case 0b1010:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b1011:
+ set_single_persistent_default_layer(_CMK2WMN);
+ break;
+ case 0b1100:
+ set_single_persistent_default_layer(_WMN2QWE);
+ break;
+ case 0b1101:
+ set_single_persistent_default_layer(_WMN2DVK);
+ break;
+ case 0b1110:
+ set_single_persistent_default_layer(_WMN2CMK);
+ break;
+ case 0b1111:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ }
+}
+#endif // ALT_LAYOUTS_ENABLE
+#endif // DIPS_ENABLE
+
+void matrix_init_user(void) {
+#ifdef DIPS_ENABLE
+ layer_on(_DIPS);
+#endif // DIPS_ENABLE
+}
+
+void keyboard_post_init_user(void) {
+ user_config.raw = eeconfig_read_user();
+ if (user_config.thumb_alt) {
+ layer_on(_THUMB_ALT);
+ } else {
+ layer_off(_THUMB_ALT);
+ }
+ if (user_config.iso) {
+ layer_on(_ISO);
+ } else {
+ layer_off(_ISO);
+ }
+}
+
+#ifdef ALT_LAYOUTS_ENABLE
+static char change_layout_input = 0;
+static bool change_layout_keystroke = 0;
+void change_layout_conversion(uint16_t keycode) {
+ switch (keycode) {
+ case CH_WMN:
+ change_layout_input |= 0b1000 << (change_layout_keystroke << 2);
+ break;
+ case CH_CMK:
+ change_layout_input |= 0b0100 << (change_layout_keystroke << 2);
+ break;
+ case CH_DVK:
+ change_layout_input |= 0b0010 << (change_layout_keystroke << 2);
+ break;
+ case CH_QWE:
+ change_layout_input |= 0b0001 << (change_layout_keystroke << 2);
+ break;
+ }
+ if (change_layout_keystroke == 1) {
+ switch (change_layout_input) {
+ case 0b00010001:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b00100001:
+ set_single_persistent_default_layer(_DVORAK);
+ break;
+ case 0b01000001:
+ set_single_persistent_default_layer(_COLEMAK);
+ break;
+ case 0b10000001:
+ set_single_persistent_default_layer(_WORKMAN);
+ break;
+ case 0b00010010:
+ set_single_persistent_default_layer(_DVK2QWE);
+ break;
+ case 0b00100010:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b01000010:
+ set_single_persistent_default_layer(_DVK2CMK);
+ break;
+ case 0b10000010:
+ set_single_persistent_default_layer(_DVK2WMN);
+ break;
+ case 0b00010100:
+ set_single_persistent_default_layer(_CMK2QWE);
+ break;
+ case 0b00100100:
+ set_single_persistent_default_layer(_CMK2DVK);
+ break;
+ case 0b01000100:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ case 0b10000100:
+ set_single_persistent_default_layer(_CMK2WMN);
+ break;
+ case 0b00011000:
+ set_single_persistent_default_layer(_WMN2QWE);
+ break;
+ case 0b00101000:
+ set_single_persistent_default_layer(_WMN2DVK);
+ break;
+ case 0b01001000:
+ set_single_persistent_default_layer(_WMN2CMK);
+ break;
+ case 0b10001000:
+ set_single_persistent_default_layer(_QWERTY);
+ break;
+ }
+ change_layout_input = 0;
+ }
+ change_layout_keystroke ^= 1;
+}
+#endif // ALT_LAYOUTS_ENABLE
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+#ifdef TRAINING_HALFES_LOCK
+ if (!record->event.pressed) {
+ lock_cooldown = --lock_cooldown < 0 ? 0 : lock_cooldown;
+ }
+ if (lock_cooldown == 0) {
+ layer_off(_LEFT);
+ layer_off(_RIGHT);
+ }
+#endif // TRAINING_HALFES_LOCK
+ switch (keycode) {
+#ifdef TRAINING_HALFES_LOCK
+ case SPC_RSH:
+ case BSP_RSH:
+ case DEL_RSE:
+ case ESC_LWR:
+ case BSL_RAL:
+ case RGU_RBR:
+ case RCT_QUO:
+ if (record->event.pressed) {
+ layer_on(_LEFT);
+ lock_cooldown = lock_timeout;
+ }
+ else {
+ lock_cooldown = 0;
+ layer_off(_LEFT);
+ }
+ break;
+ case BSP_LSH:
+ case SPC_LSH:
+ case TAB_RSE:
+ case ENT_LWR:
+ case KC_LCTL:
+ case KC_LGUI:
+ case KC_LALT:
+ if (record->event.pressed) {
+ layer_on(_RIGHT);
+ lock_cooldown = lock_timeout;
+ }
+ else {
+ lock_cooldown = 0;
+ layer_off(_RIGHT);
+ }
+ break;
+#endif // TRAINING_HALFES_LOCK
+#ifdef STENO_ENABLE
+ case PLOVER:
+ if (!record->event.pressed) {
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ return false;
+ case EXT_PLV:
+ if (record->event.pressed) {
+ layer_off(_PLOVER);
+ }
+ return false;
+#endif // STENO_ENABLE
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+#ifdef ALT_LAYOUTS_ENABLE
+ case CH_WMN:
+ case CH_CMK:
+ case CH_QWE:
+ case CH_DVK:
+ if (record->event.pressed) {
+ change_layout_conversion(keycode);
+ }
+ return false;
+#endif // ALT_LAYOUTS_ENABLE
+#ifdef DIPS_ENABLE
+#ifdef ALT_LAYOUTS_ENABLE
+ case LAYOUT0:
+ if (record->event.pressed) {
+ layout_conversion_dip_state |= 1 << 0;
+ } else {
+ layout_conversion_dip_state &= ~(1 << 0);
+ }
+ layout_convert(layout_conversion_dip_state);
+ return false;
+ case LAYOUT1:
+ if (record->event.pressed) {
+ layout_conversion_dip_state |= 1 << 1;
+ } else {
+ layout_conversion_dip_state &= ~(1 << 1);
+ }
+ layout_convert(layout_conversion_dip_state);
+ return false;
+ case LAYOUT2:
+ if (record->event.pressed) {
+ layout_conversion_dip_state |= 1 << 2;
+ } else {
+ layout_conversion_dip_state &= ~(1 << 2);
+ }
+ layout_convert(layout_conversion_dip_state);
+ return false;
+ case LAYOUT3:
+ if (record->event.pressed) {
+ layout_conversion_dip_state |= 1 << 3;
+ } else {
+ layout_conversion_dip_state &= ~(1 << 3);
+ }
+ layout_convert(layout_conversion_dip_state);
+ return false;
+#endif // ALT_LAYOUTS_ENABLE
+ case DIP_ISO:
+ if (record->event.pressed) {
+ layer_on(_ISO);
+ } else {
+ layer_off(_ISO);
+ }
+ return false;
+ case FLIP_TH:
+ if (record->event.pressed) {
+ layer_on(_THUMB_ALT);
+ } else {
+ layer_off(_THUMB_ALT);
+ }
+ return false;
+#endif // DIPS_ENABLE
+ case THUMB_ALT:
+ if (record->event.pressed) {
+ layer_invert(_THUMB_ALT);
+ user_config.thumb_alt ^= 1;
+ eeconfig_update_user(user_config.raw);
+ }
+ return false;
+ case ISO:
+ if (record->event.pressed) {
+ layer_invert(_ISO);
+ user_config.iso ^= 1;
+ eeconfig_update_user(user_config.raw);
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/jian/keymaps/advanced/rules.mk b/keyboards/jian/keymaps/advanced/rules.mk
new file mode 100644
index 000000000000..2a61a263930d
--- /dev/null
+++ b/keyboards/jian/keymaps/advanced/rules.mk
@@ -0,0 +1,5 @@
+SWAP_HANDS_ENABLE = yes
+STENO_ENABLE = no
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes # Audio control and System control
+
diff --git a/keyboards/jian/keymaps/default/config.h b/keyboards/jian/keymaps/default/config.h
new file mode 100644
index 000000000000..4d9cb17cac58
--- /dev/null
+++ b/keyboards/jian/keymaps/default/config.h
@@ -0,0 +1,22 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/jian/keymaps/default/keymap.c b/keyboards/jian/keymaps/default/keymap.c
new file mode 100644
index 000000000000..7f4391f7d2eb
--- /dev/null
+++ b/keyboards/jian/keymaps/default/keymap.c
@@ -0,0 +1,120 @@
+#include QMK_KEYBOARD_H
+
+enum jian_layers {
+ _QWERTY,
+ _DVORAK,
+ _COLEMAK,
+ _WORKMAN,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _BCKLT_ADJ
+};
+
+enum jian_keycodes {
+ QWERTY = SAFE_RANGE,
+ DVORAK,
+ COLEMAK,
+ WORKMAN
+};
+
+#define RAISE_T(kc) LT(_RAISE, kc)
+#define LOWER_T(kc) LT(_LOWER, kc)
+
+#ifdef SWAP_HANDS_ENABLE
+#define SW_TG SH_TG
+#else
+#define SW_TG _______
+#endif
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = LAYOUT(
+ KC_LGUI, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, RGUI_T(KC_RBRC),
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT),
+ KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS),
+ RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL)
+),
+
+[_DVORAK] = LAYOUT(
+ KC_LGUI, KC_GRV, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, RGUI_T(KC_RBRC),
+ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, RCTL_T(KC_SLSH),
+ KC_LALT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RALT_T(KC_BSLS),
+ RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL)
+),
+
+[_COLEMAK] = LAYOUT(
+ KC_LGUI, KC_GRV, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, RGUI_T(KC_RBRC),
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, RCTL_T(KC_QUOT),
+ KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS),
+ RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL)
+),
+
+[_WORKMAN] = LAYOUT(
+ KC_LGUI, KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, RGUI_T(KC_RBRC),
+ KC_LCTL, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, RCTL_T(KC_QUOT),
+ KC_LALT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS),
+ RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL)
+),
+
+[_LOWER] = LAYOUT(
+ _______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, RGUI_T(KC_F12),
+ LCTL_T(KC_EQL), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RCTL_T(KC_MINS),
+ LALT_T(KC_PPLS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, _______, _______, _______, _______, _______
+),
+
+[_RAISE] = LAYOUT(
+ _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SLCK, KC_CAPS, _______,
+ LCTL_T(KC_EQL), KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, RCTL_T(KC_APP),
+ _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______
+),
+
+[_ADJUST] = LAYOUT_symmetric(
+ RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, WORKMAN, COLEMAK, DVORAK, QWERTY, XXXXXXX,
+ TG(_BCKLT_ADJ), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, SW_TG, _______
+),
+
+#if defined(RGBLIGHT) || defined(BACKLIGHT_ENABLE)
+[_BCKLT_ADJ] = LAYOUT_symmetric(
+ XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, RGB_VAI, RGB_HUD, RGB_HUI,
+ XXXXXXX, XXXXXXX, BL_DEC, RGB_VAD, RGB_SAD, RGB_SAI,
+ TG(_BCKLT_ADJ), BL_BRTG, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD,
+ _______, _______, _______
+)
+#endif // defined(RGBLIGHT) || defined(BACKLIGHT_ENABLE)
+
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ case WORKMAN:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_WORKMAN);
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/jian/keymaps/default/rules.mk b/keyboards/jian/keymaps/default/rules.mk
new file mode 100644
index 000000000000..092b119d39b8
--- /dev/null
+++ b/keyboards/jian/keymaps/default/rules.mk
@@ -0,0 +1,2 @@
+SWAP_HANDS_ENABLE = yes
+EXTRAKEY_ENABLE = yes # Audio control and System control
diff --git a/keyboards/jian/nsrev2/config.h b/keyboards/jian/nsrev2/config.h
new file mode 100644
index 000000000000..9277aa19afb5
--- /dev/null
+++ b/keyboards/jian/nsrev2/config.h
@@ -0,0 +1,129 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xC0DE
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0210
+#define MANUFACTURER KgOfHedgehogs
+#define PRODUCT Huma
+#define DESCRIPTION An ergo keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+#define DIODE_DIRECTION COL2ROW
+
+
+// wiring of each half
+#define MATRIX_ROW_PINS { F4, F5, B1, B3, D1, D0, D7, E6 }
+#define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 }
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#define PHYSICAL_LEDS_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+#define BACKLIGHT_PIN C6
+#define BACKLIGHT_LEVELS 5
+#define BACKLIGHT_BREATHING //not working with splits right now
+#define BREATHING_PERIOD 6
+#endif
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D4
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 7 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS //not working with splits right now
+
+#define RGBLIGHT_SLEEP
+#define RGBLIGHT_SPLIT
+
+#ifndef IOS_DEVICE_ENABLE
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 255
+#else
+#define RGBLIGHT_LIMIT_VAL 130
+#endif
+#define RGBLIGHT_VAL_STEP 8
+#else
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 90
+#else
+#define RGBLIGHT_LIMIT_VAL 45
+#endif
+#define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+#define USB_MAX_POWER_CONSUMPTION 400
+#else
+// iOS device need lessthan 100
+#define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
+#define NUM_LOCK_LED_PIN B6
+#define CAPS_LOCK_LED_PIN B5
+// #define SCROLL_LOCK_LED_PIN B6
+
+// #define NUM_NMOSFET //uncomment this if you using n-mosfet
+// #define CAPS_NMOSFET //uncomment this if you using n-mosfet
+// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet
+
+// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
+// This will make it light up only when lock is off
+// (Doesn't work on mac. There is no num lock, so it will be always off and lit)
+
+#ifdef NUM_NMOSFET
+#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#endif // NUM_INVERT
+#else
+#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#endif // NUM_INVERT
+#endif // NUM_NMOSFET
+
+#ifdef CAPS_NMOSFET
+#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
+#else
+#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
+#endif // CAPS_NMOSFET
+
+#ifdef SCROLL_NMOSFET
+#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
+#else
+#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
+#endif // SCROLL_NMOSFET
diff --git a/keyboards/jian/nsrev2/nsrev2.c b/keyboards/jian/nsrev2/nsrev2.c
new file mode 100644
index 000000000000..a7508ad9b246
--- /dev/null
+++ b/keyboards/jian/nsrev2/nsrev2.c
@@ -0,0 +1,74 @@
+#include "nsrev2.h"
+
+// TODO:
+#ifdef SWAP_HANDS_ENABLE
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
+};
+#endif
+
+static bool backlight_was_toggled = false;
+
+void suspend_power_down_kb(void) {
+ if (is_backlight_enabled()) {
+ backlight_disable();
+ backlight_was_toggled = true;
+ }
+}
+
+void suspend_wakeup_init_kb(void) {
+ if (backlight_was_toggled) {
+ backlight_enable();
+ backlight_was_toggled = false;
+ }
+}
+
+#ifdef PHYSICAL_LEDS_ENABLE
+void led_init_kb(void)
+{
+#ifdef NUM_LOCK_LED_PIN
+ setPinOutput(NUM_LOCK_LED_PIN);
+ RESET_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ setPinOutput(CAPS_LOCK_LED_PIN);
+ RESET_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ setPinOutput(SCROLL_LOCK_LED_PIN);
+ RESET_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+}
+#endif // PHYSICAL_LEDS_ENABLE
+
+void matrix_init_kb(void) {
+#ifdef PHYSICAL_LEDS_ENABLE
+ led_init_kb();
+#endif // PHYSICAL_LEDS_ENABLE
+ matrix_init_user();
+};
+
+#ifdef PHYSICAL_LEDS_ENABLE
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+#ifdef NUM_LOCK_LED_PIN
+ UPDATE_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ UPDATE_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ UPDATE_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+ }
+ return res;
+}
+#endif // PHYSICAL_LEDS_ENABLE
diff --git a/keyboards/jian/nsrev2/nsrev2.h b/keyboards/jian/nsrev2/nsrev2.h
new file mode 100644
index 000000000000..9dfb7240b137
--- /dev/null
+++ b/keyboards/jian/nsrev2/nsrev2.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "jian.h"
+
+#define XXX KC_NO
+
+#define LAYOUT( \
+ L20, L00, L01, L12, L02, L03, L04, R04, R03, R02, R12, R01, R00, R20, \
+ L10, L11, L22, L13, L14, L05, R05, R14, R13, R22, R11, R10, \
+ L21, L32, L33, L23, L24, L15, R15, R24, R23, R33, R32, R21, \
+ L34, L25, L35, R35, R25, R34 \
+) \
+{ \
+ {L00, L01, L02, L03, L04, L05 }, \
+ {L10, L11, L12, L13, L14, L15 }, \
+ {L20, L21, L22, L23, L24, L25 }, \
+ {XXX, XXX, L32, L33, L34, L35 }, \
+ {R00, R01, R02, R03, R04, R05 }, \
+ {R10, R11, R12, R13, R14, R15 }, \
+ {R20, R21, R22, R23, R24, R25 }, \
+ {XXX, XXX, R32, R33, R34, R35 } \
+}
+
+#define LAYOUT_symmetric( \
+ K20, K00, K01, K12, K02, K03, K04, \
+ K10, K11, K22, K13, K14, K05, \
+ K21, K32, K33, K23, K24, K15, \
+ K34, K25, K35 \
+) \
+{ \
+ {K00, K01, K02, K03, K04, K05 }, \
+ {K10, K11, K12, K13, K14, K15 }, \
+ {K20, K21, K22, K23, K24, K25 }, \
+ {XXX, XXX, K32, K33, K34, K35 }, \
+ {K00, K01, K02, K03, K04, K05 }, \
+ {K10, K11, K12, K13, K14, K15 }, \
+ {K20, K21, K22, K23, K24, K25 }, \
+ {XXX, XXX, K32, K33, K34, K35 } \
+}
diff --git a/keyboards/jian/nsrev2/rules.mk b/keyboards/jian/nsrev2/rules.mk
new file mode 100644
index 000000000000..3942e629a157
--- /dev/null
+++ b/keyboards/jian/nsrev2/rules.mk
@@ -0,0 +1,20 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = qmk-dfu
+
+# Build Options
+# change yes to no to disable
+#
+CONSOLE_ENABLE = no
+SPLIT_KEYBOARD = no
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/jian/readme.md b/keyboards/jian/readme.md
new file mode 100644
index 000000000000..7afff2ab70ee
--- /dev/null
+++ b/keyboards/jian/readme.md
@@ -0,0 +1,16 @@
+# Jian
+
+
+
+A 40% ergonomic keyboard kit. Jian supports cherry mx, alps, kailh choc switches PCB and plate mounted. You can assembly keyboard without mounting plate. Jian also supports rgb led strip like ws2812b and 1 color in-switch backlight. Each half can work standalone.
+
+* Keyboard Maintainer: [KGOH](https://github.com/KGOH)
+* Hardware Supported: Jian PCB rev1, rev2, Pro Micro
+* Layout: [keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/4b6c2af67148f58ddd6c6b2976c4370f)
+* Hardware Availability: [Telegram channel](https://t.me/KgOfHedgehogs)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make jian/rev2: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).
diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h
new file mode 100644
index 000000000000..799a71fc07bc
--- /dev/null
+++ b/keyboards/jian/rev1/config.h
@@ -0,0 +1,138 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xC0DE
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0100
+#define MANUFACTURER KgOfHedgehogs
+#define PRODUCT Jian
+#define DESCRIPTION An ergo split keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 7
+#define DIODE_DIRECTION COL2ROW
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D3, D2, E6, B4 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
+
+/* Use I2C or Serial, not both */
+// #define USE_SERIAL
+#define USE_I2C
+
+/* Select hand configuration */
+// #define MASTER_LEFT
+// #define MASTER_RIGHT
+#define EE_HANDS
+
+// different Jian configs
+#define DIPS_ENABLE
+#define PHYSICAL_LEDS_ENABLE
+#define NUM_LOCK_LED_PIN C6
+#define CAPS_LOCK_LED_PIN D7
+#define SCROLL_LOCK_LED_PIN B5
+
+// #define NUM_NMOSFET //uncomment this if you using n-mosfet
+// #define CAPS_NMOSFET //uncomment this if you using n-mosfet
+// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet
+
+// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
+// This will make it light up only when lock is off
+// (Doesn't work on mac. There is no num lock, so it will be always off and lit)
+
+#ifdef NUM_NMOSFET
+#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#endif // NUM_INVERT
+#else
+#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#endif // NUM_INVERT
+#endif // NUM_NMOSFET
+
+#ifdef CAPS_NMOSFET
+#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
+#else
+#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
+#endif // CAPS_NMOSFET
+
+#ifdef SCROLL_NMOSFET
+#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
+#else
+#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
+#endif // SCROLL_NMOSFET
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#ifdef BACKLIGHT_ENABLE
+#define BACKLIGHT_PIN B6
+#define BACKLIGHT_LEVELS 5
+//#define BACKLIGHT_BREATHING //not working with splits right now
+#define BREATHING_PERIOD 6
+#endif
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D4
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 7 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS //not working with splits right now
+
+#define RGBLIGHT_SLEEP
+#define RGBLIGHT_SPLIT
+
+#ifndef IOS_DEVICE_ENABLE
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 255
+#else
+#define RGBLIGHT_LIMIT_VAL 130
+#endif
+#define RGBLIGHT_VAL_STEP 8
+#else
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 90
+#else
+#define RGBLIGHT_LIMIT_VAL 45
+#endif
+#define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+#define USB_MAX_POWER_CONSUMPTION 400
+#else
+// iOS device need lessthan 100
+#define USB_MAX_POWER_CONSUMPTION 100
+#endif
diff --git a/keyboards/jian/rev1/rev1.c b/keyboards/jian/rev1/rev1.c
new file mode 100644
index 000000000000..f1cfe99180ea
--- /dev/null
+++ b/keyboards/jian/rev1/rev1.c
@@ -0,0 +1,74 @@
+#include "rev1.h"
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}},
+};
+#endif
+
+static bool backlight_was_toggled = false;
+
+void suspend_power_down_kb(void) {
+ if (is_backlight_enabled()) {
+ backlight_disable();
+ backlight_was_toggled = true;
+ }
+}
+
+void suspend_wakeup_init_kb(void) {
+ if (backlight_was_toggled) {
+ backlight_enable();
+ backlight_was_toggled = false;
+ }
+}
+
+#ifdef PHYSICAL_LEDS_ENABLE
+void led_init_kb(void)
+{
+#ifdef NUM_LOCK_LED_PIN
+ setPinOutput(NUM_LOCK_LED_PIN);
+ RESET_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ setPinOutput(CAPS_LOCK_LED_PIN);
+ RESET_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ setPinOutput(SCROLL_LOCK_LED_PIN);
+ RESET_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+}
+#endif // PHYSICAL_LEDS_ENABLE
+
+void matrix_init_kb(void) {
+#ifdef PHYSICAL_LEDS_ENABLE
+ led_init_kb();
+#endif // PHYSICAL_LEDS_ENABLE
+ matrix_init_user();
+};
+
+#ifdef PHYSICAL_LEDS_ENABLE
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+#ifdef NUM_LOCK_LED_PIN
+ UPDATE_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ UPDATE_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ UPDATE_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+ }
+ return res;
+}
+#endif // PHYSICAL_LEDS_ENABLE
diff --git a/keyboards/jian/rev1/rev1.h b/keyboards/jian/rev1/rev1.h
new file mode 100644
index 000000000000..ee55de628761
--- /dev/null
+++ b/keyboards/jian/rev1/rev1.h
@@ -0,0 +1,56 @@
+#pragma once
+
+#include "jian.h"
+
+#define XXX KC_NO
+
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \
+ L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \
+ L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, \
+ L34, L35, L36, R36, R35, R34 \
+) \
+{ \
+ {L00, L01, L02, L03, L04, L05, L06}, \
+ {XXX, L11, L12, L13, L14, L15, L16}, \
+ {XXX, L21, L22, L23, L24, L25, L26}, \
+ {XXX, XXX, XXX, XXX, L34, L35, L36}, \
+ {R00, R01, R02, R03, R04, R05, R06}, \
+ {XXX, R11, R12, R13, R14, R15, R16}, \
+ {XXX, R21, R22, R23, R24, R25, R26}, \
+ {XXX, XXX, XXX, XXX, R34, R35, R36} \
+}
+
+#define LAYOUT_symmetric( \
+ K00, K01, K02, K03, K04, K05, K06, \
+ K11, K12, K13, K14, K15, K16, \
+ K21, K22, K23, K24, K25, K26, \
+ K34, K35, K36 \
+) \
+{ \
+ {K00, K01, K02, K03, K04, K05, K06}, \
+ {XXX, K11, K12, K13, K14, K15, K16}, \
+ {XXX, K21, K22, K23, K24, K25, K26}, \
+ {XXX, XXX, XXX, XXX, K34, K35, K36}, \
+ {K00, K01, K02, K03, K04, K05, K06}, \
+ {XXX, K11, K12, K13, K14, K15, K16}, \
+ {XXX, K21, K22, K23, K24, K25, K26}, \
+ {XXX, XXX, XXX, XXX, K34, K35, K36} \
+}
+
+#ifdef DIPS_ENABLE
+#define LAYOUT_dips( \
+ DL0, DL1, DL2, DL3, DL4, DL5, \
+ DR5, DR4, DR3, DR2, DR1, DR0 \
+) \
+{ \
+ {XXX, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DL0, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DL1, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DL2, DL3, DL4, DL5, XXX, XXX, XXX}, \
+ {XXX, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DR0, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DR1, XXX, XXX, XXX, XXX, XXX, XXX}, \
+ {DR2, DR3, DR4, DR5, XXX, XXX, XXX}, \
+}
+#endif // DIPS_ENABLE
diff --git a/keyboards/jian/rev1/rules.mk b/keyboards/jian/rev1/rules.mk
new file mode 100644
index 000000000000..915b6475484c
--- /dev/null
+++ b/keyboards/jian/rev1/rules.mk
@@ -0,0 +1,20 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+CONSOLE_ENABLE = no
+SPLIT_KEYBOARD = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h
new file mode 100644
index 000000000000..760389cc6424
--- /dev/null
+++ b/keyboards/jian/rev2/config.h
@@ -0,0 +1,136 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 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 .
+*/
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xC0DE
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0200
+#define MANUFACTURER KgOfHedgehogs
+#define PRODUCT Jian
+#define DESCRIPTION An ergo keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+#define DIODE_DIRECTION COL2ROW
+
+// wiring of each half
+#define MATRIX_ROW_PINS { F4, F5, B1, B3 }
+#define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 }
+
+//#define USE_I2C
+#define USE_SERIAL
+#define SOFT_SERIAL_PIN D1
+
+//#define EE_HANDS
+#define SPLIT_HAND_PIN E6
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#define PHYSICAL_LEDS_ENABLE
+#define IOS_DEVICE_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+#define BACKLIGHT_PIN C6
+#define BACKLIGHT_LEVELS 5
+#define BACKLIGHT_BREATHING //not working with splits right now
+#define BREATHING_PERIOD 6
+#endif
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D4
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 7 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS //not working with splits right now
+
+#define RGBLIGHT_SLEEP
+#define RGBLIGHT_SPLIT
+
+#ifndef IOS_DEVICE_ENABLE
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 255
+#else
+#define RGBLIGHT_LIMIT_VAL 130
+#endif
+#define RGBLIGHT_VAL_STEP 8
+#else
+#if RGBLED_NUM <= 6
+#define RGBLIGHT_LIMIT_VAL 90
+#else
+#define RGBLIGHT_LIMIT_VAL 45
+#endif
+#define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+#define USB_MAX_POWER_CONSUMPTION 400
+#else
+// iOS device need lessthan 100
+#define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
+#define NUM_LOCK_LED_PIN D7
+#define CAPS_LOCK_LED_PIN B5
+#define SCROLL_LOCK_LED_PIN B6
+
+// #define NUM_NMOSFET //uncomment this if you using n-mosfet
+// #define CAPS_NMOSFET //uncomment this if you using n-mosfet
+// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet
+
+// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
+// This will make it light up only when lock is off
+// (Doesn't work on mac. There is no num lock, so it will be always off and lit)
+
+#ifdef NUM_NMOSFET
+#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#endif // NUM_INVERT
+#else
+#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN)
+#ifdef NUM_INVERT
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
+#else
+#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
+#endif // NUM_INVERT
+#endif // NUM_NMOSFET
+
+#ifdef CAPS_NMOSFET
+#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
+#else
+#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN)
+#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
+#endif // CAPS_NMOSFET
+
+#ifdef SCROLL_NMOSFET
+#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
+#else
+#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN)
+#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
+#endif // SCROLL_NMOSFET
diff --git a/keyboards/jian/rev2/rev2.c b/keyboards/jian/rev2/rev2.c
new file mode 100644
index 000000000000..6f4808de7303
--- /dev/null
+++ b/keyboards/jian/rev2/rev2.c
@@ -0,0 +1,74 @@
+#include "rev2.h"
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
+};
+#endif
+
+static bool backlight_was_toggled = false;
+
+void suspend_power_down_kb(void) {
+ if (is_backlight_enabled()) {
+ backlight_disable();
+ backlight_was_toggled = true;
+ }
+}
+
+void suspend_wakeup_init_kb(void) {
+ if (backlight_was_toggled) {
+ backlight_enable();
+ backlight_was_toggled = false;
+ }
+}
+
+#ifdef PHYSICAL_LEDS_ENABLE
+void led_init_kb(void)
+{
+#ifdef NUM_LOCK_LED_PIN
+ setPinOutput(NUM_LOCK_LED_PIN);
+ RESET_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ setPinOutput(CAPS_LOCK_LED_PIN);
+ RESET_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ setPinOutput(SCROLL_LOCK_LED_PIN);
+ RESET_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+}
+#endif // PHYSICAL_LEDS_ENABLE
+
+void matrix_init_kb(void) {
+#ifdef PHYSICAL_LEDS_ENABLE
+ led_init_kb();
+#endif // PHYSICAL_LEDS_ENABLE
+ matrix_init_user();
+};
+
+#ifdef PHYSICAL_LEDS_ENABLE
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+#ifdef NUM_LOCK_LED_PIN
+ UPDATE_NUM_LOCK_LED();
+#endif // NUM_LOCK_LED_PIN
+#ifdef CAPS_LOCK_LED_PIN
+ UPDATE_CAPS_LOCK_LED();
+#endif // CAPS_LOCK_LED_PIN
+#ifdef SCROLL_LOCK_LED_PIN
+ UPDATE_SCROLL_LOCK_LED();
+#endif // SCROLL_LOCK_LED_PIN
+ }
+ return res;
+}
+#endif // PHYSICAL_LEDS_ENABLE
diff --git a/keyboards/jian/rev2/rev2.h b/keyboards/jian/rev2/rev2.h
new file mode 100644
index 000000000000..9dfb7240b137
--- /dev/null
+++ b/keyboards/jian/rev2/rev2.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "jian.h"
+
+#define XXX KC_NO
+
+#define LAYOUT( \
+ L20, L00, L01, L12, L02, L03, L04, R04, R03, R02, R12, R01, R00, R20, \
+ L10, L11, L22, L13, L14, L05, R05, R14, R13, R22, R11, R10, \
+ L21, L32, L33, L23, L24, L15, R15, R24, R23, R33, R32, R21, \
+ L34, L25, L35, R35, R25, R34 \
+) \
+{ \
+ {L00, L01, L02, L03, L04, L05 }, \
+ {L10, L11, L12, L13, L14, L15 }, \
+ {L20, L21, L22, L23, L24, L25 }, \
+ {XXX, XXX, L32, L33, L34, L35 }, \
+ {R00, R01, R02, R03, R04, R05 }, \
+ {R10, R11, R12, R13, R14, R15 }, \
+ {R20, R21, R22, R23, R24, R25 }, \
+ {XXX, XXX, R32, R33, R34, R35 } \
+}
+
+#define LAYOUT_symmetric( \
+ K20, K00, K01, K12, K02, K03, K04, \
+ K10, K11, K22, K13, K14, K05, \
+ K21, K32, K33, K23, K24, K15, \
+ K34, K25, K35 \
+) \
+{ \
+ {K00, K01, K02, K03, K04, K05 }, \
+ {K10, K11, K12, K13, K14, K15 }, \
+ {K20, K21, K22, K23, K24, K25 }, \
+ {XXX, XXX, K32, K33, K34, K35 }, \
+ {K00, K01, K02, K03, K04, K05 }, \
+ {K10, K11, K12, K13, K14, K15 }, \
+ {K20, K21, K22, K23, K24, K25 }, \
+ {XXX, XXX, K32, K33, K34, K35 } \
+}
diff --git a/keyboards/jian/rev2/rules.mk b/keyboards/jian/rev2/rules.mk
new file mode 100644
index 000000000000..bbfde67f944e
--- /dev/null
+++ b/keyboards/jian/rev2/rules.mk
@@ -0,0 +1,20 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = qmk-dfu
+
+# Build Options
+# change yes to no to disable
+#
+CONSOLE_ENABLE = no
+SPLIT_KEYBOARD = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/jian/rules.mk b/keyboards/jian/rules.mk
new file mode 100644
index 000000000000..c19fa00b5cb9
--- /dev/null
+++ b/keyboards/jian/rules.mk
@@ -0,0 +1 @@
+DEFAULT_FOLDER = jian/rev2