mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-16 21:40:53 +00:00
Compare commits
86 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9bfaf66792 | ||
![]() |
f0f991dd89 | ||
![]() |
bceffdefca | ||
![]() |
86225ccc9b | ||
![]() |
13d288116f | ||
![]() |
a9bbf9ee5c | ||
![]() |
ed659aa3a8 | ||
![]() |
b9b67e9614 | ||
![]() |
35b44ac699 | ||
![]() |
61d851af65 | ||
![]() |
7c3d2d5f64 | ||
![]() |
d837ab586a | ||
![]() |
9a91b42e92 | ||
![]() |
c73514a2b7 | ||
![]() |
ac642de9d7 | ||
![]() |
7d8a20b07f | ||
![]() |
894fa0902f | ||
![]() |
a14d539ad6 | ||
![]() |
510a8d3339 | ||
![]() |
2018df1a61 | ||
![]() |
365b863578 | ||
![]() |
5b22ddf526 | ||
![]() |
c776c1ce82 | ||
![]() |
ccaacde4d6 | ||
![]() |
5836d1a06a | ||
![]() |
fd359e23e8 | ||
![]() |
4aef0318aa | ||
![]() |
8209304904 | ||
![]() |
6bbe2366ec | ||
![]() |
3be81a2daf | ||
![]() |
586a5e8d1d | ||
![]() |
383a3c1e08 | ||
![]() |
e2352d4fbf | ||
![]() |
3a2acd4475 | ||
![]() |
ee15d2fe5e | ||
![]() |
a01dc4dd48 | ||
![]() |
4764e77121 | ||
![]() |
cfcf0fd36b | ||
![]() |
dcb2627237 | ||
![]() |
fe8942e55c | ||
![]() |
8e0d9e2637 | ||
![]() |
81ae0fb10e | ||
![]() |
e659bc4467 | ||
![]() |
e3541853a9 | ||
![]() |
0ea6cf719e | ||
![]() |
c9d23f50f6 | ||
![]() |
c5c35f5f4b | ||
![]() |
6b584a23c0 | ||
![]() |
6bb3fbd4e0 | ||
![]() |
9e0b244a34 | ||
![]() |
4b7fcf0af0 | ||
![]() |
22b9303e2a | ||
![]() |
e956c11bc9 | ||
![]() |
cbc5de67be | ||
![]() |
9cb1d36974 | ||
![]() |
0a5d302622 | ||
![]() |
6c24e28b8d | ||
![]() |
d19805f9de | ||
![]() |
4beb5e72f8 | ||
![]() |
5f0a2e078f | ||
![]() |
feac994f6f | ||
![]() |
4931510ad3 | ||
![]() |
d6215ad6af | ||
![]() |
eba4cb7a04 | ||
![]() |
85ea963931 | ||
![]() |
492a16308a | ||
![]() |
17200f4712 | ||
![]() |
eb903c7623 | ||
![]() |
c58921c64c | ||
![]() |
9fc3e26f70 | ||
![]() |
e9f44ee96d | ||
![]() |
9cb80d68e2 | ||
![]() |
4932f9566a | ||
![]() |
97c6b8143c | ||
![]() |
3b9e4967b8 | ||
![]() |
7c57104b51 | ||
![]() |
846598541b | ||
![]() |
c68597d9ad | ||
![]() |
5ffec5d9b0 | ||
![]() |
a8eaf0b666 | ||
![]() |
4f484bc1c9 | ||
![]() |
a1fa70f94d | ||
![]() |
d8f0faabda | ||
![]() |
818042b2c3 | ||
![]() |
8910f9b87e | ||
![]() |
9dd3e08fdd |
@@ -11,7 +11,7 @@ env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
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:
|
||||
- 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"
|
||||
@@ -38,4 +38,4 @@ notifications:
|
||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
|
@@ -113,9 +113,11 @@ endif
|
||||
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
FIRMWARE_FORMAT=bin
|
||||
PLATFORM=CHIBIOS
|
||||
else
|
||||
PLATFORM=AVR
|
||||
FIRMWARE_FORMAT=hex
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
@@ -270,7 +272,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
all: build check-size
|
||||
|
||||
# Change the build target to build a HEX file or a library.
|
||||
build: elf cphex
|
||||
build: elf cpfirmware
|
||||
#build: elf hex eep lss sym
|
||||
#build: lib
|
||||
|
||||
|
@@ -34,7 +34,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
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/luts.c
|
||||
endif
|
||||
@@ -151,6 +155,9 @@ endif
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
|
||||
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`
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* `#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`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
|
@@ -36,7 +36,7 @@ enum my_keycodes {
|
||||
|
||||
## Programming the Behavior of Any Keycode
|
||||
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up to you to send any key up or down events that are required.
|
||||
|
||||
These function are called every time a key is pressed or released.
|
||||
|
||||
|
@@ -127,7 +127,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
## 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
|
||||
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**.
|
||||
|
@@ -110,6 +110,9 @@ Map three keys temporarily in your keymap:
|
||||
| KC_ASDN | Lower the Auto Shift timeout variable (down) |
|
||||
| KC_ASUP | Raise the Auto Shift timeout variable (up) |
|
||||
| KC_ASRP | Report your current Auto Shift timeout value |
|
||||
| KC_ASON | Turns on the Auto Shift Function |
|
||||
| KC_ASOFF | Turns off the Auto Shift Function |
|
||||
| KC_ASTG | Toggles the statn of the Auto Shift feature |
|
||||
|
||||
Compile and upload your new firmware.
|
||||
|
||||
|
@@ -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_STEP`|Cycle through backlight levels |
|
||||
|`BL_x` |Set a specific backlight level between 0-9|
|
||||
|`BL_ON` |An alias for `BL_9` |
|
||||
|`BL_OFF` |An alias for `BL_0` |
|
||||
|`BL_INC` |Increase backlight level |
|
||||
|`BL_DEC` |Decrease backlight level |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the 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.
|
||||
|
@@ -35,10 +35,12 @@ New names should try to stick to the standards set by existing layouts, and can
|
||||
|
||||
## Supporting a Layout
|
||||
|
||||
For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
For a keyboard to support a layout, the variable must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
|
||||
The name of the layout must match this regex: `[a-z0-9_]+`
|
||||
|
||||
The folder name must be added to the keyboard's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
|
@@ -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_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
||||
| `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
|
||||
|
||||
|
@@ -53,6 +53,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
brew install avr-gcc
|
||||
brew install dfu-programmer
|
||||
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.
|
||||
|
||||
|
@@ -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_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
```
|
||||
|
||||
{% 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_STEP`|Cycle through backlight levels |
|
||||
|`BL_x` |Set a specific backlight level between 0-9|
|
||||
|`BL_ON` |An alias for `BL_9` |
|
||||
|`BL_OFF` |An alias for `BL_0` |
|
||||
|`BL_INC` |Increase backlight level |
|
||||
|`BL_DEC` |Decrease backlight level |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
## [RGB Lighting](feature_rgblight.md)
|
||||
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x2260
|
||||
#define PRODUCT_ID 0xCA60
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER MechKeysCa
|
||||
#define MANUFACTURER MECHKEYS
|
||||
#define PRODUCT ACR60
|
||||
#define DESCRIPTION ACR60 Keyboard
|
||||
#define DESCRIPTION 60% customizable keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#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 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):
|
||||
|
||||
|
46
keyboards/alu84/alu84.c
Executable file
46
keyboards/alu84/alu84.c
Executable file
@@ -0,0 +1,46 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 "alu84.h"
|
||||
#include "rgblight.h"
|
||||
#include "action_layer.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
|
||||
|
41
keyboards/alu84/alu84.h
Executable file
41
keyboards/alu84/alu84.h
Executable file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 ALU84_H
|
||||
#define ALU84_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
|
||||
#define KEYMAP( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||
}
|
||||
|
||||
#endif
|
76
keyboards/alu84/config.h
Executable file
76
keyboards/alu84/config.h
Executable file
@@ -0,0 +1,76 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 ALU84_CONFIG_H
|
||||
#define ALU84_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0xCA75
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER MECHKEYS
|
||||
#define PRODUCT ALU84
|
||||
#define DESCRIPTION 75% keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, F5, D4, B1, B0, B5, B4, D7, D6, B3, F4, F6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B6
|
||||
#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
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 10
|
||||
#define RGBLIGHT_VAL_STEP 10
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
144
keyboards/alu84/keymaps/default/keymap.c
Executable file
144
keyboards/alu84/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,144 @@
|
||||
#include "alu84.h"
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
#define _BL 0
|
||||
#define _FN1 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BL
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
|
||||
* | Esc | Scrn Brght Up | Scrn Bright Down | Expose | Launchpad | Show Desktop | Dock Hide Tog | Screen Capture | Shortcut | Shortcut | Shortcut| Shortcut | Play/Pause | Mute | Vol Up | Vol Down |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Pg Up |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Pg Dn |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Control | Option/Alt | Gui | Space | Gui | Opt | Fn (layer) | Left | Down | Right |
|
||||
* `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -'
|
||||
*/
|
||||
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER,
|
||||
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, LCTL(LGUI(KC_N)),
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* FN1
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
|
||||
* | Quit All | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU RESET |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | DELETE | Lock Shrct |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | RGB Toggle | RGB Mode | RGB Increase | RGB Decrease | RGB Hue Inc | RGB Hue Dec | RGB Sat Inc | RGB Sat Dec | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Backlight Tog | Backlight Inc | Backlight Dec | Backlight Step | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -'
|
||||
*/
|
||||
|
||||
[_FN1] = KEYMAP(
|
||||
LALT(LGUI(KC_Q)), 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, 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_DEL, LCTL(LALT(LGUI(KC_S))),
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
|
||||
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
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) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
25
keyboards/alu84/keymaps/turbomech/config.h
Normal file
25
keyboards/alu84/keymaps/turbomech/config.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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
|
||||
|
||||
#define TAPPING_TOGGLE 2
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
176
keyboards/alu84/keymaps/turbomech/keymap.c
Normal file
176
keyboards/alu84/keymaps/turbomech/keymap.c
Normal file
@@ -0,0 +1,176 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 "alu84.h"
|
||||
#include "turbomech.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
#define _QWERTY 0 //BASE layer
|
||||
#define _FUNCTION 1 //Function layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BL
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
* | Esc | Scrn | Scrn | Expose |Launchpad| Show |Dock Hide| Screen | Shortcut| Shortcut| Shortcut| Shortcut| Play | Mute | Vol Up | Vol Down|
|
||||
* | |Brght Up | Brght Dn| | | Desktop | Toggle | Capture | | | | | Pause | | | |
|
||||
* |- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Page |
|
||||
* | | | | | | | | | | | | | | Up |
|
||||
* |- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Page |
|
||||
* | | | | | | | | | | | | | | Down |
|
||||
* |- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
* | Control | Option | Gui | Space | Gui | Opt | Fn | Left | Down | Right |
|
||||
* | | /Alt | | | | Alt | | | | |
|
||||
* `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
*/
|
||||
|
||||
[_QWERTY] = KEYMAP(
|
||||
KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER,
|
||||
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, LCTL(LGUI(KC_N)),
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* FN1 - SEE readme.md
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
* | Quit | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU |
|
||||
* | All | | | | | | | | | | | | | | | Reset |
|
||||
* |- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Delete | Lock |
|
||||
* | | | | | | | | | | | | | | |Shortcut |
|
||||
* |- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
* | Trns | RGB | RGB | RGB | RGB | RGB Hue | RGB Hue | RGB Sat | RGB Sat | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | Toggle | Mode | Increase| Decrease| Increase| Decrease| Increase| Decrease| | | | | | |
|
||||
* |- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
* | Trns |Backlight|Backlight|Backlight|Backlight| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | Toggle | Increase| Decrease| Step | | | | | | | | | |
|
||||
* |- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | | | | | | | | | |
|
||||
* `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
*/
|
||||
|
||||
|
||||
[_FUNCTION] = KEYMAP(
|
||||
LALT(LGUI(KC_Q)), 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_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_DEL, LCTL(LALT(LGUI(KC_S))),
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
|
||||
//switch (id) {
|
||||
// case _FLIP:
|
||||
// if (record->event.pressed)
|
||||
|
||||
//SEND_STRING("(╯°□°)╯︵ ┻━┻");
|
||||
// }
|
||||
// return false;
|
||||
// break;
|
||||
// }
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
93
keyboards/alu84/keymaps/turbomech/readme.md
Normal file
93
keyboards/alu84/keymaps/turbomech/readme.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# This is u/TurboMech's keyboard layout for ALU84.
|
||||
|
||||
## It is designed for Mac OS, due to the specific functions I created.
|
||||
|
||||
### Here is the layout found in the keymap.c file.
|
||||
##### I use shortcuts for the Function row (above number row) listed below
|
||||
- Scrn Bright Up: F14
|
||||
- Scrn Bright Down: F15
|
||||
- Expose: LCTRL + Up
|
||||
- Launchpad: LCTRL + L
|
||||
- Show Desktop: F11
|
||||
- Show/Hide Dock: LALT + LGUI + D
|
||||
- Screen Capture: LCTRL + S
|
||||
- Custom Shortcut (setup for an application I use frequently): LCTRL + LSHFT + O
|
||||
- Custom Shortcut 1: LCTRL + LGUI + 1
|
||||
- Custom Shortcut 2: LCTRL + LGUI + 2
|
||||
- Custom Shortcut 3: LCTRL + LGUI + 3
|
||||
- use the custom shortcuts for whatever you want: launch an application, a macro, etc.
|
||||
- Play/Pause: exactly that
|
||||
- Mute / Volume Up / Volume Down: exactly what it says
|
||||
|
||||
##### Going down the right side from Vol Down:
|
||||
- POWER: this serves as the power button on Mac's only. Press and hold the button as you would on your Macbook or iMac keyboard.
|
||||
- Menu: this slides the notification bar on the right side (its the same as on iPhones/ iPads)
|
||||
|
||||
### See below keymaps for how to setup shortcuts on Mac
|
||||
|
||||
#### Base Layer
|
||||
```
|
||||
.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
| Esc | Scrn | Scrn | Expose |Launchpad| Show |Dock Hide| Screen | Shortcut| Shortcut| Shortcut| Shortcut| Play | Mute | Vol Up | Vol Down|
|
||||
| |Brght Up | Brght Dn| | | Desktop | Toggle | Capture | | | | | Pause | | | |
|
||||
|- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
| | | | | | | | | | | | | | | |
|
||||
|- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
| TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut|
|
||||
| | | | | | | | | | | | | | | |
|
||||
|- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
| CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Page |
|
||||
| | | | | | | | | | | | | | Up |
|
||||
|- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Page |
|
||||
| | | | | | | | | | | | | | Down |
|
||||
|- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
| Control | Option | Gui | Space | Gui | Opt | Fn | Left | Down | Right |
|
||||
| | /Alt | | | | Alt | | | | |
|
||||
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
```
|
||||
#### Function Layer 1 - See above for shortcuts
|
||||
```
|
||||
.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
| Quit | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU |
|
||||
| All | | | | | | | | | | | | | | | Reset |
|
||||
|- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Delete | Lock |
|
||||
| | | | | | | | | | | | | | |Shortcut |
|
||||
|- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
| Trns | RGB | RGB | RGB | RGB | RGB Hue | RGB Hue | RGB Sat | RGB Sat | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | Toggle | Mode | Increase| Decrease| Increase| Decrease| Increase| Decrease| | | | | | |
|
||||
|- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | | | | | | | | | | | | | |
|
||||
|- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
| Trns |Backlight|Backlight|Backlight|Backlight| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | Toggle | Increase| Decrease| Step | | | | | | | | | |
|
||||
|- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | | | | | | | | | |
|
||||
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
```
|
||||
|
||||
#### How to use/ setup shortcuts on Mac
|
||||
- First navigate to System Preferences > Keyboard > Shortcuts
|
||||
- You can use any of them in here
|
||||
- Just set them to the shortcut keys listed above
|
||||
|
||||
#### How to make your own (to launch applications, quit all, etc.)
|
||||
- Navigate to Automator > New Document > click Service > Choose
|
||||
- Now we have to setup our shortcut
|
||||
- Here's how to setup the Quit All Shortcut
|
||||
- In the right window select the Service recieves dropdown > select No Input
|
||||
- At the top left click the Name (Search) > type quit > click and hold Quit All Applications > drag to the right hand box (under the Service Recieves)
|
||||
- **IMPORTANT** You have to click the Run button at the upper right hand corner in order for these to actually work.
|
||||
- Now click File > Save > save it as Quit All Apps (or whatever you want) / you can also just exit out and it'll ask you if you want to save
|
||||
- Navigate back to System Preferences > Keyboard > Shortcuts
|
||||
- The new shortcut can be found under services, set it to one of the shortcuts I listed above and done
|
||||
- The same applies for applications in the Name (search) just type the application you want to have as shortcut. Don't forget to run it, then do the same steps
|
||||
to set it up as a shortcut.
|
||||
|
||||
|
||||
|
||||
|
15
keyboards/alu84/keymaps/turbomech/rules.mk
Normal file
15
keyboards/alu84/keymaps/turbomech/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
BOOTMAGIC_ENABLE ?= yes # 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 ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
UNICODE_ENABLE ?= yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
18
keyboards/alu84/readme.md
Normal file
18
keyboards/alu84/readme.md
Normal file
@@ -0,0 +1,18 @@
|
||||
ALU84
|
||||
===
|
||||
|
||||

|
||||
|
||||
A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca).
|
||||
|
||||
Keyboard Maintainer: [TurboMech](https://github.com/TurboMech)
|
||||
|
||||
Hardware Supported: ALU84
|
||||
|
||||
Hardware Availability: [MECHKEYS](https://mechkeys.ca)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make alu84: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.
|
56
keyboards/alu84/rules.mk
Executable file
56
keyboards/alu84/rules.mk
Executable file
@@ -0,0 +1,56 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # 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 ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
@@ -345,14 +345,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case MACRO_BREATH_SPEED_INC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_inc(1);
|
||||
breathing_period_inc();
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_BREATH_SPEED_DEC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_dec(1);
|
||||
breathing_period_dec();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -374,7 +374,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_UPPER);
|
||||
breathing_speed_set(2);
|
||||
breathing_period_set(2);
|
||||
breathing_pulse();
|
||||
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)
|
||||
{
|
||||
layer_on(LAYER_LOWER);
|
||||
breathing_speed_set(2);
|
||||
breathing_period_set(2);
|
||||
breathing_pulse();
|
||||
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:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_period_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_period_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* mapping backlight LEDs to correct Pin */
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
@@ -21,5 +21,7 @@
|
||||
|
||||
// place overrides here
|
||||
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 8
|
||||
|
||||
#endif
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include "bananasplit.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
WIN_SWITCH_LAYOUT = SAFE_RANGE
|
||||
WIN_SWITCH_LAYOUT = SAFE_RANGE,
|
||||
};
|
||||
|
||||
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_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, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
||||
_______, BL_STEP, BL_BRTG, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \
|
||||
),
|
||||
};
|
||||
@@ -76,19 +76,19 @@ void matrix_scan_user(void) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
case WIN_SWITCH_LAYOUT: {
|
||||
// Sends Alt+Shift on both key down and key up.
|
||||
// Designed to switch between two keyboard layouts on Windows using a locking switch.
|
||||
// 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));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
14
keyboards/chocopad/README.md
Normal file
14
keyboards/chocopad/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Chocopad
|
||||
========
|
||||
|
||||
A 4x4 macropad keyboard using Kailh PG1350 Lower Profile Choc switches.
|
||||
|
||||
Keyboard Maintainer: Keebio
|
||||
Hardware Supported: Chocopad PCB, Arduino Pro Micro
|
||||
Hardware Availability: [Keebio](https://keeb.io)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make chocopad: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.
|
1
keyboards/chocopad/chocopad.c
Normal file
1
keyboards/chocopad/chocopad.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "chocopad.h"
|
32
keyboards/chocopad/chocopad.h
Normal file
32
keyboards/chocopad/chocopad.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef CHOCOPAD_H
|
||||
#define CHOCOPAD_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
A1, A2, A3, A4, \
|
||||
B1, B2, B3, B4, \
|
||||
C1, C2, C3, C4, \
|
||||
D1, D2, D3, D4 \
|
||||
) { \
|
||||
{ A1, A2, A3, A4 }, \
|
||||
{ B1, B2, B3, B4 }, \
|
||||
{ C1, C2, C3, C4 }, \
|
||||
{ D1, D2, D3, D4 } \
|
||||
}
|
||||
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
A1, A2, A3, A4, \
|
||||
B1, B2, B3, B4, \
|
||||
C1, C2, C3, C4, \
|
||||
D1, D2, D3, D4 \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##A1, KC_##A2, KC_##A3, KC_##A4, \
|
||||
KC_##B1, KC_##B2, KC_##B3, KC_##B4, \
|
||||
KC_##C1, KC_##C2, KC_##C3, KC_##C4, \
|
||||
KC_##D1, KC_##D2, KC_##D3, KC_##D4 \
|
||||
)
|
||||
|
||||
#endif
|
59
keyboards/chocopad/config.h
Normal file
59
keyboards/chocopad/config.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x1144
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER Keebio
|
||||
#define PRODUCT Chocopad
|
||||
#define DESCRIPTION 4x4 macropad using Kailh Choc low-profile switches
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D7, E6, B3, B2 }
|
||||
#define MATRIX_COL_PINS { D2, D4, F6, F5 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
|
||||
/* 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
|
||||
|
||||
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLED_NUM 4
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
#endif
|
6
keyboards/chocopad/keymaps/default/config.h
Normal file
6
keyboards/chocopad/keymaps/default/config.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#endif
|
61
keyboards/chocopad/keymaps/default/keymap.c
Normal file
61
keyboards/chocopad/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,61 @@
|
||||
#include "chocopad.h"
|
||||
|
||||
#define _BASE 0
|
||||
#define _FN1 1
|
||||
#define _FN2 2
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define KC_X1 MO(_FN1)
|
||||
#define KC_X2 MO(_FN2)
|
||||
#define KC_RST RESET
|
||||
#define KC_BSTP BL_STEP
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
#define KC_RSAI RGB_SAI
|
||||
#define KC_RSAD RGB_SAD
|
||||
#define KC_RVAI RGB_VAI
|
||||
#define KC_RVAD RGB_VAD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_BASE] = KC_KEYMAP(
|
||||
//,----+----+----+----.
|
||||
PGUP,HOME, UP ,END ,
|
||||
//|----+----+----+----|
|
||||
PGDN,LEFT,DOWN,RGHT,
|
||||
//|----+----+----+----|
|
||||
X2 ,VOLU,MPLY,MPRV,
|
||||
//|----+----+----+----|
|
||||
X1 ,VOLD,MUTE,MNXT
|
||||
//`----+----+----+----'
|
||||
),
|
||||
|
||||
[_FN1] = KC_KEYMAP(
|
||||
//,----+----+----+----.
|
||||
ESC , P7 , P8 , P9 ,
|
||||
//|----+----+----+----|
|
||||
TAB , P4 , P5 , P6 ,
|
||||
//|----+----+----+----|
|
||||
ENT , P1 , P2 , P3 ,
|
||||
//|----+----+----+----|
|
||||
, P0 , P0 ,DOT
|
||||
//`----+----+----+----'
|
||||
),
|
||||
|
||||
[_FN2] = KC_KEYMAP(
|
||||
//,----+----+----+----.
|
||||
RTOG,RHUI,RSAI,RVAI,
|
||||
//|----+----+----+----|
|
||||
RMOD,RHUD,RSAD,RVAD,
|
||||
//|----+----+----+----|
|
||||
, , ,RST ,
|
||||
//|----+----+----+----|
|
||||
BSTP, , ,
|
||||
//`----+----+----+----'
|
||||
)
|
||||
|
||||
};
|
@@ -1,6 +1,4 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
56
keyboards/chocopad/rules.mk
Normal file
56
keyboards/chocopad/rules.mk
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
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 = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
@@ -416,7 +416,7 @@
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
||||
PIN_PUPDR_FLOATING(GPIOB_PIN6) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
|
||||
PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
||||
@@ -432,7 +432,7 @@
|
||||
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN7) | \
|
||||
PIN_ODR_LOW(GPIOB_PIN7) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
||||
|
@@ -3,11 +3,35 @@
|
||||
#define _______ KC_TRNS
|
||||
|
||||
enum keyboard_layers {
|
||||
_BL,
|
||||
_FL,
|
||||
_CL
|
||||
_BL,
|
||||
_FL,
|
||||
_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] = {
|
||||
/* Layer 0: Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
@@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, MO(_FL), _______),
|
||||
_______,_______,_______, _______, _______, _______, MO(_FL), _______),
|
||||
[_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, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, 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;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
void backlight_init_ports(void) {
|
||||
printf("backlight_init_ports()\n");
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(GPIOB, 8);
|
||||
#endif
|
||||
}
|
||||
@@ -41,13 +41,8 @@ void backlight_set(uint8_t level) {
|
||||
#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) {
|
||||
printf("led_init_ports()\n");
|
||||
printf("led_set_kb(%d)\n", usb_led);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
palSetPad(GPIOB, 7);
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
/* Clueboard 60%
|
||||
*
|
||||
* Column pins are input with internal pull-down.
|
||||
* Column pins are input with internal pull-down.
|
||||
* Row pins are output and strobe with high.
|
||||
* Key is high or 1 when it turns on.
|
||||
*
|
||||
@@ -68,13 +68,10 @@ void matrix_init(void) {
|
||||
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
|
||||
|
||||
memset(matrix, 0, MATRIX_ROWS);
|
||||
memset(matrix_debouncing, 0, MATRIX_COLS);
|
||||
|
||||
/* Setup capslock */
|
||||
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
// palClearPad(GPIOB, 7);
|
||||
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
||||
|
||||
palClearPad(GPIOB, 7); // Turn off capslock
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
@@ -84,20 +81,20 @@ uint8_t matrix_scan(void) {
|
||||
|
||||
// strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 }
|
||||
switch (col) {
|
||||
case 0: palSetPad(GPIOA, 2); break;
|
||||
case 1: palSetPad(GPIOA, 3); break;
|
||||
case 2: palSetPad(GPIOA, 6); break;
|
||||
case 3: palSetPad(GPIOB, 14); break;
|
||||
case 4: palSetPad(GPIOB, 15); break;
|
||||
case 5: palSetPad(GPIOA, 8); break;
|
||||
case 6: palSetPad(GPIOA, 9); break;
|
||||
case 7: palSetPad(GPIOA, 7); break;
|
||||
case 8: palSetPad(GPIOB, 3); break;
|
||||
case 9: palSetPad(GPIOB, 4); break;
|
||||
case 10: palSetPad(GPIOC, 15); break;
|
||||
case 11: palSetPad(GPIOC, 14); break;
|
||||
case 12: palSetPad(GPIOC, 13); break;
|
||||
case 13: palSetPad(GPIOB, 5); break;
|
||||
case 0: palSetPad(GPIOA, 2); break;
|
||||
case 1: palSetPad(GPIOA, 3); break;
|
||||
case 2: palSetPad(GPIOA, 6); break;
|
||||
case 3: palSetPad(GPIOB, 14); break;
|
||||
case 4: palSetPad(GPIOB, 15); break;
|
||||
case 5: palSetPad(GPIOA, 8); break;
|
||||
case 6: palSetPad(GPIOA, 9); break;
|
||||
case 7: palSetPad(GPIOA, 7); break;
|
||||
case 8: palSetPad(GPIOB, 3); break;
|
||||
case 9: palSetPad(GPIOB, 4); break;
|
||||
case 10: palSetPad(GPIOC, 15); break;
|
||||
case 11: palSetPad(GPIOC, 14); break;
|
||||
case 12: palSetPad(GPIOC, 13); break;
|
||||
case 13: palSetPad(GPIOB, 5); break;
|
||||
case 14: palSetPad(GPIOB, 6); break;
|
||||
}
|
||||
|
||||
@@ -115,20 +112,20 @@ uint8_t matrix_scan(void) {
|
||||
|
||||
// unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 }
|
||||
switch (col) {
|
||||
case 0: palClearPad(GPIOA, 2); break;
|
||||
case 1: palClearPad(GPIOA, 3); break;
|
||||
case 2: palClearPad(GPIOA, 6); break;
|
||||
case 3: palClearPad(GPIOB, 14); break;
|
||||
case 4: palClearPad(GPIOB, 15); break;
|
||||
case 5: palClearPad(GPIOA, 8); break;
|
||||
case 6: palClearPad(GPIOA, 9); break;
|
||||
case 7: palClearPad(GPIOA, 7); break;
|
||||
case 8: palClearPad(GPIOB, 3); break;
|
||||
case 9: palClearPad(GPIOB, 4); break;
|
||||
case 10: palClearPad(GPIOC, 15); break;
|
||||
case 11: palClearPad(GPIOC, 14); break;
|
||||
case 12: palClearPad(GPIOC, 13); break;
|
||||
case 13: palClearPad(GPIOB, 5); break;
|
||||
case 0: palClearPad(GPIOA, 2); break;
|
||||
case 1: palClearPad(GPIOA, 3); break;
|
||||
case 2: palClearPad(GPIOA, 6); break;
|
||||
case 3: palClearPad(GPIOB, 14); break;
|
||||
case 4: palClearPad(GPIOB, 15); break;
|
||||
case 5: palClearPad(GPIOA, 8); break;
|
||||
case 6: palClearPad(GPIOA, 9); break;
|
||||
case 7: palClearPad(GPIOA, 7); break;
|
||||
case 8: palClearPad(GPIOB, 3); break;
|
||||
case 9: palClearPad(GPIOB, 4); break;
|
||||
case 10: palClearPad(GPIOC, 15); break;
|
||||
case 11: palClearPad(GPIOC, 14); break;
|
||||
case 12: palClearPad(GPIOC, 13); break;
|
||||
case 13: palClearPad(GPIOB, 5); break;
|
||||
case 14: palClearPad(GPIOB, 6); break;
|
||||
}
|
||||
|
||||
@@ -138,6 +135,7 @@ uint8_t matrix_scan(void) {
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix[row] = 0;
|
||||
|
@@ -28,11 +28,13 @@ MCU = cortex-m4
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R
|
||||
@@ -50,5 +52,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
#AUDIO_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
# SERIAL_LINK_ENABLE = yes
|
||||
|
@@ -1,2 +0,0 @@
|
||||
EXTRAKEY_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
39
keyboards/clueboard/66/keymaps/manofinterests/keymap.c
Normal file
39
keyboards/clueboard/66/keymaps/manofinterests/keymap.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "66.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// 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.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
#define _CL 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = 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_GRV, KC_BSPC, RGB_VAI, \
|
||||
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, RGB_VAD, \
|
||||
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \
|
||||
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \
|
||||
KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = 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_VOLU, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \
|
||||
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \
|
||||
_______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END),
|
||||
|
||||
/* Keymap _CL: Control layer
|
||||
*/
|
||||
[_CL] = KEYMAP(
|
||||
BL_STEP,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_TOG, RGB_VAI, \
|
||||
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \
|
||||
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \
|
||||
_______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
||||
};
|
8
keyboards/clueboard/66/keymaps/manofinterests/readme.md
Normal file
8
keyboards/clueboard/66/keymaps/manofinterests/readme.md
Normal file
@@ -0,0 +1,8 @@
|
||||

|
||||
|
||||
# Default Clueboard Layout
|
||||
|
||||
This is the default layout that comes flashed on every Clueboard. For the most
|
||||
part it's a straightforward and easy to follow layout. The only unusual key is
|
||||
the key in the upper left, which sends Escape normally, but Grave when any of
|
||||
the Ctrl, Alt, or GUI modifiers are held down.
|
@@ -1,4 +0,0 @@
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
|
@@ -1,4 +0,0 @@
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
|
@@ -1 +1,2 @@
|
||||
RGBLIGHT_ENABLE = no
|
||||
MOUSEKEY_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
|
86
keyboards/dz60/keymaps/60_plus_arrows/keymap.c
Normal file
86
keyboards/dz60/keymaps/60_plus_arrows/keymap.c
Normal file
@@ -0,0 +1,86 @@
|
||||
#include "dz60.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
#define ______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Cmd | Space | Cmd | RAlt | L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
KEYMAP_2_SHIFTS(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, ______, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, ______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1),
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | BL- | BL+ | BL | | | |RESET| | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RBGM | | | | | | | | | | Val+ | Val- |RBGTOG|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Hue+| Hue-| Sat+| Sat-| | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | Ctrl| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
KEYMAP_DIRECTIONAL(
|
||||
KC_ESC, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, RESET, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, RGB_MOD, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_VAI, RGB_VAD, RGB_TOG,
|
||||
______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_RCTL, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______
|
||||
),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@@ -4,7 +4,6 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
<<<<<<< HEAD
|
||||
/* ISO 7u layout layer 0
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC |
|
||||
@@ -19,8 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
=======
|
||||
>>>>>>> dc7cc26dff01cc84b6f9f96af6d3aa03469aaca3
|
||||
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_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,
|
||||
|
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_off(uint8_t led);
|
||||
|
||||
extern inline void ergodox_led_all_off(void);
|
||||
|
||||
void ergodox_led_init(void);
|
||||
void ergodox_blink_all_leds(void);
|
||||
|
||||
|
@@ -217,8 +217,10 @@ uint32_t layer_state_set_user(uint32_t state) {
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#else
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_init();
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
@@ -13,6 +12,15 @@
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#define FORCE_NKRO
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
#endif
|
||||
#define TAPPING_TERM 150
|
||||
#undef PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
|
||||
|
||||
#endif
|
||||
|
@@ -15,15 +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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "drashna.h"
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,18 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
bool skip_leds = false;
|
||||
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#define KC_D3_1 TD(TD_D3_1)
|
||||
#define KC_D3_2 TD(TD_D3_2)
|
||||
#define KC_D3_3 TD(TD_D3_3)
|
||||
#define KC_D3_4 TD(TD_D3_4)
|
||||
#else
|
||||
#define KC_D3_1 KC_1
|
||||
#define KC_D3_2 KC_2
|
||||
#define KC_D3_3 KC_3
|
||||
#define KC_D3_4 KC_4
|
||||
#endif
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
@@ -71,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
@@ -81,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
@@ -124,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -156,9 +137,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
@@ -167,7 +148,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), OSM(MOD_RSFT),
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -178,11 +159,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* | Del | Q | D | R | W | B | L1 | | L1 | J | F | U | P | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* | BkSp | A | S | H | T | D |------| |------| Y | N | E | O | I | ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
@@ -210,7 +191,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -239,7 +220,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
@@ -280,7 +261,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GAMEPAD] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV),
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
@@ -294,7 +275,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_HYPR, MAGIC_TOGGLE_NKRO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
@@ -364,7 +345,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_MOUS] = LAYOUT_ergodox(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_SECRET_1,KC_SECRET_2,KC_SECRET_3,KC_SECRET_4,KC_SECRET_5,KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
|
@@ -4,8 +4,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
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(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
|
||||
memset(matrix, 0, MATRIX_ROWS);
|
||||
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
|
||||
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t));
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"keyboard_name": "GH60",
|
||||
"identifier": "FEED:6060:0001",
|
||||
"layout": {
|
||||
"layouts": {
|
||||
"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",
|
||||
@@ -14,4 +14,4 @@
|
||||
"height": 5,
|
||||
"url": "http://qmk.fm/keyboards/gh60",
|
||||
"manufacturer": "geekhack"
|
||||
}
|
||||
}
|
||||
|
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)
|
@@ -17,7 +17,7 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#define TAPPING_TERM 200
|
||||
|
244
keyboards/helix/common/glcdfont.c
Normal file
244
keyboards/helix/common/glcdfont.c
Normal file
@@ -0,0 +1,244 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x03, 0x07, 0x1F, 0x7F, 0xFF, 0xFF,
|
||||
0xFE, 0xF8, 0xF0, 0xC0, 0x20, 0xF8,
|
||||
0xFE, 0xFF, 0xFE, 0x79, 0x27, 0x1F,
|
||||
0x7F, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0,
|
||||
0xC0, 0x20, 0xF8, 0xFE, 0xFF, 0xFF,
|
||||
0x7F, 0x3F, 0x3F, 0x7F, 0xFF, 0xFE,
|
||||
0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0x7F, 0x7F, 0x7F,
|
||||
0xBF, 0xBF, 0xC0, 0xC0, 0xC0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF0,
|
||||
0xF8, 0x78, 0x78, 0x7C, 0x3C, 0x3C,
|
||||
0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||
0xBF, 0xBF, 0xDF, 0xDF, 0xEF, 0xEF,
|
||||
0x00, 0x03, 0x07, 0x1F, 0x7F, 0xFF,
|
||||
0xFF, 0xFF, 0xFE, 0xF8, 0xE0, 0xC0,
|
||||
0xE0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF,
|
||||
0x7F, 0x1F, 0x07, 0x03, 0x00, 0x00,
|
||||
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
|
||||
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
|
||||
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
|
||||
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
||||
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
||||
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
||||
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xC1, 0xF3,
|
||||
0xCF, 0xBF, 0x7F, 0xFF, 0xFF, 0xFC,
|
||||
0xFB, 0xE7, 0x81, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0xE3, 0xCF, 0x3F, 0xFF,
|
||||
0xFF, 0xFF, 0xFC, 0xFB, 0xE7, 0x81,
|
||||
0x00, 0x00, 0x00, 0x00, 0x81, 0xE7,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xF8, 0xF8, 0xFC, 0x7C, 0x7E,
|
||||
0x7E, 0x3E, 0xFE, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xF7, 0xF7, 0xF7, 0xFB,
|
||||
0xFB, 0x7D, 0x7D, 0x7D, 0xBE, 0xBE,
|
||||
0xBE, 0xDF, 0xDF, 0xE0, 0xE0, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0xFC, 0xFC, 0x7C, 0x7E, 0x7E,
|
||||
0x3E, 0x3E, 0x1F, 0x1F, 0x1F, 0x0F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
|
||||
0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x81,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
|
||||
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
|
||||
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
||||
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
||||
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
||||
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x70, 0x7C, 0x7F, 0x7F, 0x7F,
|
||||
0x7F, 0x1F, 0x06, 0x01, 0x03, 0x0F,
|
||||
0x3F, 0x7F, 0x7F, 0x7E, 0x7C, 0x7C,
|
||||
0x7E, 0x7F, 0x7F, 0x7F, 0x1F, 0x06,
|
||||
0x01, 0x07, 0x0F, 0x3F, 0x7F, 0x7F,
|
||||
0x7E, 0x7C, 0x7C, 0x7E, 0x7F, 0x7F,
|
||||
0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
|
||||
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F,
|
||||
0x7F, 0x7F, 0x7D, 0x7D, 0x3D, 0x3E,
|
||||
0x1E, 0x1F, 0x1F, 0x1F, 0x0F, 0x0F,
|
||||
0x07, 0x07, 0x07, 0x03, 0x03, 0x00,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
|
||||
0x00, 0x40, 0x70, 0x78, 0x7E, 0x7F,
|
||||
0x7F, 0x7F, 0x3F, 0x0F, 0x03, 0x01,
|
||||
0x03, 0x0F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||
0x7E, 0x78, 0x70, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
28
keyboards/helix/config.h
Normal file
28
keyboards/helix/config.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef SUBPROJECT_rev1
|
||||
#include "rev1/config.h"
|
||||
#endif
|
||||
|
||||
#endif
|
1
keyboards/helix/helix.c
Normal file
1
keyboards/helix/helix.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "helix.h"
|
57
keyboards/helix/helix.h
Normal file
57
keyboards/helix/helix.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#ifndef HELIX_H
|
||||
#define HELIX_H
|
||||
|
||||
#ifdef KEYBOARD_helix_rev1
|
||||
#include "rev1.h"
|
||||
#endif
|
||||
#ifdef KEYBOARD_helix_rev2
|
||||
#include "rev2.h"
|
||||
#endif
|
||||
|
||||
#if HELIX_ROWS == 3
|
||||
#define KC_KEYMAP( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
)
|
||||
#elif HELIX_ROWS == 4
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
#elif HELIX_ROWS == 5
|
||||
#define KC_KEYMAP( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
|
||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
|
||||
)
|
||||
#else
|
||||
#error "expected HELIX_ROWS 3 or 4 or 5"
|
||||
#endif
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#endif
|
162
keyboards/helix/i2c.c
Normal file
162
keyboards/helix/i2c.c
Normal file
@@ -0,0 +1,162 @@
|
||||
#include <util/twi.h>
|
||||
#include <avr/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/twi.h>
|
||||
#include <stdbool.h>
|
||||
#include "i2c.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
|
||||
// Limits the amount of we wait for any one i2c transaction.
|
||||
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
||||
// 9 bits, a single transaction will take around 90μs to complete.
|
||||
//
|
||||
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
|
||||
// poll loop takes at least 8 clock cycles to execute
|
||||
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
|
||||
|
||||
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
|
||||
|
||||
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||
|
||||
static volatile uint8_t slave_buffer_pos;
|
||||
static volatile bool slave_has_register_set = false;
|
||||
|
||||
// Wait for an i2c operation to finish
|
||||
inline static
|
||||
void i2c_delay(void) {
|
||||
uint16_t lim = 0;
|
||||
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
|
||||
// easier way, but will wait slightly longer
|
||||
// _delay_us(100);
|
||||
}
|
||||
|
||||
// Setup twi to run at 100kHz
|
||||
void i2c_master_init(void) {
|
||||
// no prescaler
|
||||
TWSR = 0;
|
||||
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
|
||||
// Check datasheets for more info.
|
||||
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
|
||||
}
|
||||
|
||||
// Start a transaction with the given i2c slave address. The direction of the
|
||||
// transfer is set with I2C_READ and I2C_WRITE.
|
||||
// returns: 0 => success
|
||||
// 1 => error
|
||||
uint8_t i2c_master_start(uint8_t address) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check that we started successfully
|
||||
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
|
||||
return 1;
|
||||
|
||||
TWDR = address;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
|
||||
return 1; // slave did not acknowledge
|
||||
else
|
||||
return 0; // success
|
||||
}
|
||||
|
||||
|
||||
// Finish the i2c transaction.
|
||||
void i2c_master_stop(void) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
|
||||
uint16_t lim = 0;
|
||||
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
}
|
||||
|
||||
// Write one byte to the i2c slave.
|
||||
// returns 0 => slave ACK
|
||||
// 1 => slave NACK
|
||||
uint8_t i2c_master_write(uint8_t data) {
|
||||
TWDR = data;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check if the slave acknowledged us
|
||||
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
|
||||
}
|
||||
|
||||
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
|
||||
// if ack=0 the acknowledge bit is not set.
|
||||
// returns: byte read from i2c device
|
||||
uint8_t i2c_master_read(int ack) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
|
||||
|
||||
i2c_delay();
|
||||
return TWDR;
|
||||
}
|
||||
|
||||
void i2c_reset_state(void) {
|
||||
TWCR = 0;
|
||||
}
|
||||
|
||||
void i2c_slave_init(uint8_t address) {
|
||||
TWAR = address << 0; // slave i2c address
|
||||
// TWEN - twi enable
|
||||
// TWEA - enable address acknowledgement
|
||||
// TWINT - twi interrupt flag
|
||||
// TWIE - enable the twi interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
ISR(TWI_vect);
|
||||
|
||||
ISR(TWI_vect) {
|
||||
uint8_t ack = 1;
|
||||
switch(TW_STATUS) {
|
||||
case TW_SR_SLA_ACK:
|
||||
// this device has been addressed as a slave receiver
|
||||
slave_has_register_set = false;
|
||||
break;
|
||||
|
||||
case TW_SR_DATA_ACK:
|
||||
// this device has received data as a slave receiver
|
||||
// The first byte that we receive in this transaction sets the location
|
||||
// of the read/write location of the slaves memory that it exposes over
|
||||
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
|
||||
// slave_buffer_pos after each write.
|
||||
if(!slave_has_register_set) {
|
||||
slave_buffer_pos = TWDR;
|
||||
// don't acknowledge the master if this memory loctaion is out of bounds
|
||||
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
|
||||
ack = 0;
|
||||
slave_buffer_pos = 0;
|
||||
}
|
||||
slave_has_register_set = true;
|
||||
} else {
|
||||
i2c_slave_buffer[slave_buffer_pos] = TWDR;
|
||||
BUFFER_POS_INC();
|
||||
}
|
||||
break;
|
||||
|
||||
case TW_ST_SLA_ACK:
|
||||
case TW_ST_DATA_ACK:
|
||||
// master has addressed this device as a slave transmitter and is
|
||||
// requesting data.
|
||||
TWDR = i2c_slave_buffer[slave_buffer_pos];
|
||||
BUFFER_POS_INC();
|
||||
break;
|
||||
|
||||
case TW_BUS_ERROR: // something went wrong, reset twi state
|
||||
TWCR = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Reset everything, so we are ready for the next TWI interrupt
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
#endif
|
49
keyboards/helix/i2c.h
Normal file
49
keyboards/helix/i2c.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef I2C_H
|
||||
#define I2C_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef F_CPU
|
||||
#define F_CPU 16000000UL
|
||||
#endif
|
||||
|
||||
#define I2C_READ 1
|
||||
#define I2C_WRITE 0
|
||||
|
||||
#define I2C_ACK 1
|
||||
#define I2C_NACK 0
|
||||
|
||||
#define SLAVE_BUFFER_SIZE 0x10
|
||||
|
||||
// i2c SCL clock frequency
|
||||
#define SCL_CLOCK 400000L
|
||||
|
||||
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||
|
||||
void i2c_master_init(void);
|
||||
uint8_t i2c_master_start(uint8_t address);
|
||||
void i2c_master_stop(void);
|
||||
uint8_t i2c_master_write(uint8_t data);
|
||||
uint8_t i2c_master_read(int);
|
||||
void i2c_reset_state(void);
|
||||
void i2c_slave_init(uint8_t address);
|
||||
|
||||
|
||||
static inline unsigned char i2c_start_read(unsigned char addr) {
|
||||
return i2c_master_start((addr << 1) | I2C_READ);
|
||||
}
|
||||
|
||||
static inline unsigned char i2c_start_write(unsigned char addr) {
|
||||
return i2c_master_start((addr << 1) | I2C_WRITE);
|
||||
}
|
||||
|
||||
// from SSD1306 scrips
|
||||
extern unsigned char i2c_rep_start(unsigned char addr);
|
||||
extern void i2c_start_wait(unsigned char addr);
|
||||
extern unsigned char i2c_readAck(void);
|
||||
extern unsigned char i2c_readNak(void);
|
||||
extern unsigned char i2c_read(unsigned char ack);
|
||||
|
||||
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
|
||||
|
||||
#endif
|
362
keyboards/helix/pro_micro.h
Normal file
362
keyboards/helix/pro_micro.h
Normal file
@@ -0,0 +1,362 @@
|
||||
/*
|
||||
pins_arduino.h - Pin definition functions for Arduino
|
||||
Part of Arduino - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2007 David A. Mellis
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
|
||||
$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
|
||||
*/
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
// Workaround for wrong definitions in "iom32u4.h".
|
||||
// This should be fixed in the AVR toolchain.
|
||||
#undef UHCON
|
||||
#undef UHINT
|
||||
#undef UHIEN
|
||||
#undef UHADDR
|
||||
#undef UHFNUM
|
||||
#undef UHFNUML
|
||||
#undef UHFNUMH
|
||||
#undef UHFLEN
|
||||
#undef UPINRQX
|
||||
#undef UPINTX
|
||||
#undef UPNUM
|
||||
#undef UPRST
|
||||
#undef UPCONX
|
||||
#undef UPCFG0X
|
||||
#undef UPCFG1X
|
||||
#undef UPSTAX
|
||||
#undef UPCFG2X
|
||||
#undef UPIENX
|
||||
#undef UPDATX
|
||||
#undef TCCR2A
|
||||
#undef WGM20
|
||||
#undef WGM21
|
||||
#undef COM2B0
|
||||
#undef COM2B1
|
||||
#undef COM2A0
|
||||
#undef COM2A1
|
||||
#undef TCCR2B
|
||||
#undef CS20
|
||||
#undef CS21
|
||||
#undef CS22
|
||||
#undef WGM22
|
||||
#undef FOC2B
|
||||
#undef FOC2A
|
||||
#undef TCNT2
|
||||
#undef TCNT2_0
|
||||
#undef TCNT2_1
|
||||
#undef TCNT2_2
|
||||
#undef TCNT2_3
|
||||
#undef TCNT2_4
|
||||
#undef TCNT2_5
|
||||
#undef TCNT2_6
|
||||
#undef TCNT2_7
|
||||
#undef OCR2A
|
||||
#undef OCR2_0
|
||||
#undef OCR2_1
|
||||
#undef OCR2_2
|
||||
#undef OCR2_3
|
||||
#undef OCR2_4
|
||||
#undef OCR2_5
|
||||
#undef OCR2_6
|
||||
#undef OCR2_7
|
||||
#undef OCR2B
|
||||
#undef OCR2_0
|
||||
#undef OCR2_1
|
||||
#undef OCR2_2
|
||||
#undef OCR2_3
|
||||
#undef OCR2_4
|
||||
#undef OCR2_5
|
||||
#undef OCR2_6
|
||||
#undef OCR2_7
|
||||
|
||||
#define NUM_DIGITAL_PINS 30
|
||||
#define NUM_ANALOG_INPUTS 12
|
||||
|
||||
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
|
||||
#define TXLED0 PORTD |= (1<<5)
|
||||
#define TXLED1 PORTD &= ~(1<<5)
|
||||
#define RXLED0 PORTB |= (1<<0)
|
||||
#define RXLED1 PORTB &= ~(1<<0)
|
||||
|
||||
static const uint8_t SDA = 2;
|
||||
static const uint8_t SCL = 3;
|
||||
#define LED_BUILTIN 13
|
||||
|
||||
// Map SPI port to 'new' pins D14..D17
|
||||
static const uint8_t SS = 17;
|
||||
static const uint8_t MOSI = 16;
|
||||
static const uint8_t MISO = 14;
|
||||
static const uint8_t SCK = 15;
|
||||
|
||||
// Mapping of analog pins as digital I/O
|
||||
// A6-A11 share with digital pins
|
||||
static const uint8_t ADC0 = 18;
|
||||
static const uint8_t ADC1 = 19;
|
||||
static const uint8_t ADC2 = 20;
|
||||
static const uint8_t ADC3 = 21;
|
||||
static const uint8_t ADC4 = 22;
|
||||
static const uint8_t ADC5 = 23;
|
||||
static const uint8_t ADC6 = 24; // D4
|
||||
static const uint8_t ADC7 = 25; // D6
|
||||
static const uint8_t ADC8 = 26; // D8
|
||||
static const uint8_t ADC9 = 27; // D9
|
||||
static const uint8_t ADC10 = 28; // D10
|
||||
static const uint8_t ADC11 = 29; // D12
|
||||
|
||||
#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
|
||||
#define digitalPinToPCICRbit(p) 0
|
||||
#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
|
||||
#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
|
||||
|
||||
// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
|
||||
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
|
||||
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
|
||||
|
||||
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
|
||||
|
||||
#ifdef ARDUINO_MAIN
|
||||
|
||||
// On the Arduino board, digital pins are also used
|
||||
// for the analog output (software PWM). Analog input
|
||||
// pins are a separate set.
|
||||
|
||||
// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
|
||||
//
|
||||
// D0 PD2 RXD1/INT2
|
||||
// D1 PD3 TXD1/INT3
|
||||
// D2 PD1 SDA SDA/INT1
|
||||
// D3# PD0 PWM8/SCL OC0B/SCL/INT0
|
||||
// D4 A6 PD4 ADC8
|
||||
// D5# PC6 ??? OC3A/#OC4A
|
||||
// D6# A7 PD7 FastPWM #OC4D/ADC10
|
||||
// D7 PE6 INT6/AIN0
|
||||
//
|
||||
// D8 A8 PB4 ADC11/PCINT4
|
||||
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
|
||||
// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
|
||||
// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
|
||||
// D12 A11 PD6 T1/#OC4D/ADC9
|
||||
// D13# PC7 PWM10 CLK0/OC4A
|
||||
//
|
||||
// A0 D18 PF7 ADC7
|
||||
// A1 D19 PF6 ADC6
|
||||
// A2 D20 PF5 ADC5
|
||||
// A3 D21 PF4 ADC4
|
||||
// A4 D22 PF1 ADC1
|
||||
// A5 D23 PF0 ADC0
|
||||
//
|
||||
// New pins D14..D17 to map SPI port to digital pins
|
||||
//
|
||||
// MISO D14 PB3 MISO,PCINT3
|
||||
// SCK D15 PB1 SCK,PCINT1
|
||||
// MOSI D16 PB2 MOSI,PCINT2
|
||||
// SS D17 PB0 RXLED,SS/PCINT0
|
||||
//
|
||||
// Connected LEDs on board for TX and RX
|
||||
// TXLED D24 PD5 XCK1
|
||||
// RXLED D17 PB0
|
||||
// HWB PE2 HWB
|
||||
|
||||
// these arrays map port names (e.g. port B) to the
|
||||
// appropriate addresses for various functions (e.g. reading
|
||||
// and writing)
|
||||
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
||||
NOT_A_PORT,
|
||||
NOT_A_PORT,
|
||||
(uint16_t) &DDRB,
|
||||
(uint16_t) &DDRC,
|
||||
(uint16_t) &DDRD,
|
||||
(uint16_t) &DDRE,
|
||||
(uint16_t) &DDRF,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM port_to_output_PGM[] = {
|
||||
NOT_A_PORT,
|
||||
NOT_A_PORT,
|
||||
(uint16_t) &PORTB,
|
||||
(uint16_t) &PORTC,
|
||||
(uint16_t) &PORTD,
|
||||
(uint16_t) &PORTE,
|
||||
(uint16_t) &PORTF,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM port_to_input_PGM[] = {
|
||||
NOT_A_PORT,
|
||||
NOT_A_PORT,
|
||||
(uint16_t) &PINB,
|
||||
(uint16_t) &PINC,
|
||||
(uint16_t) &PIND,
|
||||
(uint16_t) &PINE,
|
||||
(uint16_t) &PINF,
|
||||
};
|
||||
|
||||
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||
PD, // D0 - PD2
|
||||
PD, // D1 - PD3
|
||||
PD, // D2 - PD1
|
||||
PD, // D3 - PD0
|
||||
PD, // D4 - PD4
|
||||
PC, // D5 - PC6
|
||||
PD, // D6 - PD7
|
||||
PE, // D7 - PE6
|
||||
|
||||
PB, // D8 - PB4
|
||||
PB, // D9 - PB5
|
||||
PB, // D10 - PB6
|
||||
PB, // D11 - PB7
|
||||
PD, // D12 - PD6
|
||||
PC, // D13 - PC7
|
||||
|
||||
PB, // D14 - MISO - PB3
|
||||
PB, // D15 - SCK - PB1
|
||||
PB, // D16 - MOSI - PB2
|
||||
PB, // D17 - SS - PB0
|
||||
|
||||
PF, // D18 - A0 - PF7
|
||||
PF, // D19 - A1 - PF6
|
||||
PF, // D20 - A2 - PF5
|
||||
PF, // D21 - A3 - PF4
|
||||
PF, // D22 - A4 - PF1
|
||||
PF, // D23 - A5 - PF0
|
||||
|
||||
PD, // D24 - PD5
|
||||
PD, // D25 / D6 - A7 - PD7
|
||||
PB, // D26 / D8 - A8 - PB4
|
||||
PB, // D27 / D9 - A9 - PB5
|
||||
PB, // D28 / D10 - A10 - PB6
|
||||
PD, // D29 / D12 - A11 - PD6
|
||||
};
|
||||
|
||||
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
|
||||
_BV(2), // D0 - PD2
|
||||
_BV(3), // D1 - PD3
|
||||
_BV(1), // D2 - PD1
|
||||
_BV(0), // D3 - PD0
|
||||
_BV(4), // D4 - PD4
|
||||
_BV(6), // D5 - PC6
|
||||
_BV(7), // D6 - PD7
|
||||
_BV(6), // D7 - PE6
|
||||
|
||||
_BV(4), // D8 - PB4
|
||||
_BV(5), // D9 - PB5
|
||||
_BV(6), // D10 - PB6
|
||||
_BV(7), // D11 - PB7
|
||||
_BV(6), // D12 - PD6
|
||||
_BV(7), // D13 - PC7
|
||||
|
||||
_BV(3), // D14 - MISO - PB3
|
||||
_BV(1), // D15 - SCK - PB1
|
||||
_BV(2), // D16 - MOSI - PB2
|
||||
_BV(0), // D17 - SS - PB0
|
||||
|
||||
_BV(7), // D18 - A0 - PF7
|
||||
_BV(6), // D19 - A1 - PF6
|
||||
_BV(5), // D20 - A2 - PF5
|
||||
_BV(4), // D21 - A3 - PF4
|
||||
_BV(1), // D22 - A4 - PF1
|
||||
_BV(0), // D23 - A5 - PF0
|
||||
|
||||
_BV(5), // D24 - PD5
|
||||
_BV(7), // D25 / D6 - A7 - PD7
|
||||
_BV(4), // D26 / D8 - A8 - PB4
|
||||
_BV(5), // D27 / D9 - A9 - PB5
|
||||
_BV(6), // D28 / D10 - A10 - PB6
|
||||
_BV(6), // D29 / D12 - A11 - PD6
|
||||
};
|
||||
|
||||
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
TIMER0B, /* 3 */
|
||||
NOT_ON_TIMER,
|
||||
TIMER3A, /* 5 */
|
||||
TIMER4D, /* 6 */
|
||||
NOT_ON_TIMER,
|
||||
|
||||
NOT_ON_TIMER,
|
||||
TIMER1A, /* 9 */
|
||||
TIMER1B, /* 10 */
|
||||
TIMER0A, /* 11 */
|
||||
|
||||
NOT_ON_TIMER,
|
||||
TIMER4A, /* 13 */
|
||||
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
NOT_ON_TIMER,
|
||||
};
|
||||
|
||||
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
||||
7, // A0 PF7 ADC7
|
||||
6, // A1 PF6 ADC6
|
||||
5, // A2 PF5 ADC5
|
||||
4, // A3 PF4 ADC4
|
||||
1, // A4 PF1 ADC1
|
||||
0, // A5 PF0 ADC0
|
||||
8, // A6 D4 PD4 ADC8
|
||||
10, // A7 D6 PD7 ADC10
|
||||
11, // A8 D8 PB4 ADC11
|
||||
12, // A9 D9 PB5 ADC12
|
||||
13, // A10 D10 PB6 ADC13
|
||||
9 // A11 D12 PD6 ADC9
|
||||
};
|
||||
|
||||
#endif /* ARDUINO_MAIN */
|
||||
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#define SERIAL_PORT_USBVIRTUAL Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#define SERIAL_PORT_HARDWARE_OPEN Serial1
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user