Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c785148445 | ||
|
|
b43bdc1c69 | ||
|
|
5a5ecd7dd9 | ||
|
|
60be8d9f24 | ||
|
|
3f85e90126 | ||
|
|
3eefe31a54 | ||
|
|
7be65f2cd0 | ||
|
|
016b4be751 | ||
|
|
db80209e69 | ||
|
|
716924de3e | ||
|
|
d88dca3ca7 |
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
# バックライト
|
# バックライト
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 5d5ff80:docs/feature_backlight.md
|
original document: 0.9.10:docs/feature_backlight.md
|
||||||
git diff 5d5ff80 HEAD -- docs/feature_backlight.md | cat
|
git diff 0.9.10 HEAD -- docs/feature_backlight.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
|
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
|
||||||
@@ -94,29 +94,29 @@ BACKLIGHT_DRIVER = pwm
|
|||||||
|
|
||||||
ハードウェア PWM は以下の表に従ってサポートされます:
|
ハードウェア PWM は以下の表に従ってサポートされます:
|
||||||
|
|
||||||
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P |
|
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328/P |
|
||||||
|-------------|-------------|-------------|-------------|---------|----------|
|
|-------------|-------------|-------------|-------------|---------|----------|
|
||||||
| `B1` | | | | | Timer 1 |
|
| `B1` | | | | | Timer 1 |
|
||||||
| `B2` | | | | | Timer 1 |
|
| `B2` | | | | | Timer 1 |
|
||||||
| `B5` | Timer 1 | Timer 1 | | | |
|
| `B5` | Timer 1 | Timer 1 | | | |
|
||||||
| `B6` | Timer 1 | Timer 1 | | | |
|
| `B6` | Timer 1 | Timer 1 | | | |
|
||||||
| `B7` | Timer 1 | Timer 1 | Timer 1 | | |
|
| `B7` | Timer 1 | Timer 1 | Timer 1 | | |
|
||||||
| `C4` | Timer 3 | | | | |
|
| `C4` | Timer 3 | | | | |
|
||||||
| `C5` | Timer 3 | | Timer 1 | | |
|
| `C5` | Timer 3 | | Timer 1 | | |
|
||||||
| `C6` | Timer 3 | Timer 3 | Timer 1 | | |
|
| `C6` | Timer 3 | Timer 3 | Timer 1 | | |
|
||||||
| `D4` | | | | Timer 1 | |
|
| `D4` | | | | Timer 1 | |
|
||||||
| `D5` | | | | Timer 1 | |
|
| `D5` | | | | Timer 1 | |
|
||||||
|
|
||||||
他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます:
|
他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます:
|
||||||
|
|
||||||
| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ |
|
| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ |
|
||||||
|---------|-----------|------------------|
|
|---------|-----------|------------------|
|
||||||
| `C4` | Timer 3 | Timer 1 |
|
| `C4` | Timer 3 | Timer 1 |
|
||||||
| `C5` | Timer 3 | Timer 1 |
|
| `C5` | Timer 3 | Timer 1 |
|
||||||
| `C6` | Timer 3 | Timer 1 |
|
| `C6` | Timer 3 | Timer 1 |
|
||||||
| `B5` | Timer 1 | Timer 3 |
|
| `B5` | Timer 1 | Timer 3 |
|
||||||
| `B6` | Timer 1 | Timer 3 |
|
| `B6` | Timer 1 | Timer 3 |
|
||||||
| `B7` | Timer 1 | Timer 3 |
|
| `B7` | Timer 1 | Timer 3 |
|
||||||
|
|
||||||
両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。
|
両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。
|
||||||
|
|
||||||
@@ -126,13 +126,13 @@ BACKLIGHT_DRIVER = pwm
|
|||||||
|
|
||||||
| 定義 | デフォルト | 説明 |
|
| 定義 | デフォルト | 説明 |
|
||||||
|---------------------|-------------|--------------------------------------------------------------------------------------------------------------|
|
|---------------------|-------------|--------------------------------------------------------------------------------------------------------------|
|
||||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||||
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
||||||
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
|
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
|
||||||
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
|
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
|
||||||
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
||||||
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
||||||
|
|
||||||
### バックライトオン状態
|
### バックライトオン状態
|
||||||
|
|
||||||
@@ -192,10 +192,10 @@ BACKLIGHT_DRIVER = pwm
|
|||||||
|
|
||||||
| 定義 | デフォルト | 説明 |
|
| 定義 | デフォルト | 説明 |
|
||||||
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
|
||||||
## Software PWM Driver :id=software-pwm-driver
|
## Software PWM Driver :id=software-pwm-driver
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ BACKLIGHT_DRIVER = software
|
|||||||
|
|
||||||
| 定義 | デフォルト | 説明 |
|
| 定義 | デフォルト | 説明 |
|
||||||
|-----------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
|-----------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||||
|
|
||||||
### 複数のバックライトピン
|
### 複数のバックライトピン
|
||||||
|
|||||||
@@ -99,3 +99,14 @@ While not an exhaustive list, the following table provides the scenarios that ha
|
|||||||
| f401/f411 | :heavy_check_mark: |
|
| f401/f411 | :heavy_check_mark: |
|
||||||
|
|
||||||
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
||||||
|
|
||||||
|
### Push Pull and Open Drain Configuration
|
||||||
|
The default configuration is a push pull on the defined pin.
|
||||||
|
This can be configured for bitbang, PWM and SPI.
|
||||||
|
|
||||||
|
Note: This only applies to STM32 boards.
|
||||||
|
|
||||||
|
To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file:
|
||||||
|
```c
|
||||||
|
#define WS2812_EXTERNAL_PULLUP
|
||||||
|
```
|
||||||
@@ -14,6 +14,14 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Push Pull or Open Drain Configuration
|
||||||
|
// Default Push Pull
|
||||||
|
#ifndef WS2812_EXTERNAL_PULLUP
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_PUSHPULL
|
||||||
|
#else
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_OPENDRAIN
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NUMBER_NOPS 6
|
#define NUMBER_NOPS 6
|
||||||
#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
|
#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
|
||||||
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
|
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
|
||||||
@@ -66,7 +74,7 @@ void sendByte(uint8_t byte) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ws2812_init(void) { setPinOutput(RGB_DI_PIN); }
|
void ws2812_init(void) { palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); }
|
||||||
|
|
||||||
// Setleds for standard RGB
|
// Setleds for standard RGB
|
||||||
void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
||||||
|
|||||||
@@ -24,6 +24,22 @@
|
|||||||
# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP
|
# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Push Pull or Open Drain Configuration
|
||||||
|
// Default Push Pull
|
||||||
|
#ifndef WS2812_EXTERNAL_PULLUP
|
||||||
|
# if defined(USE_GPIOV1)
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
|
||||||
|
# else
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# if defined(USE_GPIOV1)
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||||
|
# else
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef WS2812_PWM_TARGET_PERIOD
|
#ifndef WS2812_PWM_TARGET_PERIOD
|
||||||
//# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...?
|
//# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...?
|
||||||
# define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1
|
# define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1
|
||||||
@@ -142,11 +158,7 @@ void ws2812_init(void) {
|
|||||||
for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
|
for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
|
||||||
for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
|
for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
|
||||||
|
|
||||||
#if defined(USE_GPIOV1)
|
palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
|
||||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
|
||||||
#else
|
|
||||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// PWM Configuration
|
// PWM Configuration
|
||||||
//#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
|
//#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
|
||||||
|
|||||||
@@ -16,6 +16,22 @@
|
|||||||
# define WS2812_SPI_MOSI_PAL_MODE 5
|
# define WS2812_SPI_MOSI_PAL_MODE 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Push Pull or Open Drain Configuration
|
||||||
|
// Default Push Pull
|
||||||
|
#ifndef WS2812_EXTERNAL_PULLUP
|
||||||
|
# if defined(USE_GPIOV1)
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
|
||||||
|
# else
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# if defined(USE_GPIOV1)
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||||
|
# else
|
||||||
|
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BYTES_FOR_LED_BYTE 4
|
#define BYTES_FOR_LED_BYTE 4
|
||||||
#define NB_COLORS 3
|
#define NB_COLORS 3
|
||||||
#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS)
|
#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS)
|
||||||
@@ -52,11 +68,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ws2812_init(void) {
|
void ws2812_init(void) {
|
||||||
#if defined(USE_GPIOV1)
|
palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
|
||||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
|
||||||
#else
|
|
||||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO: more dynamic baudrate
|
// TODO: more dynamic baudrate
|
||||||
static const SPIConfig spicfg = {
|
static const SPIConfig spicfg = {
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x17B9
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AlisGraveNil
|
||||||
|
#define PRODUCT GameBuddy
|
||||||
|
#define DESCRIPTION A 26-key QMK-powered macropad designed for gaming!
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, E6, B3, B2 }
|
||||||
|
#define MATRIX_COL_PINS { F5, F6, F7, B1, C6, D7, B6 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "gamebuddy.h"
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, \
|
||||||
|
K10, K11, K12, K13, K14, K15, \
|
||||||
|
K20, K22, K23, K24, K25, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K46, \
|
||||||
|
K44, K45 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, KC_NO }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, KC_NO }, \
|
||||||
|
{ K20, KC_NO, K22, K23, K24, K25, KC_NO }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, K44, K45, K46 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "GameBuddy",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 7,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00 (D1,F5)", "x":0, "y":0},
|
||||||
|
{"label":"K01 (D1,F6)", "x":1, "y":0},
|
||||||
|
{"label":"K02 (D1,F7)", "x":2, "y":0},
|
||||||
|
{"label":"K03 (D1,B1)", "x":3, "y":0},
|
||||||
|
{"label":"K04 (D1,C6)", "x":4, "y":0},
|
||||||
|
{"label":"K05 (D1,D7)", "x":5, "y":0},
|
||||||
|
{"label":"K10 (D0,F5)", "x":0, "y":1},
|
||||||
|
{"label":"K11 (D0,F6)", "x":1, "y":1},
|
||||||
|
{"label":"K12 (D0,F7)", "x":2, "y":1},
|
||||||
|
{"label":"K13 (D0,B1)", "x":3, "y":1},
|
||||||
|
{"label":"K14 (D0,C6)", "x":4, "y":1},
|
||||||
|
{"label":"K15 (D0,D7)", "x":5, "y":1},
|
||||||
|
{"label":"K20 (E6,F5)", "x":0, "y":2, "w":2},
|
||||||
|
{"label":"K22 (E6,F7)", "x":2, "y":2},
|
||||||
|
{"label":"K23 (E6,B1)", "x":3, "y":2},
|
||||||
|
{"label":"K24 (E6,C6)", "x":4, "y":2},
|
||||||
|
{"label":"K25 (E6,D7)", "x":5, "y":2},
|
||||||
|
{"label":"K30 (B3,F5)", "x":0, "y":3},
|
||||||
|
{"label":"K31 (B3,F6)", "x":1, "y":3},
|
||||||
|
{"label":"K32 (B3,F7)", "x":2, "y":3},
|
||||||
|
{"label":"K33 (B3,B1)", "x":3, "y":3},
|
||||||
|
{"label":"K34 (B3,C6)", "x":4, "y":3},
|
||||||
|
{"label":"K35 (B3,D7)", "x":5, "y":3},
|
||||||
|
{"label":"K46 (B2,B6)", "x":6, "y":3, "h":2},
|
||||||
|
{"label":"K44 (B2,C6)", "x":4, "y":4},
|
||||||
|
{"label":"K45 (B2,D7)", "x":5, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* -------------------------------
|
||||||
|
* |ESC | 1 | 2 | 3 | 4 | 5 |
|
||||||
|
* -------------------------------
|
||||||
|
* |TAB | V | Q | W | E | R |
|
||||||
|
* ------------------------------|
|
||||||
|
* |LSFT | A | S | D | G |
|
||||||
|
* ------------------------------------
|
||||||
|
* |LCTL| N | X | F | C | M |SPC |
|
||||||
|
* ------------------------------| |
|
||||||
|
* |LALT|LGUI| |
|
||||||
|
* ----------------
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_TAB, KC_V, KC_Q, KC_W, KC_E, KC_R,
|
||||||
|
KC_LSFT, KC_A, KC_S, KC_D, KC_G,
|
||||||
|
KC_LCTL, KC_N, KC_X, KC_F, KC_C, KC_M, KC_SPC,
|
||||||
|
KC_LALT, KC_LGUI
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# GameBuddy
|
||||||
|
|
||||||
|
This is a 5x7 macropad designed for left-hand usage for videogames, with special focus on FPS layouts!
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil)
|
||||||
|
* Hardware Supported: GameBuddy, Pro Micro, Elite-C
|
||||||
|
* Hardware Availability: www.clawboards.xyz
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make clawsome/gamebuddy:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
@@ -1 +0,0 @@
|
|||||||
SRC += engine.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
SRC += engine.c
|
|
||||||
@@ -7,294 +7,312 @@
|
|||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_all": {
|
"LAYOUT_all": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x": 0, "y": 0},
|
||||||
{"x":2, "y":0},
|
{"x": 2, "y": 0},
|
||||||
{"x":3, "y":0},
|
{"x": 3, "y": 0},
|
||||||
{"x":4, "y":0},
|
{"x": 4, "y": 0},
|
||||||
{"x":5, "y":0},
|
{"x": 5, "y": 0},
|
||||||
{"x":6.5, "y":0},
|
{"x": 6.5, "y": 0},
|
||||||
{"x":7.5, "y":0},
|
{"x": 7.5, "y": 0},
|
||||||
{"x":8.5, "y":0},
|
{"x": 8.5, "y": 0},
|
||||||
{"x":9.5, "y":0},
|
{"x": 9.5, "y": 0},
|
||||||
{"x":11, "y":0},
|
{"x": 11, "y": 0},
|
||||||
{"x":12, "y":0},
|
{"x": 12, "y": 0},
|
||||||
{"x":13, "y":0},
|
{"x": 13, "y": 0},
|
||||||
{"x":14, "y":0},
|
{"x": 14, "y": 0},
|
||||||
{"x":15.25, "y":0},
|
|
||||||
{"x":16.25, "y":0},
|
{"x": 15.25, "y": 0},
|
||||||
{"x":17.25, "y":0},
|
{"x": 16.25, "y": 0},
|
||||||
|
{"x": 17.25, "y": 0},
|
||||||
|
|
||||||
|
{"x": 0, "y": 1.25},
|
||||||
|
{"x": 1, "y": 1.25},
|
||||||
|
{"x": 2, "y": 1.25},
|
||||||
|
{"x": 3, "y": 1.25},
|
||||||
|
{"x": 4, "y": 1.25},
|
||||||
|
{"x": 5, "y": 1.25},
|
||||||
|
{"x": 6, "y": 1.25},
|
||||||
|
{"x": 7, "y": 1.25},
|
||||||
|
{"x": 8, "y": 1.25},
|
||||||
|
{"x": 9, "y": 1.25},
|
||||||
|
{"x": 10, "y": 1.25},
|
||||||
|
{"x": 11, "y": 1.25},
|
||||||
|
{"x": 12, "y": 1.25},
|
||||||
|
{"x": 13, "y": 1.25},
|
||||||
|
{"x": 14, "y": 1.25},
|
||||||
|
|
||||||
|
{"x": 15.25, "y": 1.25},
|
||||||
|
{"x": 16.25, "y": 1.25},
|
||||||
|
{"x": 17.25, "y": 1.25},
|
||||||
|
|
||||||
{"x":0, "y":1.25},
|
{"x": 0, "y": 2.25, "w": 1.5},
|
||||||
{"x":1, "y":1.25},
|
{"x": 1.5, "y": 2.25},
|
||||||
{"x":2, "y":1.25},
|
{"x": 2.5, "y": 2.25},
|
||||||
{"x":3, "y":1.25},
|
{"x": 3.5, "y": 2.25},
|
||||||
{"x":4, "y":1.25},
|
{"x": 4.5, "y": 2.25},
|
||||||
{"x":5, "y":1.25},
|
{"x": 5.5, "y": 2.25},
|
||||||
{"x":6, "y":1.25},
|
{"x": 6.5, "y": 2.25},
|
||||||
{"x":7, "y":1.25},
|
{"x": 7.5, "y": 2.25},
|
||||||
{"x":8, "y":1.25},
|
{"x": 8.5, "y": 2.25},
|
||||||
{"x":9, "y":1.25},
|
{"x": 9.5, "y": 2.25},
|
||||||
{"x":10, "y":1.25},
|
{"x": 10.5, "y": 2.25},
|
||||||
{"x":11, "y":1.25},
|
{"x": 11.5, "y": 2.25},
|
||||||
{"x":12, "y":1.25},
|
{"x": 12.5, "y": 2.25},
|
||||||
{"x":13, "y":1.25},
|
{"x": 13.5, "y": 2.25, "w": 1.5},
|
||||||
{"x":14, "y":1.25},
|
|
||||||
{"x":15.25, "y":1.25},
|
{"x": 15.25, "y": 2.25},
|
||||||
{"x":16.25, "y":1.25},
|
{"x": 16.25, "y": 2.25},
|
||||||
{"x":17.25, "y":1.25},
|
{"x": 17.25, "y": 2.25},
|
||||||
|
|
||||||
{"x":0, "y":2.25, "w":1.5},
|
{"x": 0, "y": 3.25, "w": 1.75},
|
||||||
{"x":1.5, "y":2.25},
|
{"x": 1.75, "y": 3.25},
|
||||||
{"x":2.5, "y":2.25},
|
{"x": 2.75, "y": 3.25},
|
||||||
{"x":3.5, "y":2.25},
|
{"x": 3.75, "y": 3.25},
|
||||||
{"x":4.5, "y":2.25},
|
{"x": 4.75, "y": 3.25},
|
||||||
{"x":5.5, "y":2.25},
|
{"x": 5.75, "y": 3.25},
|
||||||
{"x":6.5, "y":2.25},
|
{"x": 6.75, "y": 3.25},
|
||||||
{"x":7.5, "y":2.25},
|
{"x": 7.75, "y": 3.25},
|
||||||
{"x":8.5, "y":2.25},
|
{"x": 8.75, "y": 3.25},
|
||||||
{"x":9.5, "y":2.25},
|
{"x": 9.75, "y": 3.25},
|
||||||
{"x":10.5, "y":2.25},
|
{"x": 10.75, "y": 3.25},
|
||||||
{"x":11.5, "y":2.25},
|
{"x": 11.75, "y": 3.25},
|
||||||
{"x":12.5, "y":2.25},
|
{"x": 12.75, "y": 3.25},
|
||||||
{"x":13.5, "y":2.25, "w":1.5},
|
{"x": 13.75, "y": 3.25, "w": 1.25},
|
||||||
{"x":15.25, "y":2.25},
|
|
||||||
{"x":16.25, "y":2.25},
|
{"x": 0, "y": 4.25, "w": 1.25},
|
||||||
{"x":17.25, "y":2.25},
|
{"x": 1.25, "y": 4.25},
|
||||||
|
{"x": 2.25, "y": 4.25},
|
||||||
{"x":0, "y":3.25, "w":1.75},
|
{"x": 3.25, "y": 4.25},
|
||||||
{"x":1.75, "y":3.25},
|
{"x": 4.25, "y": 4.25},
|
||||||
{"x":2.75, "y":3.25},
|
{"x": 5.25, "y": 4.25},
|
||||||
{"x":3.75, "y":3.25},
|
{"x": 6.25, "y": 4.25},
|
||||||
{"x":4.75, "y":3.25},
|
{"x": 7.25, "y": 4.25},
|
||||||
{"x":5.75, "y":3.25},
|
{"x": 8.25, "y": 4.25},
|
||||||
{"x":6.75, "y":3.25},
|
{"x": 9.25, "y": 4.25},
|
||||||
{"x":7.75, "y":3.25},
|
{"x": 10.25, "y": 4.25},
|
||||||
{"x":8.75, "y":3.25},
|
{"x": 11.25, "y": 4.25},
|
||||||
{"x":9.75, "y":3.25},
|
{"x": 12.25, "y": 4.25, "w": 1.75},
|
||||||
{"x":10.75, "y":3.25},
|
{"x": 14, "y": 4.25},
|
||||||
{"x":11.75, "y":3.25},
|
|
||||||
{"x":12.75, "y":3.25},
|
{"x": 16.25, "y": 4.25},
|
||||||
|
|
||||||
{"x":13.75, "y":3.25, "w":1.25},
|
{"x": 0, "y": 5.25, "w": 1.25},
|
||||||
{"x":0, "y":4.25, "w":1.25},
|
{"x": 1.25, "y": 5.25, "w": 1.25},
|
||||||
{"x":1.25, "y":4.25},
|
{"x": 2.5, "y": 5.25, "w": 1.25},
|
||||||
{"x":2.25, "y":4.25},
|
{"x": 3.75, "y": 5.25, "w": 2.25},
|
||||||
{"x":3.25, "y":4.25},
|
{"x": 6, "y": 5.25, "w": 1.25},
|
||||||
{"x":4.25, "y":4.25},
|
{"x": 7.25, "y": 5.25, "w": 2.75},
|
||||||
{"x":5.25, "y":4.25},
|
{"x": 10, "y": 5.25, "w": 1.25},
|
||||||
{"x":6.25, "y":4.25},
|
{"x": 11.25, "y": 5.25, "w": 1.25},
|
||||||
{"x":7.25, "y":4.25},
|
{"x": 12.5, "y": 5.25, "w": 1.25},
|
||||||
{"x":8.25, "y":4.25},
|
{"x": 13.75, "y": 5.25, "w": 1.25},
|
||||||
{"x":9.25, "y":4.25},
|
|
||||||
{"x":10.25, "y":4.25},
|
{"x": 15.25, "y": 5.25},
|
||||||
{"x":11.25, "y":4.25},
|
{"x": 16.25, "y": 5.25},
|
||||||
{"x":12.25, "y":4.25, "w":2.75},
|
{"x": 17.25, "y": 5.25}
|
||||||
{"x":16.25, "y":4.25},
|
|
||||||
|
|
||||||
{"x":0, "y":5.25, "w":1.25},
|
|
||||||
{"x":1.25, "y":5.25, "w":1.25},
|
|
||||||
{"x":2.5, "y":5.25, "w":1.25},
|
|
||||||
{"x":3.75, "y":5.25, "w":6.25},
|
|
||||||
{"x":10, "y":5.25, "w":1.25},
|
|
||||||
{"x":11.25, "y":5.25, "w":1.25},
|
|
||||||
{"x":12.5, "y":5.25, "w":1.25},
|
|
||||||
{"x":13.75, "y":5.25, "w":1.25},
|
|
||||||
{"x":15.25, "y":5.25},
|
|
||||||
{"x":16.25, "y":5.25},
|
|
||||||
{"x":17.25, "y":5.25}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_tkl_ansi": {
|
"LAYOUT_tkl_ansi": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x": 0, "y": 0},
|
||||||
{"x":2, "y":0},
|
{"x": 2, "y": 0},
|
||||||
{"x":3, "y":0},
|
{"x": 3, "y": 0},
|
||||||
{"x":4, "y":0},
|
{"x": 4, "y": 0},
|
||||||
{"x":5, "y":0},
|
{"x": 5, "y": 0},
|
||||||
{"x":6.5, "y":0},
|
{"x": 6.5, "y": 0},
|
||||||
{"x":7.5, "y":0},
|
{"x": 7.5, "y": 0},
|
||||||
{"x":8.5, "y":0},
|
{"x": 8.5, "y": 0},
|
||||||
{"x":9.5, "y":0},
|
{"x": 9.5, "y": 0},
|
||||||
{"x":11, "y":0},
|
{"x": 11, "y": 0},
|
||||||
{"x":12, "y":0},
|
{"x": 12, "y": 0},
|
||||||
{"x":13, "y":0},
|
{"x": 13, "y": 0},
|
||||||
{"x":14, "y":0},
|
{"x": 14, "y": 0},
|
||||||
{"x":15.25, "y":0},
|
|
||||||
{"x":16.25, "y":0},
|
|
||||||
{"x":17.25, "y":0},
|
|
||||||
|
|
||||||
{"x":0, "y":1.25},
|
{"x": 15.25, "y": 0},
|
||||||
{"x":1, "y":1.25},
|
{"x": 16.25, "y": 0},
|
||||||
{"x":2, "y":1.25},
|
{"x": 17.25, "y": 0},
|
||||||
{"x":3, "y":1.25},
|
|
||||||
{"x":4, "y":1.25},
|
|
||||||
{"x":5, "y":1.25},
|
|
||||||
{"x":6, "y":1.25},
|
|
||||||
{"x":7, "y":1.25},
|
|
||||||
{"x":8, "y":1.25},
|
|
||||||
{"x":9, "y":1.25},
|
|
||||||
{"x":10, "y":1.25},
|
|
||||||
{"x":11, "y":1.25},
|
|
||||||
{"x":12, "y":1.25},
|
|
||||||
{"x":13, "y":1.25, "w":2},
|
|
||||||
{"x":15.25, "y":1.25},
|
|
||||||
{"x":16.25, "y":1.25},
|
|
||||||
{"x":17.25, "y":1.25},
|
|
||||||
|
|
||||||
{"x":0, "y":2.25, "w":1.5},
|
{"x": 0, "y": 1.25},
|
||||||
{"x":1.5, "y":2.25},
|
{"x": 1, "y": 1.25},
|
||||||
{"x":2.5, "y":2.25},
|
{"x": 2, "y": 1.25},
|
||||||
{"x":3.5, "y":2.25},
|
{"x": 3, "y": 1.25},
|
||||||
{"x":4.5, "y":2.25},
|
{"x": 4, "y": 1.25},
|
||||||
{"x":5.5, "y":2.25},
|
{"x": 5, "y": 1.25},
|
||||||
{"x":6.5, "y":2.25},
|
{"x": 6, "y": 1.25},
|
||||||
{"x":7.5, "y":2.25},
|
{"x": 7, "y": 1.25},
|
||||||
{"x":8.5, "y":2.25},
|
{"x": 8, "y": 1.25},
|
||||||
{"x":9.5, "y":2.25},
|
{"x": 9, "y": 1.25},
|
||||||
{"x":10.5, "y":2.25},
|
{"x": 10, "y": 1.25},
|
||||||
{"x":11.5, "y":2.25},
|
{"x": 11, "y": 1.25},
|
||||||
{"x":12.5, "y":2.25},
|
{"x": 12, "y": 1.25},
|
||||||
{"x":13.5, "y":2.25, "w":1.5},
|
{"x": 13, "y": 1.25, "w": 2},
|
||||||
{"x":15.25, "y":2.25},
|
|
||||||
{"x":16.25, "y":2.25},
|
|
||||||
{"x":17.25, "y":2.25},
|
|
||||||
|
|
||||||
{"x":0, "y":3.25, "w":1.75},
|
{"x": 15.25, "y": 1.25},
|
||||||
{"x":1.75, "y":3.25},
|
{"x": 16.25, "y": 1.25},
|
||||||
{"x":2.75, "y":3.25},
|
{"x": 17.25, "y": 1.25},
|
||||||
{"x":3.75, "y":3.25},
|
|
||||||
{"x":4.75, "y":3.25},
|
|
||||||
{"x":5.75, "y":3.25},
|
|
||||||
{"x":6.75, "y":3.25},
|
|
||||||
{"x":7.75, "y":3.25},
|
|
||||||
{"x":8.75, "y":3.25},
|
|
||||||
{"x":9.75, "y":3.25},
|
|
||||||
{"x":10.75, "y":3.25},
|
|
||||||
{"x":11.75, "y":3.25},
|
|
||||||
{"x":12.75, "y":3.25, "w":2.25},
|
|
||||||
|
|
||||||
{"x":0, "y":4.25, "w":2.25},
|
{"x": 0, "y": 2.25, "w": 1.5},
|
||||||
{"x":2.25, "y":4.25},
|
{"x": 1.5, "y": 2.25},
|
||||||
{"x":3.25, "y":4.25},
|
{"x": 2.5, "y": 2.25},
|
||||||
{"x":4.25, "y":4.25},
|
{"x": 3.5, "y": 2.25},
|
||||||
{"x":5.25, "y":4.25},
|
{"x": 4.5, "y": 2.25},
|
||||||
{"x":6.25, "y":4.25},
|
{"x": 5.5, "y": 2.25},
|
||||||
{"x":7.25, "y":4.25},
|
{"x": 6.5, "y": 2.25},
|
||||||
{"x":8.25, "y":4.25},
|
{"x": 7.5, "y": 2.25},
|
||||||
{"x":9.25, "y":4.25},
|
{"x": 8.5, "y": 2.25},
|
||||||
{"x":10.25, "y":4.25},
|
{"x": 9.5, "y": 2.25},
|
||||||
{"x":11.25, "y":4.25},
|
{"x": 10.5, "y": 2.25},
|
||||||
{"x":12.25, "y":4.25, "w":2.75},
|
{"x": 11.5, "y": 2.25},
|
||||||
{"x":16.25, "y":4.25},
|
{"x": 12.5, "y": 2.25},
|
||||||
|
{"x": 13.5, "y": 2.25, "w": 1.5},
|
||||||
|
|
||||||
{"x":0, "y":5.25, "w":1.25},
|
{"x": 15.25, "y": 2.25},
|
||||||
{"x":1.25, "y":5.25, "w":1.25},
|
{"x": 16.25, "y": 2.25},
|
||||||
{"x":2.5, "y":5.25, "w":1.25},
|
{"x": 17.25, "y": 2.25},
|
||||||
{"x":3.75, "y":5.25, "w":6.25},
|
|
||||||
{"x":10, "y":5.25, "w":1.25},
|
{"x": 0, "y": 3.25, "w": 1.75},
|
||||||
{"x":11.25, "y":5.25, "w":1.25},
|
{"x": 1.75, "y": 3.25},
|
||||||
{"x":12.5, "y":5.25, "w":1.25},
|
{"x": 2.75, "y": 3.25},
|
||||||
{"x":13.75, "y":5.25, "w":1.25},
|
{"x": 3.75, "y": 3.25},
|
||||||
{"x":15.25, "y":5.25},
|
{"x": 4.75, "y": 3.25},
|
||||||
{"x":16.25, "y":5.25},
|
{"x": 5.75, "y": 3.25},
|
||||||
{"x":17.25, "y":5.25}
|
{"x": 6.75, "y": 3.25},
|
||||||
|
{"x": 7.75, "y": 3.25},
|
||||||
|
{"x": 8.75, "y": 3.25},
|
||||||
|
{"x": 9.75, "y": 3.25},
|
||||||
|
{"x": 10.75, "y": 3.25},
|
||||||
|
{"x": 11.75, "y": 3.25},
|
||||||
|
{"x": 12.75, "y": 3.25, "w": 2.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 4.25, "w": 2.25},
|
||||||
|
{"x": 2.25, "y": 4.25},
|
||||||
|
{"x": 3.25, "y": 4.25},
|
||||||
|
{"x": 4.25, "y": 4.25},
|
||||||
|
{"x": 5.25, "y": 4.25},
|
||||||
|
{"x": 6.25, "y": 4.25},
|
||||||
|
{"x": 7.25, "y": 4.25},
|
||||||
|
{"x": 8.25, "y": 4.25},
|
||||||
|
{"x": 9.25, "y": 4.25},
|
||||||
|
{"x": 10.25, "y": 4.25},
|
||||||
|
{"x": 11.25, "y": 4.25},
|
||||||
|
{"x": 12.25, "y": 4.25, "w": 2.75},
|
||||||
|
|
||||||
|
{"x": 16.25, "y": 4.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 2.5, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 3.75, "y": 5.25, "w": 6.25},
|
||||||
|
{"x": 10, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 11.25, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 12.5, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 13.75, "y": 5.25, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 15.25, "y": 5.25},
|
||||||
|
{"x": 16.25, "y": 5.25},
|
||||||
|
{"x": 17.25, "y": 5.25}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_tkl_iso": {
|
"LAYOUT_tkl_iso": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x": 0, "y": 0},
|
||||||
{"x":2, "y":0},
|
{"x": 2, "y": 0},
|
||||||
{"x":3, "y":0},
|
{"x": 3, "y": 0},
|
||||||
{"x":4, "y":0},
|
{"x": 4, "y": 0},
|
||||||
{"x":5, "y":0},
|
{"x": 5, "y": 0},
|
||||||
{"x":6.5, "y":0},
|
{"x": 6.5, "y": 0},
|
||||||
{"x":7.5, "y":0},
|
{"x": 7.5, "y": 0},
|
||||||
{"x":8.5, "y":0},
|
{"x": 8.5, "y": 0},
|
||||||
{"x":9.5, "y":0},
|
{"x": 9.5, "y": 0},
|
||||||
{"x":11, "y":0},
|
{"x": 11, "y": 0},
|
||||||
{"x":12, "y":0},
|
{"x": 12, "y": 0},
|
||||||
{"x":13, "y":0},
|
{"x": 13, "y": 0},
|
||||||
{"x":14, "y":0},
|
{"x": 14, "y": 0},
|
||||||
{"x":15.25, "y":0},
|
|
||||||
{"x":16.25, "y":0},
|
|
||||||
{"x":17.25, "y":0},
|
|
||||||
|
|
||||||
{"x":0, "y":1.25},
|
{"x": 15.25, "y": 0},
|
||||||
{"x":1, "y":1.25},
|
{"x": 16.25, "y": 0},
|
||||||
{"x":2, "y":1.25},
|
{"x": 17.25, "y": 0},
|
||||||
{"x":3, "y":1.25},
|
|
||||||
{"x":4, "y":1.25},
|
|
||||||
{"x":5, "y":1.25},
|
|
||||||
{"x":6, "y":1.25},
|
|
||||||
{"x":7, "y":1.25},
|
|
||||||
{"x":8, "y":1.25},
|
|
||||||
{"x":9, "y":1.25},
|
|
||||||
{"x":10, "y":1.25},
|
|
||||||
{"x":11, "y":1.25},
|
|
||||||
{"x":12, "y":1.25},
|
|
||||||
{"x":13, "y":1.25, "w":2},
|
|
||||||
{"x":15.25, "y":1.25},
|
|
||||||
{"x":16.25, "y":1.25},
|
|
||||||
{"x":17.25, "y":1.25},
|
|
||||||
|
|
||||||
{"x":0, "y":2.25, "w":1.5},
|
{"x": 0, "y": 1.25},
|
||||||
{"x":1.5, "y":2.25},
|
{"x": 1, "y": 1.25},
|
||||||
{"x":2.5, "y":2.25},
|
{"x": 2, "y": 1.25},
|
||||||
{"x":3.5, "y":2.25},
|
{"x": 3, "y": 1.25},
|
||||||
{"x":4.5, "y":2.25},
|
{"x": 4, "y": 1.25},
|
||||||
{"x":5.5, "y":2.25},
|
{"x": 5, "y": 1.25},
|
||||||
{"x":6.5, "y":2.25},
|
{"x": 6, "y": 1.25},
|
||||||
{"x":7.5, "y":2.25},
|
{"x": 7, "y": 1.25},
|
||||||
{"x":8.5, "y":2.25},
|
{"x": 8, "y": 1.25},
|
||||||
{"x":9.5, "y":2.25},
|
{"x": 9, "y": 1.25},
|
||||||
{"x":10.5, "y":2.25},
|
{"x": 10, "y": 1.25},
|
||||||
{"x":11.5, "y":2.25},
|
{"x": 11, "y": 1.25},
|
||||||
{"x":12.5, "y":2.25},
|
{"x": 12, "y": 1.25},
|
||||||
{"x":15.25, "y":2.25},
|
{"x": 13, "y": 1.25, "w": 2},
|
||||||
{"x":16.25, "y":2.25},
|
|
||||||
{"x":17.25, "y":2.25},
|
|
||||||
|
|
||||||
{"x":0, "y":3.25, "w":1.75},
|
{"x": 15.25, "y": 1.25},
|
||||||
{"x":1.75, "y":3.25},
|
{"x": 16.25, "y": 1.25},
|
||||||
{"x":2.75, "y":3.25},
|
{"x": 17.25, "y": 1.25},
|
||||||
{"x":3.75, "y":3.25},
|
|
||||||
{"x":4.75, "y":3.25},
|
|
||||||
{"x":5.75, "y":3.25},
|
|
||||||
{"x":6.75, "y":3.25},
|
|
||||||
{"x":7.75, "y":3.25},
|
|
||||||
{"x":8.75, "y":3.25},
|
|
||||||
{"x":9.75, "y":3.25},
|
|
||||||
{"x":10.75, "y":3.25},
|
|
||||||
{"x":11.75, "y":3.25},
|
|
||||||
{"x":12.75, "y":3.25},
|
|
||||||
{"x":13.75, "y":2.25, "w":1.25, "h":2},
|
|
||||||
|
|
||||||
{"x":0, "y":4.25, "w":1.25},
|
{"x": 0, "y": 2.25, "w": 1.5},
|
||||||
{"x":1.25, "y":4.25},
|
{"x": 1.5, "y": 2.25},
|
||||||
{"x":2.25, "y":4.25},
|
{"x": 2.5, "y": 2.25},
|
||||||
{"x":3.25, "y":4.25},
|
{"x": 3.5, "y": 2.25},
|
||||||
{"x":4.25, "y":4.25},
|
{"x": 4.5, "y": 2.25},
|
||||||
{"x":5.25, "y":4.25},
|
{"x": 5.5, "y": 2.25},
|
||||||
{"x":6.25, "y":4.25},
|
{"x": 6.5, "y": 2.25},
|
||||||
{"x":7.25, "y":4.25},
|
{"x": 7.5, "y": 2.25},
|
||||||
{"x":8.25, "y":4.25},
|
{"x": 8.5, "y": 2.25},
|
||||||
{"x":9.25, "y":4.25},
|
{"x": 9.5, "y": 2.25},
|
||||||
{"x":10.25, "y":4.25},
|
{"x": 10.5, "y": 2.25},
|
||||||
{"x":11.25, "y":4.25},
|
{"x": 11.5, "y": 2.25},
|
||||||
{"x":12.25, "y":4.25, "w":2.75},
|
{"x": 12.5, "y": 2.25},
|
||||||
{"x":16.25, "y":4.25},
|
|
||||||
|
|
||||||
{"x":0, "y":5.25, "w":1.25},
|
{"x": 15.25, "y": 2.25},
|
||||||
{"x":1.25, "y":5.25, "w":1.25},
|
{"x": 16.25, "y": 2.25},
|
||||||
{"x":2.5, "y":5.25, "w":1.25},
|
{"x": 17.25, "y": 2.25},
|
||||||
{"x":3.75, "y":5.25, "w":6.25},
|
|
||||||
{"x":10, "y":5.25, "w":1.25},
|
{"x": 0, "y": 3.25, "w": 1.75},
|
||||||
{"x":11.25, "y":5.25, "w":1.25},
|
{"x": 1.75, "y": 3.25},
|
||||||
{"x":12.5, "y":5.25, "w":1.25},
|
{"x": 2.75, "y": 3.25},
|
||||||
{"x":13.75, "y":5.25, "w":1.25},
|
{"x": 3.75, "y": 3.25},
|
||||||
{"x":15.25, "y":5.25},
|
{"x": 4.75, "y": 3.25},
|
||||||
{"x":16.25, "y":5.25},
|
{"x": 5.75, "y": 3.25},
|
||||||
{"x":17.25, "y":5.25}
|
{"x": 6.75, "y": 3.25},
|
||||||
|
{"x": 7.75, "y": 3.25},
|
||||||
|
{"x": 8.75, "y": 3.25},
|
||||||
|
{"x": 9.75, "y": 3.25},
|
||||||
|
{"x": 10.75, "y": 3.25},
|
||||||
|
{"x": 11.75, "y": 3.25},
|
||||||
|
{"x": 12.75, "y": 3.25},
|
||||||
|
{"x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
|
||||||
|
|
||||||
|
{"x": 0, "y": 4.25, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 4.25},
|
||||||
|
{"x": 2.25, "y": 4.25},
|
||||||
|
{"x": 3.25, "y": 4.25},
|
||||||
|
{"x": 4.25, "y": 4.25},
|
||||||
|
{"x": 5.25, "y": 4.25},
|
||||||
|
{"x": 6.25, "y": 4.25},
|
||||||
|
{"x": 7.25, "y": 4.25},
|
||||||
|
{"x": 8.25, "y": 4.25},
|
||||||
|
{"x": 9.25, "y": 4.25},
|
||||||
|
{"x": 10.25, "y": 4.25},
|
||||||
|
{"x": 11.25, "y": 4.25},
|
||||||
|
{"x": 12.25, "y": 4.25, "w": 2.75},
|
||||||
|
|
||||||
|
{"x": 16.25, "y": 4.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 2.5, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 3.75, "y": 5.25, "w": 6.25},
|
||||||
|
{"x": 10, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 11.25, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 12.5, "y": 5.25, "w": 1.25},
|
||||||
|
{"x": 13.75, "y": 5.25, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 15.25, "y": 5.25},
|
||||||
|
{"x": 16.25, "y": 5.25},
|
||||||
|
{"x": 17.25, "y": 5.25}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,6 @@
|
|||||||
#include "rev2.h"
|
#include "rev2.h"
|
||||||
#elif defined(KEYBOARD_montsinger_rebound_rev3)
|
#elif defined(KEYBOARD_montsinger_rebound_rev3)
|
||||||
#include "rev3.h"
|
#include "rev3.h"
|
||||||
|
#elif defined(KEYBOARD_montsinger_rebound_rev4)
|
||||||
|
#include "rev4.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Ross Montsinger
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x552F
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER Montsinger
|
||||||
|
#define PRODUCT Rebound
|
||||||
|
#define DESCRIPTION "A conjoined Let's Split"
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on
|
||||||
|
diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, D4, C6, F7, F6, F5, F4 }
|
||||||
|
#define MATRIX_COL_PINS { D7, E6, B4, B5, B2, B3, B1 }
|
||||||
|
#define UNUSED_PINS { B6 }
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A { D2 }
|
||||||
|
#define ENCODERS_PAD_B { D3 }
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
{
|
||||||
|
"keyboard":"montsinger/rebound/rev4",
|
||||||
|
"url": "https://montsinger.net",
|
||||||
|
"maintainer": "rossman360",
|
||||||
|
"width": 13,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
{"x":4, "y":0},
|
||||||
|
{"x":5, "y":0},
|
||||||
|
|
||||||
|
{"x":7, "y":0},
|
||||||
|
{"x":8, "y":0},
|
||||||
|
{"x":9, "y":0},
|
||||||
|
{"x":10, "y":0},
|
||||||
|
{"x":11, "y":0},
|
||||||
|
{"x":12, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
{"x":4, "y":1},
|
||||||
|
{"x":5, "y":1},
|
||||||
|
{"x":6, "y":1},
|
||||||
|
{"x":7, "y":1},
|
||||||
|
{"x":8, "y":1},
|
||||||
|
{"x":9, "y":1},
|
||||||
|
{"x":10, "y":1},
|
||||||
|
{"x":11, "y":1},
|
||||||
|
{"x":12, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
{"x":4, "y":2},
|
||||||
|
{"x":5, "y":2},
|
||||||
|
{"x":6, "y":2},
|
||||||
|
{"x":7, "y":2},
|
||||||
|
{"x":8, "y":2},
|
||||||
|
{"x":9, "y":2},
|
||||||
|
{"x":10, "y":2},
|
||||||
|
{"x":11, "y":2},
|
||||||
|
{"x":12, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
{"x":4, "y":3},
|
||||||
|
{"x":5, "y":3},
|
||||||
|
{"x":6, "y":3},
|
||||||
|
{"x":7, "y":3},
|
||||||
|
{"x":8, "y":3},
|
||||||
|
{"x":9, "y":3},
|
||||||
|
{"x":10, "y":3},
|
||||||
|
{"x":11, "y":3},
|
||||||
|
{"x":12, "y":3}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_4x12": {
|
||||||
|
"layout": [
|
||||||
|
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
{"x":4, "y":0},
|
||||||
|
{"x":5, "y":0},
|
||||||
|
|
||||||
|
{"x":7, "y":0},
|
||||||
|
{"x":8, "y":0},
|
||||||
|
{"x":9, "y":0},
|
||||||
|
{"x":10, "y":0},
|
||||||
|
{"x":11, "y":0},
|
||||||
|
{"x":12, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
{"x":4, "y":1},
|
||||||
|
{"x":5, "y":1},
|
||||||
|
|
||||||
|
{"x":7, "y":1},
|
||||||
|
{"x":8, "y":1},
|
||||||
|
{"x":9, "y":1},
|
||||||
|
{"x":10, "y":1},
|
||||||
|
{"x":11, "y":1},
|
||||||
|
{"x":12, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
{"x":4, "y":2},
|
||||||
|
{"x":5, "y":2},
|
||||||
|
|
||||||
|
{"x":7, "y":2},
|
||||||
|
{"x":8, "y":2},
|
||||||
|
{"x":9, "y":2},
|
||||||
|
{"x":10, "y":2},
|
||||||
|
{"x":11, "y":2},
|
||||||
|
{"x":12, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
{"x":4, "y":3},
|
||||||
|
{"x":5, "y":3},
|
||||||
|
|
||||||
|
{"x":7, "y":3},
|
||||||
|
{"x":8, "y":3},
|
||||||
|
{"x":9, "y":3},
|
||||||
|
{"x":10, "y":3},
|
||||||
|
{"x":11, "y":3},
|
||||||
|
{"x":12, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define ADJUST MO(_ADJUST)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_all(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||||
|
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_COLEMAK] = LAYOUT_all(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||||
|
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_DVORAK] = LAYOUT_all(
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
|
||||||
|
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_all(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_all(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT_all(
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||||
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(S(KC_VOLD));
|
||||||
|
} else {
|
||||||
|
tap_code16(KC_VOLU);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rossman360.h"
|
||||||
|
|
||||||
|
#define PGMOD LT(_NUM, KC_PGDN)
|
||||||
|
#define TABMOD LT(_FN1, KC_TAB)
|
||||||
|
#define SPCMOD LT(_FN1, KC_SPACE)
|
||||||
|
#define ENTMOD LT(_FN2, KC_ENTER)
|
||||||
|
#define ESCMOD LT(_NUM, KC_ESC)
|
||||||
|
#define RSMOD LT(_FN1, KC_RSHIFT)
|
||||||
|
#
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_DEL,
|
||||||
|
_FN1,
|
||||||
|
_FN2,
|
||||||
|
_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT_all(
|
||||||
|
KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NTAB ,
|
||||||
|
JUMPBACK, KC_A , KC_S , KC_D , KC_F , KC_G ,MO(_DEL), KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , LM(_FN1, MOD_LALT), KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS,
|
||||||
|
CMDBSP , ALTDEL , KC_NO , CTRLSP , TABMOD , PGMOD , QUIT , ENTMOD , SPCMOD , MO(_DEL),KC_NO , KC_BSPC, KC_DEL
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT_all(
|
||||||
|
_______, TAB1 , TAB2 , TAB3 , TAB4 , _______, _______, UNDO , _______, _______, _______, CTAB ,
|
||||||
|
KC_CAPS, _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , KC_NO ,
|
||||||
|
_______, _______, XPANDR , _______, PMERGE , _______, _______, _______, PMERGE , KC_DOWN, _______, _______, EMDASH ,
|
||||||
|
WREFRESH,_______, _______, _______, LWORD , RWORD , _______, KC_NO , _______, KC_NO , _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN2] = LAYOUT_all(
|
||||||
|
_______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, PARADOWN, CSPEAK, _______, _______, KC_NO , KC_NO , _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_DEL] = LAYOUT_all(
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, CTAB ,
|
||||||
|
REMCAPS, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP ,KC_RIGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
||||||
|
_______, _______, _______, BLINE , KC_BSPC, BWORD , _______, KC_NO , KC_NO , _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NUM] = LAYOUT_all(
|
||||||
|
KC_GRV , KC_1 , KC_7 , KC_8 , KC_9 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_MINS, KC_EQL,
|
||||||
|
KC_CAPS, _______, KC_4 , KC_5 , KC_6 , KC_BSPC, KC_LBRC, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______,
|
||||||
|
KC_COMM, KC_DOT , KC_1 , KC_2 , KC_3 ,KC_ENTER, KC_RBRC, KC_RBRC, KC_1 , KC_2 , KC_3 , KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, KC_0 , _______, _______, KC_NO , KC_NO , KC_0 , _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
switch(get_highest_layer(layer_state)){
|
||||||
|
case _BASE:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(KC_VOLD);
|
||||||
|
} else {
|
||||||
|
tap_code16(KC_VOLU);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _DEL:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(KC_F11);
|
||||||
|
} else {
|
||||||
|
tap_code16(KC_F3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case _FN1:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(S(KC_TAB));
|
||||||
|
} else {
|
||||||
|
tap_code16(KC_TAB);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
void oled_task_user(void) {
|
||||||
|
// Host Keyboard Layer Status
|
||||||
|
oled_write_P(PSTR(""), false);
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _BASE:
|
||||||
|
oled_write_P(PSTR("Rebound\n"), false);
|
||||||
|
oled_write_P(PSTR("Rev3.1\n"), false);
|
||||||
|
break;
|
||||||
|
case _FN1:
|
||||||
|
oled_write_P(PSTR("Fn\n"), false);
|
||||||
|
break;
|
||||||
|
case _FN2:
|
||||||
|
oled_write_P(PSTR("Para\n"), false);
|
||||||
|
break;
|
||||||
|
case _NUM:
|
||||||
|
oled_write_P(PSTR("Num\n"), false);
|
||||||
|
break;
|
||||||
|
case _DEL:
|
||||||
|
oled_write_P(PSTR("Del\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||||
|
oled_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
OLED_DRIVER_ENABLE = no
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 Ross Montsinger
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
* The first section contains all of the arguments representing the
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_ortho_4x12( \
|
||||||
|
K00, K70, K01, K71, K02, K72, K04, K84, K05, K75, K06, K76, \
|
||||||
|
K10, K60, K11, K61, K12, K62, K14, K74, K15, K65, K16, K66, \
|
||||||
|
K20, K50, K21, K51, K22, K52, K24, K64, K25, K55, K26, K56,\
|
||||||
|
K30, K40, K31, K41, K32, K42, K34, K54, K35, K45, K36, K46\
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K04, K05, K06, K07}, \
|
||||||
|
{ K10, K11, K12, K14, K15, K16, K17 }, \
|
||||||
|
{ K20, K21, K22, K24, K25, K26, K27 }, \
|
||||||
|
{ K30, K31, K32, K34, K35, K36, K37 }, \
|
||||||
|
{ K40, K41, K42, K44, K45, K46, K47 }, \
|
||||||
|
{ K50, K51, K52, K54, K55, K56, K57 }, \
|
||||||
|
{ K60, K61, K62, K64, K65, K66, K67 }, \
|
||||||
|
{ K70, K71, K72, K74, K75, K76, K77 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
K00, K70, K01, K71, K02, K72, K04, K74, K05, K75, K06, K76, \
|
||||||
|
K10, K60, K11, K61, K12, K62, K13, K14, K64, K15, K65, K16, K66, \
|
||||||
|
K20, K50, K21, K51, K22, K52, K23, K24, K54, K25, K55, K26, K56,\
|
||||||
|
K30, K40, K31, K41, K32, K42, K33, K34, K44, K35, K45, K36, K46\
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, KC_NO, K04, K05, K06}, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16}, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26}, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36}, \
|
||||||
|
{ K40, K41, K42, KC_NO, K44, K45, K46}, \
|
||||||
|
{ K50, K51, K52, KC_NO, K54, K55, K56}, \
|
||||||
|
{ K60, K61, K62, KC_NO, K64, K65, K66}, \
|
||||||
|
{ K70, K71, K72, KC_NO, K74, K75, K76} \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x12
|
||||||
|
LAYOUTS_HAS_RGB = no
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 MechMerlin
|
/* Copyright 2020 Rozakiin
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -26,37 +26,9 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
/*
|
if(led_update_user(led_state)) {
|
||||||
|
writePin(C6, led_state.num_lock);
|
||||||
void matrix_scan_kb(void) {
|
}
|
||||||
// put your looping keyboard code here
|
return true;
|
||||||
// runs every cycle (a lot)
|
|
||||||
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// put your per-action keyboard code here
|
|
||||||
// runs for every action, just before processing by the firmware
|
|
||||||
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
|
||||||
writePinLow(C6);
|
|
||||||
} else {
|
|
||||||
writePinHigh(C6);
|
|
||||||
}
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 MechMerlin
|
/* Copyright 2019 Rozakiin
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4E58 //"NX"
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0x00DC //220
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Noxary
|
#define MANUFACTURER Noxary
|
||||||
#define PRODUCT 220
|
#define PRODUCT 220
|
||||||
#define DESCRIPTION A custom numpad
|
#define DESCRIPTION A custom numpad keyboard.
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 6
|
#define MATRIX_ROWS 6
|
||||||
@@ -57,42 +57,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BACKLIGHT_BREATHING
|
#define BACKLIGHT_BREATHING
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
// #define RGB_DI_PIN E2
|
|
||||||
// #ifdef RGB_DI_PIN
|
|
||||||
// #define RGBLED_NUM 16
|
|
||||||
// #define RGBLIGHT_HUE_STEP 8
|
|
||||||
// #define RGBLIGHT_SAT_STEP 8
|
|
||||||
// #define RGBLIGHT_VAL_STEP 8
|
|
||||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
|
||||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
|
||||||
// /*== all animations enable ==*/
|
|
||||||
// #define RGBLIGHT_ANIMATIONS
|
|
||||||
// /*== or choose animations ==*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHING
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
|
||||||
// #define RGBLIGHT_EFFECT_SNAKE
|
|
||||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
|
||||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
|
||||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
|
||||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
|
||||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
|
||||||
// /*== customize breathing effect ==*/
|
|
||||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
|
||||||
// /*==== use exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
|
|||||||
@@ -15,62 +15,109 @@
|
|||||||
*/
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Defines the keycodes used by our macros in process_record_user
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
enum custom_keycodes {
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
QMKBEST = SAFE_RANGE,
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
QMKURL
|
// entirely and just use numbers.
|
||||||
|
enum layer_names {
|
||||||
|
_BL,
|
||||||
|
_FL1,
|
||||||
|
_FL2,
|
||||||
|
_FL3
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base Layer
|
||||||
LAYOUT_ortho_6x4(
|
* ┌───┬───┬───┬───┐
|
||||||
KC_ESC, BL_TOGG, BL_DEC, BL_INC,
|
* │Esc│BLT│BL-│BL+│
|
||||||
KC_NLCK, KC_SLSH, KC_ASTR, KC_PEQL,
|
* ├───┼───┼───┼───┤
|
||||||
KC_7, KC_8, KC_9, KC_PMNS,
|
* │NLK│ / │ * │ = │
|
||||||
KC_4, KC_5, KC_6, KC_PPLS,
|
* ├───┼───┼───┼───┤
|
||||||
KC_1, KC_2, KC_3, KC_PENT,
|
* │ 7 │ 8 │ 9 │ - │
|
||||||
KC_0, KC_0, KC_DEL, KC_PENT),
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 4 │ 5 │ 6 │ + │
|
||||||
LAYOUT_ortho_6x4(
|
* ├───┼───┼───┼───┤
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
* │ 1 │ 2 │ 3 │ENT│
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
* ├───┼───┼───┼───┤
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
* │ 0 │ 0 │ . │ENT│
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
* └───┴───┴───┴───┘
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
*/
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
[_BL] = LAYOUT_ortho_6x4(
|
||||||
|
KC_ESC, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_P0, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
/* Function Layer 1
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL1] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Function Layer 2
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL2] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Function Layer 3
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL3] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case QMKBEST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
// when keycode QMKBEST is pressed
|
|
||||||
SEND_STRING("QMK is the best thing ever!");
|
|
||||||
} else {
|
|
||||||
// when keycode QMKBEST is released
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case QMKURL:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
// when keycode QMKURL is pressed
|
|
||||||
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
|
||||||
} else {
|
|
||||||
// when keycode QMKURL is released
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
# The default keymap for Noxary 220
|
# The default keymap for Noxary 220
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
/* Copyright 2020 Rozakiin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_names {
|
||||||
|
_BL,
|
||||||
|
_FL1,
|
||||||
|
_FL2,
|
||||||
|
_FL3
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base Layer
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │Esc│BLT│BL-│BL+│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │NLK│ / │ * │ = │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 7 │ 8 │ 9 │ - │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 4 │ 5 │ 6 │ + │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 1 │ 2 │ 3 │ENT│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 0 │ 0 │ . │ENT│
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_ortho_6x4(
|
||||||
|
KC_ESC, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_P0, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
/* Function Layer 1
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL1] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Function Layer 2
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL2] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Function Layer 3
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL3] = LAYOUT_ortho_6x4(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# The VIA keymap for Noxary 220
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
# Noxary 220
|
# Noxary 220
|
||||||
|
|
||||||
A fully customizable numpad
|

|
||||||
|
|
||||||
|
A fully customizable (4x6) numpad keyboard.
|
||||||
|
|
||||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
|
||||||
Hardware Supported: Noxary 220 PCB
|
Hardware Supported: Noxary 220 PCB
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
@@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode
|
|||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
|
||||||
|
|
||||||
LAYOUTS = ortho_6x4
|
LAYOUTS = ortho_6x4
|
||||||
@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0x4E58
|
#define VENDOR_ID 0x4E58 //"NX"
|
||||||
#define PRODUCT_ID 0x0050
|
#define PRODUCT_ID 0x0118 //280
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Noxary
|
#define MANUFACTURER Noxary
|
||||||
#define PRODUCT 280
|
#define PRODUCT 280
|
||||||
#define DESCRIPTION A custom TKL
|
#define DESCRIPTION A custom TKL keyboard.
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 12
|
#define MATRIX_ROWS 12
|
||||||
@@ -57,33 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BACKLIGHT_BREATHING
|
#define BACKLIGHT_BREATHING
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
// #define RGB_DI_PIN E2
|
|
||||||
// #ifdef RGB_DI_PIN
|
|
||||||
// #define RGBLED_NUM 16
|
|
||||||
// #define RGBLIGHT_HUE_STEP 8
|
|
||||||
// #define RGBLIGHT_SAT_STEP 8
|
|
||||||
// #define RGBLIGHT_VAL_STEP 8
|
|
||||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
|
||||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
|
||||||
// /*== all animations enable ==*/
|
|
||||||
// #define RGBLIGHT_ANIMATIONS
|
|
||||||
// /*== or choose animations ==*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHING
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
|
||||||
// #define RGBLIGHT_EFFECT_SNAKE
|
|
||||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
|
||||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
|
||||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
|
||||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
|
||||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
|
||||||
// /*== customize breathing effect ==*/
|
|
||||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
|
||||||
// /*==== use exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
@@ -91,8 +64,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Rozakin
|
/* Copyright 2020 Rozakiin
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,35 +15,34 @@
|
|||||||
*/
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Defines the keycodes used by our macros in process_record_user
|
|
||||||
enum custom_keycodes {
|
|
||||||
QMKBEST = SAFE_RANGE,
|
|
||||||
QMKURL
|
|
||||||
};
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _BL 0
|
enum layer_names {
|
||||||
#define _FL1 1
|
_BL,
|
||||||
#define _FL2 2
|
_FL1,
|
||||||
|
_FL2,
|
||||||
|
_FL3
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI enter
|
/* Base Layer - For ISO enter use ANSI enter
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11| f12| |Prnt|ScLk|Paus|
|
* │ESC│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PRT│SLK│PSE│
|
||||||
* |------------------------------------------------------------| |--------------|
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| | Ins|Home|PgUp|
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │BSP││INS│HME│PUP│
|
||||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | Del| End|PgDn|
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* |------------------------------------------------------------| `--------------'
|
* │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││DEL│END│PDN│
|
||||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| ,----.
|
* │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │
|
||||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift|Mo(1)| | Up |
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* │SFT │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │M1 │ │ ↑ │
|
||||||
* |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | |Left| Dn |Rght|
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
* `------------------------------------------------------------' `--------------'
|
* │CTRL│Win │ALT │ SPC │ALT │WIN │M(1)│CTRL││ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT(
|
[_BL] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
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,
|
||||||
@@ -51,52 +50,78 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP,
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI enter
|
),
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
/* Function Layer 1 - For ISO enter use ANSI enter
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| |--------------|
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* | | | | |RST| | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| `--------------'
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │RST│ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,----.
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* | | | | | | | | | |Bl-|Bl+| | Mute| | |Vol+|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
* | | | | BL_Toggle | | | | | | |Vol-| |
|
* │ │ │ │ │ │ │ │ │ │BL-│BL+│ │ MUTE │ │ │VL+│
|
||||||
* `------------------------------------------------------------' `--------------'
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
*/
|
* │ │ │ │ BL_TOGGLE │ │ │ │ ││ │VL-│ │
|
||||||
[_FL1] = LAYOUT(
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
*/
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
[_FL1] = LAYOUT(
|
||||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU,
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI enter
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU,
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
),
|
||||||
* |------------------------------------------------------------| |--------------|
|
/* Function Layer 2 - For ISO enter use ANSI enter
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* | | | | | | | | | | | | | | | | | | |
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| `--------------'
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,----.
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* | | | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* `------------------------------------------------------------' `--------------'
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
*/
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
[_FL2] = LAYOUT(
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
*/
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
[_FL2] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Function Layer 3 - For ISO enter use ANSI enter
|
||||||
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
|
* │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[_FL3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
# The default keymap for Noxary 280
|
# The default keymap for Noxary 280
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Rozakin
|
/* Copyright 2020 Rozakiin
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,26 +19,30 @@
|
|||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _BL 0
|
enum layer_names {
|
||||||
#define _FL1 1
|
_BL,
|
||||||
#define _FL2 2
|
_FL1,
|
||||||
#define _FL3 3
|
_FL2,
|
||||||
|
_FL3
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI enter
|
/* Base Layer - For ISO enter use ANSI enter
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11| f12| |Prnt|ScLk|Paus|
|
* │ESC│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PRT│SLK│PSE│
|
||||||
* |------------------------------------------------------------| |--------------|
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| | Ins|Home|PgUp|
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │BSP││INS│HME│PUP│
|
||||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | Del| End|PgDn|
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* |------------------------------------------------------------| `--------------'
|
* │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││DEL│END│PDN│
|
||||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| ,----.
|
* │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │
|
||||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift|Mo(1)| | Up |
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* │SFT │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │M1 │ │ ↑ │
|
||||||
* |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | |Left| Dn |Rght|
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
* `------------------------------------------------------------' `--------------'
|
* │CTRL│Win │ALT │ SPC │ALT │WIN │M(1)│CTRL││ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT(
|
[_BL] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
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,
|
||||||
@@ -46,73 +50,78 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP,
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI enter
|
),
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
/* Function Layer 1 - For ISO enter use ANSI enter
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| |--------------|
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* | | | | |RST| | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| `--------------'
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │RST│ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,----.
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* | | | | | | | | | |Bl-|Bl+| | Mute| | |Vol+|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
* | | | | BL_Toggle | | | | | | |Vol-| |
|
* │ │ │ │ │ │ │ │ │ │BL-│BL+│ │ MUTE │ │ │VL+│
|
||||||
* `------------------------------------------------------------' `--------------'
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
*/
|
* │ │ │ │ BL_TOGGLE │ │ │ │ ││ │VL-│ │
|
||||||
[_FL1] = LAYOUT(
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
*/
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
[_FL1] = LAYOUT(
|
||||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU,
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI enter
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU,
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
),
|
||||||
* |------------------------------------------------------------| |--------------|
|
/* Function Layer 2 - For ISO enter use ANSI enter
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| |--------------|
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* | | | | | | | | | | | | | | | | | | |
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| `--------------'
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,----.
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* | | | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
* | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* `------------------------------------------------------------' `--------------'
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
*/
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
[_FL2] = LAYOUT(
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
*/
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
[_FL2] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/* _FL3: Function Layer 3 - For ISO enter use ANSI enter
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
* ,------------------------------------------------------------. ,--------------.
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
* |------------------------------------------------------------| |--------------|
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
* | | | | | | | | | | | | | | | | | | | |
|
),
|
||||||
* |------------------------------------------------------------| |--------------|
|
/* Function Layer 3 - For ISO enter use ANSI enter
|
||||||
* | | | | | | | | | | | | | | | | | | |
|
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||||
* |------------------------------------------------------------| `--------------'
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* | | | | | | | | | | | | | | |
|
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||||
* |------------------------------------------------------------| ,----.
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||||
* | | | | | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* |------------------------------------------------------------| ,--------------.
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||||
* | | | | | | | | | | | | |
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
* `------------------------------------------------------------' `--------------'
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||||
*/
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
[_FL3] = LAYOUT(
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* │ │ │ │ │ │ │ │ ││ │ │ │
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
*/
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
[_FL3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
# The VIA keymap for Noxary 280
|
# The VIA keymap for Noxary 280
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
Noxary 280
|
# Noxary 280
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
A fully customizable TKL keyboard.
|
A fully customizable TKL keyboard.
|
||||||
|
|
||||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakin](https://github.com/rozakiin)
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
|
||||||
Hardware Supported: 280 PCB
|
Hardware Supported: Noxary 280 PCB
|
||||||
Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0)
|
Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define TAPPING_TERM 150
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
|
||||||
|
// Disable all RGB effects
|
||||||
|
#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||||
|
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||||
|
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
|
#define DISABLE_RGB_MATRIX_BREATHING
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_SAT
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_VAL
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||||
|
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||||
|
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
|
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||||
|
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||||
|
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||||
|
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
|
#define DISABLE_RGB_MATRIX_RAINDROPS
|
||||||
|
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
#define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
|
#define DISABLE_RGB_MATRIX_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
@@ -0,0 +1,384 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
* 2020 Niclas Meyer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define K(kc) (1ull<<((kc) - ALPHA))
|
||||||
|
|
||||||
|
#define KALPHA K(ALPHA)
|
||||||
|
#define KBETA K(BETA)
|
||||||
|
#define KGAMMA K(GAMMA)
|
||||||
|
#define KDELTA K(DELTA)
|
||||||
|
#define KEPSILON K(EPSILON)
|
||||||
|
#define KZETA K(ZETA)
|
||||||
|
#define KTHETA K(THETA)
|
||||||
|
#define KIOTA K(IOTA)
|
||||||
|
#define KKAPPA K(KAPPA)
|
||||||
|
|
||||||
|
enum keys {
|
||||||
|
ALPHA = SAFE_RANGE,
|
||||||
|
BETA,
|
||||||
|
GAMMA,
|
||||||
|
DELTA,
|
||||||
|
EPSILON,
|
||||||
|
ZETA,
|
||||||
|
THETA,
|
||||||
|
IOTA,
|
||||||
|
KAPPA,
|
||||||
|
LOCK,
|
||||||
|
NONE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
NORMAL,
|
||||||
|
QWERTY,
|
||||||
|
GAME,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
PHI,
|
||||||
|
FN,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define XXXX KC_NO
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
|
||||||
|
#define CQWER LM(QWERTY, MOD_LCTL)
|
||||||
|
#define AQWER LM(QWERTY, MOD_LALT)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[NORMAL] = LAYOUT_planck_grid(
|
||||||
|
ALPHA, BETA, GAMMA, DELTA, ____, ____, ____, ____, DELTA, GAMMA, BETA, ALPHA,
|
||||||
|
EPSILON, ZETA, THETA, IOTA, ____, ____, ____, ____, IOTA, THETA, ZETA, EPSILON,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||||
|
MO(PHI), CQWER, AQWER, MO(FN), KAPPA, ____, XXXX, KAPPA, MO(FN), ____, ____, MO(PHI)
|
||||||
|
),
|
||||||
|
[QWERTY] = LAYOUT_planck_grid(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT,
|
||||||
|
MO(PHI), KC_LCTL, KC_LALT, KC_LGUI, MO(LOWER), KC_SPC, XXXX, MO(RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||||
|
),
|
||||||
|
[GAME] = LAYOUT_planck_grid(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
KC_LCTL, KC_Z, KC_X, KC_C, KC_SPC, ____, XXXX, ____, KC_V, KC_B, ____, MO(PHI)
|
||||||
|
),
|
||||||
|
[LOWER] = LAYOUT_planck_grid(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||||
|
KC_DEL, ____, ____, ____, ____, ____, ____, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_PGDN, KC_HOME, KC_END, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, XXXX, ____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
[RAISE] = LAYOUT_planck_grid(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_DEL, ____, ____, ____, ____, ____, ____, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_PGDN, KC_HOME, KC_END, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, XXXX, ____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
[PHI] = LAYOUT_planck_grid(
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, ____, ____, ____, ____, ____, ____, KC_DEL,
|
||||||
|
____, KC_F5, KC_F6, KC_F7, KC_F8, ____, ____, DF(QWERTY), DF(NORMAL), DF(GAME), ____, KC_F13,
|
||||||
|
____, KC_F9, KC_F10, KC_F11, KC_F12, ____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, RGB_TOG, RGB_MOD, ____, ____, ____, XXXX, ____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
[FN] = LAYOUT_planck_grid(
|
||||||
|
____, ____, KC_UP, ____, ____, ____, ____, ____, ____, KC_UP, ____, ____,
|
||||||
|
KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL,
|
||||||
|
KC_HOME, KC_END, KC_PGUP, KC_PGDN, ____, ____, ____, ____, KC_PGDN, KC_PGUP, KC_HOME, KC_END,
|
||||||
|
____, ____, ____, ____, ____, ____, XXXX, ____, ____, ____, ____, ____
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t left_chord = 0;
|
||||||
|
static uint16_t right_chord = 0;
|
||||||
|
|
||||||
|
static bool locking = false;
|
||||||
|
static bool locked = false;
|
||||||
|
static uint16_t mods = 0;
|
||||||
|
|
||||||
|
#define PROCESS_MOD(mod) \
|
||||||
|
do { \
|
||||||
|
if ((mods & MOD_##mod) && !(keys & MOD_##mod)) { \
|
||||||
|
unregister_code16(KC_##mod); \
|
||||||
|
} \
|
||||||
|
if (!(mods & MOD_##mod) && (keys & MOD_##mod)) { \
|
||||||
|
register_code16(KC_##mod); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
static void process_keys(uint16_t keys) {
|
||||||
|
if (keys == NONE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keys == LOCK) {
|
||||||
|
locking = !locking;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((keys & QK_ONE_SHOT_MOD) == QK_ONE_SHOT_MOD) {
|
||||||
|
PROCESS_MOD(LCTL);
|
||||||
|
PROCESS_MOD(LSFT);
|
||||||
|
PROCESS_MOD(LALT);
|
||||||
|
PROCESS_MOD(LGUI);
|
||||||
|
|
||||||
|
mods = keys & ~QK_ONE_SHOT_MOD;
|
||||||
|
locked = false;
|
||||||
|
|
||||||
|
if (locking) {
|
||||||
|
locking = false;
|
||||||
|
locked = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Normal key
|
||||||
|
tap_code16(keys);
|
||||||
|
locking = false;
|
||||||
|
|
||||||
|
if (mods && !locked) {
|
||||||
|
if (mods & MOD_LCTL) {
|
||||||
|
unregister_code16(KC_LCTL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mods & MOD_LSFT) {
|
||||||
|
unregister_code16(KC_LSFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mods & MOD_LALT) {
|
||||||
|
unregister_code16(KC_LALT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mods & MOD_LGUI) {
|
||||||
|
unregister_code16(KC_LGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
mods = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint16_t chord_to_keys(uint16_t chord) {
|
||||||
|
switch (chord) {
|
||||||
|
// Unshifted Extra
|
||||||
|
case KKAPPA: return KC_SPC;
|
||||||
|
case KEPSILON | KZETA | KTHETA | KIOTA: return KC_ENT;
|
||||||
|
case KEPSILON | KZETA | KGAMMA | KIOTA: return KC_TAB;
|
||||||
|
case KEPSILON | KIOTA: return KC_BSPC;
|
||||||
|
case KKAPPA | KEPSILON: return KC_ESC;
|
||||||
|
|
||||||
|
// Shifted Extra
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KTHETA | KIOTA: return S(KC_ENT);
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KGAMMA | KIOTA: return S(KC_TAB);
|
||||||
|
case KKAPPA | KEPSILON | KIOTA: return S(KC_BSPC);
|
||||||
|
|
||||||
|
// Lowercase Letters
|
||||||
|
case KBETA: return KC_A;
|
||||||
|
case KZETA | KDELTA: return KC_B;
|
||||||
|
case KBETA | KGAMMA | KDELTA: return KC_C;
|
||||||
|
case KZETA | KTHETA | KIOTA: return KC_D;
|
||||||
|
case KDELTA: return KC_E;
|
||||||
|
case KGAMMA | KIOTA: return KC_F;
|
||||||
|
case KBETA | KTHETA: return KC_G;
|
||||||
|
case KZETA | KTHETA: return KC_H;
|
||||||
|
case KGAMMA: return KC_I;
|
||||||
|
case KBETA | KGAMMA | KIOTA: return KC_J;
|
||||||
|
case KBETA | KTHETA | KIOTA: return KC_K;
|
||||||
|
case KBETA | KGAMMA: return KC_L;
|
||||||
|
case KBETA | KDELTA: return KC_M;
|
||||||
|
case KZETA: return KC_N;
|
||||||
|
case KTHETA: return KC_O;
|
||||||
|
case KZETA | KGAMMA: return KC_P;
|
||||||
|
case KBETA | KTHETA | KDELTA: return KC_Q;
|
||||||
|
case KGAMMA | KDELTA: return KC_R;
|
||||||
|
case KTHETA | KIOTA: return KC_S;
|
||||||
|
case KIOTA: return KC_T;
|
||||||
|
case KZETA | KIOTA: return KC_U;
|
||||||
|
case KTHETA | KDELTA: return KC_V;
|
||||||
|
case KZETA | KGAMMA | KIOTA: return KC_W;
|
||||||
|
case KZETA | KTHETA | KDELTA: return KC_X;
|
||||||
|
case KBETA | KIOTA: return KC_Y;
|
||||||
|
case KZETA | KGAMMA | KDELTA: return KC_Z;
|
||||||
|
|
||||||
|
// Uppercase Letters
|
||||||
|
case KKAPPA | KBETA: return S(KC_A);
|
||||||
|
case KKAPPA | KZETA | KDELTA: return S(KC_B);
|
||||||
|
case KKAPPA | KBETA | KGAMMA | KDELTA: return S(KC_C);
|
||||||
|
case KKAPPA | KZETA | KTHETA | KIOTA: return S(KC_D);
|
||||||
|
case KKAPPA | KDELTA: return S(KC_E);
|
||||||
|
case KKAPPA | KGAMMA | KIOTA: return S(KC_F);
|
||||||
|
case KKAPPA | KBETA | KTHETA: return S(KC_G);
|
||||||
|
case KKAPPA | KZETA | KTHETA: return S(KC_H);
|
||||||
|
case KKAPPA | KGAMMA: return S(KC_I);
|
||||||
|
case KKAPPA | KBETA | KGAMMA | KIOTA: return S(KC_J);
|
||||||
|
case KKAPPA | KBETA | KTHETA | KIOTA: return S(KC_K);
|
||||||
|
case KKAPPA | KBETA | KGAMMA: return S(KC_L);
|
||||||
|
case KKAPPA | KBETA | KDELTA: return S(KC_M);
|
||||||
|
case KKAPPA | KZETA: return S(KC_N);
|
||||||
|
case KKAPPA | KTHETA: return S(KC_O);
|
||||||
|
case KKAPPA | KZETA | KGAMMA: return S(KC_P);
|
||||||
|
case KKAPPA | KBETA | KTHETA | KDELTA: return S(KC_Q);
|
||||||
|
case KKAPPA | KGAMMA | KDELTA: return S(KC_R);
|
||||||
|
case KKAPPA | KTHETA | KIOTA: return S(KC_S);
|
||||||
|
case KKAPPA | KIOTA: return S(KC_T);
|
||||||
|
case KKAPPA | KZETA | KIOTA: return S(KC_U);
|
||||||
|
case KKAPPA | KTHETA | KDELTA: return S(KC_V);
|
||||||
|
case KKAPPA | KZETA | KGAMMA | KIOTA: return S(KC_W);
|
||||||
|
case KKAPPA | KZETA | KTHETA | KDELTA: return S(KC_X);
|
||||||
|
case KKAPPA | KBETA | KIOTA: return S(KC_Y);
|
||||||
|
case KKAPPA | KZETA | KGAMMA | KDELTA: return S(KC_Z);
|
||||||
|
|
||||||
|
// Unshifted Numbers
|
||||||
|
case KEPSILON | KZETA: return KC_0;
|
||||||
|
case KEPSILON | KZETA | KIOTA: return KC_1;
|
||||||
|
case KEPSILON | KZETA | KTHETA: return KC_2;
|
||||||
|
case KEPSILON | KBETA: return KC_3;
|
||||||
|
case KEPSILON | KBETA | KDELTA: return KC_4;
|
||||||
|
case KEPSILON | KBETA | KGAMMA: return KC_5;
|
||||||
|
case KEPSILON | KBETA | KIOTA: return KC_6;
|
||||||
|
case KEPSILON | KTHETA: return KC_7;
|
||||||
|
case KEPSILON | KBETA | KGAMMA | KIOTA: return KC_8;
|
||||||
|
case KEPSILON | KGAMMA | KDELTA: return KC_9;
|
||||||
|
|
||||||
|
// Shifted Numbers
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KIOTA: return KC_EXLM;
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KTHETA: return KC_AT;
|
||||||
|
case KKAPPA | KEPSILON | KBETA: return KC_HASH;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KDELTA: return KC_DLR;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KGAMMA: return KC_PERC;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KIOTA: return KC_CIRC;
|
||||||
|
case KKAPPA | KEPSILON | KTHETA: return KC_AMPR;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KGAMMA | KIOTA: return KC_ASTR;
|
||||||
|
case KKAPPA | KEPSILON | KGAMMA | KDELTA: return KC_LPRN;
|
||||||
|
case KKAPPA | KEPSILON | KZETA: return KC_RPRN;
|
||||||
|
|
||||||
|
// Unshifted Symbols
|
||||||
|
case KEPSILON | KBETA | KTHETA | KIOTA: return KC_MINS;
|
||||||
|
case KEPSILON | KZETA | KTHETA | KDELTA: return KC_EQL;
|
||||||
|
case KEPSILON | KZETA | KGAMMA: return KC_LBRC;
|
||||||
|
case KEPSILON | KGAMMA | KIOTA: return KC_RBRC;
|
||||||
|
case KEPSILON | KBETA | KTHETA: return KC_BSLS;
|
||||||
|
case KEPSILON | KBETA | KGAMMA | KDELTA: return KC_SCLN;
|
||||||
|
case KEPSILON | KZETA | KDELTA: return KC_QUOT;
|
||||||
|
case KEPSILON | KTHETA | KIOTA: return KC_COMM;
|
||||||
|
case KEPSILON | KZETA | KGAMMA | KDELTA: return KC_DOT;
|
||||||
|
case KEPSILON | KGAMMA: return KC_SLSH;
|
||||||
|
case KEPSILON | KDELTA: return KC_GRV;
|
||||||
|
|
||||||
|
// Shifted Symbols
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KTHETA | KIOTA: return KC_UNDS;
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KTHETA | KDELTA: return KC_PLUS;
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KGAMMA: return KC_LCBR;
|
||||||
|
case KKAPPA | KEPSILON | KGAMMA | KIOTA: return KC_RCBR;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KTHETA: return KC_PIPE;
|
||||||
|
case KKAPPA | KEPSILON | KBETA | KGAMMA | KDELTA: return KC_COLN;
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KDELTA: return KC_DQT;
|
||||||
|
case KKAPPA | KEPSILON | KTHETA | KIOTA: return KC_LT;
|
||||||
|
case KKAPPA | KEPSILON | KZETA | KGAMMA | KDELTA: return KC_GT;
|
||||||
|
case KKAPPA | KEPSILON | KGAMMA: return KC_QUES;
|
||||||
|
case KKAPPA | KEPSILON | KDELTA: return KC_TILD;
|
||||||
|
|
||||||
|
// Modifiers
|
||||||
|
case KALPHA | KIOTA: return LOCK;
|
||||||
|
|
||||||
|
case KALPHA: return QK_ONE_SHOT_MOD; // Release all
|
||||||
|
|
||||||
|
case KALPHA | KBETA: return OSM(MOD_LCTL);
|
||||||
|
case KALPHA | KGAMMA: return OSM(MOD_LSFT);
|
||||||
|
case KALPHA | KDELTA: return OSM(MOD_LALT);
|
||||||
|
case KALPHA | KKAPPA: return OSM(MOD_LGUI);
|
||||||
|
|
||||||
|
case KALPHA | KBETA | KGAMMA: return OSM(MOD_LCTL | MOD_LSFT);
|
||||||
|
case KALPHA | KBETA | KDELTA: return OSM(MOD_LCTL | MOD_LALT);
|
||||||
|
case KALPHA | KBETA | KKAPPA: return OSM(MOD_LCTL | MOD_LGUI);
|
||||||
|
case KALPHA | KGAMMA | KDELTA: return OSM(MOD_LSFT | MOD_LALT);
|
||||||
|
case KALPHA | KGAMMA | KKAPPA: return OSM(MOD_LSFT | MOD_LGUI);
|
||||||
|
case KALPHA | KDELTA | KKAPPA: return OSM(MOD_LALT | MOD_LGUI);
|
||||||
|
|
||||||
|
case KALPHA | KBETA | KGAMMA | KDELTA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LALT);
|
||||||
|
case KALPHA | KBETA | KGAMMA | KKAPPA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LGUI);
|
||||||
|
case KALPHA | KBETA | KDELTA | KKAPPA: return OSM(MOD_LCTL | MOD_LALT | MOD_LGUI);
|
||||||
|
case KALPHA | KGAMMA | KDELTA | KKAPPA: return OSM(MOD_LSFT | MOD_LALT | MOD_LGUI);
|
||||||
|
|
||||||
|
case KALPHA | KBETA | KGAMMA | KDELTA | KKAPPA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint16_t *get_hand(keypos_t *key) {
|
||||||
|
if (key->row <= 3) {
|
||||||
|
return &left_chord;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key->row <= 6) {
|
||||||
|
return &right_chord;
|
||||||
|
}
|
||||||
|
|
||||||
|
// row 7
|
||||||
|
if (key->col <= 2) {
|
||||||
|
return &right_chord;
|
||||||
|
} else {
|
||||||
|
return &left_chord;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode < ALPHA) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t *chord = get_hand(&record->event.key);
|
||||||
|
|
||||||
|
if (record->event.pressed) {
|
||||||
|
*chord |= K(keycode);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*chord != 0) {
|
||||||
|
process_keys(chord_to_keys(*chord));
|
||||||
|
*chord = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_planck_ez
|
||||||
|
|
||||||
|
#define LED_BRIGHTNESS 50
|
||||||
|
|
||||||
|
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||||
|
switch (state) {
|
||||||
|
case 1U << NORMAL:
|
||||||
|
planck_ez_left_led_off();
|
||||||
|
planck_ez_right_led_off();
|
||||||
|
break;
|
||||||
|
case 1U << QWERTY:
|
||||||
|
planck_ez_left_led_level(LED_BRIGHTNESS);
|
||||||
|
planck_ez_right_led_off();
|
||||||
|
break;
|
||||||
|
case 1U << GAME:
|
||||||
|
planck_ez_left_led_off();
|
||||||
|
planck_ez_right_led_level(LED_BRIGHTNESS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* KEYBOARD_planck_ez */
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
# buffet's planck layout
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
The Layout is based on keychords.
|
||||||
|
The general idea is that you're able to type everything with either hand, so that you can alternate between hands as you type.
|
||||||
|
|
||||||
|
The keys are in a 2x4 block in the top left and top right respectively (mirrored).
|
||||||
|
They have greek letter names (see `keymap.c` for more info).
|
||||||
|
|
||||||
|
Thumb added to any key means shift is pressed as well.
|
||||||
|
|
||||||
|
`-` means the finger presses nothing.
|
||||||
|
`^` means the finger presses the upper row.
|
||||||
|
`v` means the finger presses the lower row.
|
||||||
|
|
||||||
|
```
|
||||||
|
Space: thumb
|
||||||
|
Return: vvvv vvvv
|
||||||
|
Tab: vv^v v^vv
|
||||||
|
Bspace: v--v v--v
|
||||||
|
Esc: lower pinky and thumb
|
||||||
|
```
|
||||||
|
|
||||||
|
### Letters
|
||||||
|
|
||||||
|
```
|
||||||
|
a: -^-- --^-
|
||||||
|
b: -v-^ ^-v-
|
||||||
|
c: -^^^ ^^^-
|
||||||
|
d: -vvv vvv-
|
||||||
|
e: ---^ ^---
|
||||||
|
f: --^v v^--
|
||||||
|
g: -^v- -v^-
|
||||||
|
h: -vv- -vv-
|
||||||
|
i: --^- -^--
|
||||||
|
j: -^^v v^^-
|
||||||
|
k: -^vv vv^-
|
||||||
|
l: -^^- -^^-
|
||||||
|
m: -^-^ ^-^-
|
||||||
|
n: -v-- --v-
|
||||||
|
o: --v- -v--
|
||||||
|
p: -v^- -^v-
|
||||||
|
q: -^v^ ^v^-
|
||||||
|
r: --^^ ^^--
|
||||||
|
s: --vv vv--
|
||||||
|
t: ---v v---
|
||||||
|
u: -v-v v-v-
|
||||||
|
v: --v^ ^v--
|
||||||
|
w: -v^v v^v-
|
||||||
|
x: -vv^ ^vv-
|
||||||
|
y: -^-v v-^-
|
||||||
|
z: -v^^ ^^v-
|
||||||
|
```
|
||||||
|
|
||||||
|
### Numbers and Symbols
|
||||||
|
|
||||||
|
```
|
||||||
|
0: vv-- --vv
|
||||||
|
1: vv-v v-vv
|
||||||
|
2: vvv- -vvv
|
||||||
|
3: v^-- --^v
|
||||||
|
4: v^-^ ^-^v
|
||||||
|
5: v^^- -^^v
|
||||||
|
6: v^-v v-^v
|
||||||
|
7: v-v- -v-v
|
||||||
|
8: v^^v v^^v
|
||||||
|
9: v-^^ ^^-v
|
||||||
|
-: v^vv vv^v
|
||||||
|
=: vvv^ ^vvv
|
||||||
|
[: vv^- -^vv
|
||||||
|
]: v-^v v^-v
|
||||||
|
\: v^v- -v^v
|
||||||
|
;: v^^^ ^^^v
|
||||||
|
': vv-^ ^-vv
|
||||||
|
,: v-vv vv-v
|
||||||
|
.: vv^^ ^^vv
|
||||||
|
/: v-^- -^-v
|
||||||
|
`: v--^ ^--v
|
||||||
|
```
|
||||||
|
|
||||||
|
### Modifiers
|
||||||
|
|
||||||
|
Modifiers all use the top pinky key, and a combinations of modifiers you want to activate for the next keypress (very similar to how OMS work).
|
||||||
|
For the modifiers the top row of keys is used.
|
||||||
|
|
||||||
|
```
|
||||||
|
Control: Ringfinger
|
||||||
|
Shift: Middlefinger
|
||||||
|
Alt: Indexfinger
|
||||||
|
Super: Thumb
|
||||||
|
```
|
||||||
|
|
||||||
|
`^--v v--^` can be used to lock the next modifier input.
|
||||||
|
|
||||||
|
### Remaining
|
||||||
|
|
||||||
|
These combinations are unused.
|
||||||
|
|
||||||
|
```
|
||||||
|
v^v^
|
||||||
|
v-v^
|
||||||
|
v---
|
||||||
|
```
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
RGB_MATRIX_EFFECT(rainbow_stripe)
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||||
|
|
||||||
|
static HSV rainbow_stripe_math(HSV hsv, uint8_t i, uint8_t time) {
|
||||||
|
if (i >= 14 && i <= 21) {
|
||||||
|
hsv.h = g_led_config.point[i].x - time;
|
||||||
|
} else {
|
||||||
|
hsv.v = 0;
|
||||||
|
}
|
||||||
|
return hsv;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool rainbow_stripe(effect_params_t* params) {
|
||||||
|
return effect_runner_i(params, &rainbow_stripe_math);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
AUDIO_ENABLE = no
|
||||||
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
|
||||||
|
RGB_MATRIX_CUSTOM_USER = yes
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32a
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
# build options
|
# build options
|
||||||
BOOTMAGIC_ENABLE = yes
|
BOOTMAGIC_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32a
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
# build options
|
# build options
|
||||||
BOOTMAGIC_ENABLE = yes
|
BOOTMAGIC_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
|
|||||||
@@ -1,14 +1 @@
|
|||||||
# MCU name
|
|
||||||
MCU = atmega32a
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# ATmega32A bootloadHID
|
|
||||||
# ATmega328P USBasp
|
|
||||||
BOOTLOADER = bootloadHID
|
|
||||||
|
|
||||||
DEFAULT_FOLDER = ymd75/rev1
|
DEFAULT_FOLDER = ymd75/rev1
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Neil Kettle
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#define VENDOR_ID 0x594D
|
||||||
|
#define PRODUCT_ID 0x5364
|
||||||
|
#define DEVICE_VER 0x0200
|
||||||
|
#define MANUFACTURER YMDK
|
||||||
|
#define PRODUCT SP64
|
||||||
|
#define DESCRIPTION YMDK Split 64
|
||||||
|
|
||||||
|
#define MATRIX_ROWS 6
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
#define RIGHT_HALF
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/* RGB underglow */
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 250 /* The maximum brightness level */
|
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "YMDK_SP64",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "walston",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"~", "x":0, "y":0},
|
||||||
|
{"label":"!", "x":1, "y":0},
|
||||||
|
{"label":"@", "x":2, "y":0},
|
||||||
|
{"label":"#", "x":3, "y":0},
|
||||||
|
{"label":"$", "x":4, "y":0},
|
||||||
|
{"label":"%", "x":5, "y":0},
|
||||||
|
{"label":"^", "x":6, "y":0},
|
||||||
|
{"label":"&", "x":8, "y":0},
|
||||||
|
{"label":"*", "x":9, "y":0},
|
||||||
|
{"label":"(", "x":10, "y":0},
|
||||||
|
{"label":")", "x":11, "y":0},
|
||||||
|
{"label":"_", "x":12, "y":0},
|
||||||
|
{"label":"+", "x":13, "y":0},
|
||||||
|
{"label":"Backspace", "x":14, "y":0, "w":2},
|
||||||
|
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":1},
|
||||||
|
{"label":"W", "x":2.5, "y":1},
|
||||||
|
{"label":"E", "x":3.5, "y":1},
|
||||||
|
{"label":"R", "x":4.5, "y":1},
|
||||||
|
{"label":"T", "x":5.5, "y":1},
|
||||||
|
{"label":"Y", "x":7.5, "y":1},
|
||||||
|
{"label":"U", "x":8.5, "y":1},
|
||||||
|
{"label":"I", "x":9.5, "y":1},
|
||||||
|
{"label":"O", "x":10.5, "y":1},
|
||||||
|
{"label":"P", "x":11.5, "y":1},
|
||||||
|
{"label":"{ ", "x":12.5, "y":1},
|
||||||
|
{"label":"}", "x":13.5, "y":1},
|
||||||
|
{"label":"|", "x":14.5, "y":1, "w":1.5},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":2},
|
||||||
|
{"label":"S", "x":2.75, "y":2},
|
||||||
|
{"label":"D", "x":3.75, "y":2},
|
||||||
|
{"label":"F", "x":4.75, "y":2},
|
||||||
|
{"label":"G", "x":5.75, "y":2},
|
||||||
|
{"label":"H", "x":7.75, "y":2},
|
||||||
|
{"label":"J", "x":8.75, "y":2},
|
||||||
|
{"label":"K", "x":9.75, "y":2},
|
||||||
|
{"label":"L", "x":10.75, "y":2},
|
||||||
|
{"label":":", "x":11.75, "y":2},
|
||||||
|
{"label":"\"", "x":12.75, "y":2},
|
||||||
|
{"label":"Enter", "x":13.75, "y":2, "w":2.25},
|
||||||
|
{"label":"Shift", "x":0, "y":3, "w":2},
|
||||||
|
{"label":"Z", "x":2, "y":3},
|
||||||
|
{"label":"X", "x":3, "y":3},
|
||||||
|
{"label":"C", "x":4, "y":3},
|
||||||
|
{"label":"V", "x":5, "y":3},
|
||||||
|
{"label":"B", "x":6, "y":3},
|
||||||
|
{"label":"N", "x":8, "y":3},
|
||||||
|
{"label":"M", "x":9, "y":3},
|
||||||
|
{"label":"<", "x":10, "y":3},
|
||||||
|
{"label":">", "x":11, "y":3},
|
||||||
|
{"label":"?", "x":12, "y":3},
|
||||||
|
{"label":"Shift", "x":13, "y":3},
|
||||||
|
{"label":"Up", "x":14, "y":3},
|
||||||
|
{"label":"F3", "x":15, "y":3},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"Win", "x":1.25, "y":4},
|
||||||
|
{"label":"Alt", "x":2.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.5, "y":4, "w":2.25},
|
||||||
|
{"label":"Fn", "x":5.75, "y":4},
|
||||||
|
{"label":"Space", "x":7.75, "y":4, "w":2.75},
|
||||||
|
{"label":"Alt", "x":10.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Win", "x":11.75, "y":4, "w":1.25},
|
||||||
|
{"label":"Left", "x":13, "y":4},
|
||||||
|
{"label":"Down", "x":14, "y":4},
|
||||||
|
{"label":"Right", "x":15, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_GAMER,
|
||||||
|
_FN,
|
||||||
|
_RAISE,
|
||||||
|
_MODE,
|
||||||
|
_GACROS,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ _MO │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ _FN │ Win │ Alt │ │ _RA │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
|
||||||
|
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, MO(_MODE),
|
||||||
|
MO(_FN), KC_LGUI, KC_LALT, KC_SPACE, MO(_RAISE), KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Gamer layer
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ _MO │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ _FN │ F13 │ Alt │ │ _GA │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_GAMER] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
|
||||||
|
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, MO(_MODE),
|
||||||
|
MO(_FN), KC_F13, KC_LALT, KC_SPACE, MO(_GACROS), KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 2: Function
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_CAPS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
|
),
|
||||||
|
/* Keymap 3: Raise / Quality of life
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_CAPS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
|
),
|
||||||
|
/* Keymap 4: Mode switching
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ RGB 0/1│RGBM-│RGBB+│RGBM+│ │ │ │ │ │ │ │ │ │ │ Reset │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │RGBS-│RGBB-│RGBS+│ │ │ │Left │ Up │Down │Right│ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ GAME| BASE│ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_MODE] = LAYOUT(
|
||||||
|
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||||
|
RGB_TOG, RGB_RMOD, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
|
_______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMER), TO(_BASE), _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Keymap 5: Gaming macros
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ PUSH│ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ FALL│ │ │ │ │Left │ Up │Down │Right│ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ CAP │ │ │ │ │ │ │ │ GAME| BASE│ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_GACROS] = LAYOUT(
|
||||||
|
KC_GRAVE, 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMER), TO(_BASE), _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
BASE, // default layer
|
||||||
|
_FN, // function layer
|
||||||
|
_FX // media keys
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ Fn │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ Ctrl │ Win │ Alt │ │ Fn │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
|
||||||
|
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_F3,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(_FN), KC_SPACE, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
/* Function
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Media
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_FX] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
enum layer_names {
|
||||||
|
BASE, // default layer
|
||||||
|
_FUN, // function layer
|
||||||
|
_NUMPAD, // num-pad
|
||||||
|
_MEDIA // media keys
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │_MED │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ _NUM │_MED │ Alt │ Cmd │ Spc │ │ Space │ Cmd │ Alt │ Lft │ Dwn │ Rgt │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[BASE] = LAYOUT(
|
||||||
|
MT(RESET, KC_GRAVE), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
|
||||||
|
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, OSL(_MEDIA),
|
||||||
|
LT(_NUMPAD, KC_CAPS), TT(_MEDIA), KC_LALT, KC_LGUI, LT(_FUN, KC_SPACE), KC_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Function Layer / Vim Arrows
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_FUN] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Keymap 2: NumPad
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ │ Vol-│ Vol+│ Mute │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ 4 │ 5 │ 6 │ │ |<< │ >>| │ >|| │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ 0 │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_NUMPAD] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, KC_VOLD, KC_VOLU, KC_MUTE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_MPRV, KC_MNXT, KC_MPLY,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/* Keymap 3: Media
|
||||||
|
*
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ │ │ │ Backlight │ │ │ │ │ │ │ │ │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
[_MEDIA] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
COMMAND_ENABLE = no
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "matrix.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "wait.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "sp64.h"
|
||||||
|
#include "debounce.h"
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
|
||||||
|
// Debouncing: store for each key the number of scans until it's eligible to
|
||||||
|
// change. When scanning the matrix, ignore any changes in keys that have
|
||||||
|
// already changed in the last DEBOUNCE scans.
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static void matrix_select_row(uint8_t row);
|
||||||
|
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
static uint8_t mcp23018_reset_loop = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
// all outputs for rows high
|
||||||
|
DDRB = 0xFF;
|
||||||
|
PORTB = 0xFF;
|
||||||
|
// all inputs for columns
|
||||||
|
DDRA = 0x00;
|
||||||
|
DDRC &= ~(0x111111<<2);
|
||||||
|
DDRD &= ~(1<<PIND7);
|
||||||
|
// all columns are pulled-up
|
||||||
|
PORTA = 0xFF;
|
||||||
|
PORTC |= (0b111111<<2);
|
||||||
|
PORTD |= (1<<PIND7);
|
||||||
|
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
// initialize row and col
|
||||||
|
mcp23018_status = init_mcp23018();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
matrix[row] = 0;
|
||||||
|
matrix_debouncing[row] = 0;
|
||||||
|
}
|
||||||
|
debounce_init(MATRIX_ROWS);
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
// Then the keyboard
|
||||||
|
if (mcp23018_status != I2C_STATUS_SUCCESS) {
|
||||||
|
if (++mcp23018_reset_loop == 0) {
|
||||||
|
// if (++mcp23018_reset_loop >= 1300) {
|
||||||
|
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||||
|
// this will be approx bit more frequent than once per second
|
||||||
|
print("trying to reset mcp23018\n");
|
||||||
|
mcp23018_status = init_mcp23018();
|
||||||
|
if (mcp23018_status) {
|
||||||
|
print("left side not responding\n");
|
||||||
|
} else {
|
||||||
|
print("left side attached\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
bool changed = false;
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++)
|
||||||
|
{
|
||||||
|
matrix_row_t cols;
|
||||||
|
|
||||||
|
matrix_select_row(row);
|
||||||
|
#ifndef RIGHT_HALF
|
||||||
|
_delay_us(5);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cols = (
|
||||||
|
// cols 0..7, PORTA 0 -> 7
|
||||||
|
(~PINA) & 0xFF
|
||||||
|
);
|
||||||
|
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
uint8_t data = 0x7F;
|
||||||
|
// Receive the columns from right half
|
||||||
|
i2c_receive(I2C_ADDR_WRITE, &data, 1, MCP23018_I2C_TIMEOUT);
|
||||||
|
cols |= ((~(data) & 0x7F) << 7);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (matrix_debouncing[row] != cols) {
|
||||||
|
matrix_debouncing[row] = cols;
|
||||||
|
//debouncing = DEBOUNCE;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
debounce(matrix_debouncing, matrix, MATRIX_ROWS, changed);
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
#ifdef DEBUG_MATRIX
|
||||||
|
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||||
|
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||||
|
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return (uint8_t)changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
pbin_reverse16(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop16(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void matrix_select_row(uint8_t row)
|
||||||
|
{
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
uint8_t txdata[3];
|
||||||
|
|
||||||
|
//Set the remote row on port A
|
||||||
|
txdata[0] = GPIOA;
|
||||||
|
txdata[1] = 0xFF & ~(1<<row);
|
||||||
|
mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)txdata, 2, MCP23018_I2C_TIMEOUT);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// select other half
|
||||||
|
DDRB = (1 << row);
|
||||||
|
PORTB = ~(1 << row);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# YMDK SP64
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Nathan Walston](https://github.com/walston)
|
||||||
|
* Hardware Supported: YMDK SP64 with the ATmega32a chip.
|
||||||
|
* Hardware Availability: [Aliexpress](https://www.aliexpress.com/item/4000074426801.html?spm=a2g0o.productlist.0.0.13a043a4NuWRUc&algo_pvid=d2e1c7f2-710a-47be-98be-c2ee4c35e205&algo_expid=d2e1c7f2-710a-47be-98be-c2ee4c35e205-1&btsid=7eeb6dd6-e91f-4ecc-b94c-0ce4b1d089e0&ws_ab_test=searchweb0_0,searchweb201602_9,searchweb201603_53)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make ymdk/sp64:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
|
||||||
|
|
||||||
|
make ymdk/sp64:default:flash
|
||||||
|
|
||||||
|
**Reset Key**: Hold down the key located at top left on the left hand board, commonly programmed as _ESC_ while plugging in the keyboard. (NOTE: If this doesn't work, try the lower left key on the lower left board, commonly programmed as _Control_. There might be a different version of the board that uses that key as the reset.)
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32a
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
#BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE = no # There is no speaker on this PCB
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
# Needed for underglow
|
||||||
|
WS2812_DRIVER = i2c
|
||||||
|
|
||||||
|
SRC += matrix.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
/* Copyright 2019 Neil Kettle
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "sp64.h"
|
||||||
|
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
bool i2c_initialized = 0;
|
||||||
|
i2c_status_t mcp23018_status = I2C_STATUS_ERROR;
|
||||||
|
|
||||||
|
uint8_t init_mcp23018(void)
|
||||||
|
{
|
||||||
|
uint8_t data[3];
|
||||||
|
mcp23018_status = I2C_STATUS_ERROR;
|
||||||
|
|
||||||
|
// I2C subsystem
|
||||||
|
if (i2c_initialized == 0) {
|
||||||
|
i2c_init(); // on pins D(1,0)
|
||||||
|
i2c_initialized = true;
|
||||||
|
_delay_ms(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set pin direction
|
||||||
|
// - unused : input : 1
|
||||||
|
// - input : input : 1
|
||||||
|
// - driving : output :
|
||||||
|
data[0] = IODIRA;
|
||||||
|
data[1] = 0b00000000;
|
||||||
|
data[2] = 0b11111111;
|
||||||
|
mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT);
|
||||||
|
if (mcp23018_status != I2C_STATUS_SUCCESS)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
// set pull-up
|
||||||
|
// - unused : on : 1
|
||||||
|
// - input : on : 1
|
||||||
|
// - driving : off : 0
|
||||||
|
data[0] = GPPUA;
|
||||||
|
data[1] = 0b00000000;
|
||||||
|
data[2] = 0b11111111;
|
||||||
|
mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT);
|
||||||
|
if (mcp23018_status != I2C_STATUS_SUCCESS)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
// set logical value (doesn't matter on inputs)
|
||||||
|
// - unused : hi-Z : 1
|
||||||
|
// - input : hi-Z : 1
|
||||||
|
// - driving : hi-Z : 1
|
||||||
|
data[0] = OLATA;
|
||||||
|
data[1] = 0b11111111;
|
||||||
|
data[2] = 0b11111111;
|
||||||
|
mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT);
|
||||||
|
|
||||||
|
out:
|
||||||
|
return (mcp23018_status);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
/* Copyright 2019 Neil Kettle
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef RIGHT_HALF
|
||||||
|
# include <stdint.h>
|
||||||
|
# include "i2c_master.h"
|
||||||
|
|
||||||
|
// I2C aliases and register addresses (see "mcp23018.md")
|
||||||
|
# define I2C_ADDR 0b0100000
|
||||||
|
# define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
|
||||||
|
# define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
|
||||||
|
# define IODIRA 0x00 // i/o direction register
|
||||||
|
# define IODIRB 0x01
|
||||||
|
# define GPPUA 0x0C // GPIO pull-up resistor register
|
||||||
|
# define GPPUB 0x0D
|
||||||
|
# define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
|
||||||
|
# define GPIOB 0x13
|
||||||
|
# define OLATA 0x14 // output latch register
|
||||||
|
# define OLATB 0x15
|
||||||
|
|
||||||
|
extern i2c_status_t mcp23018_status;
|
||||||
|
# define MCP23018_I2C_TIMEOUT 100
|
||||||
|
|
||||||
|
uint8_t init_mcp23018(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ___ KC_NO
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*
|
||||||
|
* LEFT HAND RIGHT HAND
|
||||||
|
* ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
|
||||||
|
* │ L00 │ L01 │ L02 │ L03 │ L04 │ L05 │ L06 │ │ R07 │ R08 │ R09 │ R0A │ R0B │ R0C │ R0D │
|
||||||
|
* ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
|
||||||
|
* │ L10 │ L11 │ L12 │ L13 │ L14 │ L15 │ │ R16 │ R17 │ R18 │ R19 │ R1A │ R1B │ R1C │ R1D │
|
||||||
|
* ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
|
||||||
|
* │ L20 │ L21 │ L22 │ L23 │ L24 │ L25 │ │ R26 │ R27 │ R28 │ R29 │ R2A │ R2B │ R2C │
|
||||||
|
* ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
|
||||||
|
* │ L30 │ L31 │ L32 │ L33 │ L34 │ L35 │ │ R36 │ R37 │ R38 │ R39 │ R3A │ R3B │ R3C │ R3D │
|
||||||
|
* ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
|
||||||
|
* │ L40 │ L41 │ L42 │ L43 │ L45 │ │ R46 │ R48 │ R4A │ R4B │ R4C │ R4D │
|
||||||
|
* └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, R07, R08, R09, R0A, R0B, R0C, R0D, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R16, R17, R18, R19, R1A, R1B, R1C, R1D, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R26, R27, R28, R29, R2A, R2B, R2C, \
|
||||||
|
L30, L31, L32, L33, L34, L35, R36, R37, R38, R39, R3A, R3B, R3C, R3D, \
|
||||||
|
L40, L41, L42, L43, L45, R46, R48, R4A, R4B, R4C, R4D \
|
||||||
|
) \
|
||||||
|
/* matrix positions */ \
|
||||||
|
{ \
|
||||||
|
{ ___, ___, ___, ___, ___, ___, ___, R46, R48, R4A, R4B, R4C, R4D, R3D }, \
|
||||||
|
{ L40, L41, L42, L43, L45, L06, ___, R36, R37, R38, R39, R3A, R3B, R3C }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35, ___, R26, R27, R28, R29, R2A, R2B, R2C }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25, ___, R17, R18, R19, R1A, R1B, R1C, R1D }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15, ___, R07, R08, R09, R0A, R0B, R0C, R0D }, \
|
||||||
|
{ L00, L01, L02, L03, L04, L05, ___, R16, ___, ___, ___, ___, ___, ___ } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
Check out the user's QMK environment and make sure it's ready to compile.
|
Check out the user's QMK environment and make sure it's ready to compile.
|
||||||
"""
|
"""
|
||||||
import platform
|
import platform
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -50,6 +51,16 @@ def _deprecated_udev_rule(vid, pid=None):
|
|||||||
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
|
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
|
||||||
|
|
||||||
|
|
||||||
|
def parse_gcc_version(version):
|
||||||
|
m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'major': int(m.group(1)),
|
||||||
|
'minor': int(m.group(2)) if m.group(2) else 0,
|
||||||
|
'patch': int(m.group(3)) if m.group(3) else 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def check_arm_gcc_version():
|
def check_arm_gcc_version():
|
||||||
"""Returns True if the arm-none-eabi-gcc version is not known to cause problems.
|
"""Returns True if the arm-none-eabi-gcc version is not known to cause problems.
|
||||||
"""
|
"""
|
||||||
@@ -66,8 +77,8 @@ def check_avr_gcc_version():
|
|||||||
if 'output' in ESSENTIAL_BINARIES['avr-gcc']:
|
if 'output' in ESSENTIAL_BINARIES['avr-gcc']:
|
||||||
version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip()
|
version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip()
|
||||||
|
|
||||||
major, minor, rest = version_number.split('.', 2)
|
parsed_version = parse_gcc_version(version_number)
|
||||||
if int(major) > 8:
|
if parsed_version['major'] > 8:
|
||||||
cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.')
|
cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ def test_list_keymaps_no_keyboard_found():
|
|||||||
def test_json2c():
|
def test_json2c():
|
||||||
result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json')
|
result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json')
|
||||||
check_returncode(result, 0)
|
check_returncode(result, 0)
|
||||||
assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n\n'
|
assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n'
|
||||||
|
|
||||||
|
|
||||||
def test_info():
|
def test_info():
|
||||||
@@ -132,7 +132,7 @@ def test_info_keyboard_render():
|
|||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout
|
assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout
|
||||||
assert 'Processor: STM32F303' in result.stdout
|
assert 'Processor: STM32F303' in result.stdout
|
||||||
assert 'Layout:' in result.stdout
|
assert 'Layouts:' in result.stdout
|
||||||
assert 'k0' in result.stdout
|
assert 'k0' in result.stdout
|
||||||
|
|
||||||
|
|
||||||
@@ -149,6 +149,6 @@ def test_info_matrix_render():
|
|||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout
|
assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout
|
||||||
assert 'Processor: STM32F303' in result.stdout
|
assert 'Processor: STM32F303' in result.stdout
|
||||||
assert 'LAYOUT' in result.stdout
|
assert 'LAYOUT_ortho_1x1' in result.stdout
|
||||||
assert '│0A│' in result.stdout
|
assert '│0A│' in result.stdout
|
||||||
assert 'Matrix for "LAYOUT"' in result.stdout
|
assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define BWORD LCTL(KC_BSPC)
|
#define BWORD LCTL(KC_BSPC)
|
||||||
|
#define BLINE LALT(KC_BSPC)
|
||||||
#define LWORD LCTL(KC_LEFT)
|
#define LWORD LCTL(KC_LEFT)
|
||||||
#define RWORD LCTL(KC_RIGHT)
|
#define RWORD LCTL(KC_RIGHT)
|
||||||
#define JUMPBACK LSFT(KC_TAB)
|
#define JUMPBACK LSFT(KC_TAB)
|
||||||
|
|||||||
Reference in new issue
Block a user