Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ad982e39d6 | ||
|
0ad93d7443 | ||
|
690a08cbbb | ||
|
5836d1a06a | ||
|
fd359e23e8 | ||
|
4aef0318aa | ||
|
8209304904 | ||
|
6bbe2366ec | ||
|
3be81a2daf | ||
|
586a5e8d1d | ||
|
383a3c1e08 | ||
|
e2352d4fbf | ||
|
3a2acd4475 | ||
|
ee15d2fe5e | ||
|
a01dc4dd48 | ||
|
4764e77121 | ||
|
cfcf0fd36b | ||
|
dcb2627237 | ||
|
fe8942e55c | ||
|
8e0d9e2637 | ||
|
7923376de1 | ||
|
81ae0fb10e | ||
|
e659bc4467 | ||
|
e3541853a9 | ||
|
0ea6cf719e | ||
|
c9d23f50f6 | ||
|
c5c35f5f4b | ||
|
6b584a23c0 | ||
|
6bb3fbd4e0 | ||
|
9e0b244a34 | ||
|
4b7fcf0af0 | ||
|
22b9303e2a | ||
|
8582faab6f | ||
|
60a0b08da3 | ||
|
e956c11bc9 | ||
|
cbc5de67be | ||
|
9cb1d36974 | ||
|
0a5d302622 | ||
|
6c24e28b8d | ||
|
d19805f9de | ||
|
4beb5e72f8 | ||
|
5f0a2e078f | ||
|
feac994f6f | ||
|
4931510ad3 | ||
|
d6215ad6af | ||
|
eba4cb7a04 | ||
|
85ea963931 | ||
|
492a16308a | ||
|
5cc7df8750 |
@@ -11,7 +11,7 @@ env:
|
|||||||
global:
|
global:
|
||||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||||
before_install:
|
before_install:
|
||||||
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||||
install:
|
install:
|
||||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||||
|
@@ -34,7 +34,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|||||||
OPT_DEFS += -DAUDIO_ENABLE
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE := 1
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
|
ifeq ($(PLATFORM),AVR)
|
||||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||||
|
else
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
|
||||||
|
endif
|
||||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
endif
|
endif
|
||||||
|
@@ -69,7 +69,11 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
* `#define BACKLIGHT_PIN B7`
|
* `#define BACKLIGHT_PIN B7`
|
||||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||||
* `#define BACKLIGHT_LEVELS 3`
|
* `#define BACKLIGHT_LEVELS 3`
|
||||||
* number of levels your backlight will have (not including off)
|
* number of levels your backlight will have (maximum 15 excluding off)
|
||||||
|
* `#define BACKLIGHT_BREATHING`
|
||||||
|
* enables backlight breathing (only works with backlight pins B5, B6 and B7)
|
||||||
|
* `#define BREATHING_PERIOD 6`
|
||||||
|
* the length of one backlight "breath" in seconds
|
||||||
* `#define DEBOUNCING_DELAY 5`
|
* `#define DEBOUNCING_DELAY 5`
|
||||||
* the delay when reading the value of the pin (5 is default)
|
* the delay when reading the value of the pin (5 is default)
|
||||||
* `#define LOCKING_SUPPORT_ENABLE`
|
* `#define LOCKING_SUPPORT_ENABLE`
|
||||||
|
@@ -127,7 +127,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
|||||||
|
|
||||||
## Esc and <code>`</code> on a Single Key
|
## Esc and <code>`</code> on a Single Key
|
||||||
|
|
||||||
See the [Grave Escape](feature_grave_escape.md) feature.
|
See the [Grave Escape](feature_grave_esc.md) feature.
|
||||||
|
|
||||||
## Arrow on Right Modifier Keys with Dual-Role
|
## Arrow on Right Modifier Keys with Dual-Role
|
||||||
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||||
|
@@ -10,8 +10,30 @@ These keycodes control the backlight. Most keyboards use this for single color i
|
|||||||
|---------|------------------------------------------|
|
|---------|------------------------------------------|
|
||||||
|`BL_TOGG`|Turn the backlight on or off |
|
|`BL_TOGG`|Turn the backlight on or off |
|
||||||
|`BL_STEP`|Cycle through backlight levels |
|
|`BL_STEP`|Cycle through backlight levels |
|
||||||
|`BL_x` |Set a specific backlight level between 0-9|
|
|`BL_ON` |Set the backlight to max brightness |
|
||||||
|`BL_ON` |An alias for `BL_9` |
|
|`BL_OFF` |Turn the backlight off |
|
||||||
|`BL_OFF` |An alias for `BL_0` |
|
|`BL_INC` |Increase the backlight level |
|
||||||
|`BL_INC` |Increase backlight level |
|
|`BL_DEC` |Decrease the backlight level |
|
||||||
|`BL_DEC` |Decrease backlight level |
|
|`BL_BRTG`|Toggle backlight breathing |
|
||||||
|
|
||||||
|
Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h.
|
||||||
|
|
||||||
|
## Configuration Options in `config.h`
|
||||||
|
|
||||||
|
* `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this.
|
||||||
|
* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (maximum 15 excluding off).
|
||||||
|
* `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7.
|
||||||
|
* `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds.
|
||||||
|
|
||||||
|
## Notes on Implementation
|
||||||
|
|
||||||
|
To change the brightness when using pins B5, B6 or B7, the PWM (Pulse Width Modulation) functionality of the on-chip timer is used.
|
||||||
|
The timer is a counter that counts up to a certain TOP value (`0xFFFF` set in ICR1) before resetting to 0.
|
||||||
|
We also set an OCR1x register.
|
||||||
|
When the counter reaches the value stored in that register, the PWM pin drops to low.
|
||||||
|
The PWM pin is pulled high again when the counter resets to 0.
|
||||||
|
Therefore, OCR1x basically sets the duty cycle of the LEDs and as such the brightness where `0` is the darkest and `0xFFFF` the brightest setting.
|
||||||
|
|
||||||
|
To enable the breathing effect, we register an interrupt handler to be called whenever the counter resets (with `ISR(TIMER1_OVF_vect)`).
|
||||||
|
In this handler, which gets called roughly 244 times per second, we compute the desired brightness using a precomputed brightness curve.
|
||||||
|
To disable breathing, we can just disable the respective interrupt vector and reset the brightness to the desired level.
|
||||||
|
@@ -41,6 +41,7 @@ You can change the behavior of the RGB Lighting by setting these configuration v
|
|||||||
| `RGBLIGHT_HUE_STEP` | 10 | How many hues you want to have available. |
|
| `RGBLIGHT_HUE_STEP` | 10 | How many hues you want to have available. |
|
||||||
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
||||||
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
||||||
|
| `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. |
|
||||||
|
|
||||||
### Animations
|
### Animations
|
||||||
|
|
||||||
|
@@ -53,6 +53,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
|||||||
brew install avr-gcc
|
brew install avr-gcc
|
||||||
brew install dfu-programmer
|
brew install dfu-programmer
|
||||||
brew install gcc-arm-none-eabi
|
brew install gcc-arm-none-eabi
|
||||||
|
brew install avrdude
|
||||||
|
|
||||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
||||||
|
|
||||||
|
@@ -101,8 +101,9 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
|
|||||||
|
|
||||||
```
|
```
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
#define BACKLIGHT_BREATHING
|
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BREATHING_PERIOD 6
|
||||||
```
|
```
|
||||||
|
|
||||||
{% hint style='info' %}
|
{% hint style='info' %}
|
||||||
|
@@ -256,11 +256,11 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|---------|------------------------------------------|
|
|---------|------------------------------------------|
|
||||||
|`BL_TOGG`|Turn the backlight on or off |
|
|`BL_TOGG`|Turn the backlight on or off |
|
||||||
|`BL_STEP`|Cycle through backlight levels |
|
|`BL_STEP`|Cycle through backlight levels |
|
||||||
|`BL_x` |Set a specific backlight level between 0-9|
|
|`BL_ON` |Set the backlight to max brightness |
|
||||||
|`BL_ON` |An alias for `BL_9` |
|
|`BL_OFF` |Turn the backlight off |
|
||||||
|`BL_OFF` |An alias for `BL_0` |
|
|`BL_INC` |Increase the backlight level |
|
||||||
|`BL_INC` |Increase backlight level |
|
|`BL_DEC` |Decrease the backlight level |
|
||||||
|`BL_DEC` |Decrease backlight level |
|
|`BL_BRTG`|Toggle backlight breathing |
|
||||||
|
|
||||||
## [RGB Lighting](feature_rgblight.md)
|
## [RGB Lighting](feature_rgblight.md)
|
||||||
|
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x2260
|
#define PRODUCT_ID 0xCA60
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER MechKeysCa
|
#define MANUFACTURER MECHKEYS
|
||||||
#define PRODUCT ACR60
|
#define PRODUCT ACR60
|
||||||
#define DESCRIPTION ACR60 Keyboard
|
#define DESCRIPTION 60% customizable keyboard
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
@@ -1,12 +1,15 @@
|
|||||||
# ACR60
|
ACR60
|
||||||
|
=====
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
A customizable 60% keyboard based on the DZ60.
|
A customizable 60% keyboard made and sold by mechkeys.ca [More info on MECHKEYS](https://mechkeys.ca)
|
||||||
|
|
||||||
|
Keyboard Maintainer: [TurboMech](https://github.com/TurboMech)
|
||||||
|
|
||||||
Keyboard Maintainer: QMK Community
|
|
||||||
Hardware Supported: ACR60
|
Hardware Supported: ACR60
|
||||||
Hardware Availability: [mechkeysca](https://mechkeys.ca/products/acr60)
|
|
||||||
|
Hardware Availability: [MECHKEYS](https://mechkeys.ca/products/acr60)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0xCA75
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER mechkeys.ca
|
#define MANUFACTURER MECHKEYS
|
||||||
#define PRODUCT ALU84
|
#define PRODUCT ALU84
|
||||||
#define DESCRIPTION A 75% keyboard
|
#define DESCRIPTION 75% keyboard
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 6
|
#define MATRIX_ROWS 6
|
||||||
|
@@ -102,12 +102,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
|
|
||||||
}
|
|
||||||
return MACRO_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
@@ -1,11 +1,15 @@
|
|||||||
ALU84
|
ALU84
|
||||||
===
|
===
|
||||||
|
|
||||||
A 75% keyboard kit made and sold by mechkeys.ca [More info on mechkeys.ca](https://mechkeys.ca)
|

|
||||||
|
|
||||||
|
A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca).
|
||||||
|
|
||||||
Keyboard Maintainer: [TurboMech](https://github.com/TurboMech)
|
Keyboard Maintainer: [TurboMech](https://github.com/TurboMech)
|
||||||
|
|
||||||
Hardware Supported: ALU84
|
Hardware Supported: ALU84
|
||||||
Hardware Availability: [mechkeys.ca](https://mechkeys.ca)
|
|
||||||
|
Hardware Availability: [MECHKEYS](https://mechkeys.ca)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
@@ -345,14 +345,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
case MACRO_BREATH_SPEED_INC:
|
case MACRO_BREATH_SPEED_INC:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_speed_inc(1);
|
breathing_period_inc();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MACRO_BREATH_SPEED_DEC:
|
case MACRO_BREATH_SPEED_DEC:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_speed_dec(1);
|
breathing_period_dec();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
layer_on(LAYER_UPPER);
|
layer_on(LAYER_UPPER);
|
||||||
breathing_speed_set(2);
|
breathing_period_set(2);
|
||||||
breathing_pulse();
|
breathing_pulse();
|
||||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||||
}
|
}
|
||||||
@@ -389,7 +389,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
layer_on(LAYER_LOWER);
|
layer_on(LAYER_LOWER);
|
||||||
breathing_speed_set(2);
|
breathing_period_set(2);
|
||||||
breathing_pulse();
|
breathing_pulse();
|
||||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||||
}
|
}
|
||||||
@@ -403,13 +403,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
case MACRO_FUNCTION:
|
case MACRO_FUNCTION:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_speed_set(3);
|
breathing_period_set(3);
|
||||||
breathing_enable();
|
breathing_enable();
|
||||||
layer_on(LAYER_FUNCTION);
|
layer_on(LAYER_FUNCTION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
breathing_speed_set(1);
|
breathing_period_set(1);
|
||||||
breathing_self_disable();
|
breathing_self_disable();
|
||||||
layer_off(LAYER_FUNCTION);
|
layer_off(LAYER_FUNCTION);
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
/* number of backlight levels */
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
/* mapping backlight LEDs to correct Pin */
|
/* mapping backlight LEDs to correct Pin */
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
|
@@ -21,5 +21,7 @@
|
|||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
#define GRAVE_ESC_CTRL_OVERRIDE
|
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BREATHING_PERIOD 8
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#include "bananasplit.h"
|
#include "bananasplit.h"
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
WIN_SWITCH_LAYOUT = SAFE_RANGE
|
WIN_SWITCH_LAYOUT = SAFE_RANGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \
|
||||||
KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \
|
KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \
|
||||||
_______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \
|
_______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
_______, BL_STEP, BL_BRTG, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \
|
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@@ -76,19 +76,19 @@ void matrix_scan_user(void) {
|
|||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
|
||||||
case WIN_SWITCH_LAYOUT: {
|
case WIN_SWITCH_LAYOUT: {
|
||||||
// Sends Alt+Shift on both key down and key up.
|
// Sends Alt+Shift on both key down and key up.
|
||||||
// Designed to switch between two keyboard layouts on Windows using a locking switch.
|
// Designed to switch between two keyboard layouts on Windows using a locking switch.
|
||||||
// Does nothing if right shift is pressed for easy resync.
|
// Does nothing if right shift is pressed for easy resync.
|
||||||
if (!(get_mods() & MOD_BIT(KC_RSFT))) {
|
if (!(get_mods() & MOD_BIT(KC_RSFT)))
|
||||||
SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_LSHIFT)SS_UP(X_LALT));
|
SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_LSHIFT)SS_UP(X_LALT));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
default:
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
25
keyboards/bananasplit/keymaps/kamon/config.h
Normal file
25
keyboards/bananasplit/keymaps/kamon/config.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* Copyright 2017 Balz Guenat
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
#endif
|
96
keyboards/bananasplit/keymaps/kamon/keymap.c
Normal file
96
keyboards/bananasplit/keymaps/kamon/keymap.c
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
/* Copyright 2017 Balz Guenat
|
||||||
|
*
|
||||||
|
* 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 "bananasplit.h"
|
||||||
|
|
||||||
|
#define ______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
[0] = KEYMAP( \
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_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_LCTL, 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, M(0),\
|
||||||
|
MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(1), KC_RCTL \
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Shift | | | | | | | | | | | Shift | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
[1] = KEYMAP( \
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \
|
||||||
|
KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||||
|
KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_RSFT, ______, \
|
||||||
|
______, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, ______, ______, ______, KC_RCTL \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
// Sends Alt+Shift on both key down and key up.
|
||||||
|
// Fesigned to switch between two keyboard layouts on Windows using a locking switch.
|
||||||
|
// Does nothing if right shift is pressed for easier resync.
|
||||||
|
if (!(get_mods() & MOD_BIT(KC_RSFT)))
|
||||||
|
return MACRO(D(LALT), T(LSFT), U(LALT), END);
|
||||||
|
else
|
||||||
|
return MACRO_NONE;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
34
keyboards/bananasplit/keymaps/kamon/readme.md
Normal file
34
keyboards/bananasplit/keymaps/kamon/readme.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Kamon's keymap for the Bananasplit
|
||||||
|
A simple layout to get you started with the BananaSplit60.
|
||||||
|
|
||||||
|
Default layer:
|
||||||
|
|
||||||
|
```
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
Fn1 layer:
|
||||||
|
|
||||||
|
```
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Shift | | | | | | | | | | | Shift | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
```
|
37
keyboards/bananasplit/keymaps/kamon/rules.mk
Normal file
37
keyboards/bananasplit/keymaps/kamon/rules.mk
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Copyright 2017 Balz Guenat
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
|
||||||
|
# QMK Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
# EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
# CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
# COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
# AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
# UNICODE_ENABLE = no # Unicode
|
||||||
|
# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@@ -1,77 +0,0 @@
|
|||||||
# Target file name (without extension).
|
|
||||||
PROJECT = ch
|
|
||||||
|
|
||||||
# Directory common source files exist
|
|
||||||
TMK_DIR = ../../tmk_core
|
|
||||||
|
|
||||||
# Directory keyboard dependent files exist
|
|
||||||
TARGET_DIR = .
|
|
||||||
|
|
||||||
# project specific files
|
|
||||||
SRC = matrix.c \
|
|
||||||
led.c
|
|
||||||
|
|
||||||
ifdef KEYMAP
|
|
||||||
SRC := keymap_$(KEYMAP).c $(SRC)
|
|
||||||
else
|
|
||||||
SRC := keymap_plain.c $(SRC)
|
|
||||||
endif
|
|
||||||
|
|
||||||
CONFIG_H = config.h
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
|
||||||
# - LDSCRIPT =
|
|
||||||
# - MKL26Z64 for Teensy LC
|
|
||||||
# - MK20DX128 for Teensy 3.0
|
|
||||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
|
||||||
MCU_LDSCRIPT = MK20DX128
|
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x5
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
BOARD = PJRC_TEENSY_3
|
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# comment out to disable the options.
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
|
||||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
|
||||||
|
|
||||||
include $(TMK_DIR)/tool/chibios/common.mk
|
|
||||||
include $(TMK_DIR)/tool/chibios/chibios.mk
|
|
@@ -1,77 +0,0 @@
|
|||||||
# Target file name (without extension).
|
|
||||||
PROJECT = ch
|
|
||||||
|
|
||||||
# Directory common source files exist
|
|
||||||
TMK_DIR = ../../tmk_core
|
|
||||||
|
|
||||||
# Directory keyboard dependent files exist
|
|
||||||
TARGET_DIR = .
|
|
||||||
|
|
||||||
# project specific files
|
|
||||||
SRC = matrix.c \
|
|
||||||
led.c
|
|
||||||
|
|
||||||
ifdef KEYMAP
|
|
||||||
SRC := keymap_$(KEYMAP).c $(SRC)
|
|
||||||
else
|
|
||||||
SRC := keymap_plain.c $(SRC)
|
|
||||||
endif
|
|
||||||
|
|
||||||
CONFIG_H = config.h
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
|
||||||
# - LDSCRIPT =
|
|
||||||
# - MKL26Z64 for Teensy LC
|
|
||||||
# - MK20DX128 for Teensy 3.0
|
|
||||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
|
||||||
MCU_LDSCRIPT = MK20DX256
|
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x7
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
BOARD = PJRC_TEENSY_3_1
|
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# comment out to disable the options.
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
|
||||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
|
||||||
|
|
||||||
include $(TMK_DIR)/tool/chibios/common.mk
|
|
||||||
include $(TMK_DIR)/tool/chibios/chibios.mk
|
|
247
keyboards/chimera_ortho/info.json
Normal file
247
keyboards/chimera_ortho/info.json
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "",
|
||||||
|
"manufacturer": "",
|
||||||
|
"identifier": "",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"processor": "",
|
||||||
|
"bootloader": "",
|
||||||
|
"width": 15.5,
|
||||||
|
"height": 4.25,
|
||||||
|
"layouts": {
|
||||||
|
"KEYMAP": {
|
||||||
|
"layout": [
|
||||||
|
{
|
||||||
|
"label": "Esc",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Q",
|
||||||
|
"x": 1,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "W",
|
||||||
|
"x": 2,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "E",
|
||||||
|
"x": 3,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "R",
|
||||||
|
"x": 4,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "T",
|
||||||
|
"x": 5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "{",
|
||||||
|
"x": 6,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "}",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Y",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "U",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "I",
|
||||||
|
"x": 11.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "O",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "P",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\"",
|
||||||
|
"x": 14.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Tab",
|
||||||
|
"x": 0,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "A",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "S",
|
||||||
|
"x": 2,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "D",
|
||||||
|
"x": 3,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F",
|
||||||
|
"x": 4,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "G",
|
||||||
|
"x": 5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "-",
|
||||||
|
"x": 6,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "1",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "H",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "J",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "K",
|
||||||
|
"x": 11.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "L",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ";",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Enter",
|
||||||
|
"x": 14.5,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "(",
|
||||||
|
"x": 0,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Z",
|
||||||
|
"x": 1,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "X",
|
||||||
|
"x": 2,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "C",
|
||||||
|
"x": 3,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "V",
|
||||||
|
"x": 4,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "B",
|
||||||
|
"x": 5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "=",
|
||||||
|
"x": 6,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "8",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "N",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "M",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ",",
|
||||||
|
"x": 11.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ".",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "/",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ")",
|
||||||
|
"x": 14.5,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Num Layer",
|
||||||
|
"x": 4,
|
||||||
|
"y": 3.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Back Space",
|
||||||
|
"x": 5,
|
||||||
|
"y": 3.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Space",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 3.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Symbol Layer",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 3.25
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
389
keyboards/chimera_ortho/keymaps/gordon/keymap.c
Normal file
389
keyboards/chimera_ortho/keymaps/gordon/keymap.c
Normal file
@@ -0,0 +1,389 @@
|
|||||||
|
// this is the style you want to emulate.
|
||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
|
||||||
|
#include "chimera_ortho.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "process_keycode/process_tap_dance.h"
|
||||||
|
#include "gordon.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
|
||||||
|
#define KC_SNAPLEFT LGUI(KC_LEFT)
|
||||||
|
#define KC_SNAPRIGHT LGUI(KC_RIGHT)
|
||||||
|
#define KC_SNAPUP LGUI(KC_UP)
|
||||||
|
#define KC_SNAPDOWN LGUI(KC_DOWN)
|
||||||
|
#define KC_PREVTAB LCTL(LSFT(KC_TAB))
|
||||||
|
#define KC_NEXTTAB LCTL(KC_TAB)
|
||||||
|
#define KC_WORKRIGHT LCTL(LGUI(KC_RIGHT))
|
||||||
|
#define KC_WORKLEFT LCTL(LGUI(KC_LEFT))
|
||||||
|
|
||||||
|
#define KC_NMPD TG(_NUMPAD)
|
||||||
|
#define KC_SYMB TG(_SYMBOLS)
|
||||||
|
|
||||||
|
#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
|
||||||
|
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||||
|
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
||||||
|
#define KC_SPRT MT(MOD_LALT, KC_1)
|
||||||
|
#define KC_GBRC MT(MOD_RGUI, KC_8)
|
||||||
|
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
|
||||||
|
#define KC_CSHW MT(MOD_LCTL|MOD_LSFT,KC_W)
|
||||||
|
|
||||||
|
#define KC_CDEL LCTL(KC_DEL)
|
||||||
|
#define KC_AUDUP KC_AUDIO_VOL_UP
|
||||||
|
#define KC_AUDOWN KC_AUDIO_VOL_DOWN
|
||||||
|
|
||||||
|
|
||||||
|
#define KC_MEHS MEH_T(KC_S)
|
||||||
|
#define KC_MEHL MEH_T(KC_L)
|
||||||
|
#define KC_GWIN GUI_T(KC_G)
|
||||||
|
#define KC_FCTL CTL_T(KC_F)
|
||||||
|
#define KC_JCTL CTL_T(KC_J)
|
||||||
|
#define KC_ZCTL CTL_T(KC_Z)
|
||||||
|
#define KC_ALTV ALT_T(KC_V)
|
||||||
|
#define KC_ALTN ALT_T(KC_N)
|
||||||
|
#define KC_MEHX ALL_T(KC_X)
|
||||||
|
#define KC_RESET RESET
|
||||||
|
|
||||||
|
//LTs
|
||||||
|
#define KC_MESC LT(_MACROS, KC_ESC)
|
||||||
|
#define KC_DNUM LT(_NUMPAD, KC_D)
|
||||||
|
#define KC_SPFN LT(_NAV,KC_EQL)
|
||||||
|
#define KC_EMAUS LT(_MOUSE,KC_E)
|
||||||
|
#define KC_ENAV LT(_NAV,KC_E)
|
||||||
|
#define KC_INAV LT(_TEXTNAV,KC_I)
|
||||||
|
#define KC_BSPSYM LT(_SYMBOLS,KC_BSPACE)
|
||||||
|
#define KC_ENTSYM LT(_SYMBOLS,KC_ENTER)
|
||||||
|
#define KC_CLNMAUS LT(_MOUSE,KC_SCOLON)
|
||||||
|
|
||||||
|
#define KC_FUNC TT(_FUNCTION)
|
||||||
|
|
||||||
|
//TAP DANCE
|
||||||
|
#define KC_F6F7 TD(F6F7)
|
||||||
|
#define KC_ALF4 TD(ALTF4)
|
||||||
|
#define KC_TTT TD(TTT)
|
||||||
|
#define KC_ENHM TD(HOME_END)
|
||||||
|
#define KC_CLPS TD(CALC_PRINTSCREEN)
|
||||||
|
|
||||||
|
|
||||||
|
#define KC_INCL M(0)
|
||||||
|
#define KC_PULL M(1)
|
||||||
|
#define KC_PUSH M(2)
|
||||||
|
#define KC_SCAP M(3)
|
||||||
|
#define KC_SCOF M(4)
|
||||||
|
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||||
|
|
||||||
|
#define LONGPRESS_DELAY 150
|
||||||
|
//#define LAYER_TOGGLE_DELAY 300
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
|
||||||
|
/* TODO:
|
||||||
|
*
|
||||||
|
* DONE: RESET and CAD into macro layer.
|
||||||
|
* DONE: WINUP AND WINDOWN in NAV layer
|
||||||
|
* DONE: Get rid of caps layer. not sure what it is even for.
|
||||||
|
* DONE: LMEH
|
||||||
|
* DONE: plus, divide, multiply on left hand for num layer
|
||||||
|
* DONE: F1 - F12 on a layer toggle (not a temp toggle but a one shot or something)
|
||||||
|
* DONE: Volume, page up and down for mouse layer.
|
||||||
|
* DONE: Add full user files - without using anything.
|
||||||
|
* DONE: Insert, ctrl delete
|
||||||
|
* DONE: Home and End
|
||||||
|
* DONE: Printscreen
|
||||||
|
|
||||||
|
* Easier way to open new terminal (instead of alt + F2)
|
||||||
|
* Intellij/text navigation layer (ctrl delete could be here).
|
||||||
|
* Macro for "System.exit(0)" probably macro layer and "c"
|
||||||
|
* Some sort of tap dance for comma, H, right pinky, and possibly other corners.
|
||||||
|
* Something more with the right hand. not sure what.
|
||||||
|
* Mouse: Left scroll, right scroll
|
||||||
|
* Passwords and any other macros.
|
||||||
|
* LED for control
|
||||||
|
* All modifiers reset
|
||||||
|
* Russain layer
|
||||||
|
* Hebrew layer
|
||||||
|
* Get rid of stupid git pull and push macros.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Tap dance enums
|
||||||
|
enum {
|
||||||
|
F12ETAPS = 0,
|
||||||
|
CALCCOMP,
|
||||||
|
ALTF4,
|
||||||
|
F6F7,
|
||||||
|
TTT,
|
||||||
|
HOME_END,
|
||||||
|
CALC_PRINTSCREEN
|
||||||
|
};
|
||||||
|
|
||||||
|
static xtap ttt_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//Already exists in gordon.c, shouldn't need this anymore
|
||||||
|
/*// To activate SINGLE_HOLD, you will need to hold for 200ms first.
|
||||||
|
// This tap dance favors keys that are used frequently in typing like 'f'
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted) {
|
||||||
|
return SINGLE_TAP;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!state->pressed) return SINGLE_TAP;
|
||||||
|
else return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||||
|
//with single tap.
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return DOUBLE_HOLD;
|
||||||
|
else return DOUBLE_TAP;
|
||||||
|
}
|
||||||
|
else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP;
|
||||||
|
else if (state->count == 3) return TRIPLE_HOLD;
|
||||||
|
else return 8; //magic number. At some point this method will expand to work for more presses
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* "Super tap toggle"
|
||||||
|
* Basically, TT but for two or more layers for a single key.
|
||||||
|
* This particular dance:
|
||||||
|
* Single tap/hold - TT for Function layer
|
||||||
|
* Double tap/hold - TT for Numpad layer
|
||||||
|
* Triple tap/hold - TT for Mouse layer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void TTT_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
ttt_state.state = cur_dance(state);
|
||||||
|
switch (ttt_state.state) {
|
||||||
|
case SINGLE_TAP: layer_invert(_FUNCTION); break;
|
||||||
|
case SINGLE_HOLD: layer_on(_FUNCTION); break;
|
||||||
|
case DOUBLE_TAP: layer_invert(_NUMPAD); break;
|
||||||
|
case DOUBLE_HOLD: layer_on(_NUMPAD); break;
|
||||||
|
case DOUBLE_SINGLE_TAP: layer_invert(_NUMPAD); break;
|
||||||
|
case TRIPLE_TAP: layer_invert(_MOUSE); break;
|
||||||
|
case TRIPLE_HOLD: layer_on(_MOUSE); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTT_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (ttt_state.state) {
|
||||||
|
case SINGLE_TAP: break;
|
||||||
|
case SINGLE_HOLD: layer_off(_FUNCTION); break;
|
||||||
|
case DOUBLE_TAP: break;
|
||||||
|
case DOUBLE_HOLD: layer_off(_NUMPAD); break;
|
||||||
|
case DOUBLE_SINGLE_TAP: break;
|
||||||
|
case TRIPLE_TAP: break;
|
||||||
|
case TRIPLE_HOLD: layer_off(_MOUSE); break;
|
||||||
|
}
|
||||||
|
ttt_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
// simple tap dance
|
||||||
|
[F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))),
|
||||||
|
[CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER),
|
||||||
|
[CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR),
|
||||||
|
[ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)),
|
||||||
|
[F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)),
|
||||||
|
[HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME),
|
||||||
|
[TTT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,TTT_finished, TTT_reset),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
TAB , A , MEHS,DNUM,FCTL,GWIN,GRAVE, TILD, H ,JCTL, K ,MEHL,CLNMAUS,ENHM,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
MINUS,ZCTL,MEHX, C ,ALTV, B ,DELETE, INS ,ALTN, M ,COMM,DOT ,SLSH,UNDS,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
LSHIFT,BSPSYM, SPC ,ENTSYM
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NUMPAD] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
, , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
,MINS,PLUS,/**/,EQUAL, , , , , 4 , 5 , 6 ,PLUS, ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , 0
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_SYMBOLS] = KEYMAP(
|
||||||
|
//,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/,
|
||||||
|
//|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
,EXLM,EXLM,LPRN,RPRN , , , , ,DQUO,EQUAL,QUOTE,RCBR, ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
,DOLLAR, PERC,LBRACKET,RBRACKET, , , ,PIPE,BSLASH,PLUS, , , ,
|
||||||
|
//|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
UNDS,/**/, ,/**/
|
||||||
|
// \-------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FUNCTION] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , ,
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NAV] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
, ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
,SNAPUP,PREVTAB, ,NEXTTAB,SNAPDOWN,, , ,LEFT,DOWN,RGHT, , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
CDEL ,DEL, ,
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_TEXTNAV] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
, , , , , , , , , ,/**/, , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , ,
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOUSE] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
, , ,MS_UP, , , , , , , UP , , , ,/**/
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, ,MS_LEFT,MS_DOWN,MS_RIGHT, , , , ,LEFT,DOWN,RGHT,/**/, ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
,MS_BTN1 ,MS_BTN2 ,
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_MACROS] = KEYMAP(
|
||||||
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
|
/**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
CAD ,SECRET_1, , , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
SCAP, , , , , , , , , , , , ,SCAP,
|
||||||
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
|
, , ,
|
||||||
|
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
/* include some kind of library or header */
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("#include <>");
|
||||||
|
return MACRO( T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("git pull");
|
||||||
|
return MACRO( T(ENT), END );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (record->event.pressed){
|
||||||
|
SEND_STRING("git push");
|
||||||
|
return MACRO( T(ENT), END );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (record->event.pressed){
|
||||||
|
// layer_on(_CAPS);
|
||||||
|
// register_code(KC_CAPSLOCK);
|
||||||
|
// unregister_code(KC_CAPSLOCK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (record->event.pressed){
|
||||||
|
// layer_off(_CAPS);
|
||||||
|
// register_code(KC_CAPSLOCK);
|
||||||
|
// unregister_code(KC_CAPSLOCK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
switch (layer) {
|
||||||
|
case _QWERTY:
|
||||||
|
set_led_green;
|
||||||
|
break;
|
||||||
|
case _MOUSE:
|
||||||
|
set_led_yellow;
|
||||||
|
break;
|
||||||
|
case _NUMPAD:
|
||||||
|
set_led_blue;
|
||||||
|
break;
|
||||||
|
case _SYMBOLS:
|
||||||
|
set_led_red;
|
||||||
|
break;
|
||||||
|
case _NAV:
|
||||||
|
set_led_magenta;
|
||||||
|
break;
|
||||||
|
case _MACROS:
|
||||||
|
set_led_green;
|
||||||
|
_delay_ms(45);
|
||||||
|
set_led_red;
|
||||||
|
_delay_ms(45);
|
||||||
|
break;
|
||||||
|
case _FUNCTION:
|
||||||
|
set_led_green;
|
||||||
|
_delay_ms(45);
|
||||||
|
set_led_blue;
|
||||||
|
_delay_ms(45);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
set_led_green;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
@@ -8,6 +8,30 @@ enum keyboard_layers {
|
|||||||
_CL
|
_CL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
S_BSKTC = SAFE_RANGE,
|
||||||
|
S_ODEJY,
|
||||||
|
S_RCKBY,
|
||||||
|
S_DOEDR,
|
||||||
|
S_SCALE,
|
||||||
|
S_ONEUP,
|
||||||
|
S_COIN,
|
||||||
|
S_SONIC,
|
||||||
|
S_ZELDA
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float song_basketcase[][2] = SONG(BASKET_CASE);
|
||||||
|
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
|
||||||
|
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
|
||||||
|
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
|
||||||
|
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
float song_coin[][2] = SONG(COIN_SOUND);
|
||||||
|
float song_one_up[][2] = SONG(ONE_UP_SOUND);
|
||||||
|
float song_sonic_ring[][2] = SONG(SONIC_RING);
|
||||||
|
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
|
||||||
|
#endif
|
||||||
|
|
||||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Layer 0: Default Layer
|
/* Layer 0: Default Layer
|
||||||
* ,-----------------------------------------------------------.
|
* ,-----------------------------------------------------------.
|
||||||
@@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, MO(_FL), _______),
|
_______,_______,_______, _______, _______, _______, MO(_FL), _______),
|
||||||
[_CL] = KEYMAP(
|
[_CL] = KEYMAP(
|
||||||
BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
|
BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\
|
||||||
_______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
_______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, MO(_FL), _______)
|
_______, _______, _______, _______, _______, _______, MO(_FL), _______)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case S_BSKTC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_basketcase);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ODEJY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_ode_to_joy);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_RCKBY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_rock_a_bye_baby);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_DOEDR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_doe_a_deer);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SCALE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_scale);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ONEUP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_one_up);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_COIN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_coin);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SONIC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_sonic_ring);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ZELDA:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_zelda_puzzle);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -41,13 +41,8 @@ void backlight_set(uint8_t level) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_init_ports() {
|
|
||||||
printf("led_init_ports()\n");
|
|
||||||
palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
printf("led_init_ports()\n");
|
printf("led_set_kb(%d)\n", usb_led);
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
// Turn capslock on
|
// Turn capslock on
|
||||||
palSetPad(GPIOB, 7);
|
palSetPad(GPIOB, 7);
|
||||||
|
@@ -68,13 +68,10 @@ void matrix_init(void) {
|
|||||||
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
|
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
|
||||||
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
|
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
|
||||||
memset(matrix, 0, MATRIX_ROWS);
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
memset(matrix_debouncing, 0, MATRIX_COLS);
|
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
||||||
|
|
||||||
/* Setup capslock */
|
|
||||||
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
// palClearPad(GPIOB, 7);
|
|
||||||
|
|
||||||
|
palClearPad(GPIOB, 7); // Turn off capslock
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,6 +135,7 @@ uint8_t matrix_scan(void) {
|
|||||||
debouncing_time = timer_read();
|
debouncing_time = timer_read();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||||
matrix[row] = 0;
|
matrix[row] = 0;
|
||||||
|
@@ -50,5 +50,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
|||||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
#AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
# SERIAL_LINK_ENABLE = yes
|
# SERIAL_LINK_ENABLE = yes
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
EXTRAKEY_ENABLE = yes
|
|
||||||
COMMAND_ENABLE = no
|
|
@@ -1 +0,0 @@
|
|||||||
MOUSEKEY_ENABLE = yes
|
|
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
EXTRAKEY_ENABLE = yes
|
|
||||||
|
|
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
EXTRAKEY_ENABLE = yes
|
|
||||||
|
|
@@ -1 +0,0 @@
|
|||||||
SRC = tetris_text.c
|
|
@@ -1,49 +0,0 @@
|
|||||||
#----------------------------------------------------------------------------
|
|
||||||
# On command line:
|
|
||||||
#
|
|
||||||
# make all = Make software.
|
|
||||||
#
|
|
||||||
# make clean = Clean out built project files.
|
|
||||||
#
|
|
||||||
# make coff = Convert ELF to AVR COFF.
|
|
||||||
#
|
|
||||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
|
||||||
#
|
|
||||||
# make program = Download the hex file to the device.
|
|
||||||
# Please customize your programmer settings(PROGRAM_CMD)
|
|
||||||
#
|
|
||||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
|
||||||
# (must have teensy_loader_cli installed).
|
|
||||||
#
|
|
||||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
|
||||||
# have dfu-programmer installed).
|
|
||||||
#
|
|
||||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
|
||||||
# have Atmel FLIP installed).
|
|
||||||
#
|
|
||||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
|
||||||
# (must have dfu-programmer installed).
|
|
||||||
#
|
|
||||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
|
||||||
# (must have Atmel FLIP installed).
|
|
||||||
#
|
|
||||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
|
||||||
# with avr-gdb or avr-insight as the front end for debugging.
|
|
||||||
#
|
|
||||||
# make filename.s = Just compile filename.c into the assembler code only.
|
|
||||||
#
|
|
||||||
# make filename.i = Create a preprocessed source file for use in submitting
|
|
||||||
# bug reports to the GCC project.
|
|
||||||
#
|
|
||||||
# To rebuild project do "make clean" then "make all".
|
|
||||||
#----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# change to "no" to disable the options, or define them in the makefile.mk in
|
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
1
keyboards/eagle_viper/eagle_viper.c
Normal file
1
keyboards/eagle_viper/eagle_viper.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "eagle_viper.h"
|
10
keyboards/eagle_viper/eagle_viper.h
Normal file
10
keyboards/eagle_viper/eagle_viper.h
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef EAGLE_VIPER_H
|
||||||
|
#define EAGLE_VIPER_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_eagle_viper_v2
|
||||||
|
#include "v2.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
13
keyboards/eagle_viper/info.json
Normal file
13
keyboards/eagle_viper/info.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Eagle/Viper",
|
||||||
|
"manufacturer": "Duck",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"KEYMAP": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
keyboards/eagle_viper/readme.md
Normal file
12
keyboards/eagle_viper/readme.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Duck Eagle/Viper
|
||||||
|
|
||||||
|
Non official firmware for custom Korean keyboard with 60% key layout made by Duck.
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
|
Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make eagle_viper/v2:default
|
||||||
|
|
1
keyboards/eagle_viper/rules.mk
Normal file
1
keyboards/eagle_viper/rules.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DEFAULT_FOLDER = eagle_viper/v2
|
54
keyboards/eagle_viper/v2/config.h
Normal file
54
keyboards/eagle_viper/v2/config.h
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 MechMerlin <mechmerlin@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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Duck
|
||||||
|
#define PRODUCT Eagle/Viper V2
|
||||||
|
#define DESCRIPTION 60% Korean custom keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGB_DI_PIN D6
|
||||||
|
#define RGBLED_NUM 17
|
||||||
|
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
#endif
|
89
keyboards/eagle_viper/v2/indicator_leds.c
Normal file
89
keyboards/eagle_viper/v2/indicator_leds.c
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 MechMerlin <mechmerlin@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 <avr/interrupt.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "indicator_leds.h"
|
||||||
|
|
||||||
|
#define RES 6000
|
||||||
|
|
||||||
|
#define LED_T1H 600
|
||||||
|
#define LED_T1L 650
|
||||||
|
#define LED_T0H 250
|
||||||
|
#define LED_T0L 1000
|
||||||
|
|
||||||
|
#define NS_PER_SEC (1000000000L)
|
||||||
|
#define CYCLES_PER_SEC (F_CPU)
|
||||||
|
#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
|
||||||
|
#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
|
||||||
|
|
||||||
|
void send_bit_d4(bool bitVal) {
|
||||||
|
if(bitVal) {
|
||||||
|
asm volatile (
|
||||||
|
"sbi %[port], %[bit] \n\t"
|
||||||
|
".rept %[onCycles] \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
".endr \n\t"
|
||||||
|
"cbi %[port], %[bit] \n\t"
|
||||||
|
".rept %[offCycles] \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
".endr \n\t"
|
||||||
|
::
|
||||||
|
[port] "I" (_SFR_IO_ADDR(PORTD)),
|
||||||
|
[bit] "I" (4),
|
||||||
|
[onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
|
||||||
|
[offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
|
||||||
|
} else {
|
||||||
|
asm volatile (
|
||||||
|
"sbi %[port], %[bit] \n\t"
|
||||||
|
".rept %[onCycles] \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
".endr \n\t"
|
||||||
|
"cbi %[port], %[bit] \n\t"
|
||||||
|
".rept %[offCycles] \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
".endr \n\t"
|
||||||
|
::
|
||||||
|
[port] "I" (_SFR_IO_ADDR(PORTD)),
|
||||||
|
[bit] "I" (4),
|
||||||
|
[onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
|
||||||
|
[offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void show(void) {
|
||||||
|
_delay_us((RES / 1000UL) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void send_value(uint8_t byte) {
|
||||||
|
for(uint8_t b = 0; b < 8; b++) {
|
||||||
|
send_bit_d4(byte & 0b10000000);
|
||||||
|
byte <<= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send the LED indicators to the WS2811S chips
|
||||||
|
void indicator_leds_set(bool leds[8]) {
|
||||||
|
uint8_t led_cnt;
|
||||||
|
|
||||||
|
cli();
|
||||||
|
for(led_cnt = 0; led_cnt < 8; led_cnt++)
|
||||||
|
send_value(leds[led_cnt] ? 255 : 0);
|
||||||
|
sei();
|
||||||
|
show();
|
||||||
|
}
|
2
keyboards/eagle_viper/v2/indicator_leds.h
Normal file
2
keyboards/eagle_viper/v2/indicator_leds.h
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
void indicator_leds_set(bool leds[8]);
|
||||||
|
void show(void);
|
37
keyboards/eagle_viper/v2/keymaps/default/keymap.c
Normal file
37
keyboards/eagle_viper/v2/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2017 MechMerlin <mechmerlin@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 "eagle_viper.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* layer 0: qwerty */
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
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_NO, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
|
||||||
|
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_NO, KC_RALT, KC_RGUI, KC_RCTL),
|
||||||
|
|
||||||
|
[1] = KEYMAP(\
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
10
keyboards/eagle_viper/v2/keymaps/default/readme.md
Normal file
10
keyboards/eagle_viper/v2/keymaps/default/readme.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Default Eagle Layout
|
||||||
|
|
||||||
|
This is the default implement layout for Duck Eagle V2.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* Default QWERTY layer
|
44
keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c
Normal file
44
keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2017 MechMerlin <mechmerlin@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 "eagle_viper.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* layer 0: qwerty */
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
|
||||||
|
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_NO, KC_RALT, KC_RGUI, KC_RCTL),
|
||||||
|
|
||||||
|
[1] = KEYMAP(\
|
||||||
|
KC_TRNS, 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_TRNS, KC_DEL,
|
||||||
|
RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS,
|
||||||
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_PGDN, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = KEYMAP(\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
15
keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md
Normal file
15
keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
MechMerlin's Duck Eagle V2 Layout
|
||||||
|
======================
|
||||||
|
|
||||||
|
This is the preferred 60% layout used by u/merlin36, host of the MechMerlin YouTube channel.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Keymap Notes
|
||||||
|
- Highly influenced by the KBP V60 and WKL B.Face standard layouts
|
||||||
|
- Does not support any form of inswitch lighting as Merlin hates them.
|
||||||
|
- Arrow toggle switch is FN + Space
|
||||||
|
- Reset is FN + R
|
||||||
|
|
||||||
|
### Build
|
||||||
|
To build this keymap, simply run `make eagle_viper/v2:mechmerlin` from the qmk_firmware directory.
|
40
keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c
Normal file
40
keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/* Copyright 2017 MechMerlin <mechmerlin@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 "eagle_viper.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* layer 0: qwerty */
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
|
||||||
|
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||||
|
KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO),
|
||||||
|
|
||||||
|
[1] = KEYMAP(\
|
||||||
|
KC_TRNS, 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_INS, KC_DEL,
|
||||||
|
KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
|
||||||
|
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, KC_ENT,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
5
keyboards/eagle_viper/v2/keymaps/profanum429/readme.md
Normal file
5
keyboards/eagle_viper/v2/keymaps/profanum429/readme.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Profanum429 Duck Viper V2 Layout
|
||||||
|
TODO
|
||||||
|
|
||||||
|
## Features
|
||||||
|
TODO
|
266
keyboards/eagle_viper/v2/matrix.c
Normal file
266
keyboards/eagle_viper/v2/matrix.c
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 MechMerlin <mechmerlin@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 <util/delay.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static uint8_t read_rows(uint8_t col);
|
||||||
|
static void init_rows(void);
|
||||||
|
static void unselect_cols(void);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_quantum(void) {
|
||||||
|
matrix_init_kb();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_quantum(void) {
|
||||||
|
matrix_scan_kb();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_init_ports(void)
|
||||||
|
{
|
||||||
|
DDRD |= 0b11010000;
|
||||||
|
PORTD &= ~0b01010000;
|
||||||
|
PORTD |= 0b10000000;
|
||||||
|
DDRB |= 0b00011111;
|
||||||
|
PORTB &= ~0b00001110;
|
||||||
|
PORTB |= 0b00010001;
|
||||||
|
DDRE |= 0b01000000;
|
||||||
|
PORTE &= ~0b01000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
backlight_init_ports();
|
||||||
|
unselect_cols();
|
||||||
|
init_rows();
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
|
||||||
|
uint8_t rows = read_rows(col);
|
||||||
|
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = rows & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unselect_cols();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
} else {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row pin configuration
|
||||||
|
* row: 0 1 2 3 4 5
|
||||||
|
* pin: PB7 PD0 PD1 PD2 PD3 PD5
|
||||||
|
*
|
||||||
|
* Esc uses its own pin PE2
|
||||||
|
*/
|
||||||
|
static void init_rows(void) {
|
||||||
|
DDRD &= ~0b00101111;
|
||||||
|
PORTD &= ~0b00101111;
|
||||||
|
|
||||||
|
DDRB &= ~0b10000000;
|
||||||
|
PORTB &= ~0b10000000;
|
||||||
|
|
||||||
|
DDRE &= ~0b00000100;
|
||||||
|
PORTE |= 0b00000100;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8_t read_rows(uint8_t col) {
|
||||||
|
|
||||||
|
return (PIND&(1<<0) ? (1<<0) : 0) |
|
||||||
|
(PIND&(1<<1) ? (1<<1) : 0) |
|
||||||
|
(PIND&(1<<2) ? (1<<2) : 0) |
|
||||||
|
(PIND&(1<<3) ? (1<<3) : 0) |
|
||||||
|
(PIND&(1<<5) ? (1<<4) : 0) |
|
||||||
|
(PINB&(1<<7) ? (1<<5) : 0) |
|
||||||
|
(col==0 ? ((PINE&(1<<2) ? 0 : (1<<2))) : 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t read_fwkey(void)
|
||||||
|
{
|
||||||
|
return PINE&(1<<2) ? 0 : (1<<2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Columns 0 - 15
|
||||||
|
* These columns uses two 74HC237D 3 to 8 bit demultiplexers.
|
||||||
|
* col / pin: PC6 PB6 PF0 PF1 PC7
|
||||||
|
* 0: 1 0 0 0 0
|
||||||
|
* 1: 1 0 1 0 0
|
||||||
|
* 2: 1 0 0 1 0
|
||||||
|
* 3: 1 0 1 1 0
|
||||||
|
* 4: 1 0 0 0 1
|
||||||
|
* 5: 1 0 1 0 1
|
||||||
|
* 6: 1 0 0 1 1
|
||||||
|
* 7: 1 0 1 1 1
|
||||||
|
* 8: 0 1 0 0 0
|
||||||
|
* 9: 0 1 1 0 0
|
||||||
|
* 10: 0 1 0 1 0
|
||||||
|
* 11: 0 1 1 1 0
|
||||||
|
* 12: 0 1 0 0 1
|
||||||
|
* 13: 0 1 1 0 1
|
||||||
|
* 14: 0 1 0 1 1
|
||||||
|
* 15: 0 1 1 1 1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static void unselect_cols(void) {
|
||||||
|
DDRB |= 0b01000000;
|
||||||
|
PORTB &= ~0b01000000;
|
||||||
|
|
||||||
|
DDRC |= 0b11000000;
|
||||||
|
PORTC &= ~0b11000000;
|
||||||
|
|
||||||
|
DDRF |= 0b00000011;
|
||||||
|
PORTF &= ~0b00000011;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
|
||||||
|
switch (col) {
|
||||||
|
case 0:
|
||||||
|
PORTC |= 0b01000000;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PORTC |= 0b01000000;
|
||||||
|
PORTF |= 0b00000001;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
PORTC |= 0b01000000;
|
||||||
|
PORTF |= 0b00000010;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
PORTC |= 0b01000000;
|
||||||
|
PORTF |= 0b00000011;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
PORTC |= 0b11000000;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
PORTC |= 0b11000000;
|
||||||
|
PORTF |= 0b00000001;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
PORTC |= 0b11000000;
|
||||||
|
PORTF |= 0b00000010;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
PORTC |= 0b11000000;
|
||||||
|
PORTF |= 0b00000011;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000001;
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000010;
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000011;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000001;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000010;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
PORTB |= 0b01000000;
|
||||||
|
PORTF |= 0b00000011;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
30
keyboards/eagle_viper/v2/readme.md
Normal file
30
keyboards/eagle_viper/v2/readme.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Duck Eagle/Viper V2
|
||||||
|
|
||||||
|
Non official firmware for custom Korean keyboard with 60% key layout made by Duck.
|
||||||
|
Group buy was run November 2016 via [geekhack](https://geekhack.org/index.php?topic=86087.0) with 100 keyboards total.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
Hardware Supported: Duck Eagle/Viper PCB Ver 2.0, Atmega32u4
|
||||||
|
Hardware Availability: Wait until GB of the next revision
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make eagle_viper/v2:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
|
## Hardware Notes
|
||||||
|
|
||||||
|
The Duck Eagle/Viper V2 PCB consists of:
|
||||||
|
|
||||||
|
### Microchips
|
||||||
|
2 74HC237D 3-to-8 line decoders
|
||||||
|
1 Atmega32u4 microcontroller
|
||||||
|
2 WS2811 LED controller
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Thanks to Ralf Schmitt for previous implementations in his [TMK fork](https://github.com/xauser/tmk_keyboard/tree/xauser/) and few helping words.
|
||||||
|
|
||||||
|
Based heavily on Rasmus Schults [Duck Lightsaver QMK Port](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lightsaver)
|
||||||
|
|
||||||
|
Special thanks to profanum429 for debugging help and contributions to support the Viper and LED indicators.
|
72
keyboards/eagle_viper/v2/rules.mk
Normal file
72
keyboards/eagle_viper/v2/rules.mk
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += indicator_leds.c \
|
||||||
|
matrix.c
|
65
keyboards/eagle_viper/v2/v2.c
Normal file
65
keyboards/eagle_viper/v2/v2.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/* Copyright 2017 MechMerlin <mechmerlin@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 "v2.h"
|
||||||
|
#include "indicator_leds.h"
|
||||||
|
|
||||||
|
enum BACKLIGHT_AREAS {
|
||||||
|
BACKLIGHT_ALPHAS = 0b00000010,
|
||||||
|
BACKLIGHT_MODNUM = 0b00001000
|
||||||
|
};
|
||||||
|
|
||||||
|
void backlight_set(uint8_t level) {
|
||||||
|
switch(level) {
|
||||||
|
case 0:
|
||||||
|
PORTB |= BACKLIGHT_ALPHAS;
|
||||||
|
PORTB |= BACKLIGHT_MODNUM;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PORTB &= ~BACKLIGHT_ALPHAS;
|
||||||
|
PORTB |= BACKLIGHT_MODNUM;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
PORTB |= BACKLIGHT_ALPHAS;
|
||||||
|
PORTB &= ~BACKLIGHT_MODNUM;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
PORTB &= ~BACKLIGHT_ALPHAS;
|
||||||
|
PORTB &= ~BACKLIGHT_MODNUM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Port from backlight_update_state
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
bool status[8] = {
|
||||||
|
host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK), /* LED 3 */
|
||||||
|
host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK), /* LED 2 */
|
||||||
|
host_keyboard_leds() & (1<<USB_LED_NUM_LOCK), /* LED 1 */
|
||||||
|
|
||||||
|
layer_state & (1<<2), /* LED 6 */
|
||||||
|
layer_state & (1<<1), /* LED 5 */
|
||||||
|
layer_state & (1<<0) ? 0: 1, /* LED 4 */
|
||||||
|
|
||||||
|
layer_state & (1<<5), /* LED 8 */
|
||||||
|
layer_state & (1<<4) /* LED 7 */
|
||||||
|
};
|
||||||
|
|
||||||
|
indicator_leds_set(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
34
keyboards/eagle_viper/v2/v2.h
Normal file
34
keyboards/eagle_viper/v2/v2.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/* Copyright 2017 MechMerlin <mechmerlin@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/>.
|
||||||
|
*/
|
||||||
|
#ifndef V2_H
|
||||||
|
#define V2_H
|
||||||
|
|
||||||
|
#include "../eagle_viper.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, \
|
||||||
|
K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \
|
||||||
|
K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2O, \
|
||||||
|
K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1M, K1N, K1O, \
|
||||||
|
K0A, K0B, K0C, K0J, K0K, K0L, K0M, K0N, K0O \
|
||||||
|
) { \
|
||||||
|
{ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, }, \
|
||||||
|
{ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, KC_NO, K3O, }, \
|
||||||
|
{ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, KC_NO, K2O, }, \
|
||||||
|
{ K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, }, \
|
||||||
|
{ K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O } \
|
||||||
|
}
|
||||||
|
#endif
|
@@ -12,6 +12,8 @@ extern inline void ergodox_right_led_2_off(void);
|
|||||||
extern inline void ergodox_right_led_3_off(void);
|
extern inline void ergodox_right_led_3_off(void);
|
||||||
extern inline void ergodox_right_led_off(uint8_t led);
|
extern inline void ergodox_right_led_off(uint8_t led);
|
||||||
|
|
||||||
|
extern inline void ergodox_led_all_off(void);
|
||||||
|
|
||||||
void ergodox_led_init(void);
|
void ergodox_led_init(void);
|
||||||
void ergodox_blink_all_leds(void);
|
void ergodox_blink_all_leds(void);
|
||||||
|
|
||||||
|
315
keyboards/ergodox_infinity/keymaps/gordon/keymap.c
Normal file
315
keyboards/ergodox_infinity/keymaps/gordon/keymap.c
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "process_keycode/process_tap_dance.h"
|
||||||
|
#include "gordon.h"
|
||||||
|
|
||||||
|
#include "keymap_german.h"
|
||||||
|
|
||||||
|
#include "keymap_nordic.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TLSLSH M(TIL_SLASH)
|
||||||
|
#define F1_F13 TD(F1F13)
|
||||||
|
#define F2_F14 TD(F2F14)
|
||||||
|
#define F5_F15 TD(F5F15)
|
||||||
|
#define F4_ALTF4 TD(ALTF4)
|
||||||
|
#define END_ESC TD(ENDESC)
|
||||||
|
#define SHF6_AF7 TD(F6F7)
|
||||||
|
#define F12_RUN TD(F12ETAPS)
|
||||||
|
#define COMMA_TD TD(COMMA)
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
RGB_SLD,
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap dance enums
|
||||||
|
enum {
|
||||||
|
F12TAP = 0,
|
||||||
|
F12ETAPS,
|
||||||
|
CALCCOMP,
|
||||||
|
REFRESH, //send R, or Control+R if double tapped.
|
||||||
|
ENDESC,
|
||||||
|
XESC, //'quad function'. x, control, escape, alt
|
||||||
|
ALY2, //'quad function': a, Hyper, ctrl+a, layer 2
|
||||||
|
PRLOCK,
|
||||||
|
F6F7, // Shift F6 or Alt F7
|
||||||
|
TABCOMBO,
|
||||||
|
FCTRL,
|
||||||
|
F3D,
|
||||||
|
ALTF4,
|
||||||
|
COMMA,
|
||||||
|
AT,
|
||||||
|
HTAB,
|
||||||
|
F1F13,
|
||||||
|
F2F14,
|
||||||
|
F5F15
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Custom tapping terms for each key.
|
||||||
|
// Requires changes to action_taping.c
|
||||||
|
/* uint16_t get_tapping_term(keyevent_t* event) {
|
||||||
|
uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key);
|
||||||
|
if (keycode == LT(3,KC_E) ) {
|
||||||
|
return TAPPING_TERM + 50;
|
||||||
|
}
|
||||||
|
return TAPPING_TERM;
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
// Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
// simple tap dance
|
||||||
|
[F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))),
|
||||||
|
[REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)),
|
||||||
|
[ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC),
|
||||||
|
[CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER),
|
||||||
|
[ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)),
|
||||||
|
[F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)),
|
||||||
|
[F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13),
|
||||||
|
[F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14),
|
||||||
|
[F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15),
|
||||||
|
[TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset),
|
||||||
|
[F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset),
|
||||||
|
[COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset),
|
||||||
|
[HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
//**************************FIRST LAYER - LAYER ZERO **************************************
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
|
||||||
|
SHF6_AF7, F1_F13, F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11,
|
||||||
|
________, KC_Q, CTR_SH_W, NAV_E, CTR_AL_R, KC_T, PRINTSCR,
|
||||||
|
KC_TAB, KC_A, MEH_S, NUMPAD_D, CTRL_F, WIN_G,
|
||||||
|
ALT_SHFT, CTRL_Z, HYPER_X, MOUSE_C, ALT_V, KC_B, TT(_MOUSE),
|
||||||
|
KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT,
|
||||||
|
|
||||||
|
KC_INSERT, KC_DELETE,
|
||||||
|
ALT_HOME,
|
||||||
|
KC_LSHIFT, SYMB_BSP, END_ESC,
|
||||||
|
|
||||||
|
F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP),
|
||||||
|
________, KC_Y, KC_U, KC_I, KC_O, KC_P, ________,
|
||||||
|
WIN_H, CTRL_J, KC_K, MEH_L, COL_MOUS, ________,
|
||||||
|
KC_LEAD, KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, TD(TABCOMBO),
|
||||||
|
KC_UP, KC_DOWN, KC_ESC, KC_TILD, KC_UNDS,
|
||||||
|
|
||||||
|
KC_ESCAPE, KC_DELETE,
|
||||||
|
ALT_T(KC_PGUP),
|
||||||
|
RCTL_T(KC_PGDOWN), LT(_NAV,KC_ENTER), SPAC_SYM),
|
||||||
|
|
||||||
|
|
||||||
|
//**************************SYMBOLS LAYER**************************
|
||||||
|
[_SYMBOLS] = KEYMAP(
|
||||||
|
________, ________, ________, ________, ________, ________, ________,
|
||||||
|
________, TLSLSH, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________,
|
||||||
|
________, KC_EXLM, KC_PIPE, KC_LPRN, KC_RPRN, M(DEREF),
|
||||||
|
________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________,
|
||||||
|
________, M(TICK3), ________, ________, ________,
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,________,
|
||||||
|
|
||||||
|
|
||||||
|
________, ________, ________, ________, ________, ________, NUMLOCK,
|
||||||
|
________, TLSLSH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK,
|
||||||
|
M(EQRIGHT), KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________,
|
||||||
|
________, KC_PIPE, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________,
|
||||||
|
________,________,________,M(TILD3),________,
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,________),
|
||||||
|
|
||||||
|
//**************************MOUSE MOVEMENT LAYER**************************
|
||||||
|
[_MOUSE] = KEYMAP(RESET,________,________,________,________,________,________,
|
||||||
|
RESET,________,________,KC_MS_UP,________,KC_MS_WH_UP,CALTDEL,
|
||||||
|
________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN,
|
||||||
|
KC_SECRET_1,________,HYPR(KC_F13),________,HYPR(KC_F14),KC_SECRET_2,________,
|
||||||
|
________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT,
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
KC_MS_BTN1,KC_MS_BTN2,________,
|
||||||
|
|
||||||
|
|
||||||
|
________,________,________,________,________,________,________,
|
||||||
|
KC_MS_WH_UP,________,________,KC_UP,________,________,________,
|
||||||
|
________,KC_LEFT,KC_DOWN,KC_RIGHT,________,________,
|
||||||
|
KC_MS_WH_DOWN,________,KC_PGUP,KC_PGDOWN,KC_MEDIA_NEXT_TRACK,________,________,
|
||||||
|
KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_MEDIA_PLAY_PAUSE,________,
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,KC_WWW_BACK),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************WINDOWS NAVIGATION LAYER**************************
|
||||||
|
|
||||||
|
[_NAV] = KEYMAP(________,________,________,________,________,________,________,
|
||||||
|
________,________,SNAPLEFT,________,SNAPRGHT,LALT(KC_LEFT),________,
|
||||||
|
________,LCTL(KC_W),PREVTAB,LGUI(KC_D),NEXTTAB,________,
|
||||||
|
________,________,WORKLEFT,________,WORKRIGHT,________,________,
|
||||||
|
________,________,________,________,________,
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,________,
|
||||||
|
|
||||||
|
|
||||||
|
________,________,________,________,________,________,________,
|
||||||
|
________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________,
|
||||||
|
________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________,
|
||||||
|
________,________,________,________,________,________,________,
|
||||||
|
________,________,________,________,________,
|
||||||
|
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,________),
|
||||||
|
|
||||||
|
//****************************NUMPAD LAYER****************************
|
||||||
|
[_NUMPAD] = KEYMAP(________,________,________,________,________,________,________,
|
||||||
|
________,________,________,________,________,________,________,
|
||||||
|
________,________,________,________,________,________,
|
||||||
|
________,________,________,________,________,________,________,
|
||||||
|
________,________,________,________,________,
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,________,
|
||||||
|
|
||||||
|
BL_TOGG ,BL_STEP ,________,________,________,________,________,
|
||||||
|
________,________,KC_7 ,KC_8 ,KC_9 ,________,________,
|
||||||
|
________,KC_4 ,KC_5 ,KC_6 ,________,________,
|
||||||
|
________,________,KC_1 ,KC_2 ,KC_3 ,________,________,
|
||||||
|
KC_0 ,KC_0 , KC_DOT ,________,________,
|
||||||
|
|
||||||
|
________,________,
|
||||||
|
________,
|
||||||
|
________,________,KC_0),
|
||||||
|
//****************************TEXT/INTELLIJ NAVIGATION LAYER****************************
|
||||||
|
[_TEXTNAV] = KEYMAP(________,________,________,________,________,________,________,
|
||||||
|
________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________,
|
||||||
|
________,LALT(KC_F7),LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)),
|
||||||
|
________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________,________,________,________,________,________,________,________,________,________,LCTL(KC_DELETE),________,LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)),________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)),LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(1)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case INFOQM: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case TIL_SLASH: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING ("~/.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case DEREF: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING ("->");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case EQRIGHT: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING ("=>");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case TICK3: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING ("```");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case TILD3: {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING ("~~~");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case ALTTAB_START: {
|
||||||
|
register_code(KC_LALT);
|
||||||
|
layer_on(8);
|
||||||
|
}
|
||||||
|
|
||||||
|
case ALTTAB_END: {
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
layer_off(8);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_on();
|
||||||
|
ergodox_led_all_on();
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
case _SYMBOLS:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case _MOUSE:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case _NUMPAD:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case _NAV:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
356
keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c
Normal file
356
keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c
Normal file
@@ -0,0 +1,356 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#define QWERTY 0 // qwerty layer
|
||||||
|
#define HALFQWERTY 1 // mirrored qwerty layer
|
||||||
|
#define DVORAK 2 // dvorak layer
|
||||||
|
#define HALFDVORAK 3 // mirrored dvorak layer
|
||||||
|
#define SYMB 5 // symbols
|
||||||
|
#define MDIA 6 // media keys
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
RGB_SLD
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: qwerty
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Alt | LGui | | RGui |Alt |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* |mirror|ace | End | | PgDn | |mirror|
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[QWERTY] = LAYOUT_ergodox( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, BL_ON,
|
||||||
|
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
|
||||||
|
KC_LALT, TG(DVORAK),
|
||||||
|
KC_HOME,
|
||||||
|
LT(HALFQWERTY, KC_SPACE),KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT,
|
||||||
|
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
|
||||||
|
TG(DVORAK), KC_RALT,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT)
|
||||||
|
),
|
||||||
|
/* Keymap 1: mirrored qwerty
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | \ | P | O | I | U | Y | L1 | | L1 | T | R | E | W | Q | TAB |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Alt | LGui | | RGui |Alt |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* |mirror|ace | End | | PgDn | |mirror|
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_LEFT,
|
||||||
|
KC_TAB, KC_P, KC_O, KC_I, KC_U, KC_Y, TG(SYMB),
|
||||||
|
KC_BSPC, KC_SCLN, KC_L, KC_K, KC_J, KC_H,
|
||||||
|
KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_TRANSPARENT,
|
||||||
|
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
|
||||||
|
KC_LALT, KC_TRANSPARENT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_TRANSPARENT,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC,
|
||||||
|
TG(SYMB), KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS,
|
||||||
|
KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT,
|
||||||
|
MEH_T(KC_NO),KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT,
|
||||||
|
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
|
||||||
|
KC_TRANSPARENT, KC_RALT,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, KC_TRANSPARENT
|
||||||
|
),
|
||||||
|
/* Keymap 3: dvorak
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | TAB | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | A | O | E | U | I |------| |------| D | H | T | S | - |ENTER |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Alt | LGui | | RGui |Alt |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* |mirror|ace | End | | PgDn | |mirror|
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[DVORAK] = LAYOUT_ergodox( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, TG(SYMB),
|
||||||
|
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO),
|
||||||
|
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
|
||||||
|
KC_LALT, KC_TRANSPARENT,
|
||||||
|
KC_HOME,
|
||||||
|
LT(HALFDVORAK, KC_SPACE),KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
TG(SYMB), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
|
||||||
|
KC_D, KC_H, KC_T, KC_S, KC_MINUS, KC_ENT,
|
||||||
|
MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||||
|
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
|
||||||
|
KC_TRANSPARENT, KC_RALT,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT)
|
||||||
|
),
|
||||||
|
/* Keymap 3: mirrored dvorak
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | TAB | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | / |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | - | S | T | H | D |------| |------| I | U | E | O | A |ENTER |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Alt | LGui | | RGui |Alt |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* |mirror|ace | End | | PgDn | |mirror|
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, TG(SYMB),
|
||||||
|
KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D,
|
||||||
|
KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, ALL_T(KC_NO),
|
||||||
|
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
|
||||||
|
KC_LALT, KC_TRANSPARENT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_TRANSPARENT,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC,
|
||||||
|
TG(SYMB), KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB,
|
||||||
|
KC_I, KC_U, KC_E, KC_O, KC_A, KC_ENT,
|
||||||
|
MEH_T(KC_NO),KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT,
|
||||||
|
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
|
||||||
|
KC_TRANSPARENT, KC_RALT,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, KC_TRANSPARENT
|
||||||
|
),
|
||||||
|
/* Keymap 5: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | EPRM | | | | | | | . | 0 | = | |
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* |Animat| | |Toggle|Solid |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||||
|
* |ness- |ness+ |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = LAYOUT_ergodox(
|
||||||
|
// left hand
|
||||||
|
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||||
|
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
RGB_MOD,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
RGB_VAD,RGB_VAI,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
RGB_TOG, RGB_SLD,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, RGB_HUD, RGB_HUI
|
||||||
|
),
|
||||||
|
/* Keymap 6: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = LAYOUT_ergodox(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WBAK
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) { // For resetting EEPROM
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
// dynamically generate these.
|
||||||
|
case EPRM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGB_SLD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@@ -62,8 +62,8 @@ void matrix_init(void)
|
|||||||
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
|
||||||
memset(matrix, 0, MATRIX_ROWS);
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
|
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "GH60",
|
"keyboard_name": "GH60",
|
||||||
"identifier": "FEED:6060:0001",
|
"identifier": "FEED:6060:0001",
|
||||||
"layout": {
|
"layouts": {
|
||||||
"LAYOUT_60_ansi": {
|
"LAYOUT_60_ansi": {
|
||||||
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":14, "y":0, "label":"Backspace", "w":2}, {"x":0.5, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":14, "y":1, "label":"|", "w":1.5}, {"x":0.75, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":14, "y":2, "label":"Enter", "w":2.25}, {"x":1.25, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":14, "y":3, "label":"Shift", "w":2.75}, {"x":0.25, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.5, "y":4, "label":"Win", "w":1.25}, {"x":2.75, "y":4, "label":"Alt", "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "label":"Alt", "w":1.25}, {"x":11.5, "y":4, "label":"Win", "w":1.25}, {"x":12.75, "y":4, "label":"Menu", "w":1.25}, {"x":14, "y":4, "label":"Ctrl", "w":1.25}]
|
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
|
61
keyboards/gherkin/keymaps/wanleg/config.h
Normal file
61
keyboards/gherkin/keymaps/wanleg/config.h
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER 40 Percent Club
|
||||||
|
#define PRODUCT Gherkin
|
||||||
|
#define DESCRIPTION A 30 key ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
/*tap dance definition */
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 0
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
221
keyboards/gherkin/keymaps/wanleg/keymap.c
Normal file
221
keyboards/gherkin/keymaps/wanleg/keymap.c
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
/* Copyright 2017 Brian Fong
|
||||||
|
*
|
||||||
|
* 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 "gherkin.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QW 0
|
||||||
|
#define DIR 1
|
||||||
|
#define NUM 2
|
||||||
|
#define ETC 3
|
||||||
|
|
||||||
|
|
||||||
|
/////////////// TAP DANCE SECTION START ///////////////
|
||||||
|
//Tap Dance Declarations (list of my tap dance configurations)
|
||||||
|
enum {
|
||||||
|
TD_SFT_CAPS = 0
|
||||||
|
,TD_Q_ESC
|
||||||
|
,ENT_TAP_DANCE
|
||||||
|
,DEL_TAP_DANCE
|
||||||
|
};
|
||||||
|
|
||||||
|
///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION START /////
|
||||||
|
///// (no need to edit this section) /////
|
||||||
|
//Enums used to clearly convey the state of the tap dance
|
||||||
|
enum {
|
||||||
|
SINGLE_TAP = 1,
|
||||||
|
SINGLE_HOLD = 2,
|
||||||
|
DOUBLE_TAP = 3,
|
||||||
|
DOUBLE_HOLD = 4,
|
||||||
|
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
|
||||||
|
// Add more enums here if you want for triple, quadruple, etc.
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool is_press_action;
|
||||||
|
int state;
|
||||||
|
} tap;
|
||||||
|
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||||
|
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||||
|
if (state->interrupted) return SINGLE_TAP;
|
||||||
|
else return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||||
|
//with single tap.
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return DOUBLE_HOLD;
|
||||||
|
else return DOUBLE_TAP;
|
||||||
|
}
|
||||||
|
else return 6; //magic number. At some point this method will expand to work for more presses
|
||||||
|
}
|
||||||
|
///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION END /////
|
||||||
|
///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION START /////
|
||||||
|
//instantialize an instance of 'tap' for the 'ENT' tap dance.
|
||||||
|
static tap ENTtap_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
void ENT_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
ENTtap_state.state = cur_dance(state);
|
||||||
|
switch (ENTtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code(KC_SPC); break;
|
||||||
|
case SINGLE_HOLD: register_code(KC_LSFT); break;
|
||||||
|
case DOUBLE_TAP: register_code(KC_ENT); break;
|
||||||
|
case DOUBLE_HOLD: register_code(KC_NO); break; // setting double hold to do nothing (change this if you want)
|
||||||
|
case DOUBLE_SINGLE_TAP: register_code(KC_SPC); unregister_code(KC_SPC); register_code(KC_SPC);
|
||||||
|
//Last case is for fast typing. Assuming your key is `f`:
|
||||||
|
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||||
|
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ENT_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (ENTtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code(KC_SPC); break;
|
||||||
|
case SINGLE_HOLD: unregister_code(KC_LSFT); break;
|
||||||
|
case DOUBLE_TAP: unregister_code(KC_ENT); break;
|
||||||
|
case DOUBLE_HOLD: unregister_code(KC_NO);
|
||||||
|
case DOUBLE_SINGLE_TAP: unregister_code(KC_SPC);
|
||||||
|
}
|
||||||
|
ENTtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//instanalize an instance of 'tap' for the 'DEL' tap dance.
|
||||||
|
static tap DELtap_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
void DEL_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
DELtap_state.state = cur_dance(state);
|
||||||
|
switch (DELtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code(KC_BSPC); break;
|
||||||
|
case SINGLE_HOLD: register_code(KC_LCTL); break;
|
||||||
|
case DOUBLE_TAP: register_code(KC_DEL); break;
|
||||||
|
case DOUBLE_HOLD: register_code(KC_NO); break;
|
||||||
|
case DOUBLE_SINGLE_TAP: register_code(KC_BSPC); unregister_code(KC_BSPC); register_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DEL_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (DELtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code(KC_BSPC); break;
|
||||||
|
case SINGLE_HOLD: unregister_code(KC_LCTL); break;
|
||||||
|
case DOUBLE_TAP: unregister_code(KC_DEL); break;
|
||||||
|
case DOUBLE_HOLD: unregister_code(KC_NO);
|
||||||
|
case DOUBLE_SINGLE_TAP: unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
DELtap_state.state = 0;
|
||||||
|
}
|
||||||
|
///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION END /////
|
||||||
|
|
||||||
|
//Tap Dance Definitions
|
||||||
|
//THIS SECTION HAS TO BE AT THE END OF THE TAP DANCE SECTION
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
|
||||||
|
// Other declarations would go here, separated by commas, if you have them
|
||||||
|
,[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
|
||||||
|
,[ENT_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ENT_finished, ENT_reset)
|
||||||
|
,[DEL_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, DEL_finished, DEL_reset)
|
||||||
|
};
|
||||||
|
|
||||||
|
//In Layer declaration, add tap dance item in place of a key code
|
||||||
|
//TD(TD_SFT_CAPS)
|
||||||
|
|
||||||
|
///////////// TAP DANCE SECTION END ///////////////
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* .-----------------------------------------------------------------------------------------.
|
||||||
|
* | Q//ESC | W | E | R | T | Y | U | I | O | P |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | A | S | D | F | G | H | J | K | L | ENTER |
|
||||||
|
* | | | | | | | | | |SFThold |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC |
|
||||||
|
* | SFThold| | | | | | | | |CTRLhold|
|
||||||
|
* '-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QW] = KEYMAP( /* Qwerty*/
|
||||||
|
TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC),
|
||||||
|
SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC)
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
///*
|
||||||
|
// * Directional Modifiers
|
||||||
|
// * .-----------------------------------------------------------------------------------------.
|
||||||
|
// * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | | | | | | | | | ALT | / |
|
||||||
|
// * '-----------------------------------------------------------------------------------------'
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
[DIR] = KEYMAP( /* Directional Modifiers */
|
||||||
|
KC_TAB, KC_UP, KC_TRNS, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL ,
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC ,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_SLSH
|
||||||
|
),
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// * Numbers
|
||||||
|
// * .-----------------------------------------------------------------------------------------.
|
||||||
|
// * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BKSC |
|
||||||
|
// * | | | | | | | | | |CTRLhold|
|
||||||
|
// * '-----------------------------------------------------------------------------------------'
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
[NUM] = KEYMAP ( /* Numbers */
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||||
|
KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC)
|
||||||
|
),
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// * ETC
|
||||||
|
// * .-----------------------------------------------------------------------------------------.
|
||||||
|
// * | ` | | | | | | | | | \ |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | CAPS | P-Brk | | | | | | | ; | ' |
|
||||||
|
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
// * | SHIFT | | | | | C-A-D | | GUI | | DEL |
|
||||||
|
// * '-----------------------------------------------------------------------------------------'
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
[ETC] = KEYMAP( /* ETC */
|
||||||
|
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS ,
|
||||||
|
KC_CAPS, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT ,
|
||||||
|
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(LCTL(KC_DEL)), KC_TRNS, KC_RGUI, KC_TRNS, KC_DEL
|
||||||
|
),
|
||||||
|
};
|
12
keyboards/gherkin/keymaps/wanleg/readme.md
Normal file
12
keyboards/gherkin/keymaps/wanleg/readme.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Gherkin Wanleg Layout
|
||||||
|
|
||||||
|
Here is the layout I came up with to preserve a standard QWERTY layout as much as possible, in as few layers as possible for a 30 key board.
|
||||||
|
I originally set up a few Tap Dance keys, but eventually dropped most of them in favor of chorded versions, since in actual use, they tended to impede typing speed more than their (current) two-key versions.
|
||||||
|
I've left them in my layout ready for use if anyone wants to try them out:
|
||||||
|
Single tap - Double tap - Hold
|
||||||
|
space - enter - shift
|
||||||
|
backspace - delete - control
|
||||||
|
shift - caps lock - XXXX
|
||||||
|
KC_Q - escape - XXXX
|
63
keyboards/gherkin/keymaps/wanleg/rules.mk
Normal file
63
keyboards/gherkin/keymaps/wanleg/rules.mk
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
TAP_DANCE_ENABLE = yes # Enable Tap Dance (comment if not being implemented)
|
@@ -60,8 +60,8 @@ void matrix_init(void)
|
|||||||
palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
#endif
|
#endif
|
||||||
memset(matrix, 0, MATRIX_ROWS);
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
memset(matrix_debouncing, 0, MATRIX_ROWS);
|
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
}
|
||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
|
1
keyboards/jc65/keymaps/coth/config.h
Normal file
1
keyboards/jc65/keymaps/coth/config.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "../../config.h"
|
25
keyboards/jc65/keymaps/coth/keymap.c
Normal file
25
keyboards/jc65/keymaps/coth/keymap.c
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include "jc65.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LALT, KC_LCTL, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, MO(1), KC_NO, MO(2), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = KEYMAP(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_BTN2, KC_MS_U, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_END, KC_DEL, KC_TRNS,
|
||||||
|
KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_VOLU,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||||
|
),
|
||||||
|
[2] = KEYMAP(
|
||||||
|
RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_MOD, RGB_RMOD, BL_STEP, BL_TOGG, KC_TRNS, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
14
keyboards/jc65/keymaps/coth/readme.md
Normal file
14
keyboards/jc65/keymaps/coth/readme.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
ChildoftheHorn's Keymap
|
||||||
|
===
|
||||||
|
|
||||||
|
Layer 1: "HHKB Mac" Split backspace, 6.25u space, caps is cntl
|
||||||
|
|
||||||
|
Layer 2: V60++ with mouse controls on WASD
|
||||||
|
|
||||||
|
Layer 3: RGB control on number row, LED controls, and Reset
|
||||||
|
|
||||||
|
Keymap Maintainer: [Stacy Devino](https://github.com/childofthehorn)
|
||||||
|
|
||||||
|
Difference from base layout: Primarily the HHKB-ness
|
||||||
|
|
||||||
|
Intended usage: Daily driver for programming
|
0
keyboards/jc65/keymaps/coth/rules.mk
Normal file
0
keyboards/jc65/keymaps/coth/rules.mk
Normal file
@@ -50,13 +50,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
// action_function_tap may also handle this...
|
// action_function_tap may also handle this...
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_speed_set(3);
|
breathing_period_set(3);
|
||||||
breathing_enable();
|
breathing_enable();
|
||||||
layer_on(1);
|
layer_on(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
breathing_speed_set(1);
|
breathing_period_set(1);
|
||||||
breathing_self_disable();
|
breathing_self_disable();
|
||||||
layer_off(1);
|
layer_off(1);
|
||||||
}
|
}
|
||||||
@@ -64,13 +64,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
case M_LAYER2:
|
case M_LAYER2:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_speed_set(2);
|
breathing_period_set(2);
|
||||||
breathing_pulse();
|
breathing_pulse();
|
||||||
layer_on(2);
|
layer_on(2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
breathing_speed_set(1);
|
breathing_period_set(1);
|
||||||
breathing_self_disable();
|
breathing_self_disable();
|
||||||
layer_off(2);
|
layer_off(2);
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
@@ -39,6 +41,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|
||||||
|
/* RGB underglow */
|
||||||
|
// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
|
||||||
|
// The same pin is used on the JJ40, at least.
|
||||||
|
#define RGBLED_NUM 5
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
/* key combination for command */
|
/* key combination for command */
|
||||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
||||||
|
@@ -22,19 +22,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#include "i2c.h"
|
||||||
|
|
||||||
|
// custom RGB driver
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
void rgblight_set(void) {
|
||||||
|
if (!rgblight_config.enable) {
|
||||||
|
for (uint8_t i=0; i<RGBLED_NUM; i++) {
|
||||||
|
led[i].r = 0;
|
||||||
|
led[i].g = 0;
|
||||||
|
led[i].b = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i2c_init();
|
||||||
|
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
/* Nothing to do here... yet */
|
rgblight_task();
|
||||||
}
|
/* Nothing else for now. */
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
|
|
||||||
// Call the keymap level matrix init.
|
|
||||||
matrix_init_user();
|
|
||||||
|
|
||||||
// Set our LED pins as output
|
|
||||||
DDRB |= (1<<6);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
}
|
}
|
@@ -65,6 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
{ K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
|
{ K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define KEYMAP KEYMAP_OFFSET
|
#define KEYMAP KEYMAP_MIT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -11,7 +11,11 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||||
|
DISABLE_WS2812 = yes
|
||||||
|
|
||||||
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
85
keyboards/jj40/keymaps/krusli/keymap.c
Normal file
85
keyboards/jj40/keymaps/krusli/keymap.c
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@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 "jj40.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP( \
|
||||||
|
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_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP( \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,_______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | RGB | RGB | RGB | RGB |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | RGB | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = KEYMAP( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \
|
||||||
|
_______, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
)
|
||||||
|
};
|
2
keyboards/jj40/keymaps/krusli/readme.md
Normal file
2
keyboards/jj40/keymaps/krusli/readme.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# krusli
|
||||||
|
Default JJ40 keymap, adapted with RGB underglow support. GUI and LAlt is also swapped.
|
@@ -37,8 +37,11 @@ EXTRAKEY_ENABLE = yes
|
|||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
|
||||||
RGBLIGHT_CUSTOM_DRIVER = no
|
RGBLIGHT_ENABLE = yes
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||||
|
DISABLE_WS2812 = yes # TODO check if this is necessary
|
||||||
|
|
||||||
KEY_LOCK_ENABLE = yes
|
KEY_LOCK_ENABLE = yes
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
@@ -118,7 +118,8 @@ section at the end of this file).
|
|||||||
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
|
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
|
||||||
* device is powered from the USB bus.
|
* device is powered from the USB bus.
|
||||||
*/
|
*/
|
||||||
#define USB_CFG_MAX_BUS_POWER 500
|
// max power draw with maxed white underglow measured at 120 mA (peaks)
|
||||||
|
#define USB_CFG_MAX_BUS_POWER 150
|
||||||
/* Set this variable to the maximum USB bus power consumption of your device.
|
/* Set this variable to the maximum USB bus power consumption of your device.
|
||||||
* The value is in milliamperes. [It will be divided by two since USB
|
* The value is in milliamperes. [It will be divided by two since USB
|
||||||
* communicates power requirements in units of 2 mA.]
|
* communicates power requirements in units of 2 mA.]
|
||||||
|
@@ -49,8 +49,8 @@ void matrix_init(void)
|
|||||||
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
|
||||||
memset(matrix, 0, MATRIX_ROWS);
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
memset(matrix_debouncing, 0, MATRIX_ROWS);
|
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t matrix_scan(void)
|
uint8_t matrix_scan(void)
|
||||||
|
@@ -42,8 +42,8 @@ void matrix_init(void)
|
|||||||
palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
|
||||||
memset(matrix, 0, MATRIX_ROWS);
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
memset(matrix_debouncing, 0, MATRIX_ROWS);
|
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
13
keyboards/kc60/info.json
Normal file
13
keyboards/kc60/info.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "KC60",
|
||||||
|
"manufacturer": "NKPC",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"KEYMAP": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":14, "y":0, "w":2}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":14, "y":3, "w":2.75}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
* | Esc | A | R | S | T | D | H | N | E | I | O | ' |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Dvorak
|
/* Dvorak
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
* | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
@@ -124,6 +124,12 @@ uint8_t matrix_cols(void)
|
|||||||
|
|
||||||
void matrix_init(void)
|
void matrix_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef DISABLE_JTAG
|
||||||
|
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
#endif
|
||||||
|
|
||||||
debug_enable = true;
|
debug_enable = true;
|
||||||
debug_matrix = true;
|
debug_matrix = true;
|
||||||
debug_mouse = true;
|
debug_mouse = true;
|
||||||
|
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// wiring of each half
|
// wiring of each half
|
||||||
#define MATRIX_ROW_PINS { B1, B5, E6, B4 }
|
#define MATRIX_ROW_PINS { B1, B5, E6, B4 }
|
||||||
#define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6}
|
#define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6}
|
||||||
// #define MATRIX_COL_PINS { B6, B2, B3, C6, F7, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B6, B2, B3, D7, F7, F4} //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
@@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
)
|
)
|
||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN D4
|
#define RGB_DI_PIN D1
|
||||||
#define RGBLIGHT_TIMER
|
#define RGBLIGHT_TIMER
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
#define ws2812_PORTREG PORTD
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = yes #Don't enable this along with I2C
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#ifndef REV2_H
|
#ifndef SOCKETS_H
|
||||||
#define REV2_H
|
#define SOCKETS_H
|
||||||
|
#define DISABLE_JTAG // The keyboard uses PF4 and PF7, which are used by JTAG.
|
||||||
|
|
||||||
#include "lets_split.h"
|
#include "lets_split.h"
|
||||||
|
|
||||||
|
@@ -1,42 +1,28 @@
|
|||||||
/*
|
/* Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
* Copyright 2018 TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
This program is free software: you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
*This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
You should have received a copy of the GNU General Public License
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define VENDOR_ID 0x20A0
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x422D
|
#define PRODUCT_ID 0xCA40
|
||||||
// TODO: share these strings with usbconfig.h
|
#define MANUFACTURER MECHKEYS
|
||||||
// Edit usbconfig.h to change these.
|
#define PRODUCT Mechmini
|
||||||
#define MANUFACTURER winkeyless.kr
|
#define DESCRIPTION 40% modular keyboard
|
||||||
#define PRODUCT mechmini
|
|
||||||
|
|
||||||
/* matrix size */
|
|
||||||
#define MATRIX_ROWS 8
|
|
||||||
#define MATRIX_COLS 15
|
|
||||||
|
|
||||||
#define RGBLED_NUM 16
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGB_DI_PIN E2
|
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/* key combination for command */
|
|
||||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,45 +1,17 @@
|
|||||||
/*
|
/* Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
* Copyright 2018 TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
This program is free software: you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
*This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
You should have received a copy of the GNU General Public License
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mechmini.h"
|
#include "mechmini.h"
|
||||||
#include "rgblight.h"
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#include "action_layer.h"
|
|
||||||
#include "i2c.h"
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
extern rgblight_config_t rgblight_config;
|
|
||||||
|
|
||||||
void rgblight_set(void) {
|
|
||||||
if (!rgblight_config.enable) {
|
|
||||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
|
||||||
led[i].r = 0;
|
|
||||||
led[i].g = 0;
|
|
||||||
led[i].b = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
i2c_init();
|
|
||||||
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
rgblight_task();
|
|
||||||
}
|
|
||||||
|
@@ -1,42 +1,30 @@
|
|||||||
/*
|
/* Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
* Copyright 2018 TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
This program is free software: you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
*This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
You should have received a copy of the GNU General Public License
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MECHMINI_H
|
#ifndef MECHMINI_H
|
||||||
#define MECHMINI_H
|
#define MECHMINI_H
|
||||||
|
|
||||||
#include "keycode.h"
|
|
||||||
#include "action.h"
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define KEYMAP( \
|
#ifdef KEYBOARD_mechmini_v1
|
||||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, \
|
#include "v1.h"
|
||||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, \
|
#endif
|
||||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, \
|
|
||||||
K00, K10, K20, K56, K57, KB0, KC0, K66 \
|
#ifdef KEYBOARD_mechmini_v2
|
||||||
) \
|
#include "v2.h"
|
||||||
{ \
|
#endif
|
||||||
{ K00, K10, K20, K56, KC_NO, K57, KC_NO, KC_NO, KB0, KC0, K66, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
|
||||||
{ K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
|
||||||
{ K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
|
||||||
{ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, 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, 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,13 +1,21 @@
|
|||||||
mechmini
|
Mechmini
|
||||||
========
|
========
|
||||||
|
|
||||||
A compact ortholinear/staggered keyboard.
|

|
||||||
|
|
||||||
Keyboard Maintainer: QMK Community
|
A 40% compact ortholinear/staggered keyboard.
|
||||||
Hardware Supported: mechmini PCB
|
|
||||||
Hardware Availability: https://mechkeys.ca/collections/keyboards/products/mechmini-2-0-pcb
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Version 1 was originally bootmapper (ps2avrGB) and can be ported to QMK following the v1 readme (../mechmini/v1/readme.md). This version is no longer in production.
|
||||||
|
|
||||||
|
Version 2 (Mechmini 2.0) was shipped powered by QMK [More info on MECHKEYS](https://mechkeys.ca).
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community (version 1) & [TurboMech](https://github.com/TurboMech) (version 2 - aka Mechmini 2.0)
|
||||||
|
|
||||||
|
Hardware Supported: Mechmini keyboard
|
||||||
|
|
||||||
|
Hardware Availability: [MECHKEYS](https://mechkeys.ca/collections/keyboards/products/mechmini-2-0)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment), this will make the Mechmini 2.0 default keymap (split space) - please see v1 readme for v1 make instructions:
|
||||||
|
|
||||||
make mechmini:default
|
make mechmini:default
|
||||||
|
|
||||||
@@ -15,50 +23,6 @@ See [build environment setup](https://docs.qmk.fm/build_environment_setup.html)
|
|||||||
|
|
||||||
## Mechmini Notes
|
## Mechmini Notes
|
||||||
|
|
||||||
Note that this is a complete replacement for the firmware, so you won't be
|
There are 2 versions of the Mechmini keyboard. Please read the readme for the version you have for make instructions.
|
||||||
using Bootmapper Client to change any keyboard settings, since not all the
|
|
||||||
USB report options are supported.
|
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
First, install the requirements. These commands are for OSX, but all you
|
|
||||||
need is the AVR toolchain and `bootloadHID` for flashing:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ brew cask install crosspack-avr
|
|
||||||
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
|
||||||
```
|
|
||||||
|
|
||||||
In order to use the `./program` script, which can reboot the board into
|
|
||||||
the bootloader, you'll need Python 2 with PyUSB installed:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ pip install pyusb
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, with the keyboard plugged in, simply run this command from the
|
|
||||||
`qmk_firmware` directory:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make mechmini:program
|
|
||||||
```
|
|
||||||
|
|
||||||
If you prefer, you can just build it and flash the firmware directly with
|
|
||||||
`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
|
|
||||||
in the bootloader:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make mechmini
|
|
||||||
$ bootloadHID -r mechmini_default.hex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
From my experience, it's really hard to brick these boards. But these
|
|
||||||
tricks have been useful when it got stuck in a weird scenario.
|
|
||||||
|
|
||||||
1. Try plugging the board in while pressing `L_Ctrl`. This will force it
|
|
||||||
to boot only the bootloader without loading the firmware. Once this is
|
|
||||||
done, just reflash the board with the original firmware.
|
|
||||||
2. Sometimes USB hubs can act weird, so try connecting the board directly
|
|
||||||
to your computer or plugging/unplugging the USB hub.
|
|
||||||
|
@@ -1,50 +1 @@
|
|||||||
# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
DEFAULT_FOLDER = mechmini/v2
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
# MCU name
|
|
||||||
MCU = atmega32a
|
|
||||||
PROTOCOL = VUSB
|
|
||||||
|
|
||||||
# unsupported features for now
|
|
||||||
NO_UART = yes
|
|
||||||
NO_SUSPEND_POWER_DOWN = yes
|
|
||||||
|
|
||||||
# processor frequency
|
|
||||||
F_CPU = 12000000
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
|
||||||
BOOTLOADER = atmel-dfu
|
|
||||||
|
|
||||||
# build options
|
|
||||||
BOOTMAGIC_ENABLE = yes
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
EXTRAKEY_ENABLE = yes
|
|
||||||
CONSOLE_ENABLE = yes
|
|
||||||
COMMAND_ENABLE = yes
|
|
||||||
BACKLIGHT_ENABLE = no
|
|
||||||
RGBLIGHT_ENABLE = yes
|
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes
|
|
||||||
|
|
||||||
OPT_DEFS = -DDEBUG_LEVEL=0
|
|
||||||
|
|
||||||
# custom matrix setup
|
|
||||||
CUSTOM_MATRIX = yes
|
|
||||||
SRC = matrix.c i2c.c
|
|
||||||
|
|
||||||
# programming options
|
|
||||||
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
|
|
||||||
|
83
keyboards/mechmini/v1/README.md
Normal file
83
keyboards/mechmini/v1/README.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
Mechmini V1
|
||||||
|
===========
|
||||||
|
|
||||||
|
A 40% ortholinear/staggered keyboard, that was originally bootmapper and can be ported to QMK following this readme. This version is no longer in production [More info on MECHKEYS](https://mechkeys.ca).
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: Mechmini 1 PCB
|
||||||
|
Hardware Availability: Version 1 (Bootmapper) no longer in production [MECHKEYS](https://mechkeys.ca)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make mechmini/v1:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
|
## Mechmini Notes
|
||||||
|
|
||||||
|
Note that this is a complete replacement for the firmware, so you won't be
|
||||||
|
using Bootmapper Client to change any keyboard settings, since not all the
|
||||||
|
USB report options are supported.
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
First, install the requirements. These commands are for OSX, but all you
|
||||||
|
need is the AVR toolchain and `bootloadHID` for flashing:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ brew cask install crosspack-avr
|
||||||
|
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
||||||
|
```
|
||||||
|
|
||||||
|
In order to use the `./program` script, which can reboot the board into
|
||||||
|
the bootloader, you'll need Python 2 with PyUSB installed:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pip install pyusb
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, with the keyboard plugged in, simply run this command from the
|
||||||
|
`qmk_firmware` directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make mechmini:program
|
||||||
|
```
|
||||||
|
|
||||||
|
If you prefer, you can just build it and flash the firmware directly with
|
||||||
|
`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
|
||||||
|
in the bootloader:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make mechmini
|
||||||
|
$ bootloadHID -r mechmini_default.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
From my experience, it's really hard to brick these boards. But these
|
||||||
|
tricks have been useful when it got stuck in a weird scenario.
|
||||||
|
|
||||||
|
1. Try plugging the board in while pressing `L_Ctrl`. This will force it
|
||||||
|
to boot only the bootloader without loading the firmware. Once this is
|
||||||
|
done, just reflash the board with the original firmware.
|
||||||
|
2. Sometimes USB hubs can act weird, so try connecting the board directly
|
||||||
|
to your computer or plugging/unplugging the USB hub.
|
||||||
|
3. If errors happen with
|
||||||
|
`./tmk_core/common/avr/suspend.c` it is likely you implemented a RGB underglow sleep setting previously. Simply comment out the following code found under `void suspend_wakeup_init(void)`:
|
||||||
|
```
|
||||||
|
ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
rgblight_timer_enable();
|
||||||
|
_delay_ms(50);
|
||||||
|
rgblight_set();
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
So that the resulting code should know reflect:
|
||||||
|
```
|
||||||
|
/*#ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
rgblight_timer_enable();
|
||||||
|
_delay_ms(50);
|
||||||
|
rgblight_set();
|
||||||
|
#endif*/
|
||||||
|
```
|
||||||
|
|
||||||
|
|
48
keyboards/mechmini/v1/config.h
Normal file
48
keyboards/mechmini/v1/config.h
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef V1_CONFIG_H
|
||||||
|
#define V1_CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xCA40
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
// TODO: share these strings with usbconfig.h
|
||||||
|
// Edit usbconfig.h to change these.
|
||||||
|
#define MANUFACTURER MECHKEYS
|
||||||
|
#define PRODUCT Mechmini
|
||||||
|
#define DESCRIPTION 40% modular keyboard
|
||||||
|
|
||||||
|
/* matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
#define NO_UART 1
|
||||||
|
|
||||||
|
/* RGB underglow */
|
||||||
|
// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
|
||||||
|
// The same pin is used on the JJ40, at least.
|
||||||
|
#define RGBLED_NUM 16
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
||||||
|
#endif
|
@@ -14,16 +14,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mechmini.h"
|
#include "mechmini.h"
|
||||||
#include "rgblight.h"
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define MAX_BRIGHTNESS 15
|
#define _BL 0 // base layer
|
||||||
#define MAX_BRIGHTNESS_IOS 5 // max brightness suitable for iOS devices
|
#define _FN1 1 // function layer 1
|
||||||
|
#define _FN2 2 // function layer 2
|
||||||
#define _BL 0
|
#define _FN3 3 // function layer 3
|
||||||
#define _FN1 1
|
|
||||||
#define _FN2 2
|
|
||||||
#define _FN3 3
|
|
||||||
#define _____ KC_TRNS
|
#define _____ KC_TRNS
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -52,109 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_____, _____, _____, _____, _____, _____, _____, _____
|
_____, _____, _____, _____, _____, _____, _____, _____
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Blank keymap
|
|
||||||
[0] = KEYMAP(
|
|
||||||
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____
|
|
||||||
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
|
|
||||||
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
|
|
||||||
_____, _____, _____, _____, _____, _____, _____, _____
|
|
||||||
)
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint8_t current_level = 4;
|
|
||||||
int is_on = 0;
|
|
||||||
|
|
||||||
uint8_t r = 0xFF;
|
|
||||||
uint8_t g = 0xFF;
|
|
||||||
uint8_t b = 0xFF;
|
|
||||||
|
|
||||||
uint8_t max_brightness = MAX_BRIGHTNESS_IOS;
|
|
||||||
|
|
||||||
enum macro_id {
|
|
||||||
TOGGLE_RGB,
|
|
||||||
BRIGHTNESS_DOWN,
|
|
||||||
BRIGHTNESS_UP,
|
|
||||||
COLOR_1,
|
|
||||||
COLOR_2,
|
|
||||||
COLOR_3,
|
|
||||||
ENABLE_MAX_BRIGHTNESS
|
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|
||||||
keyevent_t event = record->event;
|
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
case TOGGLE_RGB:
|
|
||||||
if (event.pressed) {
|
|
||||||
if (!is_on) {
|
|
||||||
current_level = 4;
|
|
||||||
is_on = 1;
|
|
||||||
} else {
|
|
||||||
is_on = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case BRIGHTNESS_DOWN:
|
|
||||||
if (event.pressed && current_level > 0) {
|
|
||||||
current_level--;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BRIGHTNESS_UP:
|
|
||||||
if (event.pressed && current_level < max_brightness) {
|
|
||||||
current_level++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case COLOR_1: // set to pink
|
|
||||||
if (event.pressed) {
|
|
||||||
r = 0xFF;
|
|
||||||
g = 0x81;
|
|
||||||
b = 0xC2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case COLOR_2: // set to cyan
|
|
||||||
if (event.pressed) {
|
|
||||||
r = 0x00;
|
|
||||||
g = 0xE0;
|
|
||||||
b = 0xFF;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case COLOR_3: // set to white
|
|
||||||
if (event.pressed) {
|
|
||||||
r = 0xFF;
|
|
||||||
g = 0xFF;
|
|
||||||
b = 0xFF;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case ENABLE_MAX_BRIGHTNESS: // enable all 16 brightness steps
|
|
||||||
if (event.pressed) {
|
|
||||||
max_brightness = MAX_BRIGHTNESS;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return MACRO_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
const uint16_t fn_actions[] PROGMEM = {
|
|
||||||
};
|
|
||||||
|
|
||||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
|
|
||||||
uint8_t dim(uint8_t color, uint8_t opacity) {
|
|
||||||
return ((uint16_t) color * opacity / 0xFF) & 0xFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
void user_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
uint8_t alpha = current_level * 0x11;
|
|
||||||
rgblight_setrgb(dim(r, alpha), dim(g, alpha), dim(b, alpha));
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
if (!is_on) {
|
|
||||||
current_level = 0;
|
|
||||||
user_setrgb(r, g, b);
|
|
||||||
} else {
|
|
||||||
user_setrgb(r, g, b);
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user