Compare commits

..

16 Commits

Author SHA1 Message Date
Pete Johanson
f9bb9ef0b8 CLI: Fix doctor error when can't run bin/qmk --version. (#8796) 2020-04-14 16:58:00 +02:00
Øyvind Wilhelmsen
3d9ffd3efb deleted unused keymap (#8797) 2020-04-14 12:09:33 +01:00
mimkorn
3cea9fedff Add missing repository name to qmk setup w/ github (#8792)
Using just qmk setup <github_username> would fail w/ "Could not find repo github.com/<username>, whereas the repo is actually after another slash after the user name. Can consider changing code to add the default forked repo name if slash is not detected in the arg.
2020-04-14 21:03:13 +10:00
eucalyn
575d99816e Configure RGBLIGHT_SPLIT for Mint60 (#8788) 2020-04-13 23:40:15 +01:00
Aplyard
4bccde37d4 [Keyboard] Aplx6 (#8727)
* Create test.txt

* aplx6

* Delete test.txt

* fff

* Delete ffff

* test compile

* Create README.md

* edited

* requests

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/rules.mk

* Update keyboards/aplx6/rules.mk

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md

* pins update

* update

* update pins

* Update keyboards/aplx6/README.md

* Update keyboards/aplx6/README.md
2020-04-13 12:13:41 -07:00
Pavlos Vinieratos
f6b40da7f8 update pvinis keymap (#8746)
* update a bunch of stuff

Better rules, better config, added encoders, lights, audio.

* some fmt

* more fmt
2020-04-13 11:59:04 -07:00
Pete Johanson
6fb048fdaf CLI: Use shutil.which to detect gmake, instead of OS check. 2020-04-13 10:48:27 -07:00
Pete Johanson
06b571aa53 CLI: Invoke gmake on FreeBSD when using qmk compile.
* Current makefiles aren't portable, so invoke gmake on FreeBSD.
2020-04-13 10:48:27 -07:00
umi
355b693e4e [Docs] Japanese translation of docs/feature_dip_switch.md (#8673)
* add git_dip_switch.md translation

* update based on comment

* update based on comment
2020-04-13 10:25:57 -07:00
Casey Leask
f514ad5503 Fix broken KBD8X MKII Hardware link (#8787) 2020-04-13 15:45:51 +01:00
Nick Brassel
46e4493761 Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. (#8775) 2020-04-13 17:09:50 +10:00
MechMerlin
157d121c71 VIA Support: Jane V2 (#8735)
* add VIA enabled keymap with some layers taken out for space

* get a more sane VID and PID so we don't collide with the other BMC powered boards

* small cleanups

* Update keyboards/tgr/jane/keymaps/via/keymap.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* add tkl_ansi_tsangan LAYOUT

* add tkl_iso_tsangan LAYOUT

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-04-13 08:21:22 +02:00
Gautham Yerroju
7e6b550ebf Add a simple custom keymap for Gergo. (#8662)
* Add a simple custom keymap for Gergo.

* update readme, keymap cleanup
2020-04-13 07:37:23 +02:00
Joshua Rubin
7f4ce4a8b7 Add via support to keebio/bdn9 (#8620)
Signed-off-by: Joshua Rubin <me@jawa.dev>
2020-04-13 07:32:46 +02:00
MechMerlin
6452973761 DP60 VIA cleanups (#8697)
* some via cleanups for the dp60 firmware

* update matrix size
2020-04-13 07:28:05 +02:00
codecoffeecode
a2309b306a Adding Niu Mini to VIA (#8702)
* porting the niu_mini to via

* Wrong values in mk

* Updating to unique Vendor ID and Product ID

* Addressing zvecr comments

* Addressing fauxpark comments

Co-Authored-By: Ryan <fauxpark@gmail.com>

Co-authored-by: Lauren Harris <lauren.y.harris@outlook.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-04-13 07:22:26 +02:00
48 changed files with 1463 additions and 1056 deletions

View File

@@ -0,0 +1,95 @@
# DIP スイッチ
<!---
original document: 0.8.94:docs/feature_dip_switch.md
git diff 0.8.94 HEAD -- docs/feature_dip_switch.md | cat
-->
DIP スイッチは、以下を `rules.mk` に追加することでサポートされます:
DIP_SWITCH_ENABLE = yes
さらに、以下を `config.h` に追加します:
```c
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
```
## コールバック
コールバック関数を `<keyboard>.c` に記述することができます:
```c
void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
}
```
あるいは `keymap.c` に記述することもできます:
```c
void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
break;
case 1:
if(active) { clicky_on(); } else { clicky_off(); }
break;
case 2:
if(active) { music_on(); } else { music_off(); }
break;
case 3:
if (active) {
#ifdef AUDIO_ENABLE
PLAY_SONG(plover_song);
#endif
layer_on(_PLOVER);
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(plover_gb_song);
#endif
layer_off(_PLOVER);
}
break;
}
}
```
更に、より複雑な処理ができるビットマスク関数をサポートします。
```c
void dip_switch_update_mask_kb(uint32_t state) {
dip_switch_update_mask_user(state);
}
```
あるいは `keymap.c` に記述することもできます:
```c
void dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
layer_off(_ADJUST);
}
if (state & (1UL<<0)) {
layer_on(_TEST_A); // A on ESC
} else {
layer_off(_TEST_A);
}
if (state & (1UL<<1)) {
layer_on(_TEST_B); // B on esc
} else {
layer_off(_TEST_B);
}
}
```
## ハードウェア
DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。

View File

@@ -78,7 +78,7 @@ After installing QMK you can set it up with this command:
In most situations you will want to answer Yes to all of the prompts.
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>` to clone your personal fork. If you don't know what that means you can safely ignore this message.
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
## 4. Test Your Build Environment

View File

@@ -16,7 +16,7 @@ No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` p
You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually.
`SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`.
## ARM Configuration
## ChibiOS/ARM Configuration
ARM support for this driver is not ready yet. Check back later!
@@ -28,7 +28,7 @@ Initialize the SPI driver. This function must be called only once, before any of
---
### `void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor)`
### `bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor)`
Start an SPI transaction.
@@ -48,12 +48,16 @@ Start an SPI transaction.
|`2` |Leading edge falling|Sample on leading edge |
|`3` |Leading edge falling|Sample on trailing edge|
- `uint8_t divisor`
- `uint16_t divisor`
The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`.
#### Return Value
`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`.
---
### `spi_status_t spi_write(uint8_t data, uint16_t timeout)`
### `spi_status_t spi_write(uint8_t data)`
Write a byte to the selected SPI device.
@@ -61,8 +65,6 @@ Write a byte to the selected SPI device.
- `uint8_t data`
The byte to write.
- `uint16_t timeout`
The amount of time to wait, in milliseconds, before timing out.
#### Return Value
@@ -70,22 +72,17 @@ Write a byte to the selected SPI device.
---
### `spi_status_t spi_read(uint16_t timeout)`
### `spi_status_t spi_read(void)`
Read a byte from the selected SPI device.
#### Arguments
- `uint16_t timeout`
The amount of time to wait, in milliseconds, before timing out.
#### Return Value
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device.
---
### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout)`
### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length)`
Send multiple bytes to the selected SPI device.
@@ -95,8 +92,6 @@ Send multiple bytes to the selected SPI device.
A pointer to the data to write from.
- `uint16_t length`
The number of bytes to write. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The amount of time to wait, in milliseconds, before timing out.
#### Return Value
@@ -104,7 +99,7 @@ Send multiple bytes to the selected SPI device.
---
### `spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout)`
### `spi_status_t spi_receive(uint8_t *data, uint16_t length)`
Receive multiple bytes from the selected SPI device.
@@ -114,12 +109,10 @@ Receive multiple bytes from the selected SPI device.
A pointer to the buffer to read into.
- `uint16_t length`
The number of bytes to read. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The amount of time to wait, in milliseconds, before timing out.
#### Return Value
`SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise.
`SPI_STATUS_TIMEOUT` if the internal transmission timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise.
---

View File

@@ -34,6 +34,10 @@
# define SPI_MISO_PIN B4
#endif
#ifndef SPI_TIMEOUT
# define SPI_TIMEOUT 100
#endif
static pin_t currentSlavePin = NO_PIN;
static uint8_t currentSlaveConfig = 0;
static bool currentSlave2X = false;
@@ -47,65 +51,74 @@ void spi_init(void) {
SPCR = (_BV(SPE) | _BV(MSTR));
}
void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor) {
if (currentSlavePin == NO_PIN && slavePin != NO_PIN) {
if (lsbFirst) {
currentSlaveConfig |= _BV(DORD);
}
switch (mode) {
case 1:
currentSlaveConfig |= _BV(CPHA);
break;
case 2:
currentSlaveConfig |= _BV(CPOL);
break;
case 3:
currentSlaveConfig |= (_BV(CPOL) | _BV(CPHA));
break;
}
uint8_t roundedDivisor = 1;
while (roundedDivisor < divisor) {
roundedDivisor <<= 1;
}
switch (roundedDivisor) {
case 16:
currentSlaveConfig |= _BV(SPR0);
break;
case 64:
currentSlaveConfig |= _BV(SPR1);
break;
case 128:
currentSlaveConfig |= (_BV(SPR1) | _BV(SPR0));
break;
case 2:
currentSlave2X = true;
break;
case 8:
currentSlave2X = true;
currentSlaveConfig |= _BV(SPR0);
break;
case 32:
currentSlave2X = true;
currentSlaveConfig |= _BV(SPR1);
break;
}
SPSR |= currentSlaveConfig;
currentSlavePin = slavePin;
setPinOutput(currentSlavePin);
writePinLow(currentSlavePin);
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
if (currentSlavePin != NO_PIN || slavePin == NO_PIN) {
return false;
}
currentSlaveConfig = 0;
if (lsbFirst) {
currentSlaveConfig |= _BV(DORD);
}
switch (mode) {
case 1:
currentSlaveConfig |= _BV(CPHA);
break;
case 2:
currentSlaveConfig |= _BV(CPOL);
break;
case 3:
currentSlaveConfig |= (_BV(CPOL) | _BV(CPHA));
break;
}
uint16_t roundedDivisor = 1;
while (roundedDivisor < divisor) {
roundedDivisor <<= 1;
}
switch (roundedDivisor) {
case 16:
currentSlaveConfig |= _BV(SPR0);
break;
case 64:
currentSlaveConfig |= _BV(SPR1);
break;
case 128:
currentSlaveConfig |= (_BV(SPR1) | _BV(SPR0));
break;
case 2:
currentSlave2X = true;
break;
case 8:
currentSlave2X = true;
currentSlaveConfig |= _BV(SPR0);
break;
case 32:
currentSlave2X = true;
currentSlaveConfig |= _BV(SPR1);
break;
}
SPCR |= currentSlaveConfig;
if (currentSlave2X) {
SPSR |= _BV(SPI2X);
}
currentSlavePin = slavePin;
setPinOutput(currentSlavePin);
writePinLow(currentSlavePin);
return true;
}
spi_status_t spi_write(uint8_t data, uint16_t timeout) {
spi_status_t spi_write(uint8_t data) {
SPDR = data;
uint16_t timeout_timer = timer_read();
while (!(SPSR & _BV(SPIF))) {
if ((timeout != SPI_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) {
return SPI_STATUS_TIMEOUT;
}
}
@@ -113,12 +126,12 @@ spi_status_t spi_write(uint8_t data, uint16_t timeout) {
return SPDR;
}
spi_status_t spi_read(uint16_t timeout) {
spi_status_t spi_read() {
SPDR = 0x00; // Dummy
uint16_t timeout_timer = timer_read();
while (!(SPSR & _BV(SPIF))) {
if ((timeout != SPI_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) {
return SPI_STATUS_TIMEOUT;
}
}
@@ -126,21 +139,21 @@ spi_status_t spi_read(uint16_t timeout) {
return SPDR;
}
spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout) {
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
spi_status_t status = SPI_STATUS_ERROR;
for (uint16_t i = 0; i < length; i++) {
status = spi_write(data[i], timeout);
status = spi_write(data[i]);
}
return status;
}
spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout) {
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
spi_status_t status = SPI_STATUS_ERROR;
for (uint16_t i = 0; i < length; i++) {
status = spi_read(timeout);
status = spi_read();
if (status > 0) {
data[i] = status;
@@ -155,9 +168,9 @@ void spi_stop(void) {
setPinOutput(currentSlavePin);
writePinHigh(currentSlavePin);
currentSlavePin = NO_PIN;
SPSR &= ~(_BV(SPI2X));
SPCR &= ~(currentSlaveConfig);
currentSlaveConfig = 0;
SPSR = 0;
currentSlave2X = false;
}
}

View File

@@ -41,15 +41,15 @@ extern "C" {
#endif
void spi_init(void);
void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor);
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
spi_status_t spi_write(uint8_t data, uint16_t timeout);
spi_status_t spi_write(uint8_t data);
spi_status_t spi_read(uint16_t timeout);
spi_status_t spi_read(void);
spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout);
spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout);
spi_status_t spi_receive(uint8_t *data, uint16_t length);
void spi_stop(void);
#ifdef __cplusplus

41
keyboards/aplx6/README.md Normal file
View File

@@ -0,0 +1,41 @@
# Aplx6
![Front](https://i.imgur.com/flhSvAG.png)
![Back](https://i.imgur.com/PXqNmUh.png)
A stylish (2x3) 6-key MediaPad for your music and browser shortcuts. Designed to be assembled as a sandwich with a blank PCB, using M2.5 screws and spacers, your choice of MX- or Alps-compatible switches, and 1N4148 diodes.
## RGB Underglow (WS2812)
Just wire them to any of the unused ProMicro pins. Don't forget to edit-uncomment the `config.h` and the `rules.mk` for RGB underglow support, or even add your own functions and modes. Used pins can be found in `config.h` or in the [KiCad Schematic](https://github.com/Aplyard/Aplx6/blob/master/kiCad/xd6.sch). All ProMicro pins can be found [here](https://golem.hu/article/pro-micro-pinout/) along with the +2 pins mod.
* Keyboard Maintainer: [Aplyard](https://github.com/Aplyard)
* Hardware Supported: Aplx6 PCB, Pro Micro (ATmega32U4)
* Hardware Availability: [GitHub](https://github.com/Aplyard/Aplx6)
Make example for this keyboard (after setting up your build environment):
make aplx6: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).
---
****Designed in**:**
[KiCad](https://github.com/KiCad)
**Components Footprints & Libraries :**
[keebs.pretty](https://github.com/egladman/keebs.pretty)
[keyboard_parts.pretty
](https://github.com/tmk/keyboard_parts.pretty)
[ProMicro KiCad](https://github.com/Biacco42/ProMicroKiCad)
**Usefull Links:**
[Qmk Online Configurator](https://config.qmk.fm/#)
**Alternatives of qmk that worked for me:**
[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/)
[Keyboard Plate & Case Builder](http://builder.swillkb.com/)
[Firmware Builder](https://kbfirmware.com/)
---

19
keyboards/aplx6/aplx6.c Normal file
View File

@@ -0,0 +1,19 @@
/*
Copyright 2020 April Aplyard <alex.fragiou@gmail.com>
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 "aplx6.h"

12
keyboards/aplx6/aplx6.h Normal file
View File

@@ -0,0 +1,12 @@
#pragma once
#include "quantum.h"
#define LAYOUT( \
k000, k001, k002, \
k100, k101, k102 \
) \
{ \
{ k000, k001, k002 }, \
{ k100, k101, k102 } \
}

49
keyboards/aplx6/config.h Normal file
View File

@@ -0,0 +1,49 @@
/*
Copyright 2020 April Aplyard <alex.fragiou@gmail.com>
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 0xE0E0
#define PRODUCT_ID 0x0030
#define DEVICE_VER 0x0001
#define MANUFACTURER Aplyard
#define PRODUCT Aplx6
#define DESCRIPTION Aplx6 MediaPad
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 3
/* pin-out */
#define MATRIX_ROW_PINS { E6, B3 }
#define MATRIX_COL_PINS { F7, B6, F4 }
#define UNUSED_PINS
/* ws2812 RGB LED */
//#define RGB_DI_PIN X
//#define RGBLIGHT_ANIMATIONS
//#define RGBLED_NUM X // Number of LEDs
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

View File

@@ -0,0 +1,38 @@
#include QMK_KEYBOARD_H
#define _MAIN 0
#define _FN 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap __MAIN: Default Layer
* ,--------------------------------.
* | .------. |-----|-----|-----| |
* | | | |Play |VolUp| Fn | |
* | | Pro | |-----|-----|-----| |
* | | Micro| --------------------|
* | | | |-----|-----|-----| |
* | '------' |Prev |VolD |Next | |
* | |||||| |-----|-----|-----| |
* '--------------------------------'
*/
[_MAIN] = LAYOUT(
KC_MPLY, KC_VOLU, MO(1),
KC_MPRV, KC_VOLD, KC_MNXT
),
/* Keymap __FN: Second Layer
* ,--------------------------------.
* | .------. |-----|-----|-----| |
* | | | |Calc |PgUp |TRANS| |
* | | Pro | |-----|-----|-----| |
* | | Micro| --------------------|
* | | | |-----|-----|-----| |
* | '------' |MyPC | PgD |RESET| |
* | |||||| |-----|-----|-----| |
* '--------------------------------'
*/
[_FN] = LAYOUT(
KC_CALC, KC_PGUP, _______,
KC_MYCM, KC_PGDN, RESET
)
};

33
keyboards/aplx6/rules.mk Normal file
View File

@@ -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 = caterina
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
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
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
UNICODE_ENABLE = yes # Unicode

View File

@@ -16,7 +16,7 @@
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14
#define MATRIX_COLS 15
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
@@ -49,7 +49,3 @@
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#if defined(VIA_ENABLE)
# define DYNAMIC_KEYMAP_LAYER_COUNT 2
#endif

View File

@@ -14,4 +14,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______,
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______, _______, _______,_______,TG(0),_______),
[2] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______, _______, _______,_______,_______,_______),
[3] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______, _______, _______,_______,_______,_______)
};

View File

@@ -1 +1,2 @@
VIA_ENABLE = yes
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@@ -1,38 +1,36 @@
// pvinis ergodox ez
// ,------------------------------------. ,------------------------------------.
// | | | | | | | | | | | | | | | |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | | | | | | | | | | | | | | | |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// | | | | | | |----| |----| | | | | | |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// | | | | | | | | | | | | | | | |
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | | | | | | | | | | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// | | | | | |
// ,----+----+----| |----+----+----.
// | | | | | | | |
// | | |----| |----| | |
// | | | | | | | |
// `--------------' `--------------'
// ,------------------------------------. ┌────┬────┬────┬────┬────┬────┬──────┐
// | | | | | | | |
// |------+----+----+----+----+---------| ├────┼────┼────┼────┼────┼────┼──────┤
// | | | | | | | |
// |------+----+----+----x----x----| | ├────╆━━━━╅────┼────┼────┼──────┤
// | | | | | | |----| ├────┤
// |------+----+----+----x----x----| | ├────╄━━━━╃────┼────┼────┼──────┤
// | | | | | | | |
// `------+----+----+----+----+---------' └────┴────┼────┼────┼────┼────┼────┬─┘
// | | | | | |
// `------------------------' └────┴────┴────┴────┴────┘
// ,---------. ┌────┬────┐
// | | |
// ,----+----+----| ├────┼────┼────┐
// | | | |
// | | |----| ├────┤
// | | | |
// `--------------' └────┴────┴────┘
#include QMK_KEYBOARD_H
#include "pvinis.h"
#include "mousekey.h"
// layers
enum {
MOUSE = 8,
MOUSE = 8,
};
// extra keys
enum {
NONE = 30,
TD_LAYR, // SYSCTL and MOUSE layer switch
NONE = 30,
TD_LAYR, // SYSCTL and MOUSE layer switch
};
// application selection
@@ -41,158 +39,170 @@ enum {
#define AP_XCOD ALLM(KC_X)
#define AP_MSGR ALLM(KC_M)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ,------------------------------------. ,------------------------------------.
// |4xFLSH| | | | | |Opt | | | | | | | | |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | Tab | | | | | | | | | | | | | | |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// |EscCtl| | | | | |----| |----| | | | | | Ent |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// |LShift| | | | | | | | | | | | | |RShift|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | | | |Cmd | | | | | | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// |QWER| | | | |
// ,----+----+----| |----+----+----.
// | Ba | L | | | | | |
// | ck |Shi |----| |----| |Spc |
// | spc| ft | | | | | |
// `--------------' `--------------'
[LR_BASE] = LAYOUT_ergodox_pretty_wrapper(
TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______,
KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
_______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______,
QWERTY , CARPALX, _______, _______,
_______, _______,
KC_BSPC, _______, _______, _______, _______, KC_SPC
// ,------------------------------------. ,------------------------------------.
// |4xFLSH| | | | | |Opt | | | | | | | | |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | Tab | | | | | | | | | | | | | | |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// |EscCtl| | | | | |----| |----| | | | | | Ent |
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
// |LShift| | | | | | | | | | | | | |RShift|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | | |Cmd |LOWR| |RASE|RAlt| | | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// |QWER| | | | |
// ,----+----+----| |----+----+----.
// | Ba | L | | | | | |
// | ck |Shi |----| |----| |Spc |
// | spc| ft | | | | | |
// `--------------' `--------------'
[LR_BASE] = LAYOUT_ergodox_pretty_wrapper(
// clang-format off
TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______,
KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
_______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______,
QWERTY , CARPALX, _______, _______,
_______, _______,
KC_BSPC, _______, _______, _______, _______, KC_SPC
// clang-format on
),
// ,------------------------------------. ,------------------------------------.
// | | NUMBERS_L | | | - | NUMBERS_R | = |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | | | [ | | ] | | |
// |------+ | | | | +------|
// | | QWERTY_L |----| |----| QWERTY_R | |
// |------+ | ( | | ) | +------|
// | | | | | | | |
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | ` | | | | | | | | ' | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// | | | | | |
// ,----+----+----| |----+----+----.
// | | | | | | | |
// | | |----| |----| | |
// | | | | | | | |
// `--------------' `--------------'
// See `users/pvinis/pvinis.h`
[LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
// clang-format off
_______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL ,
_______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______,
_______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______,
_______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______,
_______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
// clang-format off
),
// ,------------------------------------. ,------------------------------------.
// | | NUMBERS_L | | | - | NUMBERS_R | = |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | | | [ | | ] | | |
// |------+ | | | | +------|
// | | QWERTY_L |----| |----| QWERTY_R | |
// |------+ | ( | | ) | +------|
// | | | | | | | |
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | ` | | | | | | | | ' | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// | | | | | |
// ,----+----+----| |----+----+----.
// | | | | | | | |
// | | |----| |----| | |
// | | | | | | | |
// `--------------' `--------------'
// See `users/pvinis/pvinis.h`
[LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
_______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL ,
_______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______,
_______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______,
_______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______,
_______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
),
// ,------------------------------------. ,------------------------------------.
// | | NUMBERS_L | | | | NUMBERS_R | |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | | | | | | | |
// |------+ | | | | +------|
// | | CARPALX_L |----| |----| CARPALX_R | |
// |------+ | | | | +------|
// | | | | | | | |
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | | | | | | | | | | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// | | | | | |
// ,----+----+----| |----+----+----.
// | | | | | | | |
// | | |----| |----| | |
// | | | | | | | |
// `--------------' `--------------'
// See `users/pvinis/pvinis.h`
// ,------------------------------------. ,------------------------------------.
// | | NUMBERS_L | | | | NUMBERS_R | |
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
// | | | | | | | |
// |------+ | | | | +------|
// | | CARPALX_L |----| |----| CARPALX_R | |
// |------+ | | | | +------|
// | | | | | | | |
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
// | | | | | | | | | | | |
// `------------------------' `------------------------'
// ,---------. ,---------.
// | | | | | |
// ,----+----+----| |----+----+----.
// | | | | | | | |
// | | |----| |----| | |
// | | | | | | | |
// `--------------' `--------------'
// See `users/pvinis/pvinis.h`
[LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper(
_______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______,
_______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______,
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
// clang-format off
_______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______,
_______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______,
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
// See `users/pvinis/pvinis.h`
[LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper(
// clang-format off
_______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______,
_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______,
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
// clang-format off
),
// See `users/pvinis/pvinis.h`
[LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper(
_______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______,
_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______,
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
),
// See `users/pvinis/pvinis.h`
// See `users/pvinis/pvinis.h`
[LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// clang-format off
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
),
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
// See `users/pvinis/pvinis.h`
[LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// See `users/pvinis/pvinis.h`
[LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper(
// clang-format off
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
// clang-format on
),
/* MOUSE
* a keymap to control my system.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ^ | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | | MsUp | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | |MidClk|
* ,------|------|------| |------+------+------.
* | | | | | |Left |Right |
* | | |------| |------| Click| Click|
* | | | ^ | | | | |
* `--------------------' `--------------------'
*/
[MOUSE] = LAYOUT_ergodox_pretty(
/* MOUSE
* a keymap to control my system.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ^ | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | | MsUp | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | |MidClk|
* ,------|------|------| |------+------+------.
* | | | | | |Left |Right |
* | | |------| |------| Click| Click|
* | | | ^ | | | | |
* `--------------------' `--------------------'
*/
[MOUSE] = LAYOUT_ergodox_pretty(
// clang-format off
KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@@ -212,53 +222,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,KC_NO ,KC_NO
,KC_NO
,KC_NO ,KC_NO ,KC_NO
),
// clang-format on
),
};
// keyboard initialization
void keyboard_post_init_user_local(void) {
ergodox_led_all_on();
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
ergodox_led_all_set(i);
wait_ms(5);
}
wait_ms(1000);
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
ergodox_led_all_set(i);
wait_ms(10);
}
ergodox_led_all_off();
void keyboard_post_init_user_keymap(void) {
ergodox_led_all_on();
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
ergodox_led_all_set(i);
wait_ms(5);
}
wait_ms(1000);
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
ergodox_led_all_set(i);
wait_ms(10);
}
ergodox_led_all_off();
// restore default brightness for future use
ergodox_led_all_set(LED_BRIGHTNESS_HI);
// restore default brightness for future use
ergodox_led_all_set(LED_BRIGHTNESS_HI);
}
// light up leds based on the layer
uint32_t layer_state_set_user_local(uint32_t state) {
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (biton32(state)) {
case LR_SYSCTL:
ergodox_right_led_3_on(); // blue
break;
case LR_KBCTL:
ergodox_right_led_1_on(); // red
break;
case LR_SYMBOL:
ergodox_right_led_2_on(); // green
break;
default: break;
}
return state;
uint32_t layer_state_set_user_keymap(uint32_t state) {
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (biton32(state)) {
case LR_SYSCTL:
ergodox_right_led_3_on(); // blue
break;
case LR_KBCTL:
ergodox_right_led_1_on(); // red
break;
case LR_SYMBOL:
ergodox_right_led_2_on(); // green
break;
default:
break;
}
return state;
}
// extra keys
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// switch (id) {
// }
// return MACRO_NONE;
// switch (id) {
// }
// return MACRO_NONE;
// }
// tap dances
@@ -325,6 +336,6 @@ uint32_t layer_state_set_user_local(uint32_t state) {
// }
// qk_tap_dance_action_t tap_dance_actions[] = {
// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ),
// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ),
// };

View File

@@ -0,0 +1,3 @@
#pragma once
#define IGNORE_MOD_TAP_INTERRUPT

View File

@@ -0,0 +1,155 @@
/* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at
*
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
*
* There's also a template for adding new layers at the bottom of this file!
*/
#include QMK_KEYBOARD_H
enum layers {
BASE, // default layer
SYMB, // symbols
NUMB, // number/navigation
MOUS, // mouse navigation
};
#define KC_ANGL LSFT(KC_COMM)
#define KC_ANGR LSFT(KC_DOT)
// Blank template at the bottom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | LShift | A | S | D | F | G | | | VolUp| H | J | K | L | ; : |RSft/' "|
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | LCtrl | Z | X | C | V | B | | | VolDn| N | M | , < | . > | / ? |RCtl/- _|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .----------. .-----------. .------.
* | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS |
* '----------' '----------' `-----------' '------'
* ,-------. ,-------.
* | | |VolMute|
* ,------|-------| |-------|------.
* | NUMB | | | | SYMB |
* | Tab | LGui | | = | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[BASE] = LAYOUT_gergo(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_VOLU, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_QUOT),
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RCTL, KC_MINS),
KC_LALT, LT(SYMB, KC_SPC), LT(NUMB, KC_TAB), KC_LGUI, KC_EQL, LT(SYMB, KC_ENT), LT(NUMB, KC_BSPC), MO(MOUS)
),
/* Keymap 1: Symbols layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | # | $ | { | } | | | | < | > | | | | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | ! | @ | ( | ) | ` | | | | - | & | + | * | ; | ' " |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | _ | | | , | . | / ? | - _ |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .----------. .-----. .------.
* | LAlt | |SYMB/Space| | Del | | MOUS |
* '----------' '----------' `-----' '------'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | NUMB | | | | SYMB |
* | Tab | LGui | | = | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[SYMB] = LAYOUT_gergo(
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, KC_ANGL, KC_ANGR, XXXXXXX, XXXXXXX, KC_PIPE,
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, XXXXXXX, XXXXXXX, KC_MINS, KC_AMPR, KC_PLUS, KC_ASTR, KC_SCLN, KC_QUOT,
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
_______, _______, _______, _______, _______, _______, KC_DEL, _______
),
/* Keymap 2: Pad/Function layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | | | PgUp | LEFT | UP | RIGHT| | |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | |PgDown| HOME | DOWN | END | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .----------. .-----------. .------.
* | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS |
* '----------' '----------' `-----------' '------'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | NUMB | | | | SYMB |
* | Tab | LGui | | = | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[NUMB] = LAYOUT_gergo(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_PGUP, KC_LEFT, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_HOME, KC_DOWN, KC_END, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, _______, _______, _______
),
/* Keymap 3: Mouse layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | | | | M_L | M_U | M_R | M_Clk| |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | L_Clk| M_D | R_Clk| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .----------. .-----------. .------.
* | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS |
* '----------' '----------' `-----------' '------'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | NUMB | | | | SYMB |
* | Tab | LGui | | = | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[MOUS] = LAYOUT_gergo(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_MS_L, KC_MS_U, KC_MS_R, KC_BTN3, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_BTN1, KC_MS_D, KC_BTN2, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
/* Keymap template
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
[SYMB] = LAYOUT_gergo(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
*/

View File

@@ -0,0 +1,8 @@
This is a modified version of the default keymap for Gergo with some changes.
## Changes:
- Rehaul thumb keys. For my hand size, the L and R thumbs rest on space and backspace, and one finger outward, are tab and enter.
- = has its own dedicated key to facilitate typing "<space>=<space>", which is a very common trigram in programming.
- Change navigation into a T-shaped cluster and add Home and End keys. T-shaped, because it's similar to arrow key cluster and most keys are on the home row, while sharing the number layer.
- Separated mouse navigation into a separate layer (in favor of T-shaped arrows, which require 2 rows).
- Difficult-to-reach key positions are mostly unused.

View File

@@ -0,0 +1,37 @@
#----------------------------------------------------------------------------
# make gergo:germ:dfu
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
# Firmware options
BALLER = no # Enable to ball out
BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
SCROLLSTEP = 1 # Lines to scroll with ball
MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller
#Debug options
VERBOSE = yes
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_BALLER = no
DEBUG_MATRIX = yes
# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
#
# No touchy, capiche?
SRC += matrix.c i2c_master.c
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
ifneq ($(strip $(SCROLLSTEP)),)
OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
endif
ifeq ($(strip $(BALLER)), yes)
POINTING_DEVICE_ENABLE = yes
OPT_DEFS += -DBALLER
endif
ifeq ($(strip $(DEBUG_BALLER)), yes)
OPT_DEFS += -DDEBUG_BALLER
endif
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif

View File

@@ -6,7 +6,7 @@ A fairly typical TKL
Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/)
Hardware Supported: KBD8X MKII PCB/case
Hardware Availability: [KBDfans](https://kbdfans.cn/collections/new-arrival/products/coming-soon-kbd8x-mkii-custom-mechanical-keyboard-kit)
Hardware Availability: [KBDfans](https://kbdfans.com/collections/90-kbd19x/products/gb-kbd8x-mkii-pcb)
Make example for this keyboard (after setting up your build environment):

View File

@@ -0,0 +1,52 @@
#include QMK_KEYBOARD_H
enum layer_names {
_ZERO,
_ONE,
_TWO,
_THREE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ZERO] = LAYOUT(
KC_MPLY, KC_HOME, KC_MUTE,
MO(1), KC_UP, RGB_MOD,
KC_LEFT, KC_DOWN, KC_RGHT
),
[_ONE] = LAYOUT(
RESET, BL_STEP, KC_STOP,
_______, KC_HOME, RGB_MOD,
KC_MPRV, KC_END , KC_MNXT
),
[_TWO] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[_THREE] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
)
};
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) {
if (clockwise) {
tap_code(KC_WH_U);
} else {
tap_code(KC_WH_D);
}
}
}

View File

@@ -0,0 +1,5 @@
VIA_ENABLE = yes
LINK_TIME_OPTIMIZATION_ENABLE = yes
MOUSEKEY_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no

View File

@@ -1,24 +1,36 @@
#pragma once
#ifdef PRODUCT
#undef PRODUCT
#define PRODUCT Iris Keyboard - pvinis
# undef PRODUCT
# define PRODUCT Iris Keyboard - pvinis
#endif
// Use I2C or Serial, not both
// Use I2C or Serial, not both.
#define USE_SERIAL
// #define USE_I2C
// Select hand configuration
#define MASTER_LEFT
// #define MASTER_RIGHT
// Select hand configuration.
// #define MASTER_LEFT
#define MASTER_RIGHT
// #define EE_HANDS
// choose pin to use for audio. c6 is the one iris uses.
// Choose pin to use for audio. C6 is the one iris uses.
#ifdef AUDIO_ENABLE
#define C6_AUDIO
# define C6_AUDIO
# define STARTUP_SONG SONG(NO_SOUND) // No startup song.
#endif
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLED_NUM 16
#endif
#ifdef ENCODER_ENABLE
# define ENCODERS_PAD_A \
{ F5 } // I connected the encoder to F4 and F5.
# define ENCODERS_PAD_B \
{ F4 }
// #define ENCODERS_PAD_A_RIGHT { B5 }
// #define ENCODERS_PAD_B_RIGHT { C6 }
# define ENCODER_RESOLUTION 2
#endif

View File

@@ -1,16 +1,16 @@
// pvinis iris
// ,-----------------------------. ,-----------------------------.
// | | | | | | | | | | | | | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | | | | | | | | | |
// |----+----+----+----x----x----| |----x----x----+----+----+----|
// | | | | | | | | | | | | | |
// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----|
// | | | | | | | | | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | | | | | | | |
// `----+---------' `--------------'
// make keebio/iris/rev2:pvinis:avrdude
// ,-----------------------------. ┌────┬────┬────┬────┬────┬────┐
// | | | | | | | │ │ │ │ │ │ │
// |----+----+----+----+----+----| ├────┼────┼────┼────┼────┼────┤
// | | | | | | | │ │ │ │ │ │ │
// |----+----+----+----x----x----| ├────╆━━━━╅────┼────┼────┼────┤
// | | | | | | | │ ┃ ┃ │ │ │ │
// |----+----+----+----x----x----+----. ┌────┼────╄━━━━╃────┼────┼────┼────┤
// | | | | | | | | │ │ │ │ │ │ │ │
// `-------------------+----+----+----/ └┬───┴┬───┴┬───┴┬───┴────┴────┴────┘
// | | | | │ │ │ │
// `----+---------' └────┴────┴────┘
#include QMK_KEYBOARD_H
#include "pvinis.h"
@@ -19,102 +19,179 @@
//#include "eeconfig.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
# include "audio.h"
#endif
#ifdef AUDIO_ENABLE
// #define STARTUP_SONG SONG(SONIC_RING)
// #define STARTUP_SONG SONG(SONIC_RING)
#endif
#ifdef AUDIO_ENABLE
float tone_sonic[][2] = SONG(IN_LIKE_FLINT);
float tone_1[][2] = SONG(QWERTY_SOUND);
float tone_2[][2] = SONG(OLD_SPICE);
float tone_3[][2] = SONG(OVERWATCH_THEME);
float tone_4[][2] = SONG(QWERTY_SOUND);
// float n04[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE);
// float n10[][2] = SONG(STARTUP_SOUND);
// float n11[][2] = SONG(GOODBYE_SOUND);
// float n12[][2] = SONG(PLANCK_SOUND);
// float n19[][2] = SONG(MUSIC_ON_SOUND);
// float n20[][2] = SONG(AUDIO_ON_SOUND);
// float n29[][2] = SONG(CAPS_LOCK_ON_SOUND);
// float n30[][2] = SONG(CAPS_LOCK_OFF_SOUND);
// float n31[][2] = SONG(SCROLL_LOCK_ON_SOUND);
// float n32[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
// float n33[][2] = SONG(NUM_LOCK_ON_SOUND);
// float n34[][2] = SONG(NUM_LOCK_OFF_SOUND);
// float n40[][2] = SONG(ONE_UP_SOUND);
// float n49[][2] = SONG(E1M1_DOOM);
// float n53[][2] = SONG(OLD_SPICE);
// float n56[][2] = SONG(RICK_ROLL);
// float n57[][2] = SONG(FF_PRELUDE);
// RGB_MODE_KNIGHT
// float n78[][2] = SONG(KATAMARI_ROLLING_STAR);
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ,-----------------------------. ,-----------------------------.
// | | | | | |QWER| | | | | | | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// |Tab | | | | |CARP| | | | | | |Del |
// |----+----+----+----x----x----| |----x----x----+----+----+----|
// |EscC| | | | | | | | | | | |Ent |
// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----|
// |LSft| | | | | |Home| |End | | | | | |Rsft|
// `-------------------+----+----+----/ \----+----+----+-------------------'
// |Cmd |LOWR|Bspc| |Spc |RASE|RAlt|
// `----+---------' `--------------'
[LR_BASE] = LAYOUT_wrapper(
_______, _______, _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______,
KC_TAB , _______, _______, _______, _______, CARPALX, _______, _______, _______, _______, _______, KC_DEL ,
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT
),
// ,-----------------------------. ,-----------------------------.
// | | | | |GAME|QWER| | | | | | | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// |Tab | | | | |CRPL| | | | | | |Del |
// |----+----+----+----x----x----| |----x----x----+----+----+----|
// |EscC| | | | | | | | | | | |Ent |
// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----|
// |LSft| | | | | |Home| |End | | | | | |Rsft|
// `-------------------+----+----+----/ \----+----+----+-------------------'
// |Cmd |LOWR|Bspc| |Spc |RASE|RAlt|
// `----+---------' `--------------'
[LR_BASE] = LAYOUT_wrapper(
// clang-format off
KC_MUTE, _______, _______, _______, GAME1 , QWERTY , KC_1 , _______, _______, _______, _______, _______,
KC_TAB , ___________________________________________, ___________________________________________, KC_DEL ,
PV_ESCC, ___________________________________________, ___________________________________________, KC_ENT ,
KC_LSFT, ___________________________________________, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT
// clang-format on
),
// ,-----------------------------. ,-----------------------------.
// | | NUMBERS_L | | NUMBERS_R | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | |
// |----+ | | +----|
// | | QWERTY_L | | QWERTY_R | |
// |----+ +----. ,----| +----|
// | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | | | | | | | |
// `----+---------' `--------------'
[LR_QWERTY] = LAYOUT_wrapper(
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
_______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______,
_______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______,
_______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______,
_______, _______, _______, _______, _______, _______
),
// ,-----------------------------. ,-----------------------------.
// | | NUMBERS_L | | NUMBERS_R | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | |
// |----+ | | +----|
// | | QWERTY_L | | QWERTY_R | |
// |----+ +----. ,----| +----|
// | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | | | | | | | |
// `----+---------' `--------------'
[LR_QWERTY] = LAYOUT_wrapper(
// clang-format off
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
_______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______,
_______, _____________MOD_QWERTY_L2_________________, _________________QWERTY_R2_________________, _______,
_______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
// ,-----------------------------. ,-----------------------------.
// | | NUMBERS_L | | NUMBERS_R | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | |
// |----+ | | +----|
// | | CARPALX_L | | CARPALX_R | |
// |----+ +----. ,----| +----|
// | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | | | | | | | |
// `----+---------' `--------------'
[LR_CARPALX] = LAYOUT_wrapper(
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
_______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______,
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
_______, _______, _______, _______, _______, _______
),
// ,-----------------------------. ,-----------------------------.
// | | NUMBERS_L | | NUMBERS_R | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | |
// |----+ | | +----|
// | | CARPALX_L | | CARPALX_R | |
// |----+ +----. ,----| +----|
// | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | | | | | | | |
// `----+---------' `--------------'
[LR_CARPALX] = LAYOUT_wrapper(
// clang-format off
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
_______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______,
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
[LR_SYMBOL] = LAYOUT_wrapper(
KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 ,
_______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______,
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
_______, _______, _______, _______, _______, _______
),
[LR_SYMBOL] = LAYOUT_wrapper(
// clang-format off
KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 ,
_______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______,
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
[LR_SYSCTL] = LAYOUT_wrapper(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
_______, _______, _______, _______, _______, _______
),
[LR_SYSCTL] = LAYOUT_wrapper(
// clang-format off
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _________________SYSCTL_L1_________________, _________________SYSCTL_R1_________________, _______,
_______, _________________SYSCTL_L2_________________, _________________SYSCTL_R2_________________, _______,
_______, _________________SYSCTL_L3_________________, _______, _______, _________________SYSCTL_R3_________________, _______,
_______, _______, _______, _______, _______, _______
// clang-format on
),
[LR_KBCTL] = LAYOUT_wrapper(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX,
XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX,
BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX
)
[LR_KBCTL] = LAYOUT_wrapper(
// clang-format off
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX,
XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX,
BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX
// clang-format on
),
// ,-----------------------------. ,-----------------------------.
// | | NUMBERS_L | | NUMBERS_R | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | |
// |----+ | | +----|
// |ESC | QWERTY_L | | QWERTY_R | |
// |----+ +----. ,----| +----|
// | | | | | | | |
// `-------------------+----+----+----/ \----+----+----+-------------------'
// | |SPC | | | | | |
// `----+---------' `--------------'
[LR_GAME1] = LAYOUT_wrapper(
// clang-format off
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_BSPC,
_______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, QWERTY ,
KC_ESC , _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______,
_______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______,
_______, _______, KC_SPC , _______, _______, _______
// clang-format on
),
[LR_GAME2] = LAYOUT_wrapper(
// clang-format off
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_BSPC,
_______, _________________QWERTY_L1_________________, KC_Y , KC_U , KC_UP , KC_O , KC_P , QWERTY ,
KC_ESC , _________________QWERTY_L2_________________, KC_H , KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, _______,
_______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______,
_______, _______, KC_SPC , _______, _______, _______
// clang-format on
),
};
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
// if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
// }
}
#endif
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifdef AUDIO_ENABLE
// case PV_S04: if (record->event.pressed) PLAY_SONG(n04); return false; break;
#endif
}
return true; // Process everything else normally
}

View File

@@ -1,2 +1,9 @@
AUDIO_ENABLE = no # off for now
RGBLIGHT_ENABLE = no # off for now
TAP_DANCE_ENABLE = yes
AUDIO_ENABLE = no # piezo speaker sounds
RGBLIGHT_ENABLE = yes # rgb leds underlight
ENCODER_ENABLE = yes # rotary knob
# Some extra stuff to make firmware smaller.
LINK_TIME_OPTIMIZATION_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no

View File

@@ -148,6 +148,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D3
#define RGBLED_NUM 8
#define RGBLIGHT_SPLIT
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

View File

@@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define VENDOR_ID 0x6E6D
#define PRODUCT_ID 0x0001
#define DEVICE_VER 0x0001
#define MANUFACTURER KBDFans
#define PRODUCT NIU Mini

View File

@@ -0,0 +1,79 @@
#include QMK_KEYBOARD_H
#define LOWER FN_MO13
#define RAISE FN_MO23
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | Caps | Alt |Layer1| Space| Space|Layer2| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[0] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Layer 1
* ,-----------------------------------------------------------------------------------.
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Reset| | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[1] = LAYOUT_ortho_4x12(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Layer 2 (r_ Indicates RGB Controls)
* ,-----------------------------------------------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |BL_TOG|BL_STEP| | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[2] = LAYOUT_ortho_4x12(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Layer 3 (r_ Indicates RGB Controls)
* ,-----------------------------------------------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |BL_TOG|BL_STEP| | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | RESET| | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[3] = LAYOUT_ortho_4x12(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

View File

@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@@ -1 +0,0 @@
secrets.h

View File

@@ -1,37 +0,0 @@
#pragma once
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)
#endif
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
// Leader Key
#define LEADER_TIMEOUT 250
#define LEADER_PER_KEY_TIMING
// Tap dance
#define TAPPING_TERM 200

View File

@@ -1,392 +0,0 @@
#include QMK_KEYBOARD_H
#include "no_keycodes.h"
#if __has_include("secrets.h")
# include "secrets.h"
#else
# define mail_str ""
# define pwd_str ""
#endif
// layer definitions
enum planck_layers {
_DEFAULT,
_LOWER,
_RAISE,
_GAME,
_GLOW
};
// sounds
#ifdef AUDIO_ENABLE
float gamesong[][2] = SONG(MARIO_MUSHROOM);
float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
float failed[][2] = SONG(TERMINAL_SOUND);
#endif
// leader key
bool leader_succeed;
bool leader_layer_game;
bool leader_layer_def;
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leader_succeed = leading = false;
leader_layer_game = false;
leader_layer_def = false;
SEQ_TWO_KEYS(KC_P, KC_P) {
SEND_STRING(pwd_str);
leader_succeed = true;
}
SEQ_TWO_KEYS(KC_P, KC_M) {
SEND_STRING(mail_str);
leader_succeed = true;
}
SEQ_TWO_KEYS(KC_B, KC_B) {
SEND_STRING("build"SS_TAP(X_ENTER));
leader_succeed = true;
}
SEQ_TWO_KEYS(KC_B, KC_F) {
SEND_STRING("flash"SS_TAP(X_ENTER));
reset_keyboard();
leader_succeed = true;
}
SEQ_TWO_KEYS(KC_L, KC_G) {
layer_on(_GAME);
leader_layer_game = true;
}
SEQ_TWO_KEYS(KC_L, KC_D) {
layer_off(_GAME);
leader_layer_def = true;
}
leader_end();
}
}
void leader_end(void) {
if (leader_succeed) {
// do nothing
} else if (leader_layer_game) {
#ifdef AUDIO_ENABLE
PLAY_SONG(gamesong);
#endif
} else if (leader_layer_def) {
#ifdef AUDIO_ENABLE
PLAY_SONG(defsong);
#endif
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(failed);
#endif
}
}
// tap dance definitions
typedef struct {
bool is_press_action;
int state;
} tap;
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_HOLD = 4,
DOUBLE_SINGLE_TAP = 5,
TRIPLE_TAP = 6,
TRIPLE_HOLD = 7
};
enum {
TD_LSFT = 0,
TD_LCTL,
TD_RSFT,
TD_RCTL
};
int cur_dance (qk_tap_dance_state_t *state);
void lsft_finished (qk_tap_dance_state_t *state, void *user_data);
void lsft_reset (qk_tap_dance_state_t *state, void *user_data);
void rsft_finished (qk_tap_dance_state_t *state, void *user_data);
void rsft_reset (qk_tap_dance_state_t *state, void *user_data);
void lctl_finished (qk_tap_dance_state_t *state, void *user_data);
void lctl_reset (qk_tap_dance_state_t *state, void *user_data);
void rctl_finished (qk_tap_dance_state_t *state, void *user_data);
void rctl_reset (qk_tap_dance_state_t *state, void *user_data);
// layer declarations
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | Å | BkSp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | P | , | . | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Lead | Win | Alt | Lower| Space| Enter| Raise| AltGr| App | Lead | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
[_DEFAULT] = LAYOUT_planck_grid(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, NO_AA, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
TD(TD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, TD(TD_RSFT),
TD(TD_LCTL), KC_LEAD, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_ALGR, KC_APP, KC_LEAD, TD(TD_RCTL)
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | Tab | <Word| Up | Word>| PgUp | | | | F7 | F8 | F9 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | BkSp | Left | Down | Right| PgDn | | | | F4 | F5 | F6 | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | | Win | Alt | Lower| M_PP |M_Next| | | Mute | VolD | VolUp|
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid(
KC_TRNS, LCTL(KC_LEFT), KC_UP, LCTL(KC_RIGHT), KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | Tab | ! | ? | # | * | | | = | / | 7 | 8 | 9 | Ins |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | BkSp | @ | & | $ | % | ~ | + | \ | 4 | 5 | 6 | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| ' | " | ¨ | | | - | 0 | 1 | 2 | 3 | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | | Win | Alt | | Space| Enter| Raise| AltGr| | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_planck_grid(
KC_TRNS, NO_EXCL, NO_QEST, NO_HASH, NO_ASTE, NO_PIPE, NO_EQUA, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
KC_BSPC, NO_ALFA, NO_AMPE, NO_USDO, NO_PERC, NO_TILD, NO_PLUS, NO_BSLS, KC_4, KC_5, KC_6, KC_NO,
KC_TRNS, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, KC_NO, NO_DASH, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO
),
/* Game
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | | BkSp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | P | , | . | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Lead | | Alt | Lower| Space| Enter| Lower| | | Lead | |
* `-----------------------------------------------------------------------------------'
*/
[_GAME] = LAYOUT_planck_grid(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_NO, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, KC_NO,
KC_LCTL, KC_LEAD, KC_NO, KC_LALT, MO(_GLOW), KC_SPC, KC_ENT, MO(_GLOW), KC_NO, KC_NO, KC_LEAD, KC_NO
),
/* Game lower
* ,-----------------------------------------------------------------------------------.
* | Tab | 1 | 2 | 3 | | | | | | | | Steam|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | 4 | 5 | 6 | | | | | | | | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| 7 | 8 | 9 | 0 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | | | Alt | | PlyPa| Next | | | Mute | VolD | VolUp|
* `-----------------------------------------------------------------------------------'
*/
[_GLOW] = LAYOUT_planck_grid(
KC_TRNS, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_F7),
KC_TRNS, KC_4, KC_5, KC_6, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12,
KC_TRNS, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU
)
};
// tap dance declarations
int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
}
else if (state->count == 2) {
if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
if (state->count == 3) {
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
else return TRIPLE_HOLD;
}
else return 8;
}
static tap xtap_state = {
.is_press_action = true,
.state = 0
};
void lsft_finished (qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state);
switch (xtap_state.state) {
case SINGLE_TAP:
register_code16(LSFT(KC_8));
break;
case SINGLE_HOLD:
register_code(KC_LSFT);
break;
case DOUBLE_TAP:
register_code(KC_NUBS);
break;
case DOUBLE_SINGLE_TAP:
register_code(KC_NUBS);
break;
}
}
void lsft_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) {
case SINGLE_TAP:
unregister_code16(LSFT(KC_8));
break;
case SINGLE_HOLD:
unregister_code(KC_LSFT);
break;
case DOUBLE_TAP:
unregister_code(KC_NUBS);
break;
case DOUBLE_SINGLE_TAP:
unregister_code(KC_NUBS);
break;
}
xtap_state.state = 0;
}
void rsft_finished (qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state);
switch (xtap_state.state) {
case SINGLE_TAP:
register_code16(LSFT(KC_9));
break;
case SINGLE_HOLD:
register_code(KC_RSFT);
break;
case DOUBLE_TAP:
register_code16(LSFT(KC_NUBS));
break;
case DOUBLE_SINGLE_TAP:
register_code16(LSFT(KC_NUBS));
break;
}
}
void rsft_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) {
case SINGLE_TAP:
unregister_code16(LSFT(KC_9));
break;
case SINGLE_HOLD:
unregister_code(KC_RSFT);
break;
case DOUBLE_TAP:
unregister_code16(LSFT(KC_NUBS));
break;
case DOUBLE_SINGLE_TAP:
unregister_code16(LSFT(KC_NUBS));
break;
}
xtap_state.state = 0;
}
void lctl_finished (qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state);
switch (xtap_state.state) {
case SINGLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_7);
break;
case SINGLE_HOLD:
register_code(KC_LCTL);
break;
case DOUBLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_8);
break;
case DOUBLE_SINGLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_8);
break;
}
}
void lctl_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) {
case SINGLE_TAP:
unregister_code(KC_7);
unregister_mods(MOD_BIT(KC_ALGR));
break;
case SINGLE_HOLD:
unregister_code(KC_LCTL);
break;
case DOUBLE_TAP:
unregister_code(KC_8);
unregister_mods(MOD_BIT(KC_ALGR));
break;
case DOUBLE_SINGLE_TAP:
unregister_code(KC_8);
unregister_mods(MOD_BIT(KC_ALGR));
break;
}
xtap_state.state = 0;
}
void rctl_finished (qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state);
switch (xtap_state.state) {
case SINGLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_0);
break;
case SINGLE_HOLD:
register_code(KC_RCTL);
break;
case DOUBLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_9);
break;
case DOUBLE_SINGLE_TAP:
register_mods(MOD_BIT(KC_ALGR));
register_code(KC_9);
break;
}
}
void rctl_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) {
case SINGLE_TAP:
unregister_code(KC_0);
unregister_mods(MOD_BIT(KC_ALGR));
break;
case SINGLE_HOLD:
unregister_code(KC_RCTL);
break;
case DOUBLE_TAP:
unregister_code(KC_9);
unregister_mods(MOD_BIT(KC_ALGR));
break;
case DOUBLE_SINGLE_TAP:
unregister_code(KC_9);
unregister_mods(MOD_BIT(KC_ALGR));
break;
}
xtap_state.state = 0;
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_LSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lsft_finished, lsft_reset),
[TD_RSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rsft_finished, rsft_reset),
[TD_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset),
[TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset),
};

View File

@@ -1,28 +0,0 @@
// øæå
#define NO_OE KC_SCLN
#define NO_AE KC_QUOT
#define NO_AA KC_LBRC
// rename
#define NO_ANBR KC_NUBS
#define NO_APOS KC_BSLS
#define NO_BSLS KC_EQL
#define NO_DASH KC_SLSH
#define NO_PLUS KC_MINS
#define NO_UMLA KC_RBRC
#define NO_PIPE KC_GRV
// shifted
#define NO_EXCL LSFT(KC_1)
#define NO_QUOT LSFT(KC_2)
#define NO_HASH LSFT(KC_3)
#define NO_PERC LSFT(KC_5)
#define NO_AMPE LSFT(KC_6)
#define NO_FSLS LSFT(KC_7)
#define NO_LPAR LSFT(KC_8)
#define NO_RPAR LSFT(KC_9)
#define NO_EQUA LSFT(KC_0)
#define NO_QEST LSFT(KC_MINS)
#define NO_ASTE LSFT(KC_BSLS)
// altgr
#define NO_ALFA ALGR(KC_2)
#define NO_USDO ALGR(KC_4)
#define NO_TILD ALGR(KC_RBRC)

View File

@@ -1,4 +0,0 @@
About
------
A simple Norwegian grid layout using Leader Key, Tap Dance and audio.

View File

@@ -1,11 +0,0 @@
SRC += muse.c
# Build Options
NKRO_ENABLE = yes
EXTRAKEY_ENABLE = yes
LEADER_ENABLE = yes
TAP_DANCE_ENABLE = yes
AUDIO_ENABLE = yes
COMMAND_ENABLE = no
CONSOLE_ENABLE = no
MOUSEKEY_ENABLE = no

View File

@@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
#define VENDOR_ID 0x5447 // TG
#define PRODUCT_ID 0x4A4E // JN
#define DEVICE_VER 0x0200
#define MANUFACTURER TGR
#define PRODUCT Jane

View File

@@ -13,8 +13,16 @@
"layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
"LAYOUT_tkl_ansi_tsangan": {
"layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.25, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.25, "y":2.25}, {"x":16.25, "y":2.25}, {"x":17.25, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":16.25, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25}, {"x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"x":11, "y":5.25, "w":1.5}, {"x":12.5, "y":5.25}, {"x":13.5, "y":5.25, "w":1.5}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}]
},
"LAYOUT_tkl_iso": {
"layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
"LAYOUT_tkl_iso_tsangan": {
"layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.25, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.75, "y":2.25, "w":1.25, "h":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":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":16.25, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25}, {"x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"x":11, "y":5.25, "w":1.5}, {"x":12.5, "y":5.25}, {"x":13.5, "y":5.25, "w":1.5}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}]
}
}
}

View File

@@ -58,6 +58,24 @@
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
}
#define LAYOUT_tkl_ansi_tsangan( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \
{ k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
}
#define LAYOUT_tkl_iso( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
@@ -75,3 +93,21 @@
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
}
#define LAYOUT_tkl_iso_tsangan( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
}

View File

@@ -0,0 +1 @@
#define DYNAMIC_KEYMAP_LAYER_COUNT 3

View File

@@ -0,0 +1,43 @@
/* Copyright 2020 MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT),
[1] = LAYOUT_tkl_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
[2] = LAYOUT_tkl_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
};

View File

@@ -0,0 +1,5 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = no

View File

@@ -191,7 +191,7 @@ def is_executable(command):
cli.log.debug('Found {fg_cyan}%s', command)
return True
cli.log.error("{fg_red}Can't run `%s %s`", (command, version_arg))
cli.log.error("{fg_red}Can't run `%s %s`", command, version_arg)
return False

View File

@@ -5,6 +5,7 @@ import os
import platform
import subprocess
import shlex
import shutil
import qmk.keymap
@@ -28,11 +29,12 @@ def create_make_command(keyboard, keymap, target=None):
A command that can be run to make the specified keyboard and keymap
"""
make_args = [keyboard, keymap]
make_cmd = 'gmake' if shutil.which('gmake') else 'make'
if target:
make_args.append(target)
return ['make', ':'.join(make_args)]
return [make_cmd, ':'.join(make_args)]
def compile_configurator_json(user_keymap, bootloader=None):

View File

@@ -152,7 +152,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) {
bool ready = false;
do {
ready = spi_write(msg->type, 100) != SdepSlaveNotReady;
ready = spi_write(msg->type) != SdepSlaveNotReady;
if (ready) {
break;
}
@@ -165,7 +165,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) {
if (ready) {
// Slave is ready; send the rest of the packet
spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len, 100);
spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len);
success = true;
}
@@ -205,7 +205,7 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) {
do {
// Read the command type, waiting for the data to be ready
msg->type = spi_read(100);
msg->type = spi_read();
if (msg->type == SdepSlaveNotReady || msg->type == SdepSlaveOverflow) {
// Release it and let it initialize
spi_stop();
@@ -215,11 +215,11 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) {
}
// Read the rest of the header
spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)), 100);
spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)));
// and get the payload if there is any
if (msg->len <= SdepMaxPayload) {
spi_receive(msg->payload, msg->len, 100);
spi_receive(msg->payload, msg->len);
}
success = true;
break;

View File

@@ -1,10 +1,9 @@
#pragma once
#ifdef AUDIO_ENABLE
// #define STARTUP_SONG SONG(SONIC_RING)
// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume?
#endif
// allow rolling when keys have hold functionality
#define IGNORE_MOD_TAP_INTERRUPT
// #define TAPPING_TERM 150
#if defined(MOUSE_KEYS)
# define MOUSEKEY_WHEEL_TIME_TO_MAX 1
#endif

View File

@@ -2,88 +2,97 @@
#include "version.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif // AUDIO_ENABLE
#ifdef AUDIO_ENABLE
// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR);
#endif // AUDIO_ENABLE
# include "audio.h"
float song_sonic_ring[][2] = SONG(SONIC_RING);
float song_coin_sound[][2] = SONG(COIN_SOUND);
float song_test[][2] = SONG(QWERTY_SOUND);
#endif
// SYMBOL + SYSCTL = KBCTL
uint32_t layer_state_set_user(uint32_t state) {
uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL);
intermediate_state = layer_state_set_user_local(intermediate_state);
return intermediate_state;
uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL);
intermediate_state = layer_state_set_user_keymap(intermediate_state);
return intermediate_state;
}
// functions for the individual keymaps to implement if they need something extra
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
// handle my own keycodes
// Handle my own keycodes.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
switch (keycode) {
case PV_VRSN:
if (record->event.pressed) {
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
case PV_VRSN:
if (record->event.pressed) {
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
case PV_MAKE:
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
case PV_MAKE:
// make ergodox_ez:pvinis:teensy
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
":dfu"
":dfu"
#elif defined(BOOTLOADER_HALFKAY)
":teensy"
":teensy"
#elif defined(BOOTLOADER_CATERINA)
":avrdude"
":avrdude"
#endif
SS_TAP(X_ENTER)
);
}
return false;
SS_TAP(X_ENTER));
}
return false;
case PV_FLSH:
reset_keyboard();
return false;
case PV_FLSH:
reset_keyboard();
return false;
case PV_KTMR:
if (record->event.pressed) {
case PV_SSNC:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
// PLAY_SONG(tone_katamari_rolling_star);
PLAY_SONG(song_sonic_ring);
#endif
}
return false;
}
return process_record_keymap(keycode, record);
}
}
return false;
case PV_SCIN:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(song_coin_sound);
#endif
}
return false;
case PV_TEST:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(song_test);
#endif
}
return false;
}
return process_record_keymap(keycode, record);
}
#ifdef TAP_DANCE_ENABLE
qk_tap_dance_action_t tap_dance_actions[] = {
};
#endif // TAP_DANCE_ENABLE
qk_tap_dance_action_t tap_dance_actions[] = {};
#endif
void keyboard_post_init_rgb_light(void) {
rgblight_sethsv(HSV_GOLD);
rgblight_mode(RGBLIGHT_MODE_BREATHING);
// rgblight_mode(RGBLIGHT_MODE_KNIGHT+1);
}
// init stuff
// Init stuff.
void keyboard_post_init_user(void) {
keyboard_post_init_user_local();
#if defined(RGBLIGHT_ENABLE)
keyboard_post_init_rgb_light();
#endif
keyboard_post_init_user_keymap();
}
// Default functions.
__attribute__((weak)) void keyboard_post_init_user_keymap(void) {}
// default functions
__attribute__ ((weak))
void keyboard_post_init_user_local(void) {}
__attribute__ ((weak))
uint32_t layer_state_set_user_local(uint32_t state) {
return state;
}
__attribute__((weak)) uint32_t layer_state_set_user_keymap(uint32_t state) { return state; }

View File

@@ -2,84 +2,103 @@
#include "quantum.h"
// my own keycodes
// My own keycodes.
enum userspace_custom_keycodes {
PV_ = SAFE_RANGE,
PV_ = SAFE_RANGE,
PV_VRSN, // prints firmware version
PV_MAKE, // prints the make command of the keyboard
PV_FLSH, // resets keyboard
PV_KTMR, // play katamari music
PV_VRSN, // Print firmware version.
PV_MAKE, // Print the make command of the keyboard.
PV_FLSH, // Reset keyboard.
PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps
PV_SSNC, // Play Sonic Ring.
PV_SCIN, // Play Coin Sound.
PV_TEST, // For quick testing purposes.
PV_SAFE_RANGE, // Used for extra keycodes in individual keymaps.
};
enum tap_dance_indexes {
// tap dance
TD_FLSH, // flash keyboard (as if the physical flash key was pressed)
// tap dance
TD_FLSH, // flash keyboard (as if the physical flash key was pressed)
};
#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui
#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold
#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer
#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash
#define ALLM(kc) LCAG(kc) // Easier name for left ctrl-alt-gui.
#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold.
#define PV_LOCK LCTL(LSFT(KC_PWR)) // Lock computer.
#define TD_3FLS TD(TD_FLSH) // Tap dance 3 times for flash.
// layers
// Layers.
enum {
LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc
LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc
LR_QWERTY,
LR_CARPALX,
LR_QWERTY,
LR_CARPALX,
LR_GAME1, // game layout (space on the left thumb, no modifiers, etc)
LR_GAME2, // game layout (space on the left thumb, no modifiers, etc, arrows)
LR_SYMBOL, // symbol input (!, @, #, etc)
LR_SYSCTL, // system control (music, volume, keyboard flash, etc)
LR_KBCTL, // keyboard control (version, make, flash, etc)
LR_SYMBOL, // symbol input (!, @, #, etc)
LR_SYSCTL, // system control (music, volume, keyboard flash, etc)
LR_KBCTL, // keyboard control (version, make, flash, etc)
};
// layer switchers
#define BASE TO(LR_BASE)
#define QWERTY TO(LR_QWERTY)
// Layer switchers.
#define BASE TO(LR_BASE)
#define QWERTY TO(LR_QWERTY)
#define CARPALX TO(LR_CARPALX)
#define GAME1 TO(LR_GAME1)
#define GAME2 TO(LR_GAME2)
#define SYMBOL MO(LR_SYMBOL)
#define SYSCTL MO(LR_SYSCTL)
#define KBCTL MO(LR_KBCTL)
#define SYMBOL MO(LR_SYMBOL)
#define SYSCTL MO(LR_SYSCTL)
#define KBCTL MO(LR_KBCTL)
// Layout parts for easy reuse between keyboard keymaps.
// layout parts for easy reuse between keyboard keymaps
// Transparent.
// ┌─────┬─────┬─────┬─────┬─────┐
// │ │ │ │ │ │
// └─────┴─────┴─────┴─────┴─────┘
#define ___________________________________________ _______, _______, _______, _______, _______
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0
// Numbers.
// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
// │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │
// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
// F keys.
// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
// │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │
// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | Q | W | E | R | T | | Y | U | I | O | P |
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | A | S | D | F | G | | H | J | K | L | ; |
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | Z | X | C | V | B | | N | M | , | . | / |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T
#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G
#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B
// QWERTY.
// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
// │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │
// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤
// │ A │ S │ D ┃ F ┃ G │ │ H ┃ J ┃ K │ L │ ; │
// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤
// │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │
// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P
#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN
#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G
#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN)
// QWERTY with mods.
// ┌───────┬───────┬───────┲━━━━━━━┱───────┐ ┌───────┲━━━━━━━┱───────┬───────┬───────┐
// │ ctl/A │ sft/S │ cmd/D ┃ opt/F ┃ G │ │ H ┃ opt/J ┃ cmd/K │ sft/L │ ctl/; │
// └───────┴───────┴───────┺━━━━━━━┹───────┘ └───────┺━━━━━━━┹───────┴───────┴───────┘
// #define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G
#define _____________MOD_QWERTY_L2_________________ KC_A, KC_S, KC_D, ALT_T(KC_F), KC_G
#define _____________MOD_QWERTY_R2_________________ KC_H, ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN)
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | Q | G | M | L | W | | Y | F | I | O | P |
@@ -88,13 +107,13 @@ enum {
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | Z | X | C | V | J | | K | P | , | . | / |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W
#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R
#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J
#define ________________CARPALX_L1_________________ KC_Q, KC_G, KC_M, KC_L, KC_W
#define ________________CARPALX_L2_________________ KC_D, KC_S, KC_T, KC_N, KC_R
#define ________________CARPALX_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_J
#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN
#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H
#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH
#define ________________CARPALX_R1_________________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
#define ________________CARPALX_R2_________________ KC_I, KC_A, KC_E, KC_O, KC_H
#define ________________CARPALX_R3_________________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | ! | @ | { | } | _ | | \ | | ` | | |
@@ -103,50 +122,51 @@ enum {
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | % | ^ | [ | ] | + | | * | ~ | < | > | / |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS
#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS
#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS
#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_UNDS
#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_MINS
#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS
#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______
#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE
#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH
#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV, _______, _______
#define _________________SYMBOL_R2_________________ KC_EQL, KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE
#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// | | | | | | |MUTE |HOME | ^ | END | |
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | | | | | | |VOLUP| < | v | > | |
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| |
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define _________________SYSCTL_L1_________________
#define _________________SYSCTL_L2_________________
#define _________________SYSCTL_L3_________________
// System Control.
// vol ↓ ctl ↓
// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
// │MUTE │HOME │ ↑ │ END │LOCK │
// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤
// VOLUP┃ ← ┃ ↓ │ → │SLEEP│ ← arrows
// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤
// │ │ │ │ │ │ │VOLDN│MPREV│MPLAY│MNEXT│ PWR │ ← music
// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
#define _________________SYSCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_BTN1, XXXXXXX
#define _________________SYSCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_RIGHT, KC_MS_WH_UP
#define _________________SYSCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_DOWN
// vol v ctl v
#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK
#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP
#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR
#define _________________SYSCTL_R1_________________ KC_MUTE, KC_HOME, KC_UP, KC_END, PV_LOCK
#define _________________SYSCTL_R2_________________ KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT /* < arrows */, KC_SLEP
#define _________________SYSCTL_R3_________________ KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT /* < music */, KC_PWR
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|
// |GAME |CRPLX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX|
// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----,
// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|
// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----,
#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_L1_________________ PV_SSNC, PV_SCIN, PV_TEST, XXXXXXX, XXXXXXX
#define __________________KBCTL_L2_________________ RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_L3_________________ RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX
#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX
#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX
#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
// We need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro.
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
// extra stuff that might be needed
void keyboard_post_init_user_local(void);
uint32_t layer_state_set_user_local(uint32_t state);
// Extra stuff that might be needed.
void keyboard_post_init_user_keymap(void);
uint32_t layer_state_set_user_keymap(uint32_t state);

View File

@@ -1,15 +1,19 @@
# add userspace file
SRC += pvinis.c
SRC += pvinis.c # add userspace file
AUDIO_ENABLE = no # piezo speaker sounds
RGBLIGHT_ENABLE = no # rgb leds underlight
TAP_DANCE_ENABLE = yes
BACKLIGHT_ENABLE = no # leds under keycaps
#MOUSEKEY_ENABLE = no
#SLEEP_LED_ENABLE = no # no led blinking while sleeping
#NKRO_ENABLE = yes
# make firmware smaller
LINK_TIME_OPTIMIZATION_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
## Use the stuff below on the keyboard keymaps, not here.
## If they are used here, they will replace the keymap's rules, since this file is eval'd later.
# TAP_DANCE_ENABLE = yes
# AUDIO_ENABLE = yes # piezo speaker sounds
# RGBLIGHT_ENABLE = yes # rgb leds underlight
# BACKLIGHT_ENABLE = no # leds under keycaps
# MOUSEKEY_ENABLE = yes
# LEEP_LED_ENABLE = no # no led blinking while sleeping
# KRO_ENABLE = yes
## Some extra stuff to make firmware smaller.
# LINK_TIME_OPTIMIZATION_ENABLE = yes
# CONSOLE_ENABLE = no
# COMMAND_ENABLE = no