Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65f7bfcc8d | ||
|
|
4da241968c | ||
|
|
dd2b793c0c | ||
|
|
ef33befa06 | ||
|
|
2bddfb986d | ||
|
|
667045b492 | ||
|
|
f5209aa4e9 | ||
|
|
eb5d267e63 | ||
|
|
eaed517c0b | ||
|
|
ba628a28bc | ||
|
|
a1452db98a | ||
|
|
9b9a0f0bcb | ||
|
|
6b17067b15 | ||
|
|
055e940f06 | ||
|
|
3dd43d9cab | ||
|
|
6e710426a4 | ||
|
|
d11238f748 | ||
|
|
95c24bbaf8 | ||
|
|
1b0854fdca | ||
|
|
1fcd0b2578 | ||
|
|
619ee543b8 | ||
|
|
b6d8840915 | ||
|
|
d6e6feb377 | ||
|
|
919d69266e | ||
|
|
1e670f5e67 | ||
|
|
bf397fdd9f | ||
|
|
5153580698 | ||
|
|
3a69232213 | ||
|
|
2a6cb426ef | ||
|
|
2081c5e40e | ||
|
|
48cac9e3c8 | ||
|
|
537b8713e5 | ||
|
|
dff4f13c19 | ||
|
|
051faf4b64 | ||
|
|
2d94e02ea1 | ||
|
|
013ac11c95 | ||
|
|
dc2ed13a1c | ||
|
|
6e463c8084 | ||
|
|
3cd7cb81d4 | ||
|
|
d5e0f21798 | ||
|
|
1290039d7e | ||
|
|
e7541faadc | ||
|
|
6bcaf01c3f | ||
|
|
e7f4d56592 | ||
|
|
71493b2f9b | ||
|
|
86ad4988fe | ||
|
|
10975bd4c0 | ||
|
|
8d8f2d09cc | ||
|
|
9ce186860e | ||
|
|
4b2d3288d0 | ||
|
|
7b0200660e | ||
|
|
57a6ea11df | ||
|
|
89e8e0d277 | ||
|
|
d7c5cf6e5b | ||
|
|
a41e6804fc | ||
|
|
da1dc28d31 | ||
|
|
b42ca9bc5f | ||
|
|
42cb78f98e | ||
|
|
dc3a8ddb6b | ||
|
|
472060d333 | ||
|
|
5b80e10b82 | ||
|
|
7f8b0906c6 | ||
|
|
fa73d43818 | ||
|
|
5a86db2259 | ||
|
|
a5337b3495 | ||
|
|
cd379c69a0 | ||
|
|
156fd4e969 |
No files matched your search
+12
-7
@@ -12,6 +12,18 @@ env:
|
|||||||
- MAKEFLAGS="-j3 --output-sync"
|
- MAKEFLAGS="-j3 --output-sync"
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-trusty-7
|
||||||
|
packages:
|
||||||
|
- pandoc
|
||||||
|
- diffutils
|
||||||
|
- dos2unix
|
||||||
|
- doxygen
|
||||||
|
- clang-format-7
|
||||||
|
- libstdc++-7-dev
|
||||||
install:
|
install:
|
||||||
- npm install -g moxygen
|
- npm install -g moxygen
|
||||||
script:
|
script:
|
||||||
@@ -20,13 +32,6 @@ script:
|
|||||||
- bash util/travis_test.sh
|
- bash util/travis_test.sh
|
||||||
- bash util/travis_build.sh
|
- bash util/travis_build.sh
|
||||||
- bash util/travis_docs.sh
|
- bash util/travis_docs.sh
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- pandoc
|
|
||||||
- diffutils
|
|
||||||
- dos2unix
|
|
||||||
- doxygen
|
|
||||||
after_script:
|
after_script:
|
||||||
bash util/travis_compiled_push.sh
|
bash util/travis_compiled_push.sh
|
||||||
notifications:
|
notifications:
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(strip $(STENO_ENABLE)), yes)
|
ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DSTENO_ENABLE
|
OPT_DEFS += -DSTENO_ENABLE
|
||||||
VIRTSER_ENABLE := yes
|
VIRTSER_ENABLE ?= yes
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
* [I2C Driver](i2c_driver.md)
|
* [I2C Driver](i2c_driver.md)
|
||||||
* [WS2812 Driver](ws2812_driver.md)
|
* [WS2812 Driver](ws2812_driver.md)
|
||||||
* [GPIO Controls](internals_gpio_control.md)
|
* [GPIO Controls](internals_gpio_control.md)
|
||||||
|
* [Custom Matrix](custom_matrix.md)
|
||||||
* [Proton C Conversion](proton_c_conversion.md)
|
* [Proton C Conversion](proton_c_conversion.md)
|
||||||
|
|
||||||
* For a Deeper Understanding
|
* For a Deeper Understanding
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
||||||
* See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold)
|
* See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold)
|
||||||
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
|
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
|
||||||
|
* `#define TAPPING_FORCE_HOLD_PER_KEY`
|
||||||
|
* enables handling for per key `TAPPING_FORCE_HOLD` settings
|
||||||
* `#define LEADER_TIMEOUT 300`
|
* `#define LEADER_TIMEOUT 300`
|
||||||
* how long before the leader key times out
|
* how long before the leader key times out
|
||||||
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
|
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# Custom Matrix
|
||||||
|
|
||||||
|
QMK provides a mechanism to supplement or replace the default matrix scanning routine with your own code.
|
||||||
|
|
||||||
|
The reasons to use this feature include:
|
||||||
|
|
||||||
|
* Extra hardware between the keyboard's switches and MCU pins
|
||||||
|
* I/O multiplexer
|
||||||
|
* Line decoder
|
||||||
|
* Irregular switch matrix
|
||||||
|
* Simultaneous use of `COL2ROW` and `ROW2COL`
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`.
|
||||||
|
|
||||||
|
Add a new file to your keyboard directory:
|
||||||
|
```text
|
||||||
|
keyboards/<keyboard>/matrix.c
|
||||||
|
```
|
||||||
|
|
||||||
|
And to configure compilation for the new file, add this to your `rules.mk`:
|
||||||
|
```make
|
||||||
|
SRC += matrix.c
|
||||||
|
```
|
||||||
|
|
||||||
|
## 'lite'
|
||||||
|
|
||||||
|
Provides a default implementation for various scanning functions, reducing the boilerplate code when implementing custom matrix.
|
||||||
|
To configure it, add this to your `rules.mk`:
|
||||||
|
|
||||||
|
```make
|
||||||
|
CUSTOM_MATRIX = lite
|
||||||
|
```
|
||||||
|
|
||||||
|
And implement the following functions in a `matrix.c` file in your keyboard folder:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void matrix_init_custom(void) {
|
||||||
|
// TODO: initialize hardware here
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
|
bool matrix_has_changed = false;
|
||||||
|
|
||||||
|
// TODO: add matrix scanning routine here
|
||||||
|
|
||||||
|
return matrix_has_changed;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Full Replacement
|
||||||
|
|
||||||
|
When more control over the scanning routine is required, you can choose to implement the full scanning routine.
|
||||||
|
To configure it, add this to your rules.mk:
|
||||||
|
|
||||||
|
```make
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
And implement the following functions in a `matrix.c` file in your keyboard folder:
|
||||||
|
|
||||||
|
```c
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
// TODO: return the requested row data
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
// TODO: use print() to dump the current matrix state to console
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
// TODO: initialize hardware and global matrix state here
|
||||||
|
|
||||||
|
// Unless hardware debouncing - Init the configured debounce routine
|
||||||
|
debounce_init(MATRIX_ROWS);
|
||||||
|
|
||||||
|
// This *must* be called for correct keyboard behavior
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
bool matrix_has_changed = false;
|
||||||
|
|
||||||
|
// TODO: add matrix scanning routine here
|
||||||
|
|
||||||
|
// Unless hardware debouncing - use the configured debounce routine
|
||||||
|
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||||
|
|
||||||
|
// This *must* be called for correct keyboard behavior
|
||||||
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
return matrix_has_changed;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And also provide defaults for the following callbacks:
|
||||||
|
|
||||||
|
```c
|
||||||
|
__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) {}
|
||||||
|
```
|
||||||
@@ -291,6 +291,25 @@ Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` ena
|
|||||||
|
|
||||||
?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
||||||
|
|
||||||
|
For more granular control of this feature, you can add the following to your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then add the following function to your keymap:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case SFT_T(KC_SPC):
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Tapping Force Hold
|
## Tapping Force Hold
|
||||||
|
|
||||||
To enable `tapping force hold`, add the following to your `config.h`:
|
To enable `tapping force hold`, add the following to your `config.h`:
|
||||||
@@ -315,6 +334,25 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
|
|||||||
|
|
||||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||||
|
|
||||||
|
For more granular control of this feature, you can add the following to your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define TAPPING_FORCE_HOLD_PER_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then add the following function to your keymap:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case LT(1, KC_BSPC):
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Retro Tapping
|
## Retro Tapping
|
||||||
|
|
||||||
To enable `retro tapping`, add the following to your `config.h`:
|
To enable `retro tapping`, add the following to your `config.h`:
|
||||||
|
|||||||
@@ -380,6 +380,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
|||||||
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
|
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
|
||||||
|
#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set
|
||||||
|
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
|
||||||
|
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||||
|
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||||
```
|
```
|
||||||
|
|
||||||
## EEPROM storage
|
## EEPROM storage
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ As there is no standard split communication driver for ARM-based split keyboards
|
|||||||
|
|
||||||
`CUSTOM_MATRIX`
|
`CUSTOM_MATRIX`
|
||||||
|
|
||||||
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan().
|
Lets you replace the default matrix scanning routine with your own code. For further details, see the [Custom Matrix page](custom_matrix.md).
|
||||||
|
|
||||||
`DEBOUNCE_TYPE`
|
`DEBOUNCE_TYPE`
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
|||||||
|
|
||||||
// If any of the transactions fail we risk writing dirty PG0,
|
// If any of the transactions fail we risk writing dirty PG0,
|
||||||
// refresh page 0 just in case.
|
// refresh page 0 just in case.
|
||||||
if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])){
|
if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
|
||||||
g_led_control_registers_update_required[index] = true;
|
g_led_control_registers_update_required[index] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* number of backlight levels */
|
/* number of backlight levels */
|
||||||
#define BACKLIGHT_PIN B5
|
#define BACKLIGHT_PIN B5
|
||||||
#ifdef BACKLIGHT_PIN
|
#ifdef BACKLIGHT_PIN
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
|
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define SOFT_SERIAL_PIN D0
|
#define SOFT_SERIAL_PIN D0
|
||||||
|
|
||||||
/* define tapping term */
|
/* define tapping term */
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 }
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
+13
-21
@@ -17,27 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
void keyboard_pre_init_kb(void) {
|
||||||
void backlight_init_ports(void) {
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
setPinOutput(D1);
|
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void led_init_ports(void) {
|
||||||
if (level == 0) {
|
setPinOutput(D1);
|
||||||
// Turn out the lights
|
writePinHigh(D1);
|
||||||
writePinLow(D0);
|
}
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
bool led_update_kb(led_t led_state) {
|
||||||
writePinLow(D6);
|
if (led_update_user(led_state)) {
|
||||||
} else {
|
writePin(D1, !led_state.caps_lock);
|
||||||
// Turn on the lights
|
}
|
||||||
writePinHigh(D0);
|
return true;
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
@@ -37,7 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no
|
|||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
|
|
||||||
|
|||||||
+13
-24
@@ -17,30 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "bfake.h"
|
#include "bfake.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
setPinOutput(D0);
|
led_init_ports();
|
||||||
setPinOutput(D1);
|
keyboard_pre_init_user();
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void led_init_ports(void) {
|
||||||
if (level == 0) {
|
setPinOutput(D1);
|
||||||
// Turn out the lights
|
writePinHigh(D1);
|
||||||
writePinLow(D0);
|
}
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
bool led_update_kb(led_t led_state) {
|
||||||
writePinLow(D6);
|
if (led_update_user(led_state)) {
|
||||||
} else {
|
writePin(D1, !led_state.caps_lock);
|
||||||
// Turn on the lights
|
}
|
||||||
writePinHigh(D0);
|
return true;
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BFAKE_CONFIG_H
|
#pragma once
|
||||||
#define BFAKE_CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -38,9 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = yes
|
|||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 }
|
#define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define RGBLED_NUM 18
|
#define RGBLED_NUM 18
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
|
|||||||
@@ -16,32 +16,22 @@
|
|||||||
|
|
||||||
#include "budget96.h"
|
#include "budget96.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
writePinHigh(D0);
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D0, !led_state.num_lock);
|
||||||
writePinLow(D0);
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -37,5 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
|||||||
BOOTMAGIC_ENABLE = no
|
BOOTMAGIC_ENABLE = no
|
||||||
MOUSEKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = no
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|||||||
+1
-4
@@ -3,7 +3,4 @@
|
|||||||
# dfu-programmer atmega32u4 reset
|
# dfu-programmer atmega32u4 reset
|
||||||
|
|
||||||
# run this in the qmk_firmware directory
|
# run this in the qmk_firmware directory
|
||||||
make dz60:billiams
|
make dz60:billiams_layout2:flash
|
||||||
dfu-programmer atmega32u4 erase --force && \
|
|
||||||
dfu-programmer atmega32u4 flash dz60_billiams.hex && \
|
|
||||||
dfu-programmer atmega32u4 reset
|
|
||||||
File renamed without changes.
@@ -0,0 +1,48 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
LAYOUT_60_2_function(
|
||||||
|
KC_GRAVE, 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_DEL,
|
||||||
|
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,
|
||||||
|
MO(1), 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_ESCAPE,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(1)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute| Prev | Next |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | |Scr- |Scr+ | | | |RESET|
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
LAYOUT_60_2_function(
|
||||||
|
_______, 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__VOLDOWN, KC__VOLUP,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC_MRWD, KC_MFFD,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, KC_MPLY,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
## Billiam's DZ60 60_2 layout (KBDFANS Layout 2 with split backspace and split right shift)
|
||||||
|
|
||||||
|
This layout is optimized for MacOS and is for a Build 2 DZ60 with a 2U left shift, 1.75U right shift and no arrow cluster. Don't use this layout if you didn't get Build 2, you will enter a world of pain Donny.
|
||||||
|
|
||||||
|
Settings:
|
||||||
|
|
||||||
|
* The `CAPS LOCK` key is a function key.
|
||||||
|
* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
|
||||||
|
* RESET is available as `Fn`+ ` ESC`
|
||||||
|
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||||
|
* vim-style arrow key bindings H J K L in layer 1
|
||||||
|
|
||||||
|
### Initial Installation
|
||||||
|
|
||||||
|
I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
|
||||||
|
|
||||||
|
1. Clone the qmk_firmware repo locally
|
||||||
|
```
|
||||||
|
# Choose one:
|
||||||
|
git clone git@github.com:qmk/qmk_firmware.git # OR
|
||||||
|
git clone https://github.com/qmk/qmk_firmware.git
|
||||||
|
```
|
||||||
|
2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`.
|
||||||
|
|
||||||
|
3. Build your hex file
|
||||||
|
```
|
||||||
|
make dz60:billiams_layout2 # be in the qmk_firmware directory to do this
|
||||||
|
```
|
||||||
|
A hex file `dz60_billiams_layout2.hex` will be created in the base qmk_firmware directory
|
||||||
|
|
||||||
|
4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down
|
||||||
|
5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode
|
||||||
|
6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away.
|
||||||
|
|
||||||
|
Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard.
|
||||||
|
|
||||||
|
Hope this helps!
|
||||||
|
|
||||||
|
### 0 Qwerty
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | DEL |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1 Fn Layer
|
||||||
|
```
|
||||||
|
FN Layer
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | |Scr- |Scr+ | | | | RESET |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# dfu-programmer atmega32u4 erase --force
|
||||||
|
# dfu-programmer atmega32u4 flash /path/to/firmware.hex
|
||||||
|
# dfu-programmer atmega32u4 reset
|
||||||
|
|
||||||
|
# run this in the qmk_firmware directory
|
||||||
|
make dz60:billiams_layout4:flash
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
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 | [ | ] | \ |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
LAYOUT_directional(
|
||||||
|
KC_GRAVE, 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,
|
||||||
|
MO(1), 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, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | HOME|PG_DN| END |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
LAYOUT_directional(
|
||||||
|
_______, 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,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||||
|
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
## Billiam's DZ60 Directional layout
|
||||||
|
|
||||||
|
This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow
|
||||||
|
cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny.
|
||||||
|
|
||||||
|
Settings:
|
||||||
|
|
||||||
|
* The `CAPS LOCK` key is replaced with a second function key.
|
||||||
|
* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
|
||||||
|
* Del is available as `Fn` + `Backspace`
|
||||||
|
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
|
||||||
|
* RESET is available as `Fn`+ ` ESC`
|
||||||
|
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||||
|
* vim-style arrow key bindings H J K L in layer 1
|
||||||
|
|
||||||
|
### Initial Installation
|
||||||
|
|
||||||
|
I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
|
||||||
|
|
||||||
|
1. Clone the qmk_firmware repo locally
|
||||||
|
```
|
||||||
|
# Choose one:
|
||||||
|
git clone git@github.com:qmk/qmk_firmware.git # OR
|
||||||
|
git clone https://github.com/qmk/qmk_firmware.git
|
||||||
|
```
|
||||||
|
2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`.
|
||||||
|
|
||||||
|
3. Build your hex file
|
||||||
|
```
|
||||||
|
make dz60:billiams_layout4 # be in the qmk_firmware directory to do this
|
||||||
|
```
|
||||||
|
A hex file `dz60_billiams_layout4.hex` will be created in the base qmk_firmware directory
|
||||||
|
|
||||||
|
4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down
|
||||||
|
5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode
|
||||||
|
6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away.
|
||||||
|
|
||||||
|
Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard.
|
||||||
|
|
||||||
|
Hope this helps!
|
||||||
|
|
||||||
|
### 0 Qwerty
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1 Fn Layer
|
||||||
|
```
|
||||||
|
FN Layer
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | HOME | PG_DN | END |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define tapping term */
|
/* define tapping term */
|
||||||
#define TAPPING_TERM 120
|
#define TAPPING_TERM 120
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define tapping term */
|
/* define tapping term */
|
||||||
#define TAPPING_TERM 120
|
#define TAPPING_TERM 120
|
||||||
|
|
||||||
@@ -69,6 +71,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGBLIGHT_SPLIT
|
#define RGBLIGHT_SPLIT
|
||||||
#define RGBLED_SPLIT { 12, 12 } // Number of LEDs
|
#define RGBLED_SPLIT { 12, 12 } // Number of LEDs
|
||||||
|
|
||||||
|
// The LEDs on the slave half go in reverse order
|
||||||
|
#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, \
|
||||||
|
23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12}
|
||||||
|
|
||||||
#define SOFT_SERIAL_PIN D0
|
#define SOFT_SERIAL_PIN D0
|
||||||
#define SELECT_SOFT_SERIAL_SPEED 1
|
#define SELECT_SOFT_SERIAL_SPEED 1
|
||||||
/*Sets the protocol speed when using serial communication*/
|
/*Sets the protocol speed when using serial communication*/
|
||||||
|
|||||||
@@ -25,13 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||||
USB_6KRO_ENABLE = no # USB 6key Rollover
|
USB_6KRO_ENABLE = no # USB 6key Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
KEYMAP_IN_EEPROM_ENABLE = no # External keymap in eeprom
|
|
||||||
KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor
|
|
||||||
SOFTPWM_LED_ENABLE = no # Enable SoftPWM to drive backlight
|
|
||||||
FADING_LED_ENABLE = no # Enable fading backlight
|
|
||||||
BREATHING_LED_ENABLE = no # Enable breathing backlight
|
|
||||||
LEDMAP_ENABLE = no # Enable LED mapping
|
|
||||||
LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom
|
|
||||||
SWAP_HANDS_ENABLE = no # Disable Onehand
|
SWAP_HANDS_ENABLE = no # Disable Onehand
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
MIDI_ENABLE = no
|
MIDI_ENABLE = no
|
||||||
|
|||||||
@@ -36,4 +36,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
@@ -16,32 +16,19 @@
|
|||||||
|
|
||||||
#include "meteor.h"
|
#include "meteor.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -45,5 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLED_NUM 6
|
#define RGBLED_NUM 6
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -16,32 +16,19 @@
|
|||||||
|
|
||||||
#include "le_bmc.h"
|
#include "le_bmc.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -17,13 +17,13 @@ BOOTLOADER = bootloadHID
|
|||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
|||||||
@@ -45,5 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLED_NUM 6
|
#define RGBLED_NUM 6
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -16,32 +16,19 @@
|
|||||||
|
|
||||||
#include "oe_bmc.h"
|
#include "oe_bmc.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -17,13 +17,13 @@ BOOTLOADER = bootloadHID
|
|||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -15,3 +15,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "exent.h"
|
#include "exent.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
led_init_ports();
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(D0);
|
||||||
|
setPinOutput(D1);
|
||||||
|
setPinOutput(D6);
|
||||||
|
writePinHigh(D0);
|
||||||
|
writePinHigh(D1);
|
||||||
|
writePinHigh(D6);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
if (led_update_user(led_state)) {
|
||||||
|
writePin(D0, !led_state.num_lock);
|
||||||
|
writePin(D1, !led_state.caps_lock);
|
||||||
|
writePin(D6, !led_state.scroll_lock);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no
|
|||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
|
|
||||||
|
|||||||
@@ -37,5 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
+15
-24
@@ -17,30 +17,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "facew.h"
|
#include "facew.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
setPinOutput(D0);
|
led_init_ports();
|
||||||
setPinOutput(D1);
|
keyboard_pre_init_user();
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void led_init_ports(void) {
|
||||||
if (level == 0) {
|
setPinOutput(D0);
|
||||||
// Turn out the lights
|
setPinOutput(D1);
|
||||||
writePinLow(D0);
|
writePinHigh(D0);
|
||||||
writePinLow(D1);
|
writePinHigh(D1);
|
||||||
writePinLow(D4);
|
}
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
bool led_update_kb(led_t led_state) {
|
||||||
// Turn on the lights
|
if (led_update_user(led_state)) {
|
||||||
writePinHigh(D0);
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinHigh(D1);
|
}
|
||||||
writePinHigh(D4);
|
return true;
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
|||||||
BOOTMAGIC_ENABLE = no
|
BOOTMAGIC_ENABLE = no
|
||||||
MOUSEKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = no
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -16,32 +16,22 @@
|
|||||||
|
|
||||||
#include "mars80.h"
|
#include "mars80.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
setPinOutput(D1);
|
}
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
// turn backlight LEDs on
|
void led_init_ports(void) {
|
||||||
writePinHigh(D0);
|
setPinOutput(D1);
|
||||||
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
writePinHigh(D6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D0);
|
writePin(D6, !led_state.scroll_lock);
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -18,32 +18,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "hb85.h"
|
#include "hb85.h"
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// initialize pins D0, D1, D4 and D6 as output
|
led_init_ports();
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
writePinHigh(D0);
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
writePinHigh(D6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (level == 0) {
|
if (led_update_user(led_state)) {
|
||||||
// turn backlight LEDs off
|
writePin(D0, !led_state.num_lock);
|
||||||
writePinLow(D0);
|
writePin(D1, !led_state.caps_lock);
|
||||||
writePinLow(D1);
|
writePin(D6, !led_state.scroll_lock);
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
} else {
|
|
||||||
// turn backlight LEDs on
|
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no
|
|||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,------------------------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | DEL | INS |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | PGUP |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PGDN |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | Up | ESC |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | Alt | Cmd | Space | Alt | Ctrl | Left | Down | Right |
|
||||||
|
* `------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[0] = LAYOUT( \
|
||||||
|
KC_GRAVE, 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_DEL, KC_INS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \
|
||||||
|
MO(1), 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_PGDN, \
|
||||||
|
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 1st Layer
|
||||||
|
* ,------------------------------------------------------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | Next |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | | | | Prev |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | RGBP | RGPG | RGPK | | | Left| Down| Up |Right| | | Play/Pause | |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | Scr- | Scr+ | | | PGUP | |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | Fn2 | HOME | PGDN | END |
|
||||||
|
* `------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[1] = LAYOUT( \
|
||||||
|
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_VOLD, KC_VOLU, KC_MFFD, \
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, \
|
||||||
|
KC_TRNS, RGB_M_P, RGB_M_G, RGB_M_K, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 2nd Layer
|
||||||
|
* ,------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | | RESET |
|
||||||
|
* |------------------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[2] = LAYOUT( \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, 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 \
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
## Billiam's Space65 layout (with split backspace)
|
||||||
|
|
||||||
|
This layout is optimized for vim users on MacOS with a split backspace.
|
||||||
|
|
||||||
|
Settings:
|
||||||
|
|
||||||
|
* The `CAPS LOCK` key is a function key.
|
||||||
|
* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
|
||||||
|
* RESET is available as `Fn`+ `Right Ctrl` + `ESC`
|
||||||
|
* Underglow toggle is available as `Fn` + `Q`.
|
||||||
|
* vim-style arrow key bindings H J K L in layer 1
|
||||||
|
|
||||||
|
### Initial Installation
|
||||||
|
|
||||||
|
I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
|
||||||
|
|
||||||
|
1. Fork and Clone the qmk_firmware repo locally
|
||||||
|
```
|
||||||
|
# Choose one:
|
||||||
|
git clone git@github.com:qmk/qmk_firmware.git # OR
|
||||||
|
git clone https://github.com/qmk/qmk_firmware.git
|
||||||
|
```
|
||||||
|
2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/gray_studio/space65/keymaps). I copied the default and changed it to my liking.
|
||||||
|
3. Before plugging in your keyboard into your computer, hold `ESC` key down
|
||||||
|
4. Plug the keyboard into your computer, which will put the keyboard in bootloader mode.
|
||||||
|
5. Build your hex file and flash your keyboard
|
||||||
|
```
|
||||||
|
make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do this
|
||||||
|
```
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- If you are using QMK Toolbox, use `make gray_studio/space65:<keymap>` in the base qmk_firmware directory instead of step 5 above which will create a hex file `gray_studio_space65_billiams.hex` which you can then choose in the toolbox and hit flash
|
||||||
|
- If you accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootloader mode again, hold the `ESC` key and plug the board in.
|
||||||
|
|
||||||
|
Hope this helps!
|
||||||
|
|
||||||
|
### 0 Qwerty
|
||||||
|
```
|
||||||
|
,------------------------------------------------------------------------------------------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | INS |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | PGUP |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PGDN |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | up | ESC |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| Ctrl | Alt | Cmd | Space | Alt | Ctrl | Left | Down | Right |
|
||||||
|
`------------------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1 Fn Layer
|
||||||
|
```
|
||||||
|
,------------------------------------------------------------------------------------------------.
|
||||||
|
| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | Next |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Spd- | Spd+ | | | | Prev |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | RGBP | RGBG | RGBK | | | Left| Down| Up |Right| | | Play/Pause | |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | Scr- | Scr+ | | |PGUP | |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | Fn2 | HOME | PGDN | END |
|
||||||
|
`------------------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2 Fn Layer - Just for bootloader mode button
|
||||||
|
```
|
||||||
|
,------------------------------------------------------------------------------------------------.
|
||||||
|
| | | | | | | | | | | | | | | | |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | | RESET |
|
||||||
|
|------------------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | |
|
||||||
|
`------------------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 Rys Sommefeldt
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_65_iso_blocker(
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ ` │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │Del│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PUp│
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
|
||||||
|
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PDn│
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │Ctrl│LGUI│LAlt│ Spaaaaaaace │RAlt│ L1 │ │ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_DEL,
|
||||||
|
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_PGUP,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_65_iso_blocker(
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
RGB_TOG, RGB_M_P, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# ISO keymap for Space65
|
||||||
|
|
||||||
|
Make this firmware with `make gray_studio/space65:iso`.
|
||||||
@@ -32,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
LAYOUTS = 65_ansi_blocker
|
LAYOUTS = 65_ansi_blocker 65_iso_blocker
|
||||||
@@ -55,3 +55,16 @@
|
|||||||
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \
|
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_65_iso_blocker( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \
|
||||||
|
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \
|
||||||
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1E, K2D, K2F, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||||
|
K40, K41, K43, K47, K4A, K4B, K4D, K4E, K4F \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \
|
||||||
|
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||||
|
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||||
|
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \
|
||||||
|
}
|
||||||
@@ -39,6 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 }
|
#define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
|
// #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
|
||||||
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// WS2812 RGB LED strip input and number of LEDs
|
// WS2812 RGB LED strip input and number of LEDs
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 12
|
#define RGBLED_NUM 12
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// WS2812 RGB LED strip input and number of LEDs
|
// WS2812 RGB LED strip input and number of LEDs
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 12
|
#define RGBLED_NUM 12
|
||||||
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
#define MATRIX_ROW_PINS { F5, F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_ROW_PINS { F5, F6, F7, B1, B3, B2, B6 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// WS2812 RGB LED strip input and number of LEDs
|
// WS2812 RGB LED strip input and number of LEDs
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 12
|
#define RGBLED_NUM 12
|
||||||
@@ -37,6 +37,8 @@
|
|||||||
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
||||||
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// WS2812 RGB LED, normally used to indicate keyboard state:
|
// WS2812 RGB LED, normally used to indicate keyboard state:
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT
|
#define RGBLIGHT_EFFECT_KNIGHT
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x3060
|
#define PRODUCT_ID 0x3060
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
//#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#define MATRIX_ROW_PINS { NO_PIN }
|
#define MATRIX_ROW_PINS { NO_PIN }
|
||||||
#define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 }
|
#define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { B6 }
|
#define MATRIX_ROW_PINS { B6 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 1
|
#define MATRIX_ROWS 1
|
||||||
#define MATRIX_COLS 1
|
#define MATRIX_COLS 1
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 2
|
#define MATRIX_ROWS 2
|
||||||
#define MATRIX_COLS 1
|
#define MATRIX_COLS 1
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
#define MATRIX_ROW_PINS { B8, A0, A1, A2 }
|
#define MATRIX_ROW_PINS { B8, A0, A1, A2 }
|
||||||
#define MATRIX_COL_PINS { B13, B14, B15, B9, B7, B6, B5, B4, B3, B2, B1, B0 }
|
#define MATRIX_COL_PINS { B13, B14, B15, B9, B7, B6, B5, B4, B3, B2, B1, B0 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
Xyverz's HHKB layout
|
||||||
|
|
||||||
|
Rev 0.1, initial commit.
|
||||||
|
|
||||||
|
This is my initial keymap for the HHKB with Hasu's alternate controller.
|
||||||
|
The default layer is Dvorak, with Qwerty and Colemak being optional.
|
||||||
|
Will probably add to it later, but for now I'm going to enjoy this as it is.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_QW,
|
||||||
|
_DV,
|
||||||
|
_CM,
|
||||||
|
_FL,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK };
|
||||||
|
|
||||||
|
#define FN_TAB LT(_FL, KC_TAB)
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _QW: Qwerty Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn/Tb| Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Control| A| S| D| F| G| H| J| K| L| ;| '| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Alt |Gui | Space |Gui |Alt | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
/* Layer 0: Qwerty */
|
||||||
|
[_QW] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL ,
|
||||||
|
FN_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_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, MO(_FL),
|
||||||
|
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _DV: Dvorak Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn/Tb| '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Control| A| O| E| U| I| D| H| T| N| S| -| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Alt |Gui | Space |Gui |Alt | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
/* Layer 1: Dvorak */
|
||||||
|
[_DV] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
||||||
|
FN_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL),
|
||||||
|
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _CM: Colemak Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn/Tb| Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Control| A| R| S| T| D| H| N| E| I| O| '| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Alt |Gui | Space |Gui |Alt | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
/* Layer 2: Colemak */
|
||||||
|
[_CM] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL ,
|
||||||
|
FN_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL),
|
||||||
|
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _FL: Function Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Grv |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |CAPS | |Mut|VlD|VlU| |End| | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | Ins | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
/* Layer 3: Functions */
|
||||||
|
[_FL] = LAYOUT(
|
||||||
|
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, _______, RESET ,
|
||||||
|
_______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______,
|
||||||
|
KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||||
|
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DVORAK:
|
||||||
|
set_single_persistent_default_layer(_DV);
|
||||||
|
return false;
|
||||||
|
case QWERTY:
|
||||||
|
set_single_persistent_default_layer(_QW);
|
||||||
|
return false;
|
||||||
|
case COLEMAK:
|
||||||
|
set_single_persistent_default_layer(_CM);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/* Copyright 2019 hineybush
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* 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, k113, 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, k314, k315, \
|
||||||
|
k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k414, k415, \
|
||||||
|
k500, k501, k502, k504, k506, k508, k510, k511, k513, k514, k515 \ */
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL,
|
||||||
|
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_BSPC, KC_HOME,
|
||||||
|
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_PGUP,
|
||||||
|
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_PGDN,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RGB_TOG,
|
||||||
|
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,RGB_MOD,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default VIA keymap for h75_singa
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/* Copyright 2020 Josh Hinnebusch
|
||||||
|
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||||
|
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_MPLY, KC_MNXT, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||||
|
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_MPLY, KC_MNXT, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||||
|
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_MPLY, KC_MNXT, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(D5);
|
||||||
|
setPinOutput(E6);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
writePin(D5, !led_state.caps_lock);
|
||||||
|
writePin(E6, !led_state.scroll_lock);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default VIA keymap for h87a
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2020 Josh Hinnebusch
|
||||||
|
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_0, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||||
|
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_MPLY, KC_MNXT, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default VIA keymap for h88a
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/* Copyright 2019 hineybush
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN,
|
||||||
|
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_GRV, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS,
|
||||||
|
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_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
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_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
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_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_TRNS,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, 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, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS
|
||||||
|
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS
|
||||||
|
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The default VIA keymap for hbcp
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||||
USB_6KRO_ENABLE = no # USB 6key Rollover
|
USB_6KRO_ENABLE = no # USB 6key Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor
|
|
||||||
SWAP_HANDS_ENABLE = no # Disable Onehand
|
SWAP_HANDS_ENABLE = no # Disable Onehand
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
MIDI_ENABLE = no
|
MIDI_ENABLE = no
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLED_NUM 16
|
#define RGBLED_NUM 16
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
|||||||
+13
-26
@@ -17,32 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "v32a.h"
|
#include "v32a.h"
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
void keyboard_pre_init_kb(void) {
|
||||||
void backlight_init_ports(void) {
|
led_init_ports();
|
||||||
setPinOutput(D0);
|
keyboard_pre_init_user();
|
||||||
setPinOutput(D1);
|
|
||||||
setPinOutput(D4);
|
|
||||||
setPinOutput(D6);
|
|
||||||
|
|
||||||
writePinLow(D0);
|
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
|
||||||
writePinLow(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void led_init_ports(void) {
|
||||||
if (level == 0) {
|
setPinOutput(D1);
|
||||||
// Turn out the lights
|
writePinHigh(D1);
|
||||||
writePinLow(D0);
|
}
|
||||||
writePinLow(D1);
|
|
||||||
writePinLow(D4);
|
bool led_update_kb(led_t led_state) {
|
||||||
writePinLow(D6);
|
if (led_update_user(led_state)) {
|
||||||
} else {
|
writePin(D1, !led_state.caps_lock);
|
||||||
// Turn on the lights
|
}
|
||||||
writePinHigh(D0);
|
return true;
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D4);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 12
|
#define BACKLIGHT_LEVELS 12
|
||||||
// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a
|
#define BACKLIGHT_BREATHING
|
||||||
|
|
||||||
/* RGB underglow */
|
/* RGB underglow */
|
||||||
// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
|
// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 12
|
#define BACKLIGHT_LEVELS 12
|
||||||
// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a
|
#define BACKLIGHT_BREATHING
|
||||||
|
|
||||||
/* RGB underglow */
|
/* RGB underglow */
|
||||||
// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
|
// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
|
||||||
|
|||||||
@@ -1,213 +0,0 @@
|
|||||||
/**
|
|
||||||
* Backlighting code for PS2AVRGB boards (ATMEGA32A)
|
|
||||||
* Kenneth A. (github.com/krusli | krusli.me)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "backlight.h"
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include <avr/interrupt.h>
|
|
||||||
|
|
||||||
#include "backlight_custom.h"
|
|
||||||
#include "breathing_custom.h"
|
|
||||||
|
|
||||||
// DEBUG
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
// Port D: digital pins of the AVR chipset
|
|
||||||
#define NUMLOCK_PORT (1 << 0) // D0
|
|
||||||
#define CAPSLOCK_PORT (1 << 1) // D1
|
|
||||||
#define BACKLIGHT_PORT (1 << 4) // D4
|
|
||||||
#define SCROLLLOCK_PORT (1 << 6) // D6
|
|
||||||
|
|
||||||
#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64
|
|
||||||
#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default
|
|
||||||
|
|
||||||
#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask
|
|
||||||
|
|
||||||
#define PWM_MAX 0xFF
|
|
||||||
#define TIMER_TOP 255 // 8 bit PWM
|
|
||||||
|
|
||||||
extern backlight_config_t backlight_config;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* References
|
|
||||||
* Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
|
|
||||||
* TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
|
|
||||||
* Timers: http://www.avrbeginners.net/architecture/timers/timers.html
|
|
||||||
* 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
|
|
||||||
* PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @Override
|
|
||||||
// turn LEDs on and off depending on USB caps/num/scroll lock states.
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
|
||||||
// turn on
|
|
||||||
DDRD |= NUMLOCK_PORT;
|
|
||||||
PORTD |= NUMLOCK_PORT;
|
|
||||||
} else {
|
|
||||||
// turn off
|
|
||||||
DDRD &= ~NUMLOCK_PORT;
|
|
||||||
PORTD &= ~NUMLOCK_PORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
|
||||||
DDRD |= CAPSLOCK_PORT;
|
|
||||||
PORTD |= CAPSLOCK_PORT;
|
|
||||||
} else {
|
|
||||||
DDRD &= ~CAPSLOCK_PORT;
|
|
||||||
PORTD &= ~CAPSLOCK_PORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
||||||
DDRD |= SCROLLLOCK_PORT;
|
|
||||||
PORTD |= SCROLLLOCK_PORT;
|
|
||||||
} else {
|
|
||||||
DDRD &= ~SCROLLLOCK_PORT;
|
|
||||||
PORTD &= ~SCROLLLOCK_PORT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
|
||||||
|
|
||||||
// sets up Timer 1 for 8-bit PWM
|
|
||||||
void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE
|
|
||||||
// default 8 bit mode
|
|
||||||
TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH
|
|
||||||
TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW
|
|
||||||
|
|
||||||
// clear output compare value A
|
|
||||||
// outb(OCR1AH, 0);
|
|
||||||
// outb(OCR1AL, 0);
|
|
||||||
|
|
||||||
// clear output comparator registers for B
|
|
||||||
OCR1BH = 0; // outb(OCR1BH, 0);
|
|
||||||
OCR1BL = 0; // outb(OCR1BL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_init = false;
|
|
||||||
void timer1Init(void) {
|
|
||||||
// timer1SetPrescaler(TIMER1PRESCALE)
|
|
||||||
// set to DIV/64
|
|
||||||
(TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE;
|
|
||||||
|
|
||||||
// reset TCNT1
|
|
||||||
TCNT1H = 0; // outb(TCNT1H, 0);
|
|
||||||
TCNT1L = 0; // outb(TCNT1L, 0);
|
|
||||||
|
|
||||||
// TOIE1: Timer Overflow Interrupt Enable (Timer 1);
|
|
||||||
TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1);
|
|
||||||
|
|
||||||
is_init = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void timer1UnInit(void) {
|
|
||||||
// set prescaler back to NONE
|
|
||||||
(TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP
|
|
||||||
|
|
||||||
// disable timer overflow interrupt
|
|
||||||
TIMSK &= ~_BV(TOIE1); // overflow bit?
|
|
||||||
|
|
||||||
setPWM(0);
|
|
||||||
|
|
||||||
is_init = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// handle TCNT1 overflow
|
|
||||||
//! Interrupt handler for tcnt1 overflow interrupt
|
|
||||||
ISR(TIMER1_OVF_vect, ISR_NOBLOCK)
|
|
||||||
{
|
|
||||||
// sei();
|
|
||||||
// handle breathing here
|
|
||||||
#ifdef BACKLIGHT_BREATHING
|
|
||||||
if (is_breathing()) {
|
|
||||||
custom_breathing_handler();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO call user defined function
|
|
||||||
}
|
|
||||||
|
|
||||||
// enable timer 1 PWM
|
|
||||||
// timer1PWMBOn()
|
|
||||||
void timer1PWMBEnable(void) {
|
|
||||||
// turn on channel B (OC1B) PWM output
|
|
||||||
// set OC1B as non-inverted PWM
|
|
||||||
TCCR1A |= _BV(COM1B1);
|
|
||||||
TCCR1A &= ~_BV(COM1B0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// disable timer 1 PWM
|
|
||||||
// timer1PWMBOff()
|
|
||||||
void timer1PWMBDisable(void) {
|
|
||||||
TCCR1A &= ~_BV(COM1B1);
|
|
||||||
TCCR1A &= ~_BV(COM1B0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void enableBacklight(void) {
|
|
||||||
DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
|
|
||||||
PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
|
|
||||||
}
|
|
||||||
|
|
||||||
void disableBacklight(void) {
|
|
||||||
// DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
|
|
||||||
PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
|
|
||||||
}
|
|
||||||
|
|
||||||
void startPWM(void) {
|
|
||||||
timer1Init();
|
|
||||||
timer1PWMBEnable();
|
|
||||||
enableBacklight();
|
|
||||||
}
|
|
||||||
|
|
||||||
void stopPWM(void) {
|
|
||||||
timer1UnInit();
|
|
||||||
disableBacklight();
|
|
||||||
timer1PWMBDisable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void b_led_init_ports(void) {
|
|
||||||
/* turn backlight on/off depending on user preference */
|
|
||||||
#if BACKLIGHT_ON_STATE == 0
|
|
||||||
// DDRx register: sets the direction of Port D
|
|
||||||
// DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
|
|
||||||
PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
|
|
||||||
#else
|
|
||||||
DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
|
|
||||||
PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
|
|
||||||
#endif
|
|
||||||
|
|
||||||
timer1PWMSetup();
|
|
||||||
startPWM();
|
|
||||||
|
|
||||||
#ifdef BACKLIGHT_BREATHING
|
|
||||||
breathing_enable();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void b_led_set(uint8_t level) {
|
|
||||||
if (level > BACKLIGHT_LEVELS) {
|
|
||||||
level = BACKLIGHT_LEVELS;
|
|
||||||
}
|
|
||||||
|
|
||||||
setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS));
|
|
||||||
}
|
|
||||||
|
|
||||||
// called every matrix scan
|
|
||||||
void b_led_task(void) {
|
|
||||||
// do nothing for now
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPWM(uint16_t xValue) {
|
|
||||||
if (xValue > TIMER_TOP) {
|
|
||||||
xValue = TIMER_TOP;
|
|
||||||
}
|
|
||||||
OCR1B = xValue; // timer1PWMBSet(xValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // BACKLIGHT_ENABLE
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/**
|
|
||||||
* Backlighting code for PS2AVRGB boards (ATMEGA32A)
|
|
||||||
* Kenneth A. (github.com/krusli | krusli.me)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BACKLIGHT_CUSTOM_H
|
|
||||||
#define BACKLIGHT_CUSTOM_H
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
void b_led_init_ports(void);
|
|
||||||
void b_led_set(uint8_t level);
|
|
||||||
void b_led_task(void);
|
|
||||||
void setPWM(uint16_t xValue);
|
|
||||||
|
|
||||||
#endif // BACKLIGHT_CUSTOM_H
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
/**
|
|
||||||
* Breathing effect code for PS2AVRGB boards (ATMEGA32A)
|
|
||||||
* Works in conjunction with `backlight.c`.
|
|
||||||
*
|
|
||||||
* Code adapted from `quantum.c` to register with the existing TIMER1 overflow
|
|
||||||
* handler in `backlight.c` instead of setting up its own timer.
|
|
||||||
* Kenneth A. (github.com/krusli | krusli.me)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
|
||||||
#ifdef BACKLIGHT_BREATHING
|
|
||||||
|
|
||||||
#include "backlight_custom.h"
|
|
||||||
|
|
||||||
#ifndef BREATHING_PERIOD
|
|
||||||
#define BREATHING_PERIOD 6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define breathing_min() do {breathing_counter = 0;} while (0)
|
|
||||||
#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0)
|
|
||||||
|
|
||||||
// TODO make this share code with quantum.c
|
|
||||||
|
|
||||||
#define BREATHING_NO_HALT 0
|
|
||||||
#define BREATHING_HALT_OFF 1
|
|
||||||
#define BREATHING_HALT_ON 2
|
|
||||||
#define BREATHING_STEPS 128
|
|
||||||
|
|
||||||
static uint8_t breathing_period = BREATHING_PERIOD;
|
|
||||||
static uint8_t breathing_halt = BREATHING_NO_HALT;
|
|
||||||
static uint16_t breathing_counter = 0;
|
|
||||||
|
|
||||||
static bool breathing = false;
|
|
||||||
|
|
||||||
bool is_breathing(void) {
|
|
||||||
return breathing;
|
|
||||||
}
|
|
||||||
|
|
||||||
// See http://jared.geek.nz/2013/feb/linear-led-pwm
|
|
||||||
static uint16_t cie_lightness(uint16_t v) {
|
|
||||||
if (v <= 5243) // if below 8% of max
|
|
||||||
return v / 9; // same as dividing by 900%
|
|
||||||
else {
|
|
||||||
uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
|
|
||||||
// to get a useful result with integer division, we shift left in the expression above
|
|
||||||
// and revert what we've done again after squaring.
|
|
||||||
y = y * y * y >> 8;
|
|
||||||
if (y > 0xFFFFUL) // prevent overflow
|
|
||||||
return 0xFFFFU;
|
|
||||||
else
|
|
||||||
return (uint16_t) y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_enable(void) {
|
|
||||||
breathing = true;
|
|
||||||
breathing_counter = 0;
|
|
||||||
breathing_halt = BREATHING_NO_HALT;
|
|
||||||
// interrupt already registered
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_pulse(void) {
|
|
||||||
if (get_backlight_level() == 0)
|
|
||||||
breathing_min();
|
|
||||||
else
|
|
||||||
breathing_max();
|
|
||||||
breathing_halt = BREATHING_HALT_ON;
|
|
||||||
// breathing_interrupt_enable();
|
|
||||||
breathing = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_disable(void) {
|
|
||||||
breathing = false;
|
|
||||||
// backlight_set(get_backlight_level());
|
|
||||||
b_led_set(get_backlight_level()); // custom implementation of backlight_set()
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_self_disable(void)
|
|
||||||
{
|
|
||||||
if (get_backlight_level() == 0)
|
|
||||||
breathing_halt = BREATHING_HALT_OFF;
|
|
||||||
else
|
|
||||||
breathing_halt = BREATHING_HALT_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_toggle(void) {
|
|
||||||
if (is_breathing())
|
|
||||||
breathing_disable();
|
|
||||||
else
|
|
||||||
breathing_enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_period_set(uint8_t value)
|
|
||||||
{
|
|
||||||
if (!value)
|
|
||||||
value = 1;
|
|
||||||
breathing_period = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_period_default(void) {
|
|
||||||
breathing_period_set(BREATHING_PERIOD);
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_period_inc(void)
|
|
||||||
{
|
|
||||||
breathing_period_set(breathing_period+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void breathing_period_dec(void)
|
|
||||||
{
|
|
||||||
breathing_period_set(breathing_period-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* To generate breathing curve in python:
|
|
||||||
* from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
|
|
||||||
*/
|
|
||||||
static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
|
||||||
|
|
||||||
// Use this before the cie_lightness function.
|
|
||||||
static inline uint16_t scale_backlight(uint16_t v) {
|
|
||||||
return v / BACKLIGHT_LEVELS * get_backlight_level();
|
|
||||||
}
|
|
||||||
|
|
||||||
void custom_breathing_handler(void) {
|
|
||||||
uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
|
|
||||||
// resetting after one period to prevent ugly reset at overflow.
|
|
||||||
breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
|
|
||||||
uint8_t index = breathing_counter / interval % BREATHING_STEPS;
|
|
||||||
|
|
||||||
if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
|
|
||||||
((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
|
|
||||||
{
|
|
||||||
// breathing_interrupt_disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U)));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // BACKLIGHT_BREATHING
|
|
||||||
#endif // BACKLIGHT_ENABLE
|
|
||||||
@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
//#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 12
|
#define BACKLIGHT_LEVELS 12
|
||||||
|
|
||||||
#define RGB_DI_PIN E2
|
#define RGB_DI_PIN E2
|
||||||
|
|||||||
@@ -16,20 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "jj50.h"
|
#include "jj50.h"
|
||||||
|
|
||||||
#include "backlight.h"
|
|
||||||
#include "backlight_custom.h"
|
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
|
||||||
void backlight_init_ports(void) {
|
|
||||||
b_led_init_ports();
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_task(void) {
|
|
||||||
b_led_task();
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
|
||||||
b_led_set(level);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -29,6 +29,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
|
|
||||||
#OPT_DEFS = -DDEBUG_LEVEL=0
|
#OPT_DEFS = -DDEBUG_LEVEL=0
|
||||||
|
|
||||||
SRC = backlight.c
|
|
||||||
|
|
||||||
LAYOUTS = ortho_5x12
|
LAYOUTS = ortho_5x12
|
||||||
Loaded 100 of 303 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user