aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Diamond <josh@windowoffire.com>2021-02-14 19:59:26 -0500
committerJoshua Diamond <josh@windowoffire.com>2021-02-14 19:59:26 -0500
commitf1a3ce49ccdfee79fbad76fd13bcf4448318eb6b (patch)
tree8725ba276f485dc62a40d8f6d1ebe1bbc84e6fb3
parentc80e5f9f8868ccaa8cb990be6f4da3f1011c2b78 (diff)
parent6f44c2ec31a6aeacd9e90060a9670be03be372fe (diff)
downloadqmk_firmware-f1a3ce49ccdfee79fbad76fd13bcf4448318eb6b.tar.gz
qmk_firmware-f1a3ce49ccdfee79fbad76fd13bcf4448318eb6b.zip
Merge branch 'master' into develop
-rw-r--r--docs/feature_led_matrix.md85
-rw-r--r--docs/ja/adc_driver.md155
-rw-r--r--docs/ja/feature_unicode.md277
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/gen1.c257
-rw-r--r--keyboards/durgod/k320/k320.h14
-rw-r--r--keyboards/durgod/k320/keymaps/default/keymap.c26
-rw-r--r--keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c78
-rw-r--r--keyboards/durgod/k320/keymaps/kuenhlee/keymap.c52
-rw-r--r--keyboards/keebio/iris/keymaps/csc027/config.h5
-rw-r--r--keyboards/meishi2/keymaps/moc/config.h19
-rw-r--r--keyboards/meishi2/keymaps/moc/keymap.c45
-rw-r--r--keyboards/meishi2/keymaps/moc/readme.md17
-rw-r--r--keyboards/neokeys/g67/hotswap/config.h67
-rw-r--r--keyboards/neokeys/g67/hotswap/hotswap.c17
-rw-r--r--keyboards/neokeys/g67/hotswap/hotswap.h33
-rw-r--r--keyboards/neokeys/g67/hotswap/info.json84
-rw-r--r--keyboards/neokeys/g67/hotswap/keymaps/default/keymap.c34
-rw-r--r--keyboards/neokeys/g67/hotswap/keymaps/via/keymap.c49
-rw-r--r--keyboards/neokeys/g67/hotswap/keymaps/via/rules.mk3
-rw-r--r--keyboards/neokeys/g67/hotswap/readme.md21
-rw-r--r--keyboards/neokeys/g67/hotswap/rules.mk26
-rw-r--r--keyboards/neokeys/g67/soldered/config.h71
-rw-r--r--keyboards/neokeys/g67/soldered/info.json541
-rw-r--r--keyboards/neokeys/g67/soldered/keymaps/default/keymap.c34
-rw-r--r--keyboards/neokeys/g67/soldered/keymaps/via/keymap.c48
-rw-r--r--keyboards/neokeys/g67/soldered/keymaps/via/rules.mk2
-rw-r--r--keyboards/neokeys/g67/soldered/readme.md21
-rw-r--r--keyboards/neokeys/g67/soldered/rules.mk24
-rw-r--r--keyboards/neokeys/g67/soldered/soldered.c17
-rw-r--r--keyboards/neokeys/g67/soldered/soldered.h117
-rw-r--r--keyboards/polycarbdiet/readme.md6
-rw-r--r--keyboards/polycarbdiet/s20/config.h61
-rw-r--r--keyboards/polycarbdiet/s20/info.json88
-rw-r--r--keyboards/polycarbdiet/s20/keymaps/default/keymap.c47
-rw-r--r--keyboards/polycarbdiet/s20/keymaps/default/readme.md1
-rw-r--r--keyboards/polycarbdiet/s20/readme.md27
-rw-r--r--keyboards/polycarbdiet/s20/rules.mk23
-rw-r--r--keyboards/polycarbdiet/s20/s20.c17
-rw-r--r--keyboards/polycarbdiet/s20/s20.h61
-rw-r--r--keyboards/ymdk/ymd40/v2/config.h71
-rw-r--r--keyboards/ymdk/ymd40/v2/info.json64
-rw-r--r--keyboards/ymdk/ymd40/v2/keymaps/default/keymap.c55
-rw-r--r--keyboards/ymdk/ymd40/v2/keymaps/default/readme.md1
-rw-r--r--keyboards/ymdk/ymd40/v2/keymaps/factory/keymap.c32
-rw-r--r--keyboards/ymdk/ymd40/v2/keymaps/factory/readme.md3
-rw-r--r--keyboards/ymdk/ymd40/v2/readme.md22
-rw-r--r--keyboards/ymdk/ymd40/v2/rules.mk28
-rw-r--r--keyboards/ymdk/ymd40/v2/v2.c17
-rw-r--r--keyboards/ymdk/ymd40/v2/v2.h31
-rw-r--r--quantum/config_common.h351
-rw-r--r--quantum/led_matrix.c132
-rw-r--r--quantum/led_matrix.h42
-rw-r--r--quantum/led_matrix_types.h69
-rw-r--r--quantum/quantum.h90
-rw-r--r--quantum/rgb_matrix_types.h16
-rw-r--r--tmk_core/common/atomic_util.h32
-rw-r--r--tmk_core/common/avr/atomic_util.h22
-rw-r--r--tmk_core/common/avr/gpio.h34
-rw-r--r--tmk_core/common/avr/pin_defs.h128
-rw-r--r--tmk_core/common/chibios/atomic_util.h37
-rw-r--r--tmk_core/common/chibios/gpio.h34
-rw-r--r--tmk_core/common/chibios/pin_defs.h242
-rw-r--r--tmk_core/common/gpio.h22
-rw-r--r--tmk_core/common/pin_defs.h23
-rw-r--r--users/csc027/defines.h21
65 files changed, 3360 insertions, 829 deletions
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index 1383c97b4..6de01f31a 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -10,9 +10,11 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r
10 10
11There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: 11There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
12 12
13 LED_MATRIX_ENABLE = yes 13```make
14 LED_MATRIX_DRIVER = IS31FL3731 14LED_MATRIX_ENABLE = yes
15 15LED_MATRIX_DRIVER = IS31FL3731
16```
17
16You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: 18You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
17 19
18| Variable | Description | Default | 20| Variable | Description | Default |
@@ -28,33 +30,38 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
28 30
29Here is an example using 2 drivers. 31Here is an example using 2 drivers.
30 32
31 // This is a 7-bit address, that gets left-shifted and bit 0 33```c
32 // set to 0 for write, 1 for read (as per I2C protocol) 34// This is a 7-bit address, that gets left-shifted and bit 0
33 // The address will vary depending on your wiring: 35// set to 0 for write, 1 for read (as per I2C protocol)
34 // 0b1110100 AD <-> GND 36// The address will vary depending on your wiring:
35 // 0b1110111 AD <-> VCC 37// 0b1110100 AD <-> GND
36 // 0b1110101 AD <-> SCL 38// 0b1110111 AD <-> VCC
37 // 0b1110110 AD <-> SDA 39// 0b1110101 AD <-> SCL
38 #define LED_DRIVER_ADDR_1 0b1110100 40// 0b1110110 AD <-> SDA
39 #define LED_DRIVER_ADDR_2 0b1110110 41#define LED_DRIVER_ADDR_1 0b1110100
40 42#define LED_DRIVER_ADDR_2 0b1110110
41 #define LED_DRIVER_COUNT 2 43
42 #define LED_DRIVER_1_LED_COUNT 25 44#define LED_DRIVER_COUNT 2
43 #define LED_DRIVER_2_LED_COUNT 24 45#define LED_DRIVER_1_LED_COUNT 25
44 #define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL 46#define LED_DRIVER_2_LED_COUNT 24
47#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
48```
45 49
46Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. 50Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
47 51
48Define these arrays listing all the LEDs in your `<keyboard>.c`: 52Define these arrays listing all the LEDs in your `<keyboard>.c`:
49 53
50 const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { 54```c
51 /* Refer to IS31 manual for these locations 55 const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
52 * driver 56 /* Refer to IS31 manual for these locations
53 * | LED address 57 * driver
54 * | | */ 58 * | LED address
55 {0, C3_3}, 59 * | | */
56 .... 60 { 0, C1_1 },
57 } 61 { 0, C1_15 },
62 // ...
63 }
64```
58 65
59Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). 66Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
60 67
@@ -66,26 +73,28 @@ All LED matrix keycodes are currently shared with the [backlight system](feature
66 73
67Currently no LED matrix effects have been created. 74Currently no LED matrix effects have been created.
68 75
69## Custom layer effects 76## Custom Layer Effects
70 77
71Custom layer effects can be done by defining this in your `<keyboard>.c`: 78Custom layer effects can be done by defining this in your `<keyboard>.c`:
72 79
73 void led_matrix_indicators_kb(void) { 80```c
74 led_matrix_set_index_value(index, value); 81void led_matrix_indicators_kb(void) {
75 } 82 led_matrix_set_index_value(index, value);
83}
84```
76 85
77A similar function works in the keymap as `led_matrix_indicators_user`. 86A similar function works in the keymap as `led_matrix_indicators_user`.
78 87
79## Suspended state 88## Suspended State
80 89
81To use the suspend feature, add this to your `<keyboard>.c`: 90To use the suspend feature, add this to your `<keyboard>.c`:
82 91
83 void suspend_power_down_kb(void) 92```c
84 { 93void suspend_power_down_kb(void) {
85 led_matrix_set_suspend_state(true); 94 led_matrix_set_suspend_state(true);
86 } 95}
87 96
88 void suspend_wakeup_init_kb(void) 97void suspend_wakeup_init_kb(void) {
89 { 98 led_matrix_set_suspend_state(false);
90 led_matrix_set_suspend_state(false); 99}
91 } 100``` \ No newline at end of file
diff --git a/docs/ja/adc_driver.md b/docs/ja/adc_driver.md
new file mode 100644
index 000000000..0a531c8db
--- /dev/null
+++ b/docs/ja/adc_driver.md
@@ -0,0 +1,155 @@
1# ADC ドライバ
2
3<!---
4 original document: 0.10.52:docs/adc_driver.md
5 git diff 0.10.52 HEAD -- docs/adc_driver.md | cat
6-->
7
8QMK は対応している MCU のアナログ・デジタルコンバータ(ADC) を使用し、特定のピンの電圧を計測することができます。この機能はデジタル出力の[ロータリーエンコーダ](ja/feature_encoders.md)などではなく、アナログ計測が必要な可変抵抗器を使用したボリュームコントロールや Bluetooth キーボードのバッテリー残量表示などの実装に役立ちます。
9
10このドライバは現在 AVR と一部の ARM デバイスをサポートしています。返される値は 0V と VCC (通常 AVR の場合は 5V または 3.3V、ARM の場合は 3.3V)の間でマッピングされた 10ビットの整数 (0-1023) ですが、ARM の場合、もしもより精度が必要であれば `#define` を使うと操作をより柔軟に制御できます。
11
12## 使い方
13
14このドライバを使うには、`rules.mk` に以下を追加します:
15
16```make
17SRC += analog.c
18```
19
20そして、コードの先頭に以下の include を置きます:
21
22```c
23#include "analog.h"
24```
25
26## チャンネル
27
28### AVR
29
30|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328/P|
31|-------|-------------|-------------|---------|-----------|
32|0 |`F0` |`F0` |`A0` |`C0` |
33|1 |`F1` |`F1` |`A1` |`C1` |
34|2 |`F2` | |`A2` |`C2` |
35|3 |`F3` | |`A3` |`C3` |
36|4 |`F4` |`F4` |`A4` |`C4` |
37|5 |`F5` |`F5` |`A5` |`C5` |
38|6 |`F6` |`F6` |`A6` |* |
39|7 |`F7` |`F7` |`A7` |* |
40|8 | |`D4` | | |
41|9 | |`D6` | | |
42|10 | |`D7` | | |
43|11 | |`B4` | | |
44|12 | |`B5` | | |
45|13 | |`B6` | | |
46
47<sup>\* ATmega328/P には余分な2つの ADC チャンネルがありますが、DIP ピンアウトには存在せず、GPIO ピンとは共有されません。これらに直接アクセスするために、`adc_read()` を使えます。
48
49### ARM
50
51これらのピンの一部は同じチャンネルを使って ADC 上でダブルアップされることに注意してください。これは、これらのピンがどちらかの ADC に使われる可能性があるからです。
52
53また、F0 と F3 は異なるナンバリングスキーマを使うことに注意してください。F0 には1つの ADC があり、チャンネルは0から始まるインデックスですが、F3 には4つの ADC があり、チャンネルは1から始まるインデックスです。これは、F0 が ADC の `ADCv1` 実装を使用するのに対し、F3 が `ADCv3` 実装を使用するためです。
54
55|ADC|Channel|STM32F0xx|STM32F3xx|
56|---|-------|---------|---------|
57|1 |0 |`A0` | |
58|1 |1 |`A1` |`A0` |
59|1 |2 |`A2` |`A1` |
60|1 |3 |`A3` |`A2` |
61|1 |4 |`A4` |`A3` |
62|1 |5 |`A5` |`F4` |
63|1 |6 |`A6` |`C0` |
64|1 |7 |`A7` |`C1` |
65|1 |8 |`B0` |`C2` |
66|1 |9 |`B1` |`C3` |
67|1 |10 |`C0` |`F2` |
68|1 |11 |`C1` | |
69|1 |12 |`C2` | |
70|1 |13 |`C3` | |
71|1 |14 |`C4` | |
72|1 |15 |`C5` | |
73|1 |16 | | |
74|2 |1 | |`A4` |
75|2 |2 | |`A5` |
76|2 |3 | |`A6` |
77|2 |4 | |`A7` |
78|2 |5 | |`C4` |
79|2 |6 | |`C0` |
80|2 |7 | |`C1` |
81|2 |8 | |`C2` |
82|2 |9 | |`C3` |
83|2 |10 | |`F2` |
84|2 |11 | |`C5` |
85|2 |12 | |`B2` |
86|2 |13 | | |
87|2 |14 | | |
88|2 |15 | | |
89|2 |16 | | |
90|3 |1 | |`B1` |
91|3 |2 | |`E9` |
92|3 |3 | |`E13` |
93|3 |4 | | |
94|3 |5 | | |
95|3 |6 | |`E8` |
96|3 |7 | |`D10` |
97|3 |8 | |`D11` |
98|3 |9 | |`D12` |
99|3 |10 | |`D13` |
100|3 |11 | |`D14` |
101|3 |12 | |`B0` |
102|3 |13 | |`E7` |
103|3 |14 | |`E10` |
104|3 |15 | |`E11` |
105|3 |16 | |`E12` |
106|4 |1 | |`E14` |
107|4 |2 | |`B12` |
108|4 |3 | |`B13` |
109|4 |4 | |`B14` |
110|4 |5 | |`B15` |
111|4 |6 | |`E8` |
112|4 |7 | |`D10` |
113|4 |8 | |`D11` |
114|4 |9 | |`D12` |
115|4 |10 | |`D13` |
116|4 |11 | |`D14` |
117|4 |12 | |`D8` |
118|4 |13 | |`D9` |
119|4 |14 | | |
120|4 |15 | | |
121|4 |16 | | |
122
123## 関数
124
125### AVR
126
127|関数 |説明 |
128|----------------------------|------------------------------------------------------------------------------------------------------------------------------------|
129|`analogReference(mode)` |アナログの電圧リファレンスソースを設定する。`ADC_REF_EXTERNAL`、`ADC_REF_POWER`、`ADC_REF_INTERNAL` のいずれかでなければなりません。|
130|`analogReadPin(pin)` |指定されたピンから値を読み取ります。例えば、ATmega32U4 の ADC6 の場合 `F6`。 |
131|`pinToMux(pin)` |指定されたピンを mux 値に変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
132|`adc_read(mux)` |指定された mux に従って ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
133
134### ARM
135
136|関数 |説明 |
137|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
138|`analogReadPin(pin)` |指定されたピンから値を読み取ります。STM32F0 では チャンネル 0 の `A0`、STM32F3 ではチャンネル 1 の ADC1。ピンを複数の ADC に使える場合は、この関数のために番号の小さい ADC が選択されることに注意してください。例えば、`C0` は、ADC2 にも使える場合、ADC1 のチャンネル 6 になります。 |
139|`analogReadPinAdc(pin, adc)`|指定されたピンと ADC から値を読み取ります。例えば、`C0, 1` は、ADC1 ではなく ADC2 のチャンネル 6 から読み取ります。この関数では、ADC はインデックス 0 から始まることに注意してください。 |
140|`pinToMux(pin)` |指定されたピンをチャンネルと ADC の組み合わせに変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
141|`adc_read(mux)` |指定されたピンと ADC の組み合わせに応じて ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
142
143## 設定
144
145## ARM
146
147ADC の ARM 実装には、独自のキーボードとキーマップでオーバーライドして動作方法を変更できる幾つかの追加オプションがあります。利用可能なオプションの詳細については、特定のマイクロコントローラについて ChibiOS の対応する `hal_adc_lld.h` を調べてください。
148
149|`#define` |型 |既定値 |説明 |
150|---------------------|------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
151|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |`true` の場合、この実装は循環バッファを使います。 |
152|`ADC_NUM_CHANNELS` |`int` |`1` |ADC 動作の一部としてスキャンされるチャンネル数を設定します。現在の実装は `1` のみをサポートします。 |
153|`ADC_BUFFER_DEPTH` |`int` |`2` |各結果の深さを設定します。デフォルトでは12ビットの結果しか取得できないため、これを2バイトに設定して1つの値を含めることができます。8ビット以下の結果を選択した場合は、これを 1 に設定できます。 |
154|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |ADC のサンプリングレートを設定します。デフォルトでは、最も速い設定に設定されています。 |
155|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|結果の分解能。デフォルトでは12ビットを選択しますが、12、10、8、6ビットを選択できます。 |
diff --git a/docs/ja/feature_unicode.md b/docs/ja/feature_unicode.md
new file mode 100644
index 000000000..bfcb866ce
--- /dev/null
+++ b/docs/ja/feature_unicode.md
@@ -0,0 +1,277 @@
1# Unicode サポート
2
3<!---
4 original document: 0.10.53:docs/feature_unicode.md
5 git diff 0.10.53 HEAD -- docs/feature_unicode.md | cat
6-->
7
8Unicode 文字はキーボードから直接入力することができます!ただし幾つかの制限があります。
9
10キーボードで Unicode サポートを有効にするには、以下の事をする必要があります:
11
121. サポートされている Unicode 実装のいずれかを選択します: [Basic Unicode](#basic-unicode)、[Unicode Map](#unicode-map)、[UCIS](#ucis)。
132. オペレーティングシステムとセットアップに最適な[入力モード](#input-modes)を見つけます。
143. コンフィギュレーションに適切な入力モード(または複数のモード)を[設定](#setting-the-input-mode)します。
154. キーマップに Unicode キーコードを追加します。
16
17
18## 1. メソッド :id=methods
19
20QMK は、Unicode 入力を有効にし、キーマップに Unicode 文字を追加するための3つの異なる方法をサポートします。それぞれに柔軟性と使いやすさの点で長所と短所があります。あなたの使い方に最適なものを選んでください。
21
22ほとんどのユーザには Basic Unicode で十分です。ただし、サポートされる文字の範囲が広い(絵文字、珍しい記号など)ことが必要な場合には、Unicode Map を使う必要があります。
23
24<br>
25
26### 1.1. Basic Unicode :id=basic-unicode
27
28多少制限はありますが、最も使いやすい方法です。Unicode 文字をキーコードとしてキーマップ自体に格納するため、`0x7FFF` までのコードポイントのみをサポートします。これは、ほとんどの現代言語(東アジアを含む)の文字と記号を対象としますが、絵文字は対象外です。
29
30以下を `rules.mk` に追加します:
31
32```make
33UNICODE_ENABLE = yes
34```
35
36次に、`UC(c)` キーコードをキーマップに追加します。ここで、_c_ は目的の文字のコードポイントです (できれば16進数で最大4桁の長さが望ましいです)。例えば、`UC(0x40B)` は [Ћ](https://unicode-table.com/en/040B/) を出力し、`UC(0x30C4)` は [ツ](https://unicode-table.com/en/30C4) を出力します。
37
38<br>
39
40### 1.2. Unicode Map :id=unicode-map
41
42このメソッドは、標準の文字の範囲に加えて、絵文字、古代文字、珍しい記号なども対象にしています。実際、可能な全てのコードポイント(`0x10FFFF`まで)がサポートされています。Unicode 文字は独立のマッピングテーブルに格納されています。キーマップファイルに `unicode_map` 配列を維持する必要があります。これには最大 16384 エントリを含めることができます。
43
44以下を `rules.mk` に追加します:
45
46```make
47UNICODEMAP_ENABLE = yes
48```
49
50次に、`X(i)` キーコードをキーマップに追加します。ここで _i_ はマッピングテーブル内の目的の文字のインデックスです。これは数値にできますが、インデックスを列挙型に保持し、名前でアクセスすることをお勧めします。
51
52```c
53enum unicode_names {
54 BANG,
55 IRONY,
56 SNEK
57};
58
59const uint32_t PROGMEM unicode_map[] = {
60 [BANG] = 0x203D, // ‽
61 [IRONY] = 0x2E2E, // ⸮
62 [SNEK] = 0x1F40D, // 🐍
63};
64```
65
66そして、キーマップで `X(BANG)`、`X(SNEK)` などを使うことができます。
67
68#### 小文字と大文字
69
70文字は å や Å のような小文字と大文字のペアで提供されることがあります。これらの文字を入力しやすくするために、キーマップで `XP(i, j)` を使うことができます。ここで、_i_ および _j_ はそれぞれ小文字と大文字のマッピングテーブルのインデックスです。キーを押した時に、シフトを押したままか Caps Lock をオンにしている場合は、2番目(大文字)の文字が挿入されます; そうでなければ最初(小文字)バージョンが出力されます。
71
72これは特殊文字がある国際レイアウトのためのキーマップを作成している時に最も役立ちます。別々のキーに文字の小文字および大文字バージョンを置く代わりに、`XP()` を使ってそれら両方を同じキーに持つことができます。これは Unicode キーを通常のアルファベットと混ぜるのに役立ちます。
73
74キーコードのサイズの制約により、_i_ と _j_ はそれぞれ `unicode_map` の最初の128文字のうち1つだけを参照できます。別の言い方をすると、0 ≤ _i_ ≤ 127 かつ 0 ≤ _j_ ≤ 127 です。これはほとんどのユースケースで十分ですが、インデックス計算をカスタマイズしたい場合は、[`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) 関数をオーバーライドすることができます。これにより、例えば Shift/Caps の代わりに Ctrl をチェックすることもできます。
75
76<br>
77
78### 1.3. UCIS :id=ucis
79
80この方法も全ての可能なコードポイントをサポートします。Unicode Map の方法と同様に、キーマップファイル内にマッピングテーブルを保持する必要があります。ただし、この機能のための組み込みのキーコードはありません — この機能を起動するカスタムキーコードあるいは関数を作成する必要があります。
81
82以下を `rules.mk` に追加します:
83
84```make
85UCIS_ENABLE = yes
86```
87
88次に、キーマップファイルでこのようにテーブルを定義します:
89
90```c
91const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
92 UCIS_SYM("poop", 0x1F4A9), // 💩
93 UCIS_SYM("rofl", 0x1F923), // 🤣
94 UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺
95 UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ
96);
97```
98
99デフォルトでは、各テーブルエントリの長さは、最大3コードポイントです。この番号は `#define UCIS_MAX_CODE_POINTS n` を `config.h` ファイルに追加することで変更できます。
100
101UCIS 入力を使うには、`qk_ucis_start()` を呼び出します。次に、文字のニーモニック ("rofl" など) を入力し、Space か Enter か Esc を押します。QMK は "rofl" テキストを消去し、笑っている絵文字を挿入するはずです。
102
103#### カスタマイズ
104
105この機能をカスタマイズするためにキーマップで定義できる幾つかの関数があります。
106
107* `void qk_ucis_start_user(void)` – これは "start" 関数を呼び出す時に実行され、フィードバックを提供するために使うことができます。デフォルトでは、キーボードの絵文字を入力します。
108* `void qk_ucis_success(uint8_t symbol_index)` – これは入力が何かに一致して完了した時に実行されます。デフォルトでは何もしません。
109* `void qk_ucis_symbol_fallback (void)` – これは入力が何にも一致しない時に実行されます。デフォルトでは、入力を Unicode コードとして試そうとします。
110
111[`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c) でこれらの関数のデフォルトの実装を見つけることができます。
112
113
114## 2. Input モード :id=input-modes
115
116QMK での Unicode の入力は、マクロのように、OS への一連の文字列を入力することで動作します。残念ながら、これが行われる方法はプラットフォームによって異なります。特に各プラットフォームでは Unicode 入力を引き起こすために、異なるキーの組み合わせが必要です。従って、対応する入力モードが QMK で設定されなければなりません。
117
118以下の入力モードが利用可能です:
119
120* **`UC_MAC`**: macOS の組み込み Unicode 16進数入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
121
122 有効にするには、_システム環境設定 > キーボード > 入力ソース_ に移動し、(_その他_ の下の) _Unicode 16進数入力_ をリストに追加し、次にメニューバーの入力ドロップダウンからそれをアクティブにします。
123 デフォルトでは、このモードは Unicode 入力のために左 Option キー (`KC_LALT`) を使いますが、これは他のキーで [`UNICODE_KEY_MAC`](#input-key-configuration) を定義することで変更できます。
124
125 !> _Unicode 16進数入力_ 入力ソースの使用は、Option + 左矢印および Option + 右矢印 のような、幾つかの Option ベースのショートカットを無効にするかもしれません。
126
127 !> `UC_OSX` は `UC_MAC` の非推奨のエイリアスで、QMK の将来のバージョンで削除されます。全ての新しいキーマップは、`UC_MAC` を使うべきです。
128
129* **`UC_LNX`**: Linux の組み込み IBus Unicode 入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
130
131 デフォルトで有効になっていて、IBus が有効になったディストリビューションのほとんどどれでも動作します。IBus が無い場合、このモードは GTK アプリ下で動作しますが、他の場所ではほとんど動作しません。
132 デフォルトでは、このモードは Unicode 入力を開始するために Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) を使いますが、これは他のキーコードで [`UNICODE_KEY_LNX`](#input-key-configuration) を定義することで変更できます。これは、Ctrl+Shift+U の挙動が Ctrl+Shift+E に統合された IBus バージョン 1.5.15 以上を必要とするかもしれません。
133
134* **`UC_WIN`**: _(非推奨)_ Windows の組み込み16進数テンキー Unicode 入力。`0xFFFF` までのコードポイントをサポートします。
135
136 有効にするには、`HKEY_CURRENT_USER\Control Panel\Input Method` の下に、`EnableHexNumpad` という名前の `REG_SZ` 型のレジストリキーを作成し、その値を `1` に設定します。これは、管理者権限でコマンドラインプロンプトから `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` を実行することでできます。その後再起動します。
137 信頼性と互換性の問題から、このモードはお勧めできません; 代わりに `UC_WINC` モードを使ってください。
138
139* **`UC_BSD`**: _(未実装)_ BSD での Unicode 入力。現時点では実装されていません。BSD ユーザでサポートを追加したい場合は、[GitHub で issue を開いて](https://github.com/qmk/qmk_firmware/issues)ください。
140
141* **`UC_WINC`**: [WinCompose](https://github.com/samhocevar/wincompose) を使った Windows Unicode 入力。v0.9.0 の時点で、`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
142
143 有効にするには、[最新のリリース](https://github.com/samhocevar/wincompose/releases/latest)をインストールします。インストールすると、起動時に WinCompose が自動的に実行されます。このモードはアプリがサポートする全てのバージョンの Windows で確実に動作します。
144 デフォルトでは、このモードは Compose キーとして右 Alt (`KC_RALT`) を使いますが、これは WinCompose 設定と他のキーで [`UNICODE_KEY_WINC`](#input-key-configuration) を定義することで変更できます。
145
146
147## 3. 入力モードの設定 :id=setting-the-input-mode
148
149目的の入力モードを設定するには、以下の定義を `config.h` に追加します:
150
151```c
152#define UNICODE_SELECTED_MODES UC_LNX
153```
154
155この例では、キーボードのデフォルトの入力モードを `UC_LNX` に設定します。これは、`UC_MAC` か `UC_WINC` か[上記](#input-modes)に列挙されている他のモードのいずれかに置き換えることができます。手動で別のモード([下記](#keycodes)を見てください)に切り替えない限り、キーボードは起動時に選択したモードを自動的に使います。
156
157複数の入力モードを選択することもできます。これにより、`UC_MOD`/`UC_RMOD` キーコードを使ってそれらを簡単に切り替えることができます。
158
159```c
160#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
161```
162
163値はカンマで区切られていることに注意してください。キーボードは最後に使われた入力モードを記憶し、次の電源投入時にそれを使い続けます。`config.h` に `#define UNICODE_CYCLE_PERSIST false` を追加することで、これを無効にして常にリストの最初のモードで開始するように強制できます。
164
165#### キーコード
166
167以下のキーコードを使って、いつでも入力モードを切り替えることができます。これらをキーマップに追加すると、`UNICODE_SELECTED_MODES` に列挙されていないモードを含む特定の入力モードに素早く切り替えることができます。
168
169| キーコード |エイリアス | 入力モード | 説明 |
170|------------------------|-----------|--------------|--------------------------------------------------------------------|
171| `UNICODE_MODE_FORWARD` | `UC_MOD` | リストの次へ | 選択したモードを切り替えます。Shift が押された場合は逆方向 |
172| `UNICODE_MODE_REVERSE` | `UC_RMOD` | リストの前へ | 逆方向に選択したモードを切り替えます。Shift が押された場合は順方向 |
173| `UNICODE_MODE_MAC` | `UC_M_MA` | `UC_MAC` | macOS 入力に切り替え |
174| `UNICODE_MODE_LNX` | `UC_M_LN` | `UC_LNX` | Linux 入力に切り替え |
175| `UNICODE_MODE_WIN` | `UC_M_WI` | `UC_WIN` | Windows 入力に切り替え |
176| `UNICODE_MODE_BSD` | `UC_M_BS` | `UC_BSD` | BSD 入力に切り替え _(未実装)_ |
177| `UNICODE_MODE_WINC` | `UC_M_WC` | `UC_WINC` | WinCompose を使う Windows 入力に切り替え |
178
179コード内で `set_unicode_input_mode(x)` を呼び出すことで、入力モードを切り替えることもできます。ここで、_x_ は上記の入力モード定数のいずれか (例えば、`UC_LNX`) です。
180
181?> `matrix_init_user()` または同様の関数の中で `set_unicode_input_mode()` を呼び出すよりも、`UNICODE_SELECTED_MODES` を使うほうが望ましいです。Unicode システムとの統合性が高く、EEPROM への不要な書き込みを回避できるという利点があるからです。
182
183#### オーディオフィードバック
184
185キーボードで[オーディオ機能](ja/feature_audio.md)を有効にした場合、上記のキーを押したときにメロディーを再生するように設定できます。そのようにして、入力モードを切り替えた時になんらかのオーディオフィードバックを得ることができます。
186
187例えば、`config.h` ファイルに下記の定義を追加することができます:
188
189```c
190#define UNICODE_SONG_MAC AUDIO_ON_SOUND
191#define UNICODE_SONG_LNX UNICODE_LINUX
192#define UNICODE_SONG_BSD TERMINAL_SOUND
193#define UNICODE_SONG_WIN UNICODE_WINDOWS
194#define UNICODE_SONG_WINC UNICODE_WINDOWS
195```
196
197
198## 追加のカスタマイズ
199
200Unicode は大規模で多目的な機能のため、システムでより適切に動作するようにカスタマイズできるオプションが幾つかあります。
201
202### 入力関数の開始と終了
203
204プラットフォームで Unicode 入力を開始および終了する機能は、ローカルで上書きできます。可能な用途には、デフォルトキーを使用しない場合の入力モードの挙動のカスタマイズ、あるいは Unicode 入力への視覚/音声フィードバックの追加があります。
205
206* `void unicode_input_start(void)` – これはプラットフォームに Unicode 入力モードの入力を指示する初期シーケンスを送信します。例えば、Windows では左 Alt キーの後に Num+ を押したままにし、Linux では `UNICODE_KEY_LNX` の組み合わせ(デフォルト: Ctrl+Shift+U) を押します。
207* `void unicode_input_finish(void)` – これは、例えば Space を押すか Alt キーを放すなどして、Unicode 入力モードを終了するために呼ばれます。
208
209[`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c) でこれらの関数のデフォルトの実装を見つけることができます。
210
211### 入力キーの設定
212
213`config.h` に対応する定義を追加することで、macOS、Linux、WinCompose で Unicode 入力を引き起こすために使われるキーをカスタマイズできます。デフォルト値はプラットフォームのデフォルト設定に一致するため、Unicode 入力が動作しない、あるいは(例えば左あるいは右 Alt を解放するために)異なるキーを使いたい場合以外はこれを変更する必要はありません。
214
215| 定義 | 型 | 既定値 | 例 |
216|--------------------|------------|--------------------|---------------------------------------------|
217| `UNICODE_KEY_MAC` | `uint8_t` | `KC_LALT` | `#define UNICODE_KEY_MAC KC_RALT` |
218| `UNICODE_KEY_LNX` | `uint16_t` | `LCTL(LSFT(KC_U))` | `#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))` |
219| `UNICODE_KEY_WINC` | `uint8_t` | `KC_RALT` | `#define UNICODE_KEY_WINC KC_RGUI` |
220
221
222## Unicode 文字列の送信
223
224QMK は、Unicode 入力をプログラムでホストに送信できるようにする幾つかの関数を提供します:
225
226### `send_unicode_string()`
227
228この関数は、`send_string()` によく似ていますが、UTF-8 文字を直接入力できます。選択された入力モードでもサポートされている場合は、全てのコードポイントをサポートします。`keymap.c` ファイルが UTF-8 エンコーディングを使ってフォーマットされていることを確認してください。
229
230```c
231send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
232```
233
234使用例には、[Macros](ja/feature_macros.md) で説明されているように、キーが押された時に Unicode 文字列を送信することが含まれます。
235
236### `send_unicode_hex_string()`
237
238`send_unicode_string()` に似ていますが、文字は Unicode コードポイントで表され、16進数で記述され、空白で区切られています。例えば、上記のちゃぶ台返しは以下で表されます:
239
240```c
241send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
242```
243
244[このサイト](https://r12a.github.io/app-conversion/)で結果を "Hex/UTF-32" で受け取ることで、Unicode 文字列をこの形式に簡単に変換できます。
245
246
247## 追加の言語サポート
248
249`quantum/keymap_extras` には、様々な言語ファイルがあります — これらは Colemak または BÉPO のような代替レイアウトのファイルと同じように動作します。これらの言語ヘッダのいずれかを `#include` すると、その言語/国のレイアウトに固有のキーコードにアクセスできます。このようなキーコードは、2文字の国/言語コードの後に、アンダースコアとキーが対応する4文字の略語が続くことで定義されます。例えば、キーマップに `keymap_french.h` を含め、`FR_UGRV` を使うと、ネイティブのフランス語 AZERTY レイアウトを使うシステムで入力すると、`ù` が出力されます。
250
251マシンで使うプライマリシステムレイアウトが US ANSI と異なる場合、これらの言語固有のキーコードを使うと、QMK キーマップが実際に画面に出力されるものとより一致するようになります。ただし、これらのキーコードは、内部の対応するデフォルトの US キーコードのエイリアスに過ぎず、キーボードで使われる HID プロトコル自体は本質的に US ANSI に基づいていることに注意してください。
252
253
254## Windows での国際文字
255
256### AutoHotkey
257
258この方法はキーボード自体で Unicode サポートを必要としませんが、代わりにバックグラウンドで [AutoHotkey](https://autohotkey.com) が実行されていることを当てにします。
259
260最初にプログラムで使われていないモディファイアの組み合わせを選択する必要があります。
261Ctrl+Alt+Win はあまり広く使われていないため、これに最適なはずです。
262mod-tab コンボ `LCAG_T` 用に定義されたマクロがあります。
263この mod-tab マクロをキーボードのキーに追加します。例えば: `LCAG_T(KC_TAB)`。
264これにより、キーを押してすぐ放すとキーはタブキーのように振る舞いますが、他のキーと一緒に使うとモディファイアに変わります。
265
266AutoHotkey のデフォルトのスクリプトで、カスタムホットキーを定義できます。
267
268 <^<!<#a::Send, ä
269 <^<!<#<+a::Send, Ä
270
271上のホットキーは、CtrlAltGui と CtrlAltGuiShift + 文字 a の組み合わせです。
272この組み合わせが押されると、AutoHotkey は `Send, ` の右側にあるテキストを挿入します。
273
274### 米国インターナショナル
275
276システム上で米国インターナショナルレイアウトを有効にすると、文字にアクセントをつけるために区切り文字を使います。例えば、"\`a" は à になります。
277これを有効にする方法は[ここ](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout)で見つかります。
diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c
index 3bcf74faa..4bee38dc4 100644
--- a/keyboards/clueboard/66_hotswap/gen1/gen1.c
+++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c
@@ -20,162 +20,109 @@
20 20
21const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { 21const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = {
22/* Refer to IS31 manual for these locations 22/* Refer to IS31 manual for these locations
23 * driver 23 * driver
24 * | LED address 24 * | LED address
25 * | | */ 25 * | | */
26 {0, C1_1}, // k00 KC_GESC 26 { 0, C1_1 }, // k00 KC_GESC
27 {0, C1_2}, // k01 KC_1 27 { 0, C1_2 }, // k01 KC_1
28 {0, C1_3}, // k02 KC_2 28 { 0, C1_3 }, // k02 KC_2
29 {0, C1_4}, // k03 KC_3 29 { 0, C1_4 }, // k03 KC_3
30 {0, C1_5}, // k04 KC_4 30 { 0, C1_5 }, // k04 KC_4
31 {0, C1_6}, // k05 KC_5 31 { 0, C1_6 }, // k05 KC_5
32 {0, C1_7}, // k06 KC_6 32 { 0, C1_7 }, // k06 KC_6
33 {0, C1_8}, // k07 KC_7 33 { 0, C1_8 }, // k07 KC_7
34 {0, C1_9}, // k50 KC_8 34 { 0, C1_9 }, // k50 KC_8
35 {0, C1_10}, // k51 KC_9 35 { 0, C1_10 }, // k51 KC_9
36 {0, C1_11}, // k52 KC_0 36 { 0, C1_11 }, // k52 KC_0
37 {0, C1_12}, // k53 KC_MINS 37 { 0, C1_12 }, // k53 KC_MINS
38 {0, C1_13}, // k54 KC_EQL 38 { 0, C1_13 }, // k54 KC_EQL
39 {0, C1_14}, // k55 KC_BSPC 39 { 0, C1_14 }, // k55 KC_BSPC
40 {0, C1_15}, // k57 KC_PGUP 40 { 0, C1_15 }, // k57 KC_PGUP
41 {0, C2_1}, // k10 KC_TAB 41 { 0, C2_1 }, // k10 KC_TAB
42 {0, C2_2}, // k11 KC_Q 42 { 0, C2_2 }, // k11 KC_Q
43 {0, C2_3}, // k12 KC_W 43 { 0, C2_3 }, // k12 KC_W
44 {0, C2_4}, // k13 KC_E 44 { 0, C2_4 }, // k13 KC_E
45 {0, C2_5}, // k14 KC_R 45 { 0, C2_5 }, // k14 KC_R
46 {0, C2_6}, // k15 KC_T 46 { 0, C2_6 }, // k15 KC_T
47 {0, C2_7}, // k16 KC_Y 47 { 0, C2_7 }, // k16 KC_Y
48 {0, C2_8}, // k17 KC_U 48 { 0, C2_8 }, // k17 KC_U
49 {0, C2_9}, // k60 KC_I 49 { 0, C2_9 }, // k60 KC_I
50 {0, C2_10}, // k61 KC_O 50 { 0, C2_10 }, // k61 KC_O
51 {0, C2_11}, // k62 KC_P 51 { 0, C2_11 }, // k62 KC_P
52 {0, C2_12}, // k63 KC_LBRC 52 { 0, C2_12 }, // k63 KC_LBRC
53 {0, C2_13}, // k64 KC_RBRC 53 { 0, C2_13 }, // k64 KC_RBRC
54 {0, C2_14}, // k65 KC_BSLS 54 { 0, C2_14 }, // k65 KC_BSLS
55 {0, C2_15}, // k67 KC_PGDN 55 { 0, C2_15 }, // k67 KC_PGDN
56 {0, C3_1}, // k20 KC_CAPS 56 { 0, C3_1 }, // k20 KC_CAPS
57 {0, C3_2}, // k21 KC_A 57 { 0, C3_2 }, // k21 KC_A
58 {0, C3_3}, // k22 KC_S 58 { 0, C3_3 }, // k22 KC_S
59 {0, C3_4}, // k23 KC_D 59 { 0, C3_4 }, // k23 KC_D
60 {0, C3_5}, // k24 KC_F 60 { 0, C3_5 }, // k24 KC_F
61 {0, C3_6}, // k25 KC_G 61 { 0, C3_6 }, // k25 KC_G
62 {0, C3_7}, // k26 KC_H 62 { 0, C3_7 }, // k26 KC_H
63 {0, C3_8}, // k27 KC_J 63 { 0, C3_8 }, // k27 KC_J
64 {0, C3_9}, // k70 KC_K 64 { 0, C3_9 }, // k70 KC_K
65 {0, C3_10}, // k71 KC_L 65 { 0, C3_10 }, // k71 KC_L
66 {0, C3_11}, // k72 KC_SCLN 66 { 0, C3_11 }, // k72 KC_SCLN
67 {0, C3_12}, // k73 KC_QUOT 67 { 0, C3_12 }, // k73 KC_QUOT
68 {0, C3_14}, // k75 KC_ENT 68 { 0, C3_14 }, // k75 KC_ENT
69 {0, C4_1}, // k30 KC_LSFT 69 { 0, C4_1 }, // k30 KC_LSFT
70 {0, C4_3}, // k32 KC_Z 70 { 0, C4_3 }, // k32 KC_Z
71 {0, C4_4}, // k33 KC_X 71 { 0, C4_4 }, // k33 KC_X
72 {0, C4_5}, // k34 KC_C 72 { 0, C4_5 }, // k34 KC_C
73 {0, C4_6}, // k35 KC_V 73 { 0, C4_6 }, // k35 KC_V
74 {0, C4_7}, // k36 KC_B 74 { 0, C4_7 }, // k36 KC_B
75 {0, C4_8}, // k37 KC_N 75 { 0, C4_8 }, // k37 KC_N
76 {0, C4_9}, // k80 KC_M 76 { 0, C4_9 }, // k80 KC_M
77 {0, C4_10}, // k81 KC_COMM 77 { 0, C4_10 }, // k81 KC_COMM
78 {0, C4_11}, // k82 KC_DOT 78 { 0, C4_11 }, // k82 KC_DOT
79 {0, C4_12}, // k83 KC_SLSH 79 { 0, C4_12 }, // k83 KC_SLSH
80 {0, C4_13}, // k85 KC_RSFT 80 { 0, C4_13 }, // k85 KC_RSFT
81 {0, C4_14}, // k86 KC_UP 81 { 0, C4_14 }, // k86 KC_UP
82 {0, C5_1}, // k40 KC_LCTL 82 { 0, C5_1 }, // k40 KC_LCTL
83 {0, C5_2}, // k41 KC_LGUI 83 { 0, C5_2 }, // k41 KC_LGUI
84 {0, C5_3}, // k42 KC_LALT 84 { 0, C5_3 }, // k42 KC_LALT
85 {0, C5_4}, // Unassociated between LALT and SPACE_2.75 85 { 0, C5_4 }, // Unassociated between LALT and SPACE_2.75
86 {0, C5_5}, // k45 KC_SPC SPACE_2.75 86 { 0, C5_5 }, // k45 KC_SPC SPACE_2.75
87 {0, C5_6}, // k45 KC_SPC SPACE_6.75 87 { 0, C5_6 }, // k45 KC_SPC SPACE_6.75
88 {0, C5_7}, // k46 KC_SPC SPACE_2.25 88 { 0, C5_7 }, // k46 KC_SPC SPACE_2.25
89 {0, C5_8}, // Unassociated between SPACE_2.25 and SPACE_1.25 89 { 0, C5_8 }, // Unassociated between SPACE_2.25 and SPACE_1.25
90 {0, C5_9}, // k90 KC_RGUI 90 { 0, C5_9 }, // k90 KC_RGUI
91 {0, C5_10}, // k92 KC_RALT 91 { 0, C5_10 }, // k92 KC_RALT
92 {0, C5_11}, // k93 MO(_FL) 92 { 0, C5_11 }, // k93 MO(_FL)
93 {0, C5_12}, // k94 KC_RCTL 93 { 0, C5_12 }, // k94 KC_RCTL
94 {0, C5_13}, // k95 KC_LEFT 94 { 0, C5_13 }, // k95 KC_LEFT
95 {0, C5_14}, // k96 KC_DOWN 95 { 0, C5_14 }, // k96 KC_DOWN
96 {0, C5_15} // k97 KC_RGHT 96 { 0, C5_15 } // k97 KC_RGHT
97}; 97};
98 98
99const led_matrix g_leds[LED_DRIVER_LED_COUNT] = { 99led_config_t g_led_config = {
100 100 {
101 /*{row | col << 4} 101 // Key Matrix to LED Index
102 | LED_ROW_COL(row, col) 102 { 0, 1, 2, 3, 4, 5, 6, 7 },
103 | | modifier 103 { 15, 16, 17, 18, 19, 20, 21, 22 },
104 | | | */ 104 { 30, 31, 32, 33, 34, 35, 36, 37 },
105 {{0|(1<<4)}, {0, 0}, 1}, // k00 KC_GESC 105 { 43, NO_LED, 44, 45, 46, 47, 48, 49 },
106 {{0|(2<<4)}, {14.45, 0}, 0}, // k01 KC_1 106 { 56, 57, 58, NO_LED, NO_LED, 60, 61, NO_LED },
107 {{0|(3<<4)}, {28.9, 0}, 0}, // k02 KC_2 107 { 8, 9, 10, 11, 12, 13, NO_LED, 14 },
108 {{0|(4<<4)}, {43.35, 0}, 0}, // k03 KC_3 108 { 23, 24, 25, 26, 27, 28, NO_LED, 29 },
109 {{0|(5<<4)}, {57.8, 0}, 0}, // k04 KC_4 109 { 38, 39, 40, 41, NO_LED, 42, NO_LED, NO_LED },
110 {{0|(6<<4)}, {72.25, 0}, 0}, // k05 KC_5 110 { 50, 51, 52, 53, NO_LED, 54, 55, NO_LED },
111 {{0|(7<<4)}, {86.7, 0}, 0}, // k06 KC_6 111 { 64, NO_LED, 65, 66, 67, 68, 69, 70 }
112 {{0|(8<<4)}, {101.2, 0}, 0}, // k07 KC_7 112 }, {
113 {{0|(9<<4)}, {115.6, 0}, 0}, // k50 KC_8 113 // LED Index to Physical Position
114 {{0|(10<<4)}, {130, 0}, 0}, // k51 KC_9 114 { 0, 0 }, { 15, 0 }, { 29, 0 }, { 43, 0 }, { 58, 0 }, { 72, 0 }, { 87, 0 }, { 101, 0 }, { 116, 0 }, { 130, 0 }, { 145, 0 }, { 159, 0 }, { 173, 0 }, { 195, 0 }, { 224, 0 },
115 {{0|(11<<4)}, {144.5, 0}, 0}, // k52 KC_0 115 { 4, 16 }, { 22, 16 }, { 36, 16 }, { 51, 16 }, { 65, 16 }, { 80, 16 }, { 94, 16 }, { 108, 16 }, { 123, 16 }, { 137, 16 }, { 152, 16 }, { 166, 16 }, { 181, 16 }, { 199, 16 }, { 224, 16 },
116 {{0|(12<<4)}, {159, 0}, 0}, // k53 KC_MINS 116 { 5, 32 }, { 25, 32 }, { 40, 32 }, { 54, 32 }, { 69, 32 }, { 83, 32 }, { 98, 32 }, { 112, 32 }, { 126, 32 }, { 141, 32 }, { 155, 32 }, { 170, 32 }, { 184, 32 },
117 {{0|(13<<4)}, {173.4, 0}, 0}, // k54 KC_EQL 117 { 16, 48 }, { 33, 48 }, { 47, 48 }, { 61, 48 }, { 76, 48 }, { 90, 48 }, { 105, 48 }, { 119, 48 }, { 134, 48 }, { 148, 48 }, { 163, 48 }, { 188, 48 }, { 210, 48 },
118 {{0|(14<<4)}, {195.1, 0}, 1}, // k55 KC_BSPC 118 { 9, 64 }, { 27, 64 }, { 45, 64 }, { 60, 64 }, { 74, 64 }, { 88, 64 }, { 103, 64 }, { 117, 64 }, { 136, 64 }, { 154, 64 }, { 168, 64 }, { 186, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }
119 {{0|(15<<4)}, {224, 0}, 1}, // k57 KC_PGUP 119 }, {
120 120 // LED Index to Flag
121 {{1|(0<<4)}, {3.6125, 16}, 1}, // k10 KC_TAB 121 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
122 {{1|(1<<4)}, {21.675, 16}, 0}, // k11 KC_Q 122 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
123 {{1|(2<<4)}, {36.125, 16}, 0}, // k12 KC_W 123 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
124 {{1|(3<<4)}, {50.575, 16}, 0}, // k13 KC_E 124 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
125 {{1|(4<<4)}, {65.025, 16}, 0}, // k14 KC_R 125 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
126 {{1|(5<<4)}, {79.475, 16}, 0}, // k15 KC_T 126 }
127 {{1|(6<<4)}, {93.925, 16}, 0}, // k16 KC_Y
128 {{1|(7<<4)}, {108.375, 16}, 0}, // k17 KC_U
129 {{1|(8<<4)}, {122.825, 16}, 0}, // k60 KC_I
130 {{1|(9<<4)}, {137.275, 16}, 0}, // k61 KC_O
131 {{1|(10<<4)}, {151.725, 16}, 0}, // k62 KC_P
132 {{1|(11<<4)}, {166.175, 16}, 0}, // k63 KC_LBRC
133 {{1|(12<<4)}, {180.625, 16}, 0}, // k64 KC_RBRC
134 {{1|(13<<4)}, {198.6875, 16}, 1}, // k65 KC_BSLS
135 {{1|(14<<4)}, {224, 16}, 1}, // k67 KC_PGDN
136
137 {{2|(0<<4)}, {5.41875, 32}, 1}, // k20 KC_CAPS
138 {{2|(1<<4)}, {25.2875, 32}, 0}, // k21 KC_A
139 {{2|(2<<4)}, {39.7375, 32}, 0}, // k22 KC_S
140 {{2|(3<<4)}, {54.1875, 32}, 0}, // k23 KC_D
141 {{2|(4<<4)}, {68.6375, 32}, 0}, // k24 KC_F
142 {{2|(5<<4)}, {83.0875, 32}, 0}, // k25 KC_G
143 {{2|(6<<4)}, {97.5375, 32}, 0}, // k26 KC_H
144 {{2|(7<<4)}, {111.9875, 32}, 0}, // k27 KC_J
145 {{2|(8<<4)}, {126.4375, 32}, 0}, // k70 KC_K
146 {{2|(9<<4)}, {140.8875, 32}, 0}, // k71 KC_L
147 {{2|(10<<4)}, {155.3375, 32}, 0}, // k72 KC_SCLN
148 {{2|(11<<4)}, {169.7875, 32}, 0}, // k73 KC_QUOT
149 {{2|(12<<4)}, {184.2375, 32}, 1}, // k75 KC_ENT
150
151 {{3|(0<<4)}, {16.25625, 48}, 1}, // k30 KC_LSFT
152 {{3|(1<<4)}, {32.5125, 48}, 0}, // k32 KC_Z
153 {{3|(2<<4)}, {46.9625, 48}, 0}, // k33 KC_X
154 {{3|(3<<4)}, {61.4125, 48}, 0}, // k34 KC_C
155 {{3|(4<<4)}, {75.8625, 48}, 0}, // k35 KC_V
156 {{3|(5<<4)}, {90.3125, 48}, 0}, // k36 KC_B
157 {{3|(6<<4)}, {104.7625, 48}, 0}, // k37 KC_N
158 {{3|(7<<4)}, {119.2125, 48}, 0}, // k80 KC_M
159 {{3|(8<<4)}, {133.6625, 48}, 0}, // k81 KC_COMM
160 {{3|(9<<4)}, {148.1125, 48}, 0}, // k82 KC_DOT
161 {{3|(10<<4)}, {162.5625, 48}, 0}, // k83 KC_SLSH
162 {{3|(11<<4)}, {187.85, 48}, 1}, // k85 KC_RSFT
163 {{3|(12<<4)}, {209.525, 48}, 1}, // k86 KC_UP
164
165 {{4|(0<<4)}, {9.03125, 64}, 1}, // k40 KC_LCTL
166 {{4|(1<<4)}, {27.09375, 64}, 1}, // k41 KC_LGUI
167 {{4|(2<<4)}, {45.15625, 64}, 1}, // k42 KC_LALT
168 {{4|(3<<4)}, {59.45, 64}, 1}, // Unassociated between LALT and SPACE_2.75
169 {{4|(4<<4)}, {73.9, 64}, 1}, // k45 KC_SPC SPACE_2.75
170 {{4|(5<<4)}, {88.35, 64}, 1}, // k45 KC_SPC SPACE_6.25
171 {{4|(6<<4)}, {102.8, 64}, 1}, // k46 KC_SPC SPACE_2.25
172 {{4|(7<<4)}, {117.40625, 64}, 1}, // Unassociated between SPACE_2.25 and SPACE_2.75
173 {{4|(8<<4)}, {135.46875, 64}, 1}, // k90 KC_RGUI
174 {{4|(9<<4)}, {153.53125, 64}, 1}, // k92 KC_RALT
175 {{4|(10<<4)}, {167.98125, 64}, 1}, // k93 MO(_FL)
176 {{4|(11<<4)}, {186.04375, 64}, 1}, // k94 KC_RCTL
177 {{4|(12<<4)}, {195.075, 64}, 1}, // k95 KC_LEFT
178 {{4|(13<<4)}, {209.525, 64}, 1}, // k96 KC_DOWN
179 {{4|(14<<4)}, {224, 64}, 1} // k97 KC_RGHT
180}; 127};
181#endif 128#endif
diff --git a/keyboards/durgod/k320/k320.h b/keyboards/durgod/k320/k320.h
index 956cc0dcd..0e409a72c 100644
--- a/keyboards/durgod/k320/k320.h
+++ b/keyboards/durgod/k320/k320.h
@@ -26,13 +26,12 @@ void on_all_leds(void);
26 26
27// This a shortcut to help you visually see your layout. 27// This a shortcut to help you visually see your layout.
28#define LAYOUT_tkl_ansi( \ 28#define LAYOUT_tkl_ansi( \
29 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ 29 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
30 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ 30 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \
31 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ 31 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \
32 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ 32 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \
33 K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \ 33 K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \
34 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, \ 34 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \
35 K6F \
36) { \ 35) { \
37 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ 36 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
38 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ 37 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
@@ -43,6 +42,7 @@ void on_all_leds(void);
43 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ 42 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
44} 43}
45 44
45
46// This a shortcut to help you visually see your layout. 46// This a shortcut to help you visually see your layout.
47#define LAYOUT_tkl_iso( \ 47#define LAYOUT_tkl_iso( \
48 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ 48 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
diff --git a/keyboards/durgod/k320/keymaps/default/keymap.c b/keyboards/durgod/k320/keymaps/default/keymap.c
index 64b98acff..49a14ec29 100644
--- a/keyboards/durgod/k320/keymaps/default/keymap.c
+++ b/keyboards/durgod/k320/keymaps/default/keymap.c
@@ -45,13 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45 * `-----------------------------------------------------------' `-------------' 45 * `-----------------------------------------------------------' `-------------'
46 */ 46 */
47 [_BASE] = LAYOUT_tkl_ansi( /* Base Layer */ 47 [_BASE] = LAYOUT_tkl_ansi( /* Base Layer */
48 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, 48 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,
49 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_PGUP, 49 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,
50 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_INS, KC_HOME, 50 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,
51 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_DEL, KC_END, KC_PGDN, 51 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,
52 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_ENT, KC_UP, 52 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,
53 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, 53 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
54 KC_RGHT
55 ), 54 ),
56 /* Keymap _FUNC: Function Layer 55 /* Keymap _FUNC: Function Layer
57 * ,-----------------------------------------------------------. ,--------------. 56 * ,-----------------------------------------------------------. ,--------------.
@@ -69,13 +68,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
69 * `-----------------------------------------------------------' `-------------' 68 * `-----------------------------------------------------------' `-------------'
70 */ 69 */
71 [_FUNC] = LAYOUT_tkl_ansi( /* Function Layer */ 70 [_FUNC] = LAYOUT_tkl_ansi( /* Function Layer */
72 _______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, 71 _______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
75 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
76 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 75 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
77 _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, 76 _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
78 _______
79 ) 77 )
80}; 78};
81 79
diff --git a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c b/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c
index 7fcf52cfe..834d2ca55 100644
--- a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c
+++ b/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c
@@ -67,13 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
67 * `-----------------------------------------------------------' `-------------' 67 * `-----------------------------------------------------------' `-------------'
68 */ 68 */
69 [_WBL] = LAYOUT_tkl_ansi( /* Windows Base Layer */ 69 [_WBL] = LAYOUT_tkl_ansi( /* Windows Base Layer */
70 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, 70 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,
71 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_PGUP, 71 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,
72 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_INS, KC_HOME, 72 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,
73 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_DEL, KC_END, KC_PGDN, 73 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,
74 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_ENT, KC_UP, 74 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,
75 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, 75 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
76 KC_RGHT
77 ), 76 ),
78 /* Keymap _WFL: Windows Function Layer 77 /* Keymap _WFL: Windows Function Layer
79 * ,-----------------------------------------------------------. ,--------------. 78 * ,-----------------------------------------------------------. ,--------------.
@@ -91,13 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
91 * `-----------------------------------------------------------' `-------------' 90 * `-----------------------------------------------------------' `-------------'
92 */ 91 */
93 [_WFL] = LAYOUT_tkl_ansi( /* Windows First Layer */ 92 [_WFL] = LAYOUT_tkl_ansi( /* Windows First Layer */
94 _______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, 93 _______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
95 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
96 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 95 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 96 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
99 _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, 98 _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______
100 _______
101 ), 99 ),
102 /* Keymap _WSL: Windows System Layer 100 /* Keymap _WSL: Windows System Layer
103 * ,-----------------------------------------------------------. ,--------------. 101 * ,-----------------------------------------------------------. ,--------------.
@@ -115,13 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
115 * `-----------------------------------------------------------' `-------------' 113 * `-----------------------------------------------------------' `-------------'
116 */ 114 */
117 [_WSL] = LAYOUT_tkl_ansi( /* Windows Second / System Layer */ 115 [_WSL] = LAYOUT_tkl_ansi( /* Windows Second / System Layer */
118 RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX, 116 RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
119 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 117 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
120 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 118 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
121 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 119 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
122 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 120 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
123 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, 121 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
124 XXXXXXX
125 ), 122 ),
126 123
127 /* Keymap _MBL: Mac Base Layer (Alternate Layout) 124 /* Keymap _MBL: Mac Base Layer (Alternate Layout)
@@ -140,13 +137,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
140 * `-----------------------------------------------------------' `-------------' 137 * `-----------------------------------------------------------' `-------------'
141 */ 138 */
142 [_MBL] = LAYOUT_tkl_ansi( /* Mac Base Layer */ 139 [_MBL] = LAYOUT_tkl_ansi( /* Mac Base Layer */
143 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_F13, KC_F14, KC_F15, 140 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_F13, KC_F14, KC_F15,
144 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_PGUP, 141 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,
145 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_INS, KC_HOME, 142 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,
146 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_DEL, KC_END, KC_PGDN, 143 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,
147 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_ENT, KC_UP, 144 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,
148 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, 145 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
149 KC_RGHT
150 ), 146 ),
151 /* Keymap _MFL: Mac Function Layer 147 /* Keymap _MFL: Mac Function Layer
152 * ,-----------------------------------------------------------. ,--------------. 148 * ,-----------------------------------------------------------. ,--------------.
@@ -164,13 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
164 * `-----------------------------------------------------------' `-------------' 160 * `-----------------------------------------------------------' `-------------'
165 */ 161 */
166 [_MFL] = LAYOUT_tkl_ansi( /* Mac First Layer */ 162 [_MFL] = LAYOUT_tkl_ansi( /* Mac First Layer */
167 _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______, 163 _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______,
168 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 164 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
169 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 165 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
170 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 166 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
171 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 167 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
172 _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, 168 _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______
173 _______
174 ), 169 ),
175 /* Keymap _MSL: Mac System Layer 170 /* Keymap _MSL: Mac System Layer
176 * ,-----------------------------------------------------------. ,--------------. 171 * ,-----------------------------------------------------------. ,--------------.
@@ -188,13 +183,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
188 * `-----------------------------------------------------------' `-------------' 183 * `-----------------------------------------------------------' `-------------'
189 */ 184 */
190 [_MSL] = LAYOUT_tkl_ansi( /* Mac Second / System Layer */ 185 [_MSL] = LAYOUT_tkl_ansi( /* Mac Second / System Layer */
191 RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX, 186 RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
192 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 187 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
193 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 188 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
194 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 189 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
195 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 190 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
196 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, 191 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
197 XXXXXXX
198 ) 192 )
199}; 193};
200 194
diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c b/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c
index 6a42210f8..bf79f24db 100644
--- a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c
+++ b/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c
@@ -109,43 +109,39 @@ const uint32_t PROGMEM unicode_map[] = {
109 109
110const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 110const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
111 [_BL] = LAYOUT_tkl_ansi( /* Base Layer */ 111 [_BL] = LAYOUT_tkl_ansi( /* Base Layer */
112 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, 112 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,
113 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_PGUP, 113 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,
114 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_INS, KC_HOME, 114 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,
115 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_DEL, KC_END, KC_PGDN, 115 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,
116 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_ENT, KC_UP, 116 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,
117 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, 117 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
118 KC_RGHT
119 ), 118 ),
120 119
121 [_FL] = LAYOUT_tkl_ansi( /* First Layer */ 120 [_FL] = LAYOUT_tkl_ansi( /* First Layer */
122 KC_TRNS, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, 121 KC_TRNS, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX,
123 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PDTP, 122 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ADTP, KC_STOP, KC_PDTP,
124 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TASK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MSEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_ADTP, KC_STOP, 123 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TASK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MSEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_DDTP, KC_SEND, KC_NDTP,
125 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FIND, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DDTP, KC_SEND, KC_NDTP, 124 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FIND, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
126 XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAIL, XXXXXXX, XXXXXXX, XXXXXXX, KC_MENU, XXXXXXX, KC_WINU, 125 XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAIL, XXXXXXX, XXXXXXX, XXXXXXX, KC_MENU, KC_WINU,
127 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_SL), KC_TRNS, MO(_UL), XXXXXXX, KC_WINL, KC_WIND, 126 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_SL), KC_TRNS, MO(_UL), XXXXXXX, KC_WINL, KC_WIND, KC_WINR
128 KC_WINR
129 ), 127 ),
130 128
131 [_SL] = LAYOUT_tkl_ansi( /* Second Layer */ 129 [_SL] = LAYOUT_tkl_ansi( /* Second Layer */
132 XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 130 XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
133 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 131 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
134 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 132 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
135 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 133 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
136 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 134 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
137 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 135 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
138 XXXXXXX
139 ), 136 ),
140 137
141 [_UL] = LAYOUT_tkl_ansi( /* Unicode Layer */ 138 [_UL] = LAYOUT_tkl_ansi( /* Unicode Layer */
142 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 139 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
143 X(APPR), X(NEQU), X(POW2), X(POW3), XXXXXXX, XXXXXXX, X(BSQR), X(WSQR), X(INFI), X(BDOT), X(WDOT), XXXXXXX, X(PONE), XXXXXXX, XXXXXXX, 140 X(APPR), X(NEQU), X(POW2), X(POW3), XXXXXXX, XXXXXXX, X(BSQR), X(WSQR), X(INFI), X(BDOT), X(WDOT), XXXXXXX, X(PONE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
144 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(SUM), XXXXXXX, X(MYU), X(SAME), XXXXXXX, X(OHM), X(DLAR), X(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, 141 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(SUM), XXXXXXX, X(MYU), X(SAME), XXXXXXX, X(OHM), X(DLAR), X(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
145 XXXXXXX, XXXXXXX, X(SQRT), X(DELT), XXXXXXX, XXXXXXX, X(THFR), XXXXXXX, XXXXXXX, XXXXXXX, X(THET), X(DEGR), XXXXXXX, XXXXXXX, XXXXXXX, 142 XXXXXXX, XXXXXXX, X(SQRT), X(DELT), XXXXXXX, XXXXXXX, X(THFR), XXXXXXX, XXXXXXX, XXXXXXX, X(THET), X(DEGR), XXXXXXX,
146 XXXXXXX, XXXXXXX, XXXXXXX, X(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LTOE), X(MTOE), X(DIV), XXXXXXX, XXXXXXX, X(UARR), 143 XXXXXXX, XXXXXXX, XXXXXXX, X(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LTOE), X(MTOE), X(DIV), XXXXXXX, X(UARR),
147 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, X(LARR), X(DARR), 144 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, X(LARR), X(DARR), X(RARR)
148 X(RARR)
149 ) 145 )
150}; 146};
151 147
diff --git a/keyboards/keebio/iris/keymaps/csc027/config.h b/keyboards/keebio/iris/keymaps/csc027/config.h
index 31333b06b..2ec00e98b 100644
--- a/keyboards/keebio/iris/keymaps/csc027/config.h
+++ b/keyboards/keebio/iris/keymaps/csc027/config.h
@@ -19,9 +19,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20#define EE_HANDS 20#define EE_HANDS
21 21
22#define NO_ACTION_MACRO
23#define NO_ACTION_FUNCTION
24
22#undef RGBLED_NUM 25#undef RGBLED_NUM
23#define RGBLIGHT_ANIMATIONS 26#define RGBLIGHT_ANIMATIONS
24#define RGBLED_NUM 12 27#define RGBLED_NUM 12
25#define RGBLIGHT_HUE_STEP 8 28#define RGBLIGHT_HUE_STEP 8
26#define RGBLIGHT_SAT_STEP 8 29#define RGBLIGHT_SAT_STEP 8
27#define RGBLIGHT_VAL_STEP 8 30#define RGBLIGHT_VAL_STEP 8
31
32#define USB_POLLING_INTERVAL_MS 1
diff --git a/keyboards/meishi2/keymaps/moc/config.h b/keyboards/meishi2/keymaps/moc/config.h
new file mode 100644
index 000000000..9b5675af6
--- /dev/null
+++ b/keyboards/meishi2/keymaps/moc/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2021 Atsushi Nagase
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
diff --git a/keyboards/meishi2/keymaps/moc/keymap.c b/keyboards/meishi2/keymaps/moc/keymap.c
new file mode 100644
index 000000000..5e6c2e9c2
--- /dev/null
+++ b/keyboards/meishi2/keymaps/moc/keymap.c
@@ -0,0 +1,45 @@
1/* Copyright 2021 Atsushi Nagase
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18enum meishi2_moc_layers {
19 _DEFAULT,
20 _RAISE
21};
22
23#define PRO_MICRO_LED_TX D5
24#define RAISE MO(_RAISE)
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 [_DEFAULT] = LAYOUT( /* Base */
28 RAISE, KC_B, KC_N, KC_SPC
29 ),
30 [_RAISE] = LAYOUT( /* Raise */
31 _______, KC_LEFT, KC_RGHT, LSFT(KC_S)
32 )
33};
34
35void matrix_init_user(void) {
36 setPinOutput(PRO_MICRO_LED_TX);
37 writePinHigh(PRO_MICRO_LED_TX);
38}
39
40bool process_record_user(uint16_t keycode, keyrecord_t *record) {
41 if (keycode == RAISE) {
42 writePin(PRO_MICRO_LED_TX, !record->event.pressed);
43 }
44 return true;
45}
diff --git a/keyboards/meishi2/keymaps/moc/readme.md b/keyboards/meishi2/keymaps/moc/readme.md
new file mode 100644
index 000000000..aac1b25c9
--- /dev/null
+++ b/keyboards/meishi2/keymaps/moc/readme.md
@@ -0,0 +1,17 @@
1# [MOC] keymap for meishi2
2
3```
4,--------- ------ ------ -----,
5| RAISE | ⏮ | ⏭ | ⏯ |
6`--------- ------ ------ -----'
7```
8
9## Raise Layer
10
11```
12,--------- ------ ------ -----,
13| | ⏪ | ⏩ | 🔀 |
14`--------- ------ ------ -----'
15```
16
17[moc]: http://moc.daper.net/
diff --git a/keyboards/neokeys/g67/hotswap/config.h b/keyboards/neokeys/g67/hotswap/config.h
new file mode 100644
index 000000000..d5303fa05
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/config.h
@@ -0,0 +1,67 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x4E4B // "NK"
23#define PRODUCT_ID 0x5048
24#define DEVICE_VER 0x0100
25#define MANUFACTURER NEO Keys
26#define PRODUCT Palette G67 Hotswap
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 15
31
32/*
33 * Keyboard Matrix Assignments
34 *
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
40 *
41 */
42#define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 }
43#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D4, D5, D6, D7, B4 }
44
45#define DIODE_DIRECTION COL2ROW
46
47#if defined(RGBLIGHT_ENABLE)
48 #define RGB_DI_PIN F0
49 #define RGBLED_NUM 77
50 #define RGBLIGHT_HUE_STEP 8
51 #define RGBLIGHT_SAT_STEP 8
52 #define RGBLIGHT_VAL_STEP 8
53 #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
54 #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
55/*== all animations enable ==*/
56 #define RGBLIGHT_ANIMATIONS
57// /*== or choose animations ==*/
58// #define RGBLIGHT_EFFECT_BREATHING
59// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
60// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
61// #define RGBLIGHT_EFFECT_SNAKE
62// #define RGBLIGHT_EFFECT_KNIGHT
63// #define RGBLIGHT_EFFECT_CHRISTMAS
64// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
65// #define RGBLIGHT_EFFECT_RGB_TEST
66// #define RGBLIGHT_EFFECT_ALTERNATING
67#endif
diff --git a/keyboards/neokeys/g67/hotswap/hotswap.c b/keyboards/neokeys/g67/hotswap/hotswap.c
new file mode 100644
index 000000000..dfa980344
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/hotswap.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "hotswap.h"
diff --git a/keyboards/neokeys/g67/hotswap/hotswap.h b/keyboards/neokeys/g67/hotswap/hotswap.h
new file mode 100644
index 000000000..474300d06
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/hotswap.h
@@ -0,0 +1,33 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_65_ansi_blocker( \
22 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
23 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
24 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
25 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
26 K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \
27) { \
28 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
29 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
30 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
31 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
32 { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \
33}
diff --git a/keyboards/neokeys/g67/hotswap/info.json b/keyboards/neokeys/g67/hotswap/info.json
new file mode 100644
index 000000000..98d6654f0
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/info.json
@@ -0,0 +1,84 @@
1{
2 "keyboard_name": "NEO Keys Palette G67 Hotswap",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 16,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_65_ansi_blocker": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":3, "y":0},
14 {"x":4, "y":0},
15 {"x":5, "y":0},
16 {"x":6, "y":0},
17 {"x":7, "y":0},
18 {"x":8, "y":0},
19 {"x":9, "y":0},
20 {"x":10, "y":0},
21 {"x":11, "y":0},
22 {"x":12, "y":0},
23 {"x":13, "y":0, "w":2},
24 {"x":15, "y":0},
25
26 {"x":0, "y":1, "w":1.5},
27 {"x":1.5, "y":1},
28 {"x":2.5, "y":1},
29 {"x":3.5, "y":1},
30 {"x":4.5, "y":1},
31 {"x":5.5, "y":1},
32 {"x":6.5, "y":1},
33 {"x":7.5, "y":1},
34 {"x":8.5, "y":1},
35 {"x":9.5, "y":1},
36 {"x":10.5, "y":1},
37 {"x":11.5, "y":1},
38 {"x":12.5, "y":1},
39 {"x":13.5, "y":1, "w":1.5},
40 {"x":15, "y":1},
41
42 {"x":0, "y":2, "w":1.75},
43 {"x":1.75, "y":2},
44 {"x":2.75, "y":2},
45 {"x":3.75, "y":2},
46 {"x":4.75, "y":2},
47 {"x":5.75, "y":2},
48 {"x":6.75, "y":2},
49 {"x":7.75, "y":2},
50 {"x":8.75, "y":2},
51 {"x":9.75, "y":2},
52 {"x":10.75, "y":2},
53 {"x":11.75, "y":2},
54 {"x":12.75, "y":2, "w":2.25},
55 {"x":15, "y":2},
56
57 {"x":0, "y":3, "w":2.25},
58 {"x":2.25, "y":3},
59 {"x":3.25, "y":3},
60 {"x":4.25, "y":3},
61 {"x":5.25, "y":3},
62 {"x":6.25, "y":3},
63 {"x":7.25, "y":3},
64 {"x":8.25, "y":3},
65 {"x":9.25, "y":3},
66 {"x":10.25, "y":3},
67 {"x":11.25, "y":3},
68 {"x":12.25, "y":3, "w":1.75},
69 {"x":14, "y":3},
70 {"x":15, "y":3},
71
72 {"x":0, "y":4, "w":1.25},
73 {"x":1.25, "y":4, "w":1.25},
74 {"x":2.5, "y":4, "w":1.25},
75 {"x":3.75, "y":4, "w":6.25},
76 {"x":10, "y":4, "w":1.25},
77 {"x":11.25, "y":4, "w":1.25},
78 {"x":13, "y":4},
79 {"x":14, "y":4},
80 {"x":15, "y":4}
81 ]
82 }
83 }
84}
diff --git a/keyboards/neokeys/g67/hotswap/keymaps/default/keymap.c b/keyboards/neokeys/g67/hotswap/keymaps/default/keymap.c
new file mode 100644
index 000000000..9eac0afaf
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_65_ansi_blocker(
21 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_TILD,
22 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,
23 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_PGUP,
24 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,
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27 [1] = LAYOUT_65_ansi_blocker(
28 _______, 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,
29 _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END,
30 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, KC_PGUP,
31 _______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, KC_PGDN,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______
33 ),
34};
diff --git a/keyboards/neokeys/g67/hotswap/keymaps/via/keymap.c b/keyboards/neokeys/g67/hotswap/keymaps/via/keymap.c
new file mode 100644
index 000000000..e7c96d274
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/keymaps/via/keymap.c
@@ -0,0 +1,49 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_65_ansi_blocker(
21 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_TILD,
22 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,
23 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_PGUP,
24 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,
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27 [1] = LAYOUT_65_ansi_blocker(
28 _______, 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,
29 _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END,
30 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, KC_PGUP,
31 _______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, KC_PGDN,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______
33 ),
34 [2] = LAYOUT_65_ansi_blocker(
35 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______
40
41 ),
42 [3] = LAYOUT_65_ansi_blocker(
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______
48 ),
49};
diff --git a/keyboards/neokeys/g67/hotswap/keymaps/via/rules.mk b/keyboards/neokeys/g67/hotswap/keymaps/via/rules.mk
new file mode 100644
index 000000000..152460f30
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/keymaps/via/rules.mk
@@ -0,0 +1,3 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
3KEY_LOCK_ENABLE = no
diff --git a/keyboards/neokeys/g67/hotswap/readme.md b/keyboards/neokeys/g67/hotswap/readme.md
new file mode 100644
index 000000000..e8b428dae
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/readme.md
@@ -0,0 +1,21 @@
1# Palette G67 Hotswap
2
3![Palette G67 Carbon](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/neokeys/palette_g67/PaletteCarbonG67.jpg)
4
5A blockered 65% with per-key RGB, underglow, and USB Type C.
6
7* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
8* Hardware Supported: Palette G67 Hotswap (ATmega32U4)
9* Hardware Availability: [NEO Keys](https://www.neokeys.net/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make neokeys/palette_g67/hotswap:default
14
15Flashing example for this keyboard:
16
17 make neokeys/palette_g67/hotswap:default:flash
18
19To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings).
20
21See 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/neokeys/g67/hotswap/rules.mk b/keyboards/neokeys/g67/hotswap/rules.mk
new file mode 100644
index 000000000..0b304a6aa
--- /dev/null
+++ b/keyboards/neokeys/g67/hotswap/rules.mk
@@ -0,0 +1,26 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23
24KEY_LOCK_ENABLE = yes # Enable KC_LOCK support
25
26LAYOUTS = 65_ansi_blocker
diff --git a/keyboards/neokeys/g67/soldered/config.h b/keyboards/neokeys/g67/soldered/config.h
new file mode 100644
index 000000000..4672d96f1
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/config.h
@@ -0,0 +1,71 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x4E4B // "NK"
23#define PRODUCT_ID 0x5053
24#define DEVICE_VER 0x0100
25#define MANUFACTURER NEO Keys
26#define PRODUCT Palette G67 Soldered
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 16
31
32/*
33 * Keyboard Matrix Assignments
34 *
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
40 *
41 */
42#define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 }
43#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D4, D5, D6, D7, B5, B4 }
44
45#define DIODE_DIRECTION COL2ROW
46
47#define BACKLIGHT_PIN B6
48#define BACKLIGHT_BREATHING
49#define BACKLIGHT_LEVELS 10
50
51#if defined(RGBLIGHT_ENABLE)
52 #define RGB_DI_PIN F0
53 #define RGBLED_NUM 18
54 #define RGBLIGHT_HUE_STEP 8
55 #define RGBLIGHT_SAT_STEP 8
56 #define RGBLIGHT_VAL_STEP 8
57 #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
58 #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
59/*== all animations enable ==*/
60 #define RGBLIGHT_ANIMATIONS
61// /*== or choose animations ==*/
62// #define RGBLIGHT_EFFECT_BREATHING
63// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
64// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
65// #define RGBLIGHT_EFFECT_SNAKE
66// #define RGBLIGHT_EFFECT_KNIGHT
67// #define RGBLIGHT_EFFECT_CHRISTMAS
68// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
69// #define RGBLIGHT_EFFECT_RGB_TEST
70// #define RGBLIGHT_EFFECT_ALTERNATING
71#endif
diff --git a/keyboards/neokeys/g67/soldered/info.json b/keyboards/neokeys/g67/soldered/info.json
new file mode 100644
index 000000000..b2e9208e4
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/info.json
@@ -0,0 +1,541 @@
1{
2 "keyboard_name": "NEO Keys Palette G67 Soldered",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 16,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_all": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":3, "y":0},
14 {"x":4, "y":0},
15 {"x":5, "y":0},
16 {"x":6, "y":0},
17 {"x":7, "y":0},
18 {"x":8, "y":0},
19 {"x":9, "y":0},
20 {"x":10, "y":0},
21 {"x":11, "y":0},
22 {"x":12, "y":0},
23 {"x":13, "y":0},
24 {"x":14, "y":0},
25 {"x":15, "y":0},
26
27 {"x":0, "y":1, "w":1.5},
28 {"x":1.5, "y":1},
29 {"x":2.5, "y":1},
30 {"x":3.5, "y":1},
31 {"x":4.5, "y":1},
32 {"x":5.5, "y":1},
33 {"x":6.5, "y":1},
34 {"x":7.5, "y":1},
35 {"x":8.5, "y":1},
36 {"x":9.5, "y":1},
37 {"x":10.5, "y":1},
38 {"x":11.5, "y":1},
39 {"x":12.5, "y":1},
40 {"x":13.5, "y":1, "w":1.5},
41 {"x":15, "y":1},
42
43 {"x":0, "y":2, "w":1.75},
44 {"x":1.75, "y":2},
45 {"x":2.75, "y":2},
46 {"x":3.75, "y":2},
47 {"x":4.75, "y":2},
48 {"x":5.75, "y":2},
49 {"x":6.75, "y":2},
50 {"x":7.75, "y":2},
51 {"x":8.75, "y":2},
52 {"x":9.75, "y":2},
53 {"x":10.75, "y":2},
54 {"x":11.75, "y":2},
55 {"x":12.75, "y":2},
56 {"x":13.75, "y":2, "w":1.25},
57 {"x":15, "y":2},
58
59 {"x":0, "y":3, "w":1.25},
60 {"x":1.25, "y":3},
61 {"x":2.25, "y":3},
62 {"x":3.25, "y":3},
63 {"x":4.25, "y":3},
64 {"x":5.25, "y":3},
65 {"x":6.25, "y":3},
66 {"x":7.25, "y":3},
67 {"x":8.25, "y":3},
68 {"x":9.25, "y":3},
69 {"x":10.25, "y":3},
70 {"x":11.25, "y":3},
71 {"x":12.25, "y":3, "w":1.75},
72 {"x":14, "y":3},
73 {"x":15, "y":3},
74
75 {"x":0, "y":4, "w":1.25},
76 {"x":1.25, "y":4, "w":1.25},
77 {"x":2.5, "y":4, "w":1.25},
78 {"x":3.75, "y":4, "w":6.25},
79 {"x":10, "y":4},
80 {"x":11, "y":4},
81 {"x":12, "y":4},
82 {"x":13, "y":4},
83 {"x":14, "y":4},
84 {"x":15, "y":4}
85 ]
86 },
87 "LAYOUT_65_ansi": {
88 "layout": [
89 {"x":0, "y":0},
90 {"x":1, "y":0},
91 {"x":2, "y":0},
92 {"x":3, "y":0},
93 {"x":4, "y":0},
94 {"x":5, "y":0},
95 {"x":6, "y":0},
96 {"x":7, "y":0},
97 {"x":8, "y":0},
98 {"x":9, "y":0},
99 {"x":10, "y":0},
100 {"x":11, "y":0},
101 {"x":12, "y":0},
102 {"x":13, "y":0, "w":2},
103 {"x":15, "y":0},
104
105 {"x":0, "y":1, "w":1.5},
106 {"x":1.5, "y":1},
107 {"x":2.5, "y":1},
108 {"x":3.5, "y":1},
109 {"x":4.5, "y":1},
110 {"x":5.5, "y":1},
111 {"x":6.5, "y":1},
112 {"x":7.5, "y":1},
113 {"x":8.5, "y":1},
114 {"x":9.5, "y":1},
115 {"x":10.5, "y":1},
116 {"x":11.5, "y":1},
117 {"x":12.5, "y":1},
118 {"x":13.5, "y":1, "w":1.5},
119 {"x":15, "y":1},
120
121 {"x":0, "y":2, "w":1.75},
122 {"x":1.75, "y":2},
123 {"x":2.75, "y":2},
124 {"x":3.75, "y":2},
125 {"x":4.75, "y":2},
126 {"x":5.75, "y":2},
127 {"x":6.75, "y":2},
128 {"x":7.75, "y":2},
129 {"x":8.75, "y":2},
130 {"x":9.75, "y":2},
131 {"x":10.75, "y":2},
132 {"x":11.75, "y":2},
133 {"x":12.75, "y":2, "w":2.25},
134 {"x":15, "y":2},
135
136 {"x":0, "y":3, "w":2.25},
137 {"x":2.25, "y":3},
138 {"x":3.25, "y":3},
139 {"x":4.25, "y":3},
140 {"x":5.25, "y":3},
141 {"x":6.25, "y":3},
142 {"x":7.25, "y":3},
143 {"x":8.25, "y":3},
144 {"x":9.25, "y":3},
145 {"x":10.25, "y":3},
146 {"x":11.25, "y":3},
147 {"x":12.25, "y":3, "w":1.75},
148 {"x":14, "y":3},
149 {"x":15, "y":3},
150
151 {"x":0, "y":4, "w":1.25},
152 {"x":1.25, "y":4, "w":1.25},
153 {"x":2.5, "y":4, "w":1.25},
154 {"x":3.75, "y":4, "w":6.25},
155 {"x":10, "y":4},
156 {"x":11, "y":4},
157 {"x":12, "y":4},
158 {"x":13, "y":4},
159 {"x":14, "y":4},
160 {"x":15, "y":4}
161 ]
162 },
163 "LAYOUT_65_ansi_blocker": {
164 "layout": [
165 {"x":0, "y":0},
166 {"x":1, "y":0},
167 {"x":2, "y":0},
168 {"x":3, "y":0},
169 {"x":4, "y":0},
170 {"x":5, "y":0},
171 {"x":6, "y":0},
172 {"x":7, "y":0},
173 {"x":8, "y":0},
174 {"x":9, "y":0},
175 {"x":10, "y":0},
176 {"x":11, "y":0},
177 {"x":12, "y":0},
178 {"x":13, "y":0, "w":2},
179 {"x":15, "y":0},
180
181 {"x":0, "y":1, "w":1.5},
182 {"x":1.5, "y":1},
183 {"x":2.5, "y":1},
184 {"x":3.5, "y":1},
185 {"x":4.5, "y":1},
186 {"x":5.5, "y":1},
187 {"x":6.5, "y":1},
188 {"x":7.5, "y":1},
189 {"x":8.5, "y":1},
190 {"x":9.5, "y":1},
191 {"x":10.5, "y":1},
192 {"x":11.5, "y":1},
193 {"x":12.5, "y":1},
194 {"x":13.5, "y":1, "w":1.5},
195 {"x":15, "y":1},
196
197 {"x":0, "y":2, "w":1.75},
198 {"x":1.75, "y":2},
199 {"x":2.75, "y":2},
200 {"x":3.75, "y":2},
201 {"x":4.75, "y":2},
202 {"x":5.75, "y":2},
203 {"x":6.75, "y":2},
204 {"x":7.75, "y":2},
205 {"x":8.75, "y":2},
206 {"x":9.75, "y":2},
207 {"x":10.75, "y":2},
208 {"x":11.75, "y":2},
209 {"x":12.75, "y":2, "w":2.25},
210 {"x":15, "y":2},
211
212 {"x":0, "y":3, "w":2.25},
213 {"x":2.25, "y":3},
214 {"x":3.25, "y":3},
215 {"x":4.25, "y":3},
216 {"x":5.25, "y":3},
217 {"x":6.25, "y":3},
218 {"x":7.25, "y":3},
219 {"x":8.25, "y":3},
220 {"x":9.25, "y":3},
221 {"x":10.25, "y":3},
222 {"x":11.25, "y":3},
223 {"x":12.25, "y":3, "w":1.75},
224 {"x":14, "y":3},
225 {"x":15, "y":3},
226
227 {"x":0, "y":4, "w":1.25},
228 {"x":1.25, "y":4, "w":1.25},
229 {"x":2.5, "y":4, "w":1.25},
230 {"x":3.75, "y":4, "w":6.25},
231 {"x":10, "y":4, "w":1.25},
232 {"x":11.25, "y":4, "w":1.25},
233 {"x":13, "y":4},
234 {"x":14, "y":4},
235 {"x":15, "y":4}
236 ]
237 },
238 "LAYOUT_65_ansi_blocker_tsangan": {
239 "layout": [
240 {"x":0, "y":0},
241 {"x":1, "y":0},
242 {"x":2, "y":0},
243 {"x":3, "y":0},
244 {"x":4, "y":0},
245 {"x":5, "y":0},
246 {"x":6, "y":0},
247 {"x":7, "y":0},
248 {"x":8, "y":0},
249 {"x":9, "y":0},
250 {"x":10, "y":0},
251 {"x":11, "y":0},
252 {"x":12, "y":0},
253 {"x":13, "y":0, "w":2},
254 {"x":15, "y":0},
255
256 {"x":0, "y":1, "w":1.5},
257 {"x":1.5, "y":1},
258 {"x":2.5, "y":1},
259 {"x":3.5, "y":1},
260 {"x":4.5, "y":1},
261 {"x":5.5, "y":1},
262 {"x":6.5, "y":1},
263 {"x":7.5, "y":1},
264 {"x":8.5, "y":1},
265 {"x":9.5, "y":1},
266 {"x":10.5, "y":1},
267 {"x":11.5, "y":1},
268 {"x":12.5, "y":1},
269 {"x":13.5, "y":1, "w":1.5},
270 {"x":15, "y":1},
271
272 {"x":0, "y":2, "w":1.75},
273 {"x":1.75, "y":2},
274 {"x":2.75, "y":2},
275 {"x":3.75, "y":2},
276 {"x":4.75, "y":2},
277 {"x":5.75, "y":2},
278 {"x":6.75, "y":2},
279 {"x":7.75, "y":2},
280 {"x":8.75, "y":2},
281 {"x":9.75, "y":2},
282 {"x":10.75, "y":2},
283 {"x":11.75, "y":2},
284 {"x":12.75, "y":2, "w":2.25},
285 {"x":15, "y":2},
286
287 {"x":0, "y":3, "w":2.25},
288 {"x":2.25, "y":3},
289 {"x":3.25, "y":3},
290 {"x":4.25, "y":3},
291 {"x":5.25, "y":3},
292 {"x":6.25, "y":3},
293 {"x":7.25, "y":3},
294 {"x":8.25, "y":3},
295 {"x":9.25, "y":3},
296 {"x":10.25, "y":3},
297 {"x":11.25, "y":3},
298 {"x":12.25, "y":3, "w":1.75},
299 {"x":14, "y":3},
300 {"x":15, "y":3},
301
302 {"x":0, "y":4, "w":1.5},
303 {"x":1.5, "y":4},
304 {"x":2.5, "y":4, "w":1.5},
305 {"x":4, "y":4, "w":7},
306 {"x":11, "y":4, "w":1.5},
307 {"x":13, "y":4},
308 {"x":14, "y":4},
309 {"x":15, "y":4}
310 ]
311 },
312 "LAYOUT_65_iso": {
313 "layout": [
314 {"x":0, "y":0},
315 {"x":1, "y":0},
316 {"x":2, "y":0},
317 {"x":3, "y":0},
318 {"x":4, "y":0},
319 {"x":5, "y":0},
320 {"x":6, "y":0},
321 {"x":7, "y":0},
322 {"x":8, "y":0},
323 {"x":9, "y":0},
324 {"x":10, "y":0},
325 {"x":11, "y":0},
326 {"x":12, "y":0},
327 {"x":13, "y":0, "w":2},
328 {"x":15, "y":0},
329
330 {"x":0, "y":1, "w":1.5},
331 {"x":1.5, "y":1},
332 {"x":2.5, "y":1},
333 {"x":3.5, "y":1},
334 {"x":4.5, "y":1},
335 {"x":5.5, "y":1},
336 {"x":6.5, "y":1},
337 {"x":7.5, "y":1},
338 {"x":8.5, "y":1},
339 {"x":9.5, "y":1},
340 {"x":10.5, "y":1},
341 {"x":11.5, "y":1},
342 {"x":12.5, "y":1},
343 {"x":15, "y":1},
344
345 {"x":0, "y":2, "w":1.75},
346 {"x":1.75, "y":2},
347 {"x":2.75, "y":2},
348 {"x":3.75, "y":2},
349 {"x":4.75, "y":2},
350 {"x":5.75, "y":2},
351 {"x":6.75, "y":2},
352 {"x":7.75, "y":2},
353 {"x":8.75, "y":2},
354 {"x":9.75, "y":2},
355 {"x":10.75, "y":2},
356 {"x":11.75, "y":2},
357 {"x":12.75, "y":2},
358 {"x":13.75, "y":1, "w":1.25, "h":2},
359 {"x":15, "y":2},
360
361 {"x":0, "y":3, "w":1.25},
362 {"x":1.25, "y":3},
363 {"x":2.25, "y":3},
364 {"x":3.25, "y":3},
365 {"x":4.25, "y":3},
366 {"x":5.25, "y":3},
367 {"x":6.25, "y":3},
368 {"x":7.25, "y":3},
369 {"x":8.25, "y":3},
370 {"x":9.25, "y":3},
371 {"x":10.25, "y":3},
372 {"x":11.25, "y":3},
373 {"x":12.25, "y":3, "w":1.75},
374 {"x":14, "y":3},
375 {"x":15, "y":3},
376
377 {"x":0, "y":4, "w":1.25},
378 {"x":1.25, "y":4, "w":1.25},
379 {"x":2.5, "y":4, "w":1.25},
380 {"x":3.75, "y":4, "w":6.25},
381 {"x":10, "y":4},
382 {"x":11, "y":4},
383 {"x":12, "y":4},
384 {"x":13, "y":4},
385 {"x":14, "y":4},
386 {"x":15, "y":4}
387 ]
388 },
389 "LAYOUT_65_iso_blocker": {
390 "layout": [
391 {"x":0, "y":0},
392 {"x":1, "y":0},
393 {"x":2, "y":0},
394 {"x":3, "y":0},
395 {"x":4, "y":0},
396 {"x":5, "y":0},
397 {"x":6, "y":0},
398 {"x":7, "y":0},
399 {"x":8, "y":0},
400 {"x":9, "y":0},
401 {"x":10, "y":0},
402 {"x":11, "y":0},
403 {"x":12, "y":0},
404 {"x":13, "y":0, "w":2},
405 {"x":15, "y":0},
406
407 {"x":0, "y":1, "w":1.5},
408 {"x":1.5, "y":1},
409 {"x":2.5, "y":1},
410 {"x":3.5, "y":1},
411 {"x":4.5, "y":1},
412 {"x":5.5, "y":1},
413 {"x":6.5, "y":1},
414 {"x":7.5, "y":1},
415 {"x":8.5, "y":1},
416 {"x":9.5, "y":1},
417 {"x":10.5, "y":1},
418 {"x":11.5, "y":1},
419 {"x":12.5, "y":1},
420 {"x":15, "y":1},
421
422 {"x":0, "y":2, "w":1.75},
423 {"x":1.75, "y":2},
424 {"x":2.75, "y":2},
425 {"x":3.75, "y":2},
426 {"x":4.75, "y":2},
427 {"x":5.75, "y":2},
428 {"x":6.75, "y":2},
429 {"x":7.75, "y":2},
430 {"x":8.75, "y":2},
431 {"x":9.75, "y":2},
432 {"x":10.75, "y":2},
433 {"x":11.75, "y":2},
434 {"x":12.75, "y":2},
435 {"x":13.75, "y":1, "w":1.25, "h":2},
436 {"x":15, "y":2},
437
438 {"x":0, "y":3, "w":1.25},
439 {"x":1.25, "y":3},
440 {"x":2.25, "y":3},
441 {"x":3.25, "y":3},
442 {"x":4.25, "y":3},
443 {"x":5.25, "y":3},
444 {"x":6.25, "y":3},
445 {"x":7.25, "y":3},
446 {"x":8.25, "y":3},
447 {"x":9.25, "y":3},
448 {"x":10.25, "y":3},
449 {"x":11.25, "y":3},
450 {"x":12.25, "y":3, "w":1.75},
451 {"x":14, "y":3},
452 {"x":15, "y":3},
453
454 {"x":0, "y":4, "w":1.25},
455 {"x":1.25, "y":4, "w":1.25},
456 {"x":2.5, "y":4, "w":1.25},
457 {"x":3.75, "y":4, "w":6.25},
458 {"x":10, "y":4, "w":1.25},
459 {"x":11.25, "y":4, "w":1.25},
460 {"x":13, "y":4},
461 {"x":14, "y":4},
462 {"x":15, "y":4}
463 ]
464 },
465 "LAYOUT_65_iso_blocker_tsangan": {
466 "layout": [
467 {"x":0, "y":0},
468 {"x":1, "y":0},
469 {"x":2, "y":0},
470 {"x":3, "y":0},
471 {"x":4, "y":0},
472 {"x":5, "y":0},
473 {"x":6, "y":0},
474 {"x":7, "y":0},
475 {"x":8, "y":0},
476 {"x":9, "y":0},
477 {"x":10, "y":0},
478 {"x":11, "y":0},
479 {"x":12, "y":0},
480 {"x":13, "y":0, "w":2},
481 {"x":15, "y":0},
482
483 {"x":0, "y":1, "w":1.5},
484 {"x":1.5, "y":1},
485 {"x":2.5, "y":1},
486 {"x":3.5, "y":1},
487 {"x":4.5, "y":1},
488 {"x":5.5, "y":1},
489 {"x":6.5, "y":1},
490 {"x":7.5, "y":1},
491 {"x":8.5, "y":1},
492 {"x":9.5, "y":1},
493 {"x":10.5, "y":1},
494 {"x":11.5, "y":1},
495 {"x":12.5, "y":1},
496 {"x":15, "y":1},
497
498 {"x":0, "y":2, "w":1.75},
499 {"x":1.75, "y":2},
500 {"x":2.75, "y":2},
501 {"x":3.75, "y":2},
502 {"x":4.75, "y":2},
503 {"x":5.75, "y":2},
504 {"x":6.75, "y":2},
505 {"x":7.75, "y":2},
506 {"x":8.75, "y":2},
507 {"x":9.75, "y":2},
508 {"x":10.75, "y":2},
509 {"x":11.75, "y":2},
510 {"x":12.75, "y":2},
511 {"x":13.75, "y":1, "w":1.25, "h":2},
512 {"x":15, "y":2},
513
514 {"x":0, "y":3, "w":1.25},
515 {"x":1.25, "y":3},
516 {"x":2.25, "y":3},
517 {"x":3.25, "y":3},
518 {"x":4.25, "y":3},
519 {"x":5.25, "y":3},
520 {"x":6.25, "y":3},
521 {"x":7.25, "y":3},
522 {"x":8.25, "y":3},
523 {"x":9.25, "y":3},
524 {"x":10.25, "y":3},
525 {"x":11.25, "y":3},
526 {"x":12.25, "y":3, "w":1.75},
527 {"x":14, "y":3},
528 {"x":15, "y":3},
529
530 {"x":0, "y":4, "w":1.5},
531 {"x":1.5, "y":4},
532 {"x":2.5, "y":4, "w":1.5},
533 {"x":4, "y":4, "w":7},
534 {"x":11, "y":4, "w":1.5},
535 {"x":13, "y":4},
536 {"x":14, "y":4},
537 {"x":15, "y":4}
538 ]
539 }
540 }
541}
diff --git a/keyboards/neokeys/g67/soldered/keymaps/default/keymap.c b/keyboards/neokeys/g67/soldered/keymaps/default/keymap.c
new file mode 100644
index 000000000..867fb5ca9
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_all(
21 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_BSLS, KC_GRV,
22 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,
23 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_GRV, KC_ENT, KC_PGUP,
24 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_RSFT, KC_UP, KC_PGDN,
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27 [1] = LAYOUT_all(
28 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
29 _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______,
30 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______,
31 _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, _______,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
33 ),
34};
diff --git a/keyboards/neokeys/g67/soldered/keymaps/via/keymap.c b/keyboards/neokeys/g67/soldered/keymaps/via/keymap.c
new file mode 100644
index 000000000..247c7fadf
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/keymaps/via/keymap.c
@@ -0,0 +1,48 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_all(
21 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_BSLS, KC_GRV,
22 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,
23 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_GRV, KC_ENT, KC_PGUP,
24 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_RSFT, KC_UP, KC_PGDN,
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27 [1] = LAYOUT_all(
28 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
29 _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______,
30 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______,
31 _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, _______,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
33 ),
34 [2] = LAYOUT_all(
35 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
40 ),
41 [3] = LAYOUT_all(
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
47 ),
48};
diff --git a/keyboards/neokeys/g67/soldered/keymaps/via/rules.mk b/keyboards/neokeys/g67/soldered/keymaps/via/rules.mk
new file mode 100644
index 000000000..36b7ba9cb
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
diff --git a/keyboards/neokeys/g67/soldered/readme.md b/keyboards/neokeys/g67/soldered/readme.md
new file mode 100644
index 000000000..5ac1196bd
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/readme.md
@@ -0,0 +1,21 @@
1# Palette G67 Soldered
2
3![Palette G67 Carbon](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/neokeys/palette_g67/PaletteCarbonG67.jpg)
4
5A blockered 65% with RGB underglow, USB Type C, and footprints for in-switch backlight.
6
7* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
8* Hardware Supported: Palette G67 Soldered (ATmega32U4)
9* Hardware Availability: [NEO Keys](https://www.neokeys.net/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make neokeys/palette_g67/soldered:default
14
15Flashing example for this keyboard:
16
17 make neokeys/palette_g67/soldered:default:flash
18
19To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings).
20
21See 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/neokeys/g67/soldered/rules.mk b/keyboards/neokeys/g67/soldered/rules.mk
new file mode 100644
index 000000000..7ddf623a2
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/rules.mk
@@ -0,0 +1,24 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23
24LAYOUTS = 65_ansi 65_ansi_blocker 65_ansi_blocker_tsangan 65_iso 65_iso_blocker # 65_iso_blocker_tsangan
diff --git a/keyboards/neokeys/g67/soldered/soldered.c b/keyboards/neokeys/g67/soldered/soldered.c
new file mode 100644
index 000000000..a2c5a258a
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/soldered.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "soldered.h"
diff --git a/keyboards/neokeys/g67/soldered/soldered.h b/keyboards/neokeys/g67/soldered/soldered.h
new file mode 100644
index 000000000..d68f07d2e
--- /dev/null
+++ b/keyboards/neokeys/g67/soldered/soldered.h
@@ -0,0 +1,117 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_all( \
22 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
23 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \
24 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
25 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
26 K40, K41, K42, K47, K48, K49, K4B, K4C, K4D, K4F \
27) { \
28 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
29 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \
30 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
31 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
32 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, K48, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F }, \
33}
34
35#define LAYOUT_65_ansi( \
36 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
37 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \
38 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \
39 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
40 K40, K41, K42, K47, K48, K49, K4B, K4C, K4D, K4F \
41) { \
42 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
43 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \
44 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \
45 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
46 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, K48, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F }, \
47}
48
49#define LAYOUT_65_ansi_blocker( \
50 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
51 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \
52 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \
53 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
54 K40, K41, K42, K47, K48, K49, K4C, K4D, K4F \
55) { \
56 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
57 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \
58 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \
59 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
60 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, K48, K49, KC_NO, KC_NO, K4C, K4D, KC_NO, K4F }, \
61}
62
63#define LAYOUT_65_ansi_blocker_tsangan( \
64 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
65 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \
66 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \
67 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
68 K40, K41, K42, K47, K49, K4C, K4D, K4F \
69) { \
70 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
71 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \
72 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \
73 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
74 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, KC_NO, KC_NO, K4C, K4D, KC_NO, K4F }, \
75}
76
77#define LAYOUT_65_iso( \
78 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
79 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1F, \
80 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
81 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
82 K40, K41, K42, K47, K48, K49, K4B, K4C, K4D, K4F \
83) { \
84 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
85 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO, K1F }, \
86 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
87 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
88 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, K48, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F }, \
89}
90
91#define LAYOUT_65_iso_blocker( \
92 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
93 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1F, \
94 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
95 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
96 K40, K41, K42, K47, K48, K49, K4C, K4D, K4F \
97) { \
98 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
99 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO, K1F }, \
100 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
101 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
102 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, K48, K49, KC_NO, KC_NO, K4C, K4D, KC_NO, K4F }, \
103}
104
105#define LAYOUT_65_iso_blocker_tsangan( \
106 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
107 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1F, \
108 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
109 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \
110 K40, K41, K42, K47, K49, K4C, K4D, K4F \
111) { \
112 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
113 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO, K1F }, \
114 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
115 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \
116 { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, KC_NO, KC_NO, K4C, K4D, KC_NO, K4F }, \
117}
diff --git a/keyboards/polycarbdiet/readme.md b/keyboards/polycarbdiet/readme.md
new file mode 100644
index 000000000..c928ebed5
--- /dev/null
+++ b/keyboards/polycarbdiet/readme.md
@@ -0,0 +1,6 @@
1# polycarbdiet
2QMK folder for custom PCB firmware.
3
4Github: polycarbdiet
5Discord: polycarb_diet
6Reddit: u/polycarb_diet
diff --git a/keyboards/polycarbdiet/s20/config.h b/keyboards/polycarbdiet/s20/config.h
new file mode 100644
index 000000000..58f998e76
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/config.h
@@ -0,0 +1,61 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x5040 // PD = polycarbdiet
23#define PRODUCT_ID 0x7320 // S20
24#define DEVICE_VER 0x0001
25#define MANUFACTURER polycarbdiet
26#define PRODUCT S20
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 4
31
32// 1 2 3 4 5
33#define MATRIX_ROW_PINS { B7, E6, D0, D1, D5 }
34#define MATRIX_COL_PINS { C6, C7, D4, D6 }
35#define UNUSED_PINS
36
37/* COL2ROW, ROW2COL */
38#define DIODE_DIRECTION ROW2COL
39
40#define BACKLIGHT_PIN B6
41#define BACKLIGHT_LEVELS 3
42#define BACKLIGHT_BREATHING
43
44#define RGB_DI_PIN B3
45#define RGBLED_NUM 4
46#define RGBLIGHT_HUE_STEP 8
47#define RGBLIGHT_SAT_STEP 8
48#define RGBLIGHT_VAL_STEP 8
49#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
50#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
51
52#define RGBLIGHT_ANIMATIONS
53
54#define DEBOUNCE 5
55
56/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
57#define LOCKING_SUPPORT_ENABLE
58/* Locking resynchronize hack */
59#define LOCKING_RESYNC_ENABLE
60
61#define FORCE_NKRO
diff --git a/keyboards/polycarbdiet/s20/info.json b/keyboards/polycarbdiet/s20/info.json
new file mode 100644
index 000000000..32407beea
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/info.json
@@ -0,0 +1,88 @@
1{
2 "keyboard_name": "S20 revA",
3 "url": "",
4 "maintainer": "polycarbdiet",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_ortho_5x4": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":3, "y":0},
14
15 {"x":0, "y":1},
16 {"x":1, "y":1},
17 {"x":2, "y":1},
18 {"x":3, "y":1},
19
20 {"x":0, "y":2},
21 {"x":1, "y":2},
22 {"x":2, "y":2},
23 {"x":3, "y":2},
24
25 {"x":0, "y":3},
26 {"x":1, "y":3},
27 {"x":2, "y":3},
28 {"x":3, "y":3},
29
30 {"x":0, "y":4},
31 {"x":1, "y":4},
32 {"x":2, "y":4},
33 {"x":3, "y":4}
34 ]
35 },
36 "LAYOUT_numpad_5x4":{
37 "layout": [
38 {"x":0, "y":0},
39 {"x":1, "y":0},
40 {"x":2, "y":0},
41 {"x":3, "y":0},
42
43 {"x":0, "y":1},
44 {"x":1, "y":1},
45 {"x":2, "y":1},
46
47 {"x":0, "y":2},
48 {"x":1, "y":2},
49 {"x":2, "y":2},
50 {"x":3, "y":1, "h":2},
51 {"x":0, "y":3},
52 {"x":1, "y":3},
53 {"x":2, "y":3},
54
55 {"x":0, "y":4, "w":2},
56 {"x":2, "y":4},
57 {"x":3, "y":3, "h":2}
58 ]
59 },
60 "LAYOUT_enter": {
61 "layout": [
62 {"x":0, "y":0},
63 {"x":1, "y":0},
64 {"x":2, "y":0},
65 {"x":3, "y":0},
66
67 {"x":0, "y":1},
68 {"x":1, "y":1},
69 {"x":2, "y":1},
70 {"x":3, "y":1},
71
72 {"x":0, "y":2},
73 {"x":1, "y":2},
74 {"x":2, "y":2},
75 {"x":3, "y":2},
76
77 {"x":0, "y":3},
78 {"x":1, "y":3},
79 {"x":2, "y":3},
80 {"x":3, "y":3, "h":2},
81
82 {"x":0, "y":4},
83 {"x":1, "y":4},
84 {"x":2, "y":4}
85 ]
86 }
87 }
88}
diff --git a/keyboards/polycarbdiet/s20/keymaps/default/keymap.c b/keyboards/polycarbdiet/s20/keymaps/default/keymap.c
new file mode 100644
index 000000000..b39920206
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/keymaps/default/keymap.c
@@ -0,0 +1,47 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_ortho_5x4(
20 KC_ESC, KC_PAST, KC_PSLS, KC_BSPC,
21 KC_P7, KC_P8, KC_P9, KC_PMNS,
22 KC_P4, KC_P5, KC_P6, KC_PPLS,
23 KC_P1, KC_P2, KC_P3, KC_PENT,
24 KC_P0, KC_PDOT, MO(1), RGB_TOG
25 ),
26 [1] = LAYOUT_ortho_5x4(
27 KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS,
30 KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS,
31 RESET, MO(2), KC_TRNS, KC_TRNS
32 ),
33 [2] = LAYOUT_ortho_5x4(
34 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
35 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
36 BL_TOGG, BL_ON, BL_INC, BL_STEP,
37 KC_TRNS, BL_OFF, BL_DEC, BL_BRTG,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39 ),
40 [3] = LAYOUT_ortho_5x4(
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
46 )
47};
diff --git a/keyboards/polycarbdiet/s20/keymaps/default/readme.md b/keyboards/polycarbdiet/s20/keymaps/default/readme.md
new file mode 100644
index 000000000..81c2266b4
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for S20
diff --git a/keyboards/polycarbdiet/s20/readme.md b/keyboards/polycarbdiet/s20/readme.md
new file mode 100644
index 000000000..7eb292771
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/readme.md
@@ -0,0 +1,27 @@
1# S20
2
3![S20](https://i.imgur.com/RvOACqR.jpg?1)
4
5The S20 keyboard is a FR4 sandwich keyboard which was orginally designed to add extra functionality to a user's current keyboard setup.
6
7* Keyboard Maintainer: [polycarbdiet](https://github.com/polycarbdiet)
8* Hardware Supported: S20 - FR4 sandwich MacroPad/NumberPad
9* Hardware Availability: Custom, limitied quantaties.
10
11Make example for this keyboard (after setting up your build environment):
12
13 make polycarbdiet/s20:default
14
15Flashing example for this keyboard:
16
17 make polycarbdiet/s20:default:flash
18
19**Reset Method:**
20- Press the `RESET` button on the under side of the PCB
21
22**Bootloader Method:**
23- Hold down the key located at `K00`, commonly programmed as `ESC`, while plugging in the keyboard.
24- Hold down the key located at `K00`, commonly programmed as `ESC`, and press the RESET button on the PCB.
25- Hold down the key located at `K42` and then press the key located at `K40`.
26
27See 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/polycarbdiet/s20/rules.mk b/keyboards/polycarbdiet/s20/rules.mk
new file mode 100644
index 000000000..152430af9
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/rules.mk
@@ -0,0 +1,23 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8
9BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
10MOUSEKEY_ENABLE = yes # Mouse keys
11EXTRAKEY_ENABLE = yes # Audio control and System control
12CONSOLE_ENABLE = no # Console for debug
13COMMAND_ENABLE = no # Commands for debug and configuration
14# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
15SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
16# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
17NKRO_ENABLE = yes # USB Nkey Rollover
18BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
19RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
20BLUETOOTH_ENABLE = no # Enable Bluetooth
21AUDIO_ENABLE = no # Audio output
22
23LAYOUTS = ortho_5x4 numpad_5x4
diff --git a/keyboards/polycarbdiet/s20/s20.c b/keyboards/polycarbdiet/s20/s20.c
new file mode 100644
index 000000000..f7b3fa903
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/s20.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "s20.h"
diff --git a/keyboards/polycarbdiet/s20/s20.h b/keyboards/polycarbdiet/s20/s20.h
new file mode 100644
index 000000000..0e3eec12e
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/s20.h
@@ -0,0 +1,61 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_ortho_5x4( \
22 K00, K01, K02, K03, \
23 K10, K11, K12, K13, \
24 K20, K21, K22, K23, \
25 K30, K31, K32, K33, \
26 K40, K41, K42, K43 \
27) { \
28 { K00, K01, K02, K03 }, \
29 { K10, K11, K12, K13 }, \
30 { K20, K21, K22, K23 }, \
31 { K30, K31, K32, K33 }, \
32 { K40, K41, K42, K43 } \
33}
34
35#define LAYOUT_numpad_5x4( \
36 K00, K01, K02, K03, \
37 K10, K11, K12, \
38 K20, K21, K22, K13, \
39 K30, K31, K32, \
40 K40, K42, K33 \
41) { \
42 { K00, K01, K02, K03 }, \
43 { K10, K11, K12, K13 }, \
44 { K20, K21, K22, KC_NO }, \
45 { K30, K31, K32, K33 }, \
46 { K40, KC_NO, K42, KC_NO } \
47}
48
49#define LAYOUT_enter( \
50 K00, K01, K02, K03, \
51 K10, K11, K12, K13, \
52 K20, K21, K22, K23, \
53 K30, K31, K32, K33, \
54 K40, K41, K42 \
55) { \
56 { K00, K01, K02, K03 }, \
57 { K10, K11, K12, K13 }, \
58 { K20, K21, K22, K23 }, \
59 { K30, K31, K32, K33 }, \
60 { K40, K41, K42, KC_NO } \
61}
diff --git a/keyboards/ymdk/ymd40/v2/config.h b/keyboards/ymdk/ymd40/v2/config.h
new file mode 100644
index 000000000..926333f4e
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/config.h
@@ -0,0 +1,71 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x594D // "YM"
23#define PRODUCT_ID 0x4440 // "D" + 40
24#define DEVICE_VER 0x0001
25#define MANUFACTURER YMDK
26#define PRODUCT YMD40 v2
27
28/* key matrix size */
29#define MATRIX_ROWS 4
30#define MATRIX_COLS 12
31
32/*
33 * Keyboard Matrix Assignments
34 *
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
40 *
41 */
42#define MATRIX_ROW_PINS { D0, B3, B2, B1 }
43#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
44
45#define DIODE_DIRECTION COL2ROW
46
47#define BACKLIGHT_PIN B6
48#define BACKLIGHT_BREATHING
49#define BACKLIGHT_LEVELS 3
50
51#if defined(RGBLIGHT_ENABLE)
52 #define RGB_DI_PIN E2
53 #define RGBLED_NUM 8
54 #define RGBLIGHT_HUE_STEP 8
55 #define RGBLIGHT_SAT_STEP 8
56 #define RGBLIGHT_VAL_STEP 8
57 #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
58 #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
59/*== all animations enable ==*/
60 #define RGBLIGHT_ANIMATIONS
61// /*== or choose animations ==*/
62// #define RGBLIGHT_EFFECT_BREATHING
63// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
64// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
65// #define RGBLIGHT_EFFECT_SNAKE
66// #define RGBLIGHT_EFFECT_KNIGHT
67// #define RGBLIGHT_EFFECT_CHRISTMAS
68// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
69// #define RGBLIGHT_EFFECT_RGB_TEST
70// #define RGBLIGHT_EFFECT_ALTERNATING
71#endif
diff --git a/keyboards/ymdk/ymd40/v2/info.json b/keyboards/ymdk/ymd40/v2/info.json
new file mode 100644
index 000000000..7bb677e20
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/info.json
@@ -0,0 +1,64 @@
1{
2 "keyboard_name": "ymd40v2",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 12,
6 "height": 4,
7 "layouts": {
8 "LAYOUT_ortho_4x12": {
9 "layout": [
10 {"label":"K00 (D0,F1)", "x":0, "y":0},
11 {"label":"K01 (D0,F0)", "x":1, "y":0},
12 {"label":"K02 (D0,B0)", "x":2, "y":0},
13 {"label":"K03 (D0,C7)", "x":3, "y":0},
14 {"label":"K04 (D0,F4)", "x":4, "y":0},
15 {"label":"K05 (D0,F5)", "x":5, "y":0},
16 {"label":"K06 (D0,F6)", "x":6, "y":0},
17 {"label":"K07 (D0,F7)", "x":7, "y":0},
18 {"label":"K08 (D0,D4)", "x":8, "y":0},
19 {"label":"K09 (D0,D6)", "x":9, "y":0},
20 {"label":"K0A (D0,B4)", "x":10, "y":0},
21 {"label":"K0B (D0,D7)", "x":11, "y":0},
22
23 {"label":"K10 (B3,F1)", "x":0, "y":1},
24 {"label":"K11 (B3,F0)", "x":1, "y":1},
25 {"label":"K12 (B3,B0)", "x":2, "y":1},
26 {"label":"K13 (B3,C7)", "x":3, "y":1},
27 {"label":"K14 (B3,F4)", "x":4, "y":1},
28 {"label":"K15 (B3,F5)", "x":5, "y":1},
29 {"label":"K16 (B3,F6)", "x":6, "y":1},
30 {"label":"K17 (B3,F7)", "x":7, "y":1},
31 {"label":"K18 (B3,D4)", "x":8, "y":1},
32 {"label":"K19 (B3,D6)", "x":9, "y":1},
33 {"label":"K1A (B3,B4)", "x":10, "y":1},
34 {"label":"K1B (B3,D7)", "x":11, "y":1},
35
36 {"label":"K20 (B2,F1)", "x":0, "y":2},
37 {"label":"K21 (B2,F0)", "x":1, "y":2},
38 {"label":"K22 (B2,B0)", "x":2, "y":2},
39 {"label":"K23 (B2,C7)", "x":3, "y":2},
40 {"label":"K24 (B2,F4)", "x":4, "y":2},
41 {"label":"K25 (B2,F5)", "x":5, "y":2},
42 {"label":"K26 (B2,F6)", "x":6, "y":2},
43 {"label":"K27 (B2,F7)", "x":7, "y":2},
44 {"label":"K28 (B2,D4)", "x":8, "y":2},
45 {"label":"K29 (B2,D6)", "x":9, "y":2},
46 {"label":"K2A (B2,B4)", "x":10, "y":2},
47 {"label":"K2B (B2,D7)", "x":11, "y":2},
48
49 {"label":"K30 (B1,F1)", "x":0, "y":3},
50 {"label":"K31 (B1,F0)", "x":1, "y":3},
51 {"label":"K32 (B1,B0)", "x":2, "y":3},
52 {"label":"K33 (B1,C7)", "x":3, "y":3},
53 {"label":"K34 (B1,F4)", "x":4, "y":3},
54 {"label":"K35 (B1,F5)", "x":5, "y":3},
55 {"label":"K36 (B1,F6)", "x":6, "y":3},
56 {"label":"K37 (B1,F7)", "x":7, "y":3},
57 {"label":"K38 (B1,D4)", "x":8, "y":3},
58 {"label":"K39 (B1,D6)", "x":9, "y":3},
59 {"label":"K3A (B1,B4)", "x":10, "y":3},
60 {"label":"K3B (B1,D7)", "x":11, "y":3}
61 ]
62 }
63 }
64}
diff --git a/keyboards/ymdk/ymd40/v2/keymaps/default/keymap.c b/keyboards/ymdk/ymd40/v2/keymaps/default/keymap.c
new file mode 100644
index 000000000..10d9385cf
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/keymaps/default/keymap.c
@@ -0,0 +1,55 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum layer_names {
20 _QWERTY,
21 _LOWER,
22 _RAISE,
23 _ADJUST
24};
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 [_QWERTY] = LAYOUT_ortho_4x12(
28 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
29 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
31 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_UP, KC_LEFT, KC_DOWN, KC_RGHT
32 ),
33 [_LOWER] = LAYOUT_ortho_4x12(
34 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
35 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
36 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
38 ),
39 [_RAISE] = LAYOUT_ortho_4x12(
40 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
41 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
42 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
44 ),
45 [_ADJUST] = LAYOUT_ortho_4x12(
46 RESET, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, DEBUG,
47 _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
48 _______, BL_TOGG, BL_DEC, BL_INC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______,
49 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
50 )
51};
52
53layer_state_t layer_state_set_user(layer_state_t state) {
54 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
55}
diff --git a/keyboards/ymdk/ymd40/v2/keymaps/default/readme.md b/keyboards/ymdk/ymd40/v2/keymaps/default/readme.md
new file mode 100644
index 000000000..952866354
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for YMD40 v2
diff --git a/keyboards/ymdk/ymd40/v2/keymaps/factory/keymap.c b/keyboards/ymdk/ymd40/v2/keymaps/factory/keymap.c
new file mode 100644
index 000000000..3c7de8bc6
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/keymaps/factory/keymap.c
@@ -0,0 +1,32 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ortho_4x12(
21 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
22 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
23 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
24 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, KC_DEL, KC_SPC, KC_SPC, RGB_MOD, KC_UP, KC_LEFT, KC_DOWN, KC_RGHT
25 ),
26 [1] = LAYOUT_ortho_4x12(
27 RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
28 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
29 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
30 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
31 ),
32};
diff --git a/keyboards/ymdk/ymd40/v2/keymaps/factory/readme.md b/keyboards/ymdk/ymd40/v2/keymaps/factory/readme.md
new file mode 100644
index 000000000..923396165
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/keymaps/factory/readme.md
@@ -0,0 +1,3 @@
1# The factory keymap for YMD40 v2
2
3This is the keymap assigned by the KBFirmware-format JSON file distributed by the vendor. This is included mainly for reference; if you wish to create your own keymap, the `default` keymap is a better starting point.
diff --git a/keyboards/ymdk/ymd40/v2/readme.md b/keyboards/ymdk/ymd40/v2/readme.md
new file mode 100644
index 000000000..153853c9f
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/readme.md
@@ -0,0 +1,22 @@
1# YMD40 v2
2
3![YMD40 v2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/ymdk/ymd40/v2/ymdk_ymd40_v2_00.jpg)\
4[PCB photo](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/ymdk/ymd40/v2/ymdk_ymd40_v2_pcb.jpg)
5
6A 40% ortholinear keyboard with in-switch LED support, underglow, and USB Type C.
7
8* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
9* Hardware Supported: YMD40v2 PCB (ATmega32U4)
10* Hardware Availability: [AliExpress](https://www.aliexpress.com/i/32821953148.html), [ymdkey.com](https://ymdkey.com/collections/40-mini-diy/products/ymd40-v2-diy-kit-qmk-type-c-pcb-cnc-case-plate-for-40-mini-cute-mechanical-keyboard-similar-to-planck-layout)
11
12Make example for this keyboard (after setting up your build environment):
13
14 make ymdk/ymd40/v2:default
15
16Flashing example for this keyboard:
17
18 make ymdk/ymd40/v2:default:flash
19
20To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings).
21
22See 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/ymdk/ymd40/v2/rules.mk b/keyboards/ymdk/ymd40/v2/rules.mk
new file mode 100644
index 000000000..7c7c443c9
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/rules.mk
@@ -0,0 +1,28 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23
24KEY_LOCK_ENABLE = no # Enable KC_LOCK support
25
26AUDIO_SUPPORTED = no
27
28LAYOUTS = ortho_4x12
diff --git a/keyboards/ymdk/ymd40/v2/v2.c b/keyboards/ymdk/ymd40/v2/v2.c
new file mode 100644
index 000000000..54450ccd1
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/v2.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "v2.h"
diff --git a/keyboards/ymdk/ymd40/v2/v2.h b/keyboards/ymdk/ymd40/v2/v2.h
new file mode 100644
index 000000000..6d524e073
--- /dev/null
+++ b/keyboards/ymdk/ymd40/v2/v2.h
@@ -0,0 +1,31 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_ortho_4x12( \
22 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
23 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
24 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
25 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \
26) { \
27 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
28 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
29 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
30 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B }, \
31}
diff --git a/quantum/config_common.h b/quantum/config_common.h
index bfaf7389e..fa1ff2a5f 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -16,357 +16,14 @@
16 16
17#pragma once 17#pragma once
18 18
19#ifndef __ASSEMBLER__
20# include "pin_defs.h"
21#endif
22
19/* diode directions */ 23/* diode directions */
20#define COL2ROW 0 24#define COL2ROW 0
21#define ROW2COL 1 25#define ROW2COL 1
22 26
23// useful for direct pin mapping
24#define NO_PIN (pin_t)(~0)
25
26#ifdef __AVR__
27# ifndef __ASSEMBLER__
28# include <avr/io.h>
29# endif
30# define PORT_SHIFTER 4 // this may be 4 for all AVR chips
31
32// If you want to add more to this list, reference the PINx definitions in these header
33// files: https://github.com/vancegroup-mirrors/avr-libc/tree/master/avr-libc/include/avr
34
35# if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
36# define ADDRESS_BASE 0x00
37# define PINB_ADDRESS 0x3
38# define PINC_ADDRESS 0x6
39# define PIND_ADDRESS 0x9
40# define PINE_ADDRESS 0xC
41# define PINF_ADDRESS 0xF
42# elif defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
43# define ADDRESS_BASE 0x00
44# define PINB_ADDRESS 0x3
45# define PINC_ADDRESS 0x6
46# define PIND_ADDRESS 0x9
47# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
48# define ADDRESS_BASE 0x00
49# define PINA_ADDRESS 0x0
50# define PINB_ADDRESS 0x3
51# define PINC_ADDRESS 0x6
52# define PIND_ADDRESS 0x9
53# define PINE_ADDRESS 0xC
54# define PINF_ADDRESS 0xF
55# elif defined(__AVR_ATmega32A__)
56# define ADDRESS_BASE 0x10
57# define PIND_ADDRESS 0x0
58# define PINC_ADDRESS 0x3
59# define PINB_ADDRESS 0x6
60# define PINA_ADDRESS 0x9
61# elif defined(__AVR_ATtiny85__)
62# define ADDRESS_BASE 0x10
63# define PINB_ADDRESS 0x6
64# else
65# error "Pins are not defined"
66# endif
67
68/* I/O pins */
69# define PINDEF(port, pin) ((PIN##port##_ADDRESS << PORT_SHIFTER) | pin)
70
71# ifdef PORTA
72# define A0 PINDEF(A, 0)
73# define A1 PINDEF(A, 1)
74# define A2 PINDEF(A, 2)
75# define A3 PINDEF(A, 3)
76# define A4 PINDEF(A, 4)
77# define A5 PINDEF(A, 5)
78# define A6 PINDEF(A, 6)
79# define A7 PINDEF(A, 7)
80# endif
81# ifdef PORTB
82# define B0 PINDEF(B, 0)
83# define B1 PINDEF(B, 1)
84# define B2 PINDEF(B, 2)
85# define B3 PINDEF(B, 3)
86# define B4 PINDEF(B, 4)
87# define B5 PINDEF(B, 5)
88# define B6 PINDEF(B, 6)
89# define B7 PINDEF(B, 7)
90# endif
91# ifdef PORTC
92# define C0 PINDEF(C, 0)
93# define C1 PINDEF(C, 1)
94# define C2 PINDEF(C, 2)
95# define C3 PINDEF(C, 3)
96# define C4 PINDEF(C, 4)
97# define C5 PINDEF(C, 5)
98# define C6 PINDEF(C, 6)
99# define C7 PINDEF(C, 7)
100# endif
101# ifdef PORTD
102# define D0 PINDEF(D, 0)
103# define D1 PINDEF(D, 1)
104# define D2 PINDEF(D, 2)
105# define D3 PINDEF(D, 3)
106# define D4 PINDEF(D, 4)
107# define D5 PINDEF(D, 5)
108# define D6 PINDEF(D, 6)
109# define D7 PINDEF(D, 7)
110# endif
111# ifdef PORTE
112# define E0 PINDEF(E, 0)
113# define E1 PINDEF(E, 1)
114# define E2 PINDEF(E, 2)
115# define E3 PINDEF(E, 3)
116# define E4 PINDEF(E, 4)
117# define E5 PINDEF(E, 5)
118# define E6 PINDEF(E, 6)
119# define E7 PINDEF(E, 7)
120# endif
121# ifdef PORTF
122# define F0 PINDEF(F, 0)
123# define F1 PINDEF(F, 1)
124# define F2 PINDEF(F, 2)
125# define F3 PINDEF(F, 3)
126# define F4 PINDEF(F, 4)
127# define F5 PINDEF(F, 5)
128# define F6 PINDEF(F, 6)
129# define F7 PINDEF(F, 7)
130# endif
131
132# ifndef __ASSEMBLER__
133# define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + ((p) >> PORT_SHIFTER) + (offset))
134// Port X Input Pins Address
135# define PINx_ADDRESS(p) _PIN_ADDRESS(p, 0)
136// Port X Data Direction Register, 0:input 1:output
137# define DDRx_ADDRESS(p) _PIN_ADDRESS(p, 1)
138// Port X Data Register
139# define PORTx_ADDRESS(p) _PIN_ADDRESS(p, 2)
140# endif
141
142#elif defined(PROTOCOL_CHIBIOS)
143// Defines mapping for Proton C replacement
144# ifdef CONVERT_TO_PROTON_C
145// Left side (front)
146# define D3 PAL_LINE(GPIOA, 9)
147# define D2 PAL_LINE(GPIOA, 10)
148// GND
149// GND
150# define D1 PAL_LINE(GPIOB, 7)
151# define D0 PAL_LINE(GPIOB, 6)
152# define D4 PAL_LINE(GPIOB, 5)
153# define C6 PAL_LINE(GPIOB, 4)
154# define D7 PAL_LINE(GPIOB, 3)
155# define E6 PAL_LINE(GPIOB, 2)
156# define B4 PAL_LINE(GPIOB, 1)
157# define B5 PAL_LINE(GPIOB, 0)
158
159// Right side (front)
160// RAW
161// GND
162// RESET
163// VCC
164# define F4 PAL_LINE(GPIOA, 2)
165# define F5 PAL_LINE(GPIOA, 1)
166# define F6 PAL_LINE(GPIOA, 0)
167# define F7 PAL_LINE(GPIOB, 8)
168# define B1 PAL_LINE(GPIOB, 13)
169# define B3 PAL_LINE(GPIOB, 14)
170# define B2 PAL_LINE(GPIOB, 15)
171# define B6 PAL_LINE(GPIOB, 9)
172
173// LEDs (only D5/C13 uses an actual LED)
174# ifdef CONVERT_TO_PROTON_C_RXLED
175# define D5 PAL_LINE(GPIOC, 14)
176# define B0 PAL_LINE(GPIOC, 13)
177# else
178# define D5 PAL_LINE(GPIOC, 13)
179# define B0 PAL_LINE(GPIOC, 14)
180# endif
181# else
182# define A0 PAL_LINE(GPIOA, 0)
183# define A1 PAL_LINE(GPIOA, 1)
184# define A2 PAL_LINE(GPIOA, 2)
185# define A3 PAL_LINE(GPIOA, 3)
186# define A4 PAL_LINE(GPIOA, 4)
187# define A5 PAL_LINE(GPIOA, 5)
188# define A6 PAL_LINE(GPIOA, 6)
189# define A7 PAL_LINE(GPIOA, 7)
190# define A8 PAL_LINE(GPIOA, 8)
191# define A9 PAL_LINE(GPIOA, 9)
192# define A10 PAL_LINE(GPIOA, 10)
193# define A11 PAL_LINE(GPIOA, 11)
194# define A12 PAL_LINE(GPIOA, 12)
195# define A13 PAL_LINE(GPIOA, 13)
196# define A14 PAL_LINE(GPIOA, 14)
197# define A15 PAL_LINE(GPIOA, 15)
198# define B0 PAL_LINE(GPIOB, 0)
199# define B1 PAL_LINE(GPIOB, 1)
200# define B2 PAL_LINE(GPIOB, 2)
201# define B3 PAL_LINE(GPIOB, 3)
202# define B4 PAL_LINE(GPIOB, 4)
203# define B5 PAL_LINE(GPIOB, 5)
204# define B6 PAL_LINE(GPIOB, 6)
205# define B7 PAL_LINE(GPIOB, 7)
206# define B8 PAL_LINE(GPIOB, 8)
207# define B9 PAL_LINE(GPIOB, 9)
208# define B10 PAL_LINE(GPIOB, 10)
209# define B11 PAL_LINE(GPIOB, 11)
210# define B12 PAL_LINE(GPIOB, 12)
211# define B13 PAL_LINE(GPIOB, 13)
212# define B14 PAL_LINE(GPIOB, 14)
213# define B15 PAL_LINE(GPIOB, 15)
214# define B16 PAL_LINE(GPIOB, 16)
215# define B17 PAL_LINE(GPIOB, 17)
216# define B18 PAL_LINE(GPIOB, 18)
217# define B19 PAL_LINE(GPIOB, 19)
218# define C0 PAL_LINE(GPIOC, 0)
219# define C1 PAL_LINE(GPIOC, 1)
220# define C2 PAL_LINE(GPIOC, 2)
221# define C3 PAL_LINE(GPIOC, 3)
222# define C4 PAL_LINE(GPIOC, 4)
223# define C5 PAL_LINE(GPIOC, 5)
224# define C6 PAL_LINE(GPIOC, 6)
225# define C7 PAL_LINE(GPIOC, 7)
226# define C8 PAL_LINE(GPIOC, 8)
227# define C9 PAL_LINE(GPIOC, 9)
228# define C10 PAL_LINE(GPIOC, 10)
229# define C11 PAL_LINE(GPIOC, 11)
230# define C12 PAL_LINE(GPIOC, 12)
231# define C13 PAL_LINE(GPIOC, 13)
232# define C14 PAL_LINE(GPIOC, 14)
233# define C15 PAL_LINE(GPIOC, 15)
234# define D0 PAL_LINE(GPIOD, 0)
235# define D1 PAL_LINE(GPIOD, 1)
236# define D2 PAL_LINE(GPIOD, 2)
237# define D3 PAL_LINE(GPIOD, 3)
238# define D4 PAL_LINE(GPIOD, 4)
239# define D5 PAL_LINE(GPIOD, 5)
240# define D6 PAL_LINE(GPIOD, 6)
241# define D7 PAL_LINE(GPIOD, 7)
242# define D8 PAL_LINE(GPIOD, 8)
243# define D9 PAL_LINE(GPIOD, 9)
244# define D10 PAL_LINE(GPIOD, 10)
245# define D11 PAL_LINE(GPIOD, 11)
246# define D12 PAL_LINE(GPIOD, 12)
247# define D13 PAL_LINE(GPIOD, 13)
248# define D14 PAL_LINE(GPIOD, 14)
249# define D15 PAL_LINE(GPIOD, 15)
250# define E0 PAL_LINE(GPIOE, 0)
251# define E1 PAL_LINE(GPIOE, 1)
252# define E2 PAL_LINE(GPIOE, 2)
253# define E3 PAL_LINE(GPIOE, 3)
254# define E4 PAL_LINE(GPIOE, 4)
255# define E5 PAL_LINE(GPIOE, 5)
256# define E6 PAL_LINE(GPIOE, 6)
257# define E7 PAL_LINE(GPIOE, 7)
258# define E8 PAL_LINE(GPIOE, 8)
259# define E9 PAL_LINE(GPIOE, 9)
260# define E10 PAL_LINE(GPIOE, 10)
261# define E11 PAL_LINE(GPIOE, 11)
262# define E12 PAL_LINE(GPIOE, 12)
263# define E13 PAL_LINE(GPIOE, 13)
264# define E14 PAL_LINE(GPIOE, 14)
265# define E15 PAL_LINE(GPIOE, 15)
266# define F0 PAL_LINE(GPIOF, 0)
267# define F1 PAL_LINE(GPIOF, 1)
268# define F2 PAL_LINE(GPIOF, 2)
269# define F3 PAL_LINE(GPIOF, 3)
270# define F4 PAL_LINE(GPIOF, 4)
271# define F5 PAL_LINE(GPIOF, 5)
272# define F6 PAL_LINE(GPIOF, 6)
273# define F7 PAL_LINE(GPIOF, 7)
274# define F8 PAL_LINE(GPIOF, 8)
275# define F9 PAL_LINE(GPIOF, 9)
276# define F10 PAL_LINE(GPIOF, 10)
277# define F11 PAL_LINE(GPIOF, 11)
278# define F12 PAL_LINE(GPIOF, 12)
279# define F13 PAL_LINE(GPIOF, 13)
280# define F14 PAL_LINE(GPIOF, 14)
281# define F15 PAL_LINE(GPIOF, 15)
282# define G0 PAL_LINE(GPIOG, 0)
283# define G1 PAL_LINE(GPIOG, 1)
284# define G2 PAL_LINE(GPIOG, 2)
285# define G3 PAL_LINE(GPIOG, 3)
286# define G4 PAL_LINE(GPIOG, 4)
287# define G5 PAL_LINE(GPIOG, 5)
288# define G6 PAL_LINE(GPIOG, 6)
289# define G7 PAL_LINE(GPIOG, 7)
290# define G8 PAL_LINE(GPIOG, 8)
291# define G9 PAL_LINE(GPIOG, 9)
292# define G10 PAL_LINE(GPIOG, 10)
293# define G11 PAL_LINE(GPIOG, 11)
294# define G12 PAL_LINE(GPIOG, 12)
295# define G13 PAL_LINE(GPIOG, 13)
296# define G14 PAL_LINE(GPIOG, 14)
297# define G15 PAL_LINE(GPIOG, 15)
298# define H0 PAL_LINE(GPIOH, 0)
299# define H1 PAL_LINE(GPIOH, 1)
300# define H2 PAL_LINE(GPIOH, 2)
301# define H3 PAL_LINE(GPIOH, 3)
302# define H4 PAL_LINE(GPIOH, 4)
303# define H5 PAL_LINE(GPIOH, 5)
304# define H6 PAL_LINE(GPIOH, 6)
305# define H7 PAL_LINE(GPIOH, 7)
306# define H8 PAL_LINE(GPIOH, 8)
307# define H9 PAL_LINE(GPIOH, 9)
308# define H10 PAL_LINE(GPIOH, 10)
309# define H11 PAL_LINE(GPIOH, 11)
310# define H12 PAL_LINE(GPIOH, 12)
311# define H13 PAL_LINE(GPIOH, 13)
312# define H14 PAL_LINE(GPIOH, 14)
313# define H15 PAL_LINE(GPIOH, 15)
314# define I0 PAL_LINE(GPIOI, 0)
315# define I1 PAL_LINE(GPIOI, 1)
316# define I2 PAL_LINE(GPIOI, 2)
317# define I3 PAL_LINE(GPIOI, 3)
318# define I4 PAL_LINE(GPIOI, 4)
319# define I5 PAL_LINE(GPIOI, 5)
320# define I6 PAL_LINE(GPIOI, 6)
321# define I7 PAL_LINE(GPIOI, 7)
322# define I8 PAL_LINE(GPIOI, 8)
323# define I9 PAL_LINE(GPIOI, 9)
324# define I10 PAL_LINE(GPIOI, 10)
325# define I11 PAL_LINE(GPIOI, 11)
326# define I12 PAL_LINE(GPIOI, 12)
327# define I13 PAL_LINE(GPIOI, 13)
328# define I14 PAL_LINE(GPIOI, 14)
329# define I15 PAL_LINE(GPIOI, 15)
330# define J0 PAL_LINE(GPIOJ, 0)
331# define J1 PAL_LINE(GPIOJ, 1)
332# define J2 PAL_LINE(GPIOJ, 2)
333# define J3 PAL_LINE(GPIOJ, 3)
334# define J4 PAL_LINE(GPIOJ, 4)
335# define J5 PAL_LINE(GPIOJ, 5)
336# define J6 PAL_LINE(GPIOJ, 6)
337# define J7 PAL_LINE(GPIOJ, 7)
338# define J8 PAL_LINE(GPIOJ, 8)
339# define J9 PAL_LINE(GPIOJ, 9)
340# define J10 PAL_LINE(GPIOJ, 10)
341# define J11 PAL_LINE(GPIOJ, 11)
342# define J12 PAL_LINE(GPIOJ, 12)
343# define J13 PAL_LINE(GPIOJ, 13)
344# define J14 PAL_LINE(GPIOJ, 14)
345# define J15 PAL_LINE(GPIOJ, 15)
346// Keyboards can `#define KEYBOARD_REQUIRES_GPIOK` if they need to access GPIO-K pins. These conflict with a whole
347// bunch of layout definitions, so it's intentionally left out unless absolutely required -- in that case, the
348// keyboard designer should use a different symbol when defining their layout macros.
349# ifdef KEYBOARD_REQUIRES_GPIOK
350# define K0 PAL_LINE(GPIOK, 0)
351# define K1 PAL_LINE(GPIOK, 1)
352# define K2 PAL_LINE(GPIOK, 2)
353# define K3 PAL_LINE(GPIOK, 3)
354# define K4 PAL_LINE(GPIOK, 4)
355# define K5 PAL_LINE(GPIOK, 5)
356# define K6 PAL_LINE(GPIOK, 6)
357# define K7 PAL_LINE(GPIOK, 7)
358# define K8 PAL_LINE(GPIOK, 8)
359# define K9 PAL_LINE(GPIOK, 9)
360# define K10 PAL_LINE(GPIOK, 10)
361# define K11 PAL_LINE(GPIOK, 11)
362# define K12 PAL_LINE(GPIOK, 12)
363# define K13 PAL_LINE(GPIOK, 13)
364# define K14 PAL_LINE(GPIOK, 14)
365# define K15 PAL_LINE(GPIOK, 15)
366# endif
367# endif
368#endif
369
370#define API_SYSEX_MAX_SIZE 32 27#define API_SYSEX_MAX_SIZE 32
371 28
372#include "song_list.h" 29#include "song_list.h"
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index eb523990a..c3538e94d 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -27,7 +27,7 @@
27#include <string.h> 27#include <string.h>
28#include <math.h> 28#include <math.h>
29 29
30led_config_t led_matrix_config; 30led_eeconfig_t led_matrix_eeconfig;
31 31
32#ifndef MAX 32#ifndef MAX
33# define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) 33# define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
@@ -70,40 +70,32 @@ void eeconfig_update_led_matrix(uint32_t config_value) { eeprom_update_dword(EEC
70 70
71void eeconfig_update_led_matrix_default(void) { 71void eeconfig_update_led_matrix_default(void) {
72 dprintf("eeconfig_update_led_matrix_default\n"); 72 dprintf("eeconfig_update_led_matrix_default\n");
73 led_matrix_config.enable = 1; 73 led_matrix_eeconfig.enable = 1;
74 led_matrix_config.mode = LED_MATRIX_UNIFORM_BRIGHTNESS; 74 led_matrix_eeconfig.mode = LED_MATRIX_UNIFORM_BRIGHTNESS;
75 led_matrix_config.val = 128; 75 led_matrix_eeconfig.val = 128;
76 led_matrix_config.speed = 0; 76 led_matrix_eeconfig.speed = 0;
77 eeconfig_update_led_matrix(led_matrix_config.raw); 77 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
78} 78}
79 79
80void eeconfig_debug_led_matrix(void) { 80void eeconfig_debug_led_matrix(void) {
81 dprintf("led_matrix_config eeprom\n"); 81 dprintf("led_matrix_eeconfig eeprom\n");
82 dprintf("led_matrix_config.enable = %d\n", led_matrix_config.enable); 82 dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable);
83 dprintf("led_matrix_config.mode = %d\n", led_matrix_config.mode); 83 dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode);
84 dprintf("led_matrix_config.val = %d\n", led_matrix_config.val); 84 dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val);
85 dprintf("led_matrix_config.speed = %d\n", led_matrix_config.speed); 85 dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed);
86} 86}
87 87
88// Last led hit
89#ifndef LED_HITS_TO_REMEMBER
90# define LED_HITS_TO_REMEMBER 8
91#endif
92uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; 88uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255};
93uint8_t g_last_led_count = 0; 89uint8_t g_last_led_count = 0;
94 90
95void map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { 91uint8_t map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
96 led_matrix led; 92 uint8_t led_count = 0;
97 *led_count = 0; 93 uint8_t led_index = g_led_config.matrix_co[row][column];
98 94 if (led_index != NO_LED) {
99 for (uint8_t i = 0; i < LED_DRIVER_LED_COUNT; i++) { 95 led_i[led_count] = led_index;
100 // map_index_to_led(i, &led); 96 led_count++;
101 led = g_leds[i];
102 if (row == led.matrix_co.row && column == led.matrix_co.col) {
103 led_i[*led_count] = i;
104 (*led_count)++;
105 }
106 } 97 }
98 return led_count;
107} 99}
108 100
109void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); } 101void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); }
@@ -114,8 +106,8 @@ void led_matrix_set_index_value_all(uint8_t value) { led_matrix_driver.set_value
114 106
115bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { 107bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
116 if (record->event.pressed) { 108 if (record->event.pressed) {
117 uint8_t led[8], led_count; 109 uint8_t led[8];
118 map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); 110 uint8_t led_count = map_row_column_to_led(record->event.key.row, record->event.key.col, led);
119 if (led_count > 0) { 111 if (led_count > 0) {
120 for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { 112 for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) {
121 g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; 113 g_last_led_hit[i - 1] = g_last_led_hit[i - 2];
@@ -127,8 +119,8 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
127 g_any_key_hit = 0; 119 g_any_key_hit = 0;
128 } else { 120 } else {
129#ifdef LED_MATRIX_KEYRELEASES 121#ifdef LED_MATRIX_KEYRELEASES
130 uint8_t led[8], led_count; 122 uint8_t led[8];
131 map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); 123 uint8_t led_count = map_row_column_to_led(record->event.key.row, record->event.key.col, led);
132 for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 255; 124 for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 255;
133 125
134 g_any_key_hit = 255; 126 g_any_key_hit = 255;
@@ -143,12 +135,12 @@ void led_matrix_set_suspend_state(bool state) { g_suspend_state = state; }
143void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); } 135void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); }
144 136
145// Uniform brightness 137// Uniform brightness
146void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_config.val); } 138void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_eeconfig.val); }
147 139
148void led_matrix_custom(void) {} 140void led_matrix_custom(void) {}
149 141
150void led_matrix_task(void) { 142void led_matrix_task(void) {
151 if (!led_matrix_config.enable) { 143 if (!led_matrix_eeconfig.enable) {
152 led_matrix_all_off(); 144 led_matrix_all_off();
153 led_matrix_indicators(); 145 led_matrix_indicators();
154 return; 146 return;
@@ -170,7 +162,7 @@ void led_matrix_task(void) {
170 // Ideally we would also stop sending zeros to the LED driver PWM buffers 162 // Ideally we would also stop sending zeros to the LED driver PWM buffers
171 // while suspended and just do a software shutdown. This is a cheap hack for now. 163 // while suspended and just do a software shutdown. This is a cheap hack for now.
172 bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20)); 164 bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20));
173 uint8_t effect = suspend_backlight ? 0 : led_matrix_config.mode; 165 uint8_t effect = suspend_backlight ? 0 : led_matrix_eeconfig.mode;
174 166
175 // this gets ticked at 20 Hz. 167 // this gets ticked at 20 Hz.
176 // each effect can opt to do calculations 168 // each effect can opt to do calculations
@@ -211,8 +203,8 @@ __attribute__((weak)) void led_matrix_indicators_user(void) {}
211// else 203// else
212// { 204// {
213// // This needs updated to something like 205// // This needs updated to something like
214// // uint8_t led[8], led_count; 206// // uint8_t led[8];
215// // map_row_column_to_led(row,column,led,&led_count); 207// // uint8_t led_count = map_row_column_to_led(row, column, led);
216// // for(uint8_t i = 0; i < led_count; i++) 208// // for(uint8_t i = 0; i < led_count; i++)
217// map_row_column_to_led(row, column, index); 209// map_row_column_to_led(row, column, index);
218// } 210// }
@@ -235,12 +227,12 @@ void led_matrix_init(void) {
235 eeconfig_update_led_matrix_default(); 227 eeconfig_update_led_matrix_default();
236 } 228 }
237 229
238 led_matrix_config.raw = eeconfig_read_led_matrix(); 230 led_matrix_eeconfig.raw = eeconfig_read_led_matrix();
239 231
240 if (!led_matrix_config.mode) { 232 if (!led_matrix_eeconfig.mode) {
241 dprintf("led_matrix_init_drivers led_matrix_config.mode = 0. Write default values to EEPROM.\n"); 233 dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
242 eeconfig_update_led_matrix_default(); 234 eeconfig_update_led_matrix_default();
243 led_matrix_config.raw = eeconfig_read_led_matrix(); 235 led_matrix_eeconfig.raw = eeconfig_read_led_matrix();
244 } 236 }
245 237
246 eeconfig_debug_led_matrix(); // display current eeprom values 238 eeconfig_debug_led_matrix(); // display current eeprom values
@@ -270,8 +262,8 @@ static uint8_t decrement(uint8_t value, uint8_t step, uint8_t min, uint8_t max)
270// } 262// }
271 263
272// void backlight_set_key_value(uint8_t row, uint8_t column, uint8_t value) { 264// void backlight_set_key_value(uint8_t row, uint8_t column, uint8_t value) {
273// uint8_t led[8], led_count; 265// uint8_t led[8];
274// map_row_column_to_led(row,column,led,&led_count); 266// uint8_t led_count = map_row_column_to_led(row, column, led);
275// for(uint8_t i = 0; i < led_count; i++) { 267// for(uint8_t i = 0; i < led_count; i++) {
276// if (led[i] < LED_DRIVER_LED_COUNT) { 268// if (led[i] < LED_DRIVER_LED_COUNT) {
277// void *address = backlight_get_custom_key_value_eeprom_address(led[i]); 269// void *address = backlight_get_custom_key_value_eeprom_address(led[i]);
@@ -283,74 +275,74 @@ static uint8_t decrement(uint8_t value, uint8_t step, uint8_t min, uint8_t max)
283uint32_t led_matrix_get_tick(void) { return g_tick; } 275uint32_t led_matrix_get_tick(void) { return g_tick; }
284 276
285void led_matrix_toggle(void) { 277void led_matrix_toggle(void) {
286 led_matrix_config.enable ^= 1; 278 led_matrix_eeconfig.enable ^= 1;
287 eeconfig_update_led_matrix(led_matrix_config.raw); 279 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
288} 280}
289 281
290void led_matrix_enable(void) { 282void led_matrix_enable(void) {
291 led_matrix_config.enable = 1; 283 led_matrix_eeconfig.enable = 1;
292 eeconfig_update_led_matrix(led_matrix_config.raw); 284 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
293} 285}
294 286
295void led_matrix_enable_noeeprom(void) { led_matrix_config.enable = 1; } 287void led_matrix_enable_noeeprom(void) { led_matrix_eeconfig.enable = 1; }
296 288
297void led_matrix_disable(void) { 289void led_matrix_disable(void) {
298 led_matrix_config.enable = 0; 290 led_matrix_eeconfig.enable = 0;
299 eeconfig_update_led_matrix(led_matrix_config.raw); 291 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
300} 292}
301 293
302void led_matrix_disable_noeeprom(void) { led_matrix_config.enable = 0; } 294void led_matrix_disable_noeeprom(void) { led_matrix_eeconfig.enable = 0; }
303 295
304void led_matrix_step(void) { 296void led_matrix_step(void) {
305 led_matrix_config.mode++; 297 led_matrix_eeconfig.mode++;
306 if (led_matrix_config.mode >= LED_MATRIX_EFFECT_MAX) { 298 if (led_matrix_eeconfig.mode >= LED_MATRIX_EFFECT_MAX) {
307 led_matrix_config.mode = 1; 299 led_matrix_eeconfig.mode = 1;
308 } 300 }
309 eeconfig_update_led_matrix(led_matrix_config.raw); 301 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
310} 302}
311 303
312void led_matrix_step_reverse(void) { 304void led_matrix_step_reverse(void) {
313 led_matrix_config.mode--; 305 led_matrix_eeconfig.mode--;
314 if (led_matrix_config.mode < 1) { 306 if (led_matrix_eeconfig.mode < 1) {
315 led_matrix_config.mode = LED_MATRIX_EFFECT_MAX - 1; 307 led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1;
316 } 308 }
317 eeconfig_update_led_matrix(led_matrix_config.raw); 309 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
318} 310}
319 311
320void led_matrix_increase_val(void) { 312void led_matrix_increase_val(void) {
321 led_matrix_config.val = increment(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); 313 led_matrix_eeconfig.val = increment(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
322 eeconfig_update_led_matrix(led_matrix_config.raw); 314 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
323} 315}
324 316
325void led_matrix_decrease_val(void) { 317void led_matrix_decrease_val(void) {
326 led_matrix_config.val = decrement(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); 318 led_matrix_eeconfig.val = decrement(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
327 eeconfig_update_led_matrix(led_matrix_config.raw); 319 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
328} 320}
329 321
330void led_matrix_increase_speed(void) { 322void led_matrix_increase_speed(void) {
331 led_matrix_config.speed = increment(led_matrix_config.speed, 1, 0, 3); 323 led_matrix_eeconfig.speed = increment(led_matrix_eeconfig.speed, 1, 0, 3);
332 eeconfig_update_led_matrix(led_matrix_config.raw); // EECONFIG needs to be increased to support this 324 eeconfig_update_led_matrix(led_matrix_eeconfig.raw); // EECONFIG needs to be increased to support this
333} 325}
334 326
335void led_matrix_decrease_speed(void) { 327void led_matrix_decrease_speed(void) {
336 led_matrix_config.speed = decrement(led_matrix_config.speed, 1, 0, 3); 328 led_matrix_eeconfig.speed = decrement(led_matrix_eeconfig.speed, 1, 0, 3);
337 eeconfig_update_led_matrix(led_matrix_config.raw); // EECONFIG needs to be increased to support this 329 eeconfig_update_led_matrix(led_matrix_eeconfig.raw); // EECONFIG needs to be increased to support this
338} 330}
339 331
340void led_matrix_mode(uint8_t mode, bool eeprom_write) { 332void led_matrix_mode(uint8_t mode, bool eeprom_write) {
341 led_matrix_config.mode = mode; 333 led_matrix_eeconfig.mode = mode;
342 if (eeprom_write) { 334 if (eeprom_write) {
343 eeconfig_update_led_matrix(led_matrix_config.raw); 335 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
344 } 336 }
345} 337}
346 338
347uint8_t led_matrix_get_mode(void) { return led_matrix_config.mode; } 339uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; }
348 340
349void led_matrix_set_value_noeeprom(uint8_t val) { led_matrix_config.val = val; } 341void led_matrix_set_value_noeeprom(uint8_t val) { led_matrix_eeconfig.val = val; }
350 342
351void led_matrix_set_value(uint8_t val) { 343void led_matrix_set_value(uint8_t val) {
352 led_matrix_set_value_noeeprom(val); 344 led_matrix_set_value_noeeprom(val);
353 eeconfig_update_led_matrix(led_matrix_config.raw); 345 eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
354} 346}
355 347
356void backlight_set(uint8_t val) { led_matrix_set_value(val); } 348void backlight_set(uint8_t val) { led_matrix_set_value(val); }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index 7dcdf1d48..85bae43c1 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -19,46 +19,12 @@
19 19
20#pragma once 20#pragma once
21 21
22#include "led_matrix_types.h"
23
22#ifndef BACKLIGHT_ENABLE 24#ifndef BACKLIGHT_ENABLE
23# error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE 25# error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE
24#endif 26#endif
25 27
26typedef struct Point {
27 uint8_t x;
28 uint8_t y;
29} __attribute__((packed)) Point;
30
31typedef struct led_matrix {
32 union {
33 uint8_t raw;
34 struct {
35 uint8_t row : 4; // 16 max
36 uint8_t col : 4; // 16 max
37 };
38 } matrix_co;
39 Point point;
40 uint8_t modifier : 1;
41} __attribute__((packed)) led_matrix;
42
43extern const led_matrix g_leds[LED_DRIVER_LED_COUNT];
44
45typedef struct {
46 uint8_t index;
47 uint8_t value;
48} led_indicator;
49
50typedef union {
51 uint32_t raw;
52 struct {
53 bool enable : 1;
54 uint8_t mode : 6;
55 uint8_t hue : 8; // Unused by led_matrix
56 uint8_t sat : 8; // Unused by led_matrix
57 uint8_t val : 8;
58 uint8_t speed : 8; // EECONFIG needs to be increased to support this
59 };
60} led_config_t;
61
62enum led_matrix_effects { 28enum led_matrix_effects {
63 LED_MATRIX_UNIFORM_BRIGHTNESS = 1, 29 LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
64 // All new effects go above this line 30 // All new effects go above this line
@@ -122,3 +88,7 @@ typedef struct {
122} led_matrix_driver_t; 88} led_matrix_driver_t;
123 89
124extern const led_matrix_driver_t led_matrix_driver; 90extern const led_matrix_driver_t led_matrix_driver;
91
92extern led_eeconfig_t led_matrix_eeconfig;
93
94extern led_config_t g_led_config;
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix_types.h
new file mode 100644
index 000000000..2602bf2bf
--- /dev/null
+++ b/quantum/led_matrix_types.h
@@ -0,0 +1,69 @@
1/* Copyright 2021
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include <stdint.h>
20#include <stdbool.h>
21
22#if defined(__GNUC__)
23# define PACKED __attribute__((__packed__))
24#else
25# define PACKED
26#endif
27
28#if defined(_MSC_VER)
29# pragma pack(push, 1)
30#endif
31
32// Last led hit
33#ifndef LED_HITS_TO_REMEMBER
34# define LED_HITS_TO_REMEMBER 8
35#endif // LED_HITS_TO_REMEMBER
36
37typedef struct PACKED {
38 uint8_t x;
39 uint8_t y;
40} point_t;
41
42#define LED_FLAG_ALL 0xFF
43#define LED_FLAG_NONE 0x00
44#define LED_FLAG_MODIFIER 0x01
45#define LED_FLAG_KEYLIGHT 0x04
46#define LED_FLAG_INDICATOR 0x08
47
48#define NO_LED 255
49
50typedef struct PACKED {
51 uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
52 point_t point[LED_DRIVER_LED_COUNT];
53 uint8_t flags[LED_DRIVER_LED_COUNT];
54} led_config_t;
55
56typedef union {
57 uint32_t raw;
58 struct PACKED {
59 uint8_t enable : 2;
60 uint8_t mode : 6;
61 uint16_t reserved;
62 uint8_t val;
63 uint8_t speed; // EECONFIG needs to be increased to support this
64 };
65} led_eeconfig_t;
66
67#if defined(_MSC_VER)
68# pragma pack(pop)
69#endif
diff --git a/quantum/quantum.h b/quantum/quantum.h
index b7bf5be31..36a983d57 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -55,6 +55,8 @@
55#include "timer.h" 55#include "timer.h"
56#include "sync_timer.h" 56#include "sync_timer.h"
57#include "config_common.h" 57#include "config_common.h"
58#include "gpio.h"
59#include "atomic_util.h"
58#include "led.h" 60#include "led.h"
59#include "action_util.h" 61#include "action_util.h"
60#include "action_tapping.h" 62#include "action_tapping.h"
@@ -199,20 +201,6 @@ extern layer_state_t layer_state;
199 201
200// Function substitutions to ease GPIO manipulation 202// Function substitutions to ease GPIO manipulation
201#if defined(__AVR__) 203#if defined(__AVR__)
202typedef uint8_t pin_t;
203
204# define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
205# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
206# define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low")
207# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
208
209# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
210# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
211# define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin))
212
213# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
214
215# define togglePin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF))
216 204
217/* The AVR series GPIOs have a one clock read delay for changes in the digital input signal. 205/* The AVR series GPIOs have a one clock read delay for changes in the digital input signal.
218 * But here's more margin to make it two clocks. */ 206 * But here's more margin to make it two clocks. */
@@ -221,25 +209,8 @@ typedef uint8_t pin_t;
221# endif 209# endif
222# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) 210# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
223 211
224#elif defined(PROTOCOL_CHIBIOS) 212#elif defined(__ARMEL__) || defined(__ARMEB__)
225typedef ioline_t pin_t;
226
227# define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT)
228# define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)
229# define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)
230# define setPinOutput(pin) palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)
231
232# define writePinHigh(pin) palSetLine(pin)
233# define writePinLow(pin) palClearLine(pin)
234# define writePin(pin, level) ((level) ? (writePinHigh(pin)) : (writePinLow(pin)))
235
236# define readPin(pin) palReadLine(pin)
237 213
238# define togglePin(pin) palToggleLine(pin)
239
240#endif
241
242#if defined(__ARMEL__) || defined(__ARMEB__)
243/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus 214/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus
244 * to which the GPIO is connected. 215 * to which the GPIO is connected.
245 * The connected buses differ depending on the various series of MCUs. 216 * The connected buses differ depending on the various series of MCUs.
@@ -258,63 +229,8 @@ typedef ioline_t pin_t;
258# endif 229# endif
259# endif 230# endif
260# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) 231# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
261#endif
262
263// Atomic macro to help make GPIO and other controls atomic.
264#ifdef IGNORE_ATOMIC_BLOCK
265/* do nothing atomic macro */
266# define ATOMIC_BLOCK for (uint8_t __ToDo = 1; __ToDo; __ToDo = 0)
267# define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK
268# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK
269
270#elif defined(__AVR__)
271/* atomic macro for AVR */
272# include <util/atomic.h>
273
274# define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
275# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK(ATOMIC_FORCEON)
276
277#elif defined(PROTOCOL_CHIBIOS) || defined(PROTOCOL_ARM_ATSAM)
278/* atomic macro for ChibiOS / ARM ATSAM */
279# if defined(PROTOCOL_ARM_ATSAM)
280# include "arm_atsam_protocol.h"
281# endif
282
283static __inline__ uint8_t __interrupt_disable__(void) {
284# if defined(PROTOCOL_CHIBIOS)
285 chSysLock();
286# endif
287# if defined(PROTOCOL_ARM_ATSAM)
288 __disable_irq();
289# endif
290 return 1;
291}
292
293static __inline__ void __interrupt_enable__(const uint8_t *__s) {
294# if defined(PROTOCOL_CHIBIOS)
295 chSysUnlock();
296# endif
297# if defined(PROTOCOL_ARM_ATSAM)
298 __enable_irq();
299# endif
300 __asm__ volatile("" ::: "memory");
301 (void)__s;
302}
303
304# define ATOMIC_BLOCK(type) for (type, __ToDo = __interrupt_disable__(); __ToDo; __ToDo = 0)
305# define ATOMIC_FORCEON uint8_t sreg_save __attribute__((__cleanup__(__interrupt_enable__))) = 0
306
307# define ATOMIC_BLOCK_RESTORESTATE _Static_assert(0, "ATOMIC_BLOCK_RESTORESTATE dose not implement")
308# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK(ATOMIC_FORCEON)
309
310/* Other platform */
311#else
312
313# define ATOMIC_BLOCK_RESTORESTATE _Static_assert(0, "ATOMIC_BLOCK_RESTORESTATE dose not implement")
314# define ATOMIC_BLOCK_FORCEON _Static_assert(0, "ATOMIC_BLOCK_FORCEON dose not implement")
315 232
316#endif 233#endif
317
318#define SEND_STRING(string) send_string_P(PSTR(string)) 234#define SEND_STRING(string) send_string_P(PSTR(string))
319#define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval) 235#define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval)
320 236
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
index f7ebec1d5..7b8171fb2 100644
--- a/quantum/rgb_matrix_types.h
+++ b/quantum/rgb_matrix_types.h
@@ -1,3 +1,19 @@
1/* Copyright 2021
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3#include <stdint.h> 19#include <stdint.h>
diff --git a/tmk_core/common/atomic_util.h b/tmk_core/common/atomic_util.h
new file mode 100644
index 000000000..2c95302a1
--- /dev/null
+++ b/tmk_core/common/atomic_util.h
@@ -0,0 +1,32 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18// Macro to help make GPIO and other controls atomic.
19
20#ifndef IGNORE_ATOMIC_BLOCK
21# if __has_include_next("atomic_util.h")
22# include_next "atomic_util.h" /* Include the platforms atomic.h */
23# else
24# define ATOMIC_BLOCK _Static_assert(0, "ATOMIC_BLOCK not implemented")
25# define ATOMIC_BLOCK_RESTORESTATE _Static_assert(0, "ATOMIC_BLOCK_RESTORESTATE not implemented")
26# define ATOMIC_BLOCK_FORCEON _Static_assert(0, "ATOMIC_BLOCK_FORCEON not implemented")
27# endif
28#else /* do nothing atomic macro */
29# define ATOMIC_BLOCK for (uint8_t __ToDo = 1; __ToDo; __ToDo = 0)
30# define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK
31# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK
32#endif
diff --git a/tmk_core/common/avr/atomic_util.h b/tmk_core/common/avr/atomic_util.h
new file mode 100644
index 000000000..7c5d2e7dc
--- /dev/null
+++ b/tmk_core/common/avr/atomic_util.h
@@ -0,0 +1,22 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18/* atomic macro for AVR */
19#include <util/atomic.h>
20
21#define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
22#define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK(ATOMIC_FORCEON)
diff --git a/tmk_core/common/avr/gpio.h b/tmk_core/common/avr/gpio.h
new file mode 100644
index 000000000..231556c29
--- /dev/null
+++ b/tmk_core/common/avr/gpio.h
@@ -0,0 +1,34 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include <avr/io.h>
19#include "pin_defs.h"
20
21typedef uint8_t pin_t;
22
23#define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
24#define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
25#define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low")
26#define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
27
28#define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
29#define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
30#define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin))
31
32#define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
33
34#define togglePin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF))
diff --git a/tmk_core/common/avr/pin_defs.h b/tmk_core/common/avr/pin_defs.h
new file mode 100644
index 000000000..23d948041
--- /dev/null
+++ b/tmk_core/common/avr/pin_defs.h
@@ -0,0 +1,128 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include <avr/io.h>
19
20#define PORT_SHIFTER 4 // this may be 4 for all AVR chips
21
22// If you want to add more to this list, reference the PINx definitions in these header
23// files: https://github.com/vancegroup-mirrors/avr-libc/tree/master/avr-libc/include/avr
24
25#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
26# define ADDRESS_BASE 0x00
27# define PINB_ADDRESS 0x3
28# define PINC_ADDRESS 0x6
29# define PIND_ADDRESS 0x9
30# define PINE_ADDRESS 0xC
31# define PINF_ADDRESS 0xF
32#elif defined(__AVR_AT90USB162__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
33# define ADDRESS_BASE 0x00
34# define PINB_ADDRESS 0x3
35# define PINC_ADDRESS 0x6
36# define PIND_ADDRESS 0x9
37#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
38# define ADDRESS_BASE 0x00
39# define PINA_ADDRESS 0x0
40# define PINB_ADDRESS 0x3
41# define PINC_ADDRESS 0x6
42# define PIND_ADDRESS 0x9
43# define PINE_ADDRESS 0xC
44# define PINF_ADDRESS 0xF
45#elif defined(__AVR_ATmega32A__)
46# define ADDRESS_BASE 0x10
47# define PIND_ADDRESS 0x0
48# define PINC_ADDRESS 0x3
49# define PINB_ADDRESS 0x6
50# define PINA_ADDRESS 0x9
51#elif defined(__AVR_ATtiny85__)
52# define ADDRESS_BASE 0x10
53# define PINB_ADDRESS 0x6
54#else
55# error "Pins are not defined"
56#endif
57
58#define PINDEF(port, pin) ((PIN##port##_ADDRESS << PORT_SHIFTER) | pin)
59
60#define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + ((p) >> PORT_SHIFTER) + (offset))
61// Port X Input Pins Address
62#define PINx_ADDRESS(p) _PIN_ADDRESS(p, 0)
63// Port X Data Direction Register, 0:input 1:output
64#define DDRx_ADDRESS(p) _PIN_ADDRESS(p, 1)
65// Port X Data Register
66#define PORTx_ADDRESS(p) _PIN_ADDRESS(p, 2)
67
68/* I/O pins */
69#ifdef PORTA
70# define A0 PINDEF(A, 0)
71# define A1 PINDEF(A, 1)
72# define A2 PINDEF(A, 2)
73# define A3 PINDEF(A, 3)
74# define A4 PINDEF(A, 4)
75# define A5 PINDEF(A, 5)
76# define A6 PINDEF(A, 6)
77# define A7 PINDEF(A, 7)
78#endif
79#ifdef PORTB
80# define B0 PINDEF(B, 0)
81# define B1 PINDEF(B, 1)
82# define B2 PINDEF(B, 2)
83# define B3 PINDEF(B, 3)
84# define B4 PINDEF(B, 4)
85# define B5 PINDEF(B, 5)
86# define B6 PINDEF(B, 6)
87# define B7 PINDEF(B, 7)
88#endif
89#ifdef PORTC
90# define C0 PINDEF(C, 0)
91# define C1 PINDEF(C, 1)
92# define C2 PINDEF(C, 2)
93# define C3 PINDEF(C, 3)
94# define C4 PINDEF(C, 4)
95# define C5 PINDEF(C, 5)
96# define C6 PINDEF(C, 6)
97# define C7 PINDEF(C, 7)
98#endif
99#ifdef PORTD
100# define D0 PINDEF(D, 0)
101# define D1 PINDEF(D, 1)
102# define D2 PINDEF(D, 2)
103# define D3 PINDEF(D, 3)
104# define D4 PINDEF(D, 4)
105# define D5 PINDEF(D, 5)
106# define D6 PINDEF(D, 6)
107# define D7 PINDEF(D, 7)
108#endif
109#ifdef PORTE
110# define E0 PINDEF(E, 0)
111# define E1 PINDEF(E, 1)
112# define E2 PINDEF(E, 2)
113# define E3 PINDEF(E, 3)
114# define E4 PINDEF(E, 4)
115# define E5 PINDEF(E, 5)
116# define E6 PINDEF(E, 6)
117# define E7 PINDEF(E, 7)
118#endif
119#ifdef PORTF
120# define F0 PINDEF(F, 0)
121# define F1 PINDEF(F, 1)
122# define F2 PINDEF(F, 2)
123# define F3 PINDEF(F, 3)
124# define F4 PINDEF(F, 4)
125# define F5 PINDEF(F, 5)
126# define F6 PINDEF(F, 6)
127# define F7 PINDEF(F, 7)
128#endif
diff --git a/tmk_core/common/chibios/atomic_util.h b/tmk_core/common/chibios/atomic_util.h
new file mode 100644
index 000000000..897504515
--- /dev/null
+++ b/tmk_core/common/chibios/atomic_util.h
@@ -0,0 +1,37 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include <ch.h>
19
20static __inline__ uint8_t __interrupt_disable__(void) {
21 chSysLock();
22
23 return 1;
24}
25
26static __inline__ void __interrupt_enable__(const uint8_t *__s) {
27 chSysUnlock();
28
29 __asm__ volatile("" ::: "memory");
30 (void)__s;
31}
32
33#define ATOMIC_BLOCK(type) for (type, __ToDo = __interrupt_disable__(); __ToDo; __ToDo = 0)
34#define ATOMIC_FORCEON uint8_t sreg_save __attribute__((__cleanup__(__interrupt_enable__))) = 0
35
36#define ATOMIC_BLOCK_RESTORESTATE _Static_assert(0, "ATOMIC_BLOCK_RESTORESTATE not implemented")
37#define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK(ATOMIC_FORCEON)
diff --git a/tmk_core/common/chibios/gpio.h b/tmk_core/common/chibios/gpio.h
new file mode 100644
index 000000000..5d0e142ab
--- /dev/null
+++ b/tmk_core/common/chibios/gpio.h
@@ -0,0 +1,34 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include <hal.h>
19#include "pin_defs.h"
20
21typedef ioline_t pin_t;
22
23#define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT)
24#define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)
25#define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)
26#define setPinOutput(pin) palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)
27
28#define writePinHigh(pin) palSetLine(pin)
29#define writePinLow(pin) palClearLine(pin)
30#define writePin(pin, level) ((level) ? (writePinHigh(pin)) : (writePinLow(pin)))
31
32#define readPin(pin) palReadLine(pin)
33
34#define togglePin(pin) palToggleLine(pin)
diff --git a/tmk_core/common/chibios/pin_defs.h b/tmk_core/common/chibios/pin_defs.h
new file mode 100644
index 000000000..86bc1076e
--- /dev/null
+++ b/tmk_core/common/chibios/pin_defs.h
@@ -0,0 +1,242 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18// Defines mapping for Proton C replacement
19#ifdef CONVERT_TO_PROTON_C
20// Left side (front)
21# define D3 PAL_LINE(GPIOA, 9)
22# define D2 PAL_LINE(GPIOA, 10)
23// GND
24// GND
25# define D1 PAL_LINE(GPIOB, 7)
26# define D0 PAL_LINE(GPIOB, 6)
27# define D4 PAL_LINE(GPIOB, 5)
28# define C6 PAL_LINE(GPIOB, 4)
29# define D7 PAL_LINE(GPIOB, 3)
30# define E6 PAL_LINE(GPIOB, 2)
31# define B4 PAL_LINE(GPIOB, 1)
32# define B5 PAL_LINE(GPIOB, 0)
33
34// Right side (front)
35// RAW
36// GND
37// RESET
38// VCC
39# define F4 PAL_LINE(GPIOA, 2)
40# define F5 PAL_LINE(GPIOA, 1)
41# define F6 PAL_LINE(GPIOA, 0)
42# define F7 PAL_LINE(GPIOB, 8)
43# define B1 PAL_LINE(GPIOB, 13)
44# define B3 PAL_LINE(GPIOB, 14)
45# define B2 PAL_LINE(GPIOB, 15)
46# define B6 PAL_LINE(GPIOB, 9)
47
48// LEDs (only D5/C13 uses an actual LED)
49# ifdef CONVERT_TO_PROTON_C_RXLED
50# define D5 PAL_LINE(GPIOC, 14)
51# define B0 PAL_LINE(GPIOC, 13)
52# else
53# define D5 PAL_LINE(GPIOC, 13)
54# define B0 PAL_LINE(GPIOC, 14)
55# endif
56#else
57# define A0 PAL_LINE(GPIOA, 0)
58# define A1 PAL_LINE(GPIOA, 1)
59# define A2 PAL_LINE(GPIOA, 2)
60# define A3 PAL_LINE(GPIOA, 3)
61# define A4 PAL_LINE(GPIOA, 4)
62# define A5 PAL_LINE(GPIOA, 5)
63# define A6 PAL_LINE(GPIOA, 6)
64# define A7 PAL_LINE(GPIOA, 7)
65# define A8 PAL_LINE(GPIOA, 8)
66# define A9 PAL_LINE(GPIOA, 9)
67# define A10 PAL_LINE(GPIOA, 10)
68# define A11 PAL_LINE(GPIOA, 11)
69# define A12 PAL_LINE(GPIOA, 12)
70# define A13 PAL_LINE(GPIOA, 13)
71# define A14 PAL_LINE(GPIOA, 14)
72# define A15 PAL_LINE(GPIOA, 15)
73# define B0 PAL_LINE(GPIOB, 0)
74# define B1 PAL_LINE(GPIOB, 1)
75# define B2 PAL_LINE(GPIOB, 2)
76# define B3 PAL_LINE(GPIOB, 3)
77# define B4 PAL_LINE(GPIOB, 4)
78# define B5 PAL_LINE(GPIOB, 5)
79# define B6 PAL_LINE(GPIOB, 6)
80# define B7 PAL_LINE(GPIOB, 7)
81# define B8 PAL_LINE(GPIOB, 8)
82# define B9 PAL_LINE(GPIOB, 9)
83# define B10 PAL_LINE(GPIOB, 10)
84# define B11 PAL_LINE(GPIOB, 11)
85# define B12 PAL_LINE(GPIOB, 12)
86# define B13 PAL_LINE(GPIOB, 13)
87# define B14 PAL_LINE(GPIOB, 14)
88# define B15 PAL_LINE(GPIOB, 15)
89# define B16 PAL_LINE(GPIOB, 16)
90# define B17 PAL_LINE(GPIOB, 17)
91# define B18 PAL_LINE(GPIOB, 18)
92# define B19 PAL_LINE(GPIOB, 19)
93# define C0 PAL_LINE(GPIOC, 0)
94# define C1 PAL_LINE(GPIOC, 1)
95# define C2 PAL_LINE(GPIOC, 2)
96# define C3 PAL_LINE(GPIOC, 3)
97# define C4 PAL_LINE(GPIOC, 4)
98# define C5 PAL_LINE(GPIOC, 5)
99# define C6 PAL_LINE(GPIOC, 6)
100# define C7 PAL_LINE(GPIOC, 7)
101# define C8 PAL_LINE(GPIOC, 8)
102# define C9 PAL_LINE(GPIOC, 9)
103# define C10 PAL_LINE(GPIOC, 10)
104# define C11 PAL_LINE(GPIOC, 11)
105# define C12 PAL_LINE(GPIOC, 12)
106# define C13 PAL_LINE(GPIOC, 13)
107# define C14 PAL_LINE(GPIOC, 14)
108# define C15 PAL_LINE(GPIOC, 15)
109# define D0 PAL_LINE(GPIOD, 0)
110# define D1 PAL_LINE(GPIOD, 1)
111# define D2 PAL_LINE(GPIOD, 2)
112# define D3 PAL_LINE(GPIOD, 3)
113# define D4 PAL_LINE(GPIOD, 4)
114# define D5 PAL_LINE(GPIOD, 5)
115# define D6 PAL_LINE(GPIOD, 6)
116# define D7 PAL_LINE(GPIOD, 7)
117# define D8 PAL_LINE(GPIOD, 8)
118# define D9 PAL_LINE(GPIOD, 9)
119# define D10 PAL_LINE(GPIOD, 10)
120# define D11 PAL_LINE(GPIOD, 11)
121# define D12 PAL_LINE(GPIOD, 12)
122# define D13 PAL_LINE(GPIOD, 13)
123# define D14 PAL_LINE(GPIOD, 14)
124# define D15 PAL_LINE(GPIOD, 15)
125# define E0 PAL_LINE(GPIOE, 0)
126# define E1 PAL_LINE(GPIOE, 1)
127# define E2 PAL_LINE(GPIOE, 2)
128# define E3 PAL_LINE(GPIOE, 3)
129# define E4 PAL_LINE(GPIOE, 4)
130# define E5 PAL_LINE(GPIOE, 5)
131# define E6 PAL_LINE(GPIOE, 6)
132# define E7 PAL_LINE(GPIOE, 7)
133# define E8 PAL_LINE(GPIOE, 8)
134# define E9 PAL_LINE(GPIOE, 9)
135# define E10 PAL_LINE(GPIOE, 10)
136# define E11 PAL_LINE(GPIOE, 11)
137# define E12 PAL_LINE(GPIOE, 12)
138# define E13 PAL_LINE(GPIOE, 13)
139# define E14 PAL_LINE(GPIOE, 14)
140# define E15 PAL_LINE(GPIOE, 15)
141# define F0 PAL_LINE(GPIOF, 0)
142# define F1 PAL_LINE(GPIOF, 1)
143# define F2 PAL_LINE(GPIOF, 2)
144# define F3 PAL_LINE(GPIOF, 3)
145# define F4 PAL_LINE(GPIOF, 4)
146# define F5 PAL_LINE(GPIOF, 5)
147# define F6 PAL_LINE(GPIOF, 6)
148# define F7 PAL_LINE(GPIOF, 7)
149# define F8 PAL_LINE(GPIOF, 8)
150# define F9 PAL_LINE(GPIOF, 9)
151# define F10 PAL_LINE(GPIOF, 10)
152# define F11 PAL_LINE(GPIOF, 11)
153# define F12 PAL_LINE(GPIOF, 12)
154# define F13 PAL_LINE(GPIOF, 13)
155# define F14 PAL_LINE(GPIOF, 14)
156# define F15 PAL_LINE(GPIOF, 15)
157# define G0 PAL_LINE(GPIOG, 0)
158# define G1 PAL_LINE(GPIOG, 1)
159# define G2 PAL_LINE(GPIOG, 2)
160# define G3 PAL_LINE(GPIOG, 3)
161# define G4 PAL_LINE(GPIOG, 4)
162# define G5 PAL_LINE(GPIOG, 5)
163# define G6 PAL_LINE(GPIOG, 6)
164# define G7 PAL_LINE(GPIOG, 7)
165# define G8 PAL_LINE(GPIOG, 8)
166# define G9 PAL_LINE(GPIOG, 9)
167# define G10 PAL_LINE(GPIOG, 10)
168# define G11 PAL_LINE(GPIOG, 11)
169# define G12 PAL_LINE(GPIOG, 12)
170# define G13 PAL_LINE(GPIOG, 13)
171# define G14 PAL_LINE(GPIOG, 14)
172# define G15 PAL_LINE(GPIOG, 15)
173# define H0 PAL_LINE(GPIOH, 0)
174# define H1 PAL_LINE(GPIOH, 1)
175# define H2 PAL_LINE(GPIOH, 2)
176# define H3 PAL_LINE(GPIOH, 3)
177# define H4 PAL_LINE(GPIOH, 4)
178# define H5 PAL_LINE(GPIOH, 5)
179# define H6 PAL_LINE(GPIOH, 6)
180# define H7 PAL_LINE(GPIOH, 7)
181# define H8 PAL_LINE(GPIOH, 8)
182# define H9 PAL_LINE(GPIOH, 9)
183# define H10 PAL_LINE(GPIOH, 10)
184# define H11 PAL_LINE(GPIOH, 11)
185# define H12 PAL_LINE(GPIOH, 12)
186# define H13 PAL_LINE(GPIOH, 13)
187# define H14 PAL_LINE(GPIOH, 14)
188# define H15 PAL_LINE(GPIOH, 15)
189# define I0 PAL_LINE(GPIOI, 0)
190# define I1 PAL_LINE(GPIOI, 1)
191# define I2 PAL_LINE(GPIOI, 2)
192# define I3 PAL_LINE(GPIOI, 3)
193# define I4 PAL_LINE(GPIOI, 4)
194# define I5 PAL_LINE(GPIOI, 5)
195# define I6 PAL_LINE(GPIOI, 6)
196# define I7 PAL_LINE(GPIOI, 7)
197# define I8 PAL_LINE(GPIOI, 8)
198# define I9 PAL_LINE(GPIOI, 9)
199# define I10 PAL_LINE(GPIOI, 10)
200# define I11 PAL_LINE(GPIOI, 11)
201# define I12 PAL_LINE(GPIOI, 12)
202# define I13 PAL_LINE(GPIOI, 13)
203# define I14 PAL_LINE(GPIOI, 14)
204# define I15 PAL_LINE(GPIOI, 15)
205# define J0 PAL_LINE(GPIOJ, 0)
206# define J1 PAL_LINE(GPIOJ, 1)
207# define J2 PAL_LINE(GPIOJ, 2)
208# define J3 PAL_LINE(GPIOJ, 3)
209# define J4 PAL_LINE(GPIOJ, 4)
210# define J5 PAL_LINE(GPIOJ, 5)
211# define J6 PAL_LINE(GPIOJ, 6)
212# define J7 PAL_LINE(GPIOJ, 7)
213# define J8 PAL_LINE(GPIOJ, 8)
214# define J9 PAL_LINE(GPIOJ, 9)
215# define J10 PAL_LINE(GPIOJ, 10)
216# define J11 PAL_LINE(GPIOJ, 11)
217# define J12 PAL_LINE(GPIOJ, 12)
218# define J13 PAL_LINE(GPIOJ, 13)
219# define J14 PAL_LINE(GPIOJ, 14)
220# define J15 PAL_LINE(GPIOJ, 15)
221// Keyboards can `#define KEYBOARD_REQUIRES_GPIOK` if they need to access GPIO-K pins. These conflict with a whole
222// bunch of layout definitions, so it's intentionally left out unless absolutely required -- in that case, the
223// keyboard designer should use a different symbol when defining their layout macros.
224# ifdef KEYBOARD_REQUIRES_GPIOK
225# define K0 PAL_LINE(GPIOK, 0)
226# define K1 PAL_LINE(GPIOK, 1)
227# define K2 PAL_LINE(GPIOK, 2)
228# define K3 PAL_LINE(GPIOK, 3)
229# define K4 PAL_LINE(GPIOK, 4)
230# define K5 PAL_LINE(GPIOK, 5)
231# define K6 PAL_LINE(GPIOK, 6)
232# define K7 PAL_LINE(GPIOK, 7)
233# define K8 PAL_LINE(GPIOK, 8)
234# define K9 PAL_LINE(GPIOK, 9)
235# define K10 PAL_LINE(GPIOK, 10)
236# define K11 PAL_LINE(GPIOK, 11)
237# define K12 PAL_LINE(GPIOK, 12)
238# define K13 PAL_LINE(GPIOK, 13)
239# define K14 PAL_LINE(GPIOK, 14)
240# define K15 PAL_LINE(GPIOK, 15)
241# endif
242#endif
diff --git a/tmk_core/common/gpio.h b/tmk_core/common/gpio.h
new file mode 100644
index 000000000..b47f6f8e4
--- /dev/null
+++ b/tmk_core/common/gpio.h
@@ -0,0 +1,22 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "pin_defs.h"
19
20#if __has_include_next("gpio.h")
21# include_next "gpio.h" /* Include the platforms gpio.h */
22#endif \ No newline at end of file
diff --git a/tmk_core/common/pin_defs.h b/tmk_core/common/pin_defs.h
new file mode 100644
index 000000000..ea730138f
--- /dev/null
+++ b/tmk_core/common/pin_defs.h
@@ -0,0 +1,23 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18// useful for direct pin mapping
19#define NO_PIN (pin_t)(~0)
20
21#if __has_include_next("pin_defs.h")
22# include_next "pin_defs.h" /* Include the platforms pin_defs.h */
23#endif
diff --git a/users/csc027/defines.h b/users/csc027/defines.h
index 220001924..c9093ab2a 100644
--- a/users/csc027/defines.h
+++ b/users/csc027/defines.h
@@ -202,7 +202,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
202/* Windows Terminal Layer 202/* Windows Terminal Layer
203 * 203 *
204 * ,-----------------------------------. ,-----------------------------------. 204 * ,-----------------------------------. ,-----------------------------------.
205 * | | | | | | | | | | | | |BkSpc| 205 * | |Tab 1|Tab 2|Tab 3|Tab 4|Tab 5| |Tab 6|Tab 7|Tab 8|Tab 9| |BkSpc|
206 * |-----------------------------------| |-----------------------------------| 206 * |-----------------------------------| |-----------------------------------|
207 * | | |Split|Close| | | |FcsLf|FcsDn|FcsUp|FcsRt| | | 207 * | | |Split|Close| | | |FcsLf|FcsDn|FcsUp|FcsRt| | |
208 * |-----------------------------------| |-----------------------------------| 208 * |-----------------------------------| |-----------------------------------|
@@ -212,13 +212,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
212 * `-----------------------------------' `-----------------------------------' 212 * `-----------------------------------' `-----------------------------------'
213 */ 213 */
214 214
215#define ________________WINDOWS_TERMINAL_L1________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX 215#define ________________WINDOWS_TERMINAL_L1________________ XXXXXXX, MC_trt1, MC_trt2, MC_trt3, MC_trt4, MC_trt5
216#define ________________WINDOWS_TERMINAL_L2________________ _______, XXXXXXX, MC_trps, MC_trpc, XXXXXXX, XXXXXXX 216#define ________________WINDOWS_TERMINAL_L2________________ _______, XXXXXXX, MC_trps, MC_trpc, XXXXXXX, MC_trtn
217#define ________________WINDOWS_TERMINAL_L3________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, MC_trpv, XXXXXXX 217#define ________________WINDOWS_TERMINAL_L3________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, MC_trpv, XXXXXXX
218#define ________________WINDOWS_TERMINAL_L4________________ _______, _______, _______, _______, _______, _______ 218#define ________________WINDOWS_TERMINAL_L4________________ _______, _______, _______, _______, _______, _______
219 219
220#define ________________WINDOWS_TERMINAL_R1________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC 220#define ________________WINDOWS_TERMINAL_R1________________ MC_trt6, MC_trt7, MC_trt8, MC_trt9, XXXXXXX, KC_BSPC
221#define ________________WINDOWS_TERMINAL_R2________________ MC_trpl, MC_trpd, MC_trpu, MC_trpr, XXXXXXX, XXXXXXX 221#define ________________WINDOWS_TERMINAL_R2________________ MC_trpl, MC_trpd, MC_trpu, MC_trpr, MC_trcp, XXXXXXX
222#define ________________WINDOWS_TERMINAL_R3________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ 222#define ________________WINDOWS_TERMINAL_R3________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
223#define ________________WINDOWS_TERMINAL_R4________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX 223#define ________________WINDOWS_TERMINAL_R4________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
224 224
@@ -297,6 +297,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
297#define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \ 297#define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \
298 CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \ 298 CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \
299 CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \ 299 CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \
300 CUSTOM_NAME(trcp) CUSTOM_STRING(SS_LCTL(SS_LSFT("p"))) CUSTOM_DELIM() \
300 CUSTOM_NAME(trps) CUSTOM_STRING(SS_LALT(SS_LSFT("-"))) CUSTOM_DELIM() \ 301 CUSTOM_NAME(trps) CUSTOM_STRING(SS_LALT(SS_LSFT("-"))) CUSTOM_DELIM() \
301 CUSTOM_NAME(trpv) CUSTOM_STRING(SS_LALT(SS_LSFT("+"))) CUSTOM_DELIM() \ 302 CUSTOM_NAME(trpv) CUSTOM_STRING(SS_LALT(SS_LSFT("+"))) CUSTOM_DELIM() \
302 CUSTOM_NAME(trpc) CUSTOM_STRING(SS_LCTL(SS_LSFT("w"))) CUSTOM_DELIM() \ 303 CUSTOM_NAME(trpc) CUSTOM_STRING(SS_LCTL(SS_LSFT("w"))) CUSTOM_DELIM() \
@@ -304,6 +305,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
304 CUSTOM_NAME(trpd) CUSTOM_STRING(SS_LALT(SS_TAP(X_DOWN))) CUSTOM_DELIM() \ 305 CUSTOM_NAME(trpd) CUSTOM_STRING(SS_LALT(SS_TAP(X_DOWN))) CUSTOM_DELIM() \
305 CUSTOM_NAME(trpu) CUSTOM_STRING(SS_LALT(SS_TAP(X_UP))) CUSTOM_DELIM() \ 306 CUSTOM_NAME(trpu) CUSTOM_STRING(SS_LALT(SS_TAP(X_UP))) CUSTOM_DELIM() \
306 CUSTOM_NAME(trpr) CUSTOM_STRING(SS_LALT(SS_TAP(X_RIGHT))) CUSTOM_DELIM() \ 307 CUSTOM_NAME(trpr) CUSTOM_STRING(SS_LALT(SS_TAP(X_RIGHT))) CUSTOM_DELIM() \
308 CUSTOM_NAME(trtn) CUSTOM_STRING(SS_LCTL(SS_LSFT("t"))) CUSTOM_DELIM() \
309 CUSTOM_NAME(trt1) CUSTOM_STRING(SS_LCTL(SS_LALT("1"))) CUSTOM_DELIM() \
310 CUSTOM_NAME(trt2) CUSTOM_STRING(SS_LCTL(SS_LALT("2"))) CUSTOM_DELIM() \
311 CUSTOM_NAME(trt3) CUSTOM_STRING(SS_LCTL(SS_LALT("3"))) CUSTOM_DELIM() \
312 CUSTOM_NAME(trt4) CUSTOM_STRING(SS_LCTL(SS_LALT("4"))) CUSTOM_DELIM() \
313 CUSTOM_NAME(trt5) CUSTOM_STRING(SS_LCTL(SS_LALT("5"))) CUSTOM_DELIM() \
314 CUSTOM_NAME(trt6) CUSTOM_STRING(SS_LCTL(SS_LALT("6"))) CUSTOM_DELIM() \
315 CUSTOM_NAME(trt7) CUSTOM_STRING(SS_LCTL(SS_LALT("7"))) CUSTOM_DELIM() \
316 CUSTOM_NAME(trt8) CUSTOM_STRING(SS_LCTL(SS_LALT("8"))) CUSTOM_DELIM() \
317 CUSTOM_NAME(trt9) CUSTOM_STRING(SS_LCTL(SS_LALT("9"))) CUSTOM_DELIM() \
307 CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \ 318 CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \
308 CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \ 319 CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \
309 CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \ 320 CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \