Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93a97ec6e5 | ||
|
|
b68d8fe82e | ||
|
|
4cdb86c730 | ||
|
|
e8b27a965d | ||
|
|
9b46fabe08 | ||
|
|
8e3cbe030c | ||
|
|
7e1d28673f | ||
|
|
94f104cb6c | ||
|
|
0db65190c2 | ||
|
|
2b78840ef7 | ||
|
|
b32ad8b90c | ||
|
|
831d765b52 | ||
|
|
8d46bb9cab | ||
|
|
c6184d2e7e | ||
|
|
ec302295b6 | ||
|
|
f542c0589b | ||
|
|
d53cbd2dc6 | ||
|
|
5c4707eafc | ||
|
|
819364ea23 | ||
|
|
b9c38cfec8 | ||
|
|
d591ab6263 | ||
|
|
7871a465d3 | ||
|
|
fd23a0e909 | ||
|
|
62ba66d618 | ||
|
|
febaf9dec4 | ||
|
|
6464dfc91d |
No files matched your search
Vendored
+3
-1
@@ -7,6 +7,8 @@ Vagrant.configure(2) do |config|
|
|||||||
|
|
||||||
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
||||||
config.vm.box = "generic/debian9"
|
config.vm.box = "generic/debian9"
|
||||||
|
|
||||||
|
config.vm.synced_folder '.', '/vagrant'
|
||||||
|
|
||||||
# This section allows you to customize the Virtualbox VM
|
# This section allows you to customize the Virtualbox VM
|
||||||
# settings, ie showing the GUI or upping the memory
|
# settings, ie showing the GUI or upping the memory
|
||||||
@@ -64,7 +66,7 @@ Vagrant.configure(2) do |config|
|
|||||||
# If this causes issues you can run a 'vagrant destroy' and then
|
# If this causes issues you can run a 'vagrant destroy' and then
|
||||||
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
|
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
|
||||||
# non-updated box and then attempt to troubleshoot or open a Github issue
|
# non-updated box and then attempt to troubleshoot or open a Github issue
|
||||||
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
|
config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always"
|
||||||
|
|
||||||
config.vm.post_up_message = <<-EOT
|
config.vm.post_up_message = <<-EOT
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ Configure the hardware via your `config.h`:
|
|||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
#define DRIVER_1_LED_TOTAL 25
|
#define DRIVER_1_LED_TOTAL 25
|
||||||
#define DRIVER_2_LED_TOTAL 24
|
#define DRIVER_2_LED_TOTAL 24
|
||||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
||||||
|
|
||||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
||||||
|
|
||||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
@@ -195,6 +197,8 @@ enum rgb_matrix_effects {
|
|||||||
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
|
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
|
||||||
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
||||||
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
||||||
|
RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
|
||||||
|
RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
|
||||||
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
|
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
|
||||||
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||||
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
|
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
|
||||||
@@ -234,6 +238,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
|||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
||||||
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
||||||
|
|||||||
+44
-20
@@ -37,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV)
|
|||||||
|
|
||||||
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||||
|
|
||||||
Changing the **Hue** cycles around the circle.
|
Changing the **Hue** cycles around the circle.<br>
|
||||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
|
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||||
Changing the **Value** sets the overall brightness.
|
Changing the **Value** sets the overall brightness.<br>
|
||||||
|
|
||||||
## Keycodes
|
## Keycodes
|
||||||
|
|
||||||
@@ -77,8 +77,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|
|||||||
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|
||||||
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|
||||||
|
|
||||||
## Animations
|
## Effects and Animations
|
||||||
|
|
||||||
|
|
||||||
Not only can this lighting be whatever color you want,
|
Not only can this lighting be whatever color you want,
|
||||||
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
|
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
|
||||||
@@ -100,29 +99,54 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat
|
|||||||
|
|
||||||
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
|
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
|
||||||
|
|
||||||
The following options can be used to tweak the various animations:
|
### Effect and Animation Toggles
|
||||||
|
|
||||||
|
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
||||||
|
|
||||||
|
|Define |Default |Description |
|
||||||
|
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||||
|
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
||||||
|
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
||||||
|
|
||||||
|
### Effect and Animation Settings
|
||||||
|
|
||||||
|
The following options are used to tweak the various animations:
|
||||||
|
|
||||||
|Define |Default |Description |
|
|Define |Default |Description |
|
||||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
|
|
||||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
|
|
||||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
|
|
||||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
|
||||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|
||||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||||
|
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||||
|
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||||
|
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||||
|
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||||
|
|
||||||
|
### Example Usage to Reduce Memory Footprint
|
||||||
|
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
||||||
|
1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
-#define RGBLIGHT_ANIMATIONS
|
||||||
|
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
```
|
||||||
|
|
||||||
|
### Animation Speed
|
||||||
|
|
||||||
You can also modify the speeds that the different modes animate at:
|
You can also modify the speeds that the different modes animate at:
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Firstly, in your keymap, do one of the following:
|
|||||||
|`KC_RCPC` |Right Control when held, `)` when tapped |
|
|`KC_RCPC` |Right Control when held, `)` when tapped |
|
||||||
|`KC_LAPO` |Left Alt when held, `(` when tapped |
|
|`KC_LAPO` |Left Alt when held, `(` when tapped |
|
||||||
|`KC_RAPC` |Right Alt when held, `)` when tapped |
|
|`KC_RAPC` |Right Alt when held, `)` when tapped |
|
||||||
|`KC_SFTENT`|Right Shift when held, `Enter` when tapped |
|
|`KC_SFTENT`|Right Shift when held, Enter when tapped |
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
@@ -38,10 +38,10 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe
|
|||||||
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|
||||||
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|
||||||
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|
||||||
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|
|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||||
|`RCPC_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|
|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||||
|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. |
|
|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||||
|`RAPC_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|
|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||||
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
|
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||||
|
|`KC_LCPO` | |Left Control when held, `(` when tapped |
|
||||||
|
|`KC_RCPC` | |Right Control when held, `)` when tapped |
|
||||||
|
|`KC_LAPO` | |Left Alt when held, `(` when tapped |
|
||||||
|
|`KC_RAPC` | |Right Alt when held, `)` when tapped |
|
||||||
|
|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|
||||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Quantum Keycodes
|
# Quantum Keycodes
|
||||||
|
|
||||||
Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
|
Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions.
|
||||||
|
|
||||||
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
|
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
|
||||||
|
|
||||||
@@ -16,6 +16,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|
|||||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||||
|
|`KC_LCPO` | |Left Control when held, `(` when tapped |
|
||||||
|
|`KC_RCPC` | |Right Control when held, `)` when tapped |
|
||||||
|
|`KC_LAPO` | |Left Alt when held, `(` when tapped |
|
||||||
|
|`KC_RAPC` | |Right Alt when held, `)` when tapped |
|
||||||
|
|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|
||||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||||
|
|||||||
@@ -0,0 +1,205 @@
|
|||||||
|
# 如何做贡献
|
||||||
|
|
||||||
|
👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍
|
||||||
|
|
||||||
|
第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。
|
||||||
|
|
||||||
|
* [项目概况](#项目概况)
|
||||||
|
* [代码规范](#代码规范)
|
||||||
|
* [一般教程](#一般教程)
|
||||||
|
* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?)
|
||||||
|
|
||||||
|
## 这文章巨长无比不想读啊! 我就想问个问题而已!
|
||||||
|
|
||||||
|
您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。
|
||||||
|
|
||||||
|
请记住:
|
||||||
|
|
||||||
|
* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。
|
||||||
|
* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。
|
||||||
|
* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答:
|
||||||
|
* https://opensource.com/life/16/10/how-ask-technical-questions
|
||||||
|
* http://www.catb.org/esr/faqs/smart-questions.html
|
||||||
|
|
||||||
|
# 项目概况
|
||||||
|
|
||||||
|
Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。
|
||||||
|
|
||||||
|
<!-- 需要修正: 这里放些学习C语言的资源。另外感谢修正的小可爱。谢谢您了。-->
|
||||||
|
|
||||||
|
# Q酱,我在哪能帮助你嘞?
|
||||||
|
|
||||||
|
您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh).
|
||||||
|
|
||||||
|
# Q酱,我如何帮助你?
|
||||||
|
|
||||||
|
您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下!
|
||||||
|
|
||||||
|
0. 先注册一个 [GitHub](https://github.com) 账户。
|
||||||
|
1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。
|
||||||
|
2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。
|
||||||
|
3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。
|
||||||
|
4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。
|
||||||
|
5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。
|
||||||
|
6. 对要解决的问题或要添加的特性进行适当的更改。
|
||||||
|
7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。
|
||||||
|
8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。
|
||||||
|
9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。
|
||||||
|
10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。
|
||||||
|
11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。
|
||||||
|
12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的!
|
||||||
|
13. 维护人员审查代码可能需要一些时间。
|
||||||
|
14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。
|
||||||
|
15. 预祝您合并成功!
|
||||||
|
|
||||||
|
# 代码规范
|
||||||
|
|
||||||
|
其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议:
|
||||||
|
|
||||||
|
* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键)
|
||||||
|
* 我们使用改良的1TBS(允许单行样式)
|
||||||
|
* 左大括号: 在开放性语句块那行的末尾
|
||||||
|
* 右大括号: 和开放性语句块第一个字母对齐
|
||||||
|
* Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾
|
||||||
|
* 可选大括号: 可选大括号是必选的
|
||||||
|
* 应该这样: if (condition) { return false; }
|
||||||
|
* 不应该这样: if (condition) return false;
|
||||||
|
* 建议使用C语言风格的注释: `/* */`
|
||||||
|
* 把注释想象成一个描述特征的故事
|
||||||
|
* 充分使用注释来描述你为何这样修改
|
||||||
|
* 有些公认的东西就不要写到注释里面了
|
||||||
|
* 如果你不知道注释是否多余,看下面
|
||||||
|
* 一般不要主动换行,主动换行的话每行不要超过76列
|
||||||
|
* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧
|
||||||
|
* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)`
|
||||||
|
* 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。
|
||||||
|
* 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。
|
||||||
|
* `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。
|
||||||
|
* 以下是缩进规则:
|
||||||
|
* 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。
|
||||||
|
* 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。
|
||||||
|
* 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。
|
||||||
|
|
||||||
|
可以参照下面:
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* foo 的 Enums*/
|
||||||
|
enum foo_state {
|
||||||
|
FOO_BAR,
|
||||||
|
FOO_BAZ,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 有返回值的情况 */
|
||||||
|
int foo(void) {
|
||||||
|
if (some_condition) {
|
||||||
|
return FOO_BAR;
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Clang-format的自动格式化
|
||||||
|
[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。
|
||||||
|
|
||||||
|
使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。
|
||||||
|
|
||||||
|
命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。
|
||||||
|
|
||||||
|
VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。
|
||||||
|
|
||||||
|
有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。
|
||||||
|
|
||||||
|
# 一般教程
|
||||||
|
|
||||||
|
你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。
|
||||||
|
|
||||||
|
* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。
|
||||||
|
* 提交之前看一眼,`git diff --check`的空格一定要写对了
|
||||||
|
* 确定你的代码能通过编译
|
||||||
|
* 布局: 确定`make keyboard:your_new_keymap` 不返回错误
|
||||||
|
* 键盘: 确定 `make keyboard:all` 不返回错误
|
||||||
|
* 核心代码: 确定 `make all` 不返回错误
|
||||||
|
* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如:
|
||||||
|
|
||||||
|
```
|
||||||
|
Adjust the fronzlebop for the kerpleplork
|
||||||
|
|
||||||
|
The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
|
||||||
|
|
||||||
|
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
|
||||||
|
```
|
||||||
|
|
||||||
|
## 文档
|
||||||
|
|
||||||
|
想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)!
|
||||||
|
|
||||||
|
文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。
|
||||||
|
|
||||||
|
在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum my_layers {
|
||||||
|
_FIRST_LAYER,
|
||||||
|
_SECOND_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
enum my_keycodes {
|
||||||
|
FIRST_LAYER = SAFE_RANGE,
|
||||||
|
SECOND_LAYER
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## 布局
|
||||||
|
|
||||||
|
大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码
|
||||||
|
|
||||||
|
* 用 [模板](documentation_templates.md)写个`readme.md`。
|
||||||
|
* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧
|
||||||
|
* 不要把新特性和布局一起PR。可以分别PR他们
|
||||||
|
* 布局文件夹就不要放`Makefile`了,这个操作都过时啦
|
||||||
|
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
|
||||||
|
|
||||||
|
## 键盘
|
||||||
|
|
||||||
|
QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。
|
||||||
|
|
||||||
|
我们建议你按下面的来操作:
|
||||||
|
|
||||||
|
* 用[模板](documentation_templates.md)写`readme.md`。
|
||||||
|
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
|
||||||
|
* 不要把新特性和新键盘一起PR。可以分别PR他们
|
||||||
|
* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||||
|
* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦
|
||||||
|
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
|
||||||
|
|
||||||
|
## Quantum/TMK 核心
|
||||||
|
|
||||||
|
在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以:
|
||||||
|
|
||||||
|
* [在Discord交流](https://discord.gg/Uq7gcHh)
|
||||||
|
* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||||
|
|
||||||
|
新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。
|
||||||
|
|
||||||
|
修复BUG或者开发新特性之前看看这个:
|
||||||
|
|
||||||
|
* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。
|
||||||
|
* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。
|
||||||
|
* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。
|
||||||
|
* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。
|
||||||
|
|
||||||
|
也可以看看以下建议:
|
||||||
|
|
||||||
|
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
|
||||||
|
* 不要把新特性、布局和键盘一起PR。可以分别PR他们。
|
||||||
|
* 给你的特性写[单元测试](unit_testing.md)。
|
||||||
|
* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。
|
||||||
|
|
||||||
|
## 重构
|
||||||
|
|
||||||
|
为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。
|
||||||
|
|
||||||
|
# 行为守则对于我来说有何意义?
|
||||||
|
|
||||||
|
我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# 常见问题
|
||||||
|
|
||||||
|
* [一般问题](faq_general.md)
|
||||||
|
* [构建和编译QMK](faq_build.md)
|
||||||
|
* [QMK调试和故障排除](faq_debug.md)
|
||||||
|
* [布局问题](faq_keymap.md)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# 获得帮助
|
||||||
|
|
||||||
|
有很多方法来获得关于QMK的帮助.
|
||||||
|
|
||||||
|
## 实时聊天
|
||||||
|
|
||||||
|
你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator).
|
||||||
|
|
||||||
|
## OLKB Subreddit
|
||||||
|
|
||||||
|
QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上.
|
||||||
|
|
||||||
|
## Github的Issue
|
||||||
|
|
||||||
|
你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
# 如何在QMK中使用Github
|
||||||
|
|
||||||
|
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
|
||||||
|
|
||||||
|
?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。
|
||||||
|
|
||||||
|
首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork":
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮:
|
||||||
|
|
||||||
|
!从Github下载](http://i.imgur.com/N1NYcSz.jpg)
|
||||||
|
|
||||||
|
你要选择 "HTTPS", 然后选择链接复制:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
然后,在命令行输入`git clone `,然后粘贴你的链接:
|
||||||
|
|
||||||
|
```
|
||||||
|
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||||
|
Cloning into 'qmk_firmware'...
|
||||||
|
remote: Counting objects: 46625, done.
|
||||||
|
remote: Compressing objects: 100% (2/2), done.
|
||||||
|
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||||
|
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||||
|
Resolving deltas: 100% (29362/29362), done.
|
||||||
|
Checking out files: 100% (2799/2799), done.
|
||||||
|
```
|
||||||
|
|
||||||
|
现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样:
|
||||||
|
|
||||||
|
```
|
||||||
|
user@computer:~$ git add .
|
||||||
|
user@computer:~$ git commit -m "adding my keymap"
|
||||||
|
[master cccb1608] adding my keymap
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||||
|
user@computer:~$ git push
|
||||||
|
Counting objects: 1, done.
|
||||||
|
Delta compression using up to 4 threads.
|
||||||
|
Compressing objects: 100% (1/1), done.
|
||||||
|
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||||
|
Total 1 (delta 1), reused 0 (delta 0)
|
||||||
|
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||||
|
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||||
|
+ 20043e64...7da94ac5 master -> master
|
||||||
|
```
|
||||||
|
|
||||||
|
现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request":
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# QMK菜鸟教程
|
||||||
|
|
||||||
|
QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。
|
||||||
|
|
||||||
|
你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。
|
||||||
|
|
||||||
|
## 概览
|
||||||
|
|
||||||
|
这个教程有7个主要部分:
|
||||||
|
|
||||||
|
* [新手上路](newbs_getting_started.md)
|
||||||
|
* [用命令行构建你的第一个固件](newbs_building_firmware.md)
|
||||||
|
* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md)
|
||||||
|
* [刷新固件](newbs_flashing.md)
|
||||||
|
* [测试和调试](newbs_testing_debugging.md)
|
||||||
|
* [Git最佳实践](newbs_best_practices.md)
|
||||||
|
* [其他学习资源](newbs_learn_more_resources.md)
|
||||||
|
|
||||||
|
这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md).
|
||||||
|
|
||||||
|
## 其他资源
|
||||||
|
|
||||||
|
* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。
|
||||||
@@ -404,13 +404,13 @@
|
|||||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||||
k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \
|
k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
|
||||||
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||||
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \
|
||||||
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO,k4d, k4e } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,-----------------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next |
|
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
* | | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
|
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
@@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
LAYOUT_directional(
|
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,
|
_______, 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_MRWD, KC_MFFD,
|
_______, 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_MUTE, KC__VOLDOWN, KC__VOLUP,
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||||
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Settings:
|
|||||||
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
|
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
|
||||||
* RESET is available as `Fn`+ ` ESC`
|
* 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!
|
* 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
|
### Initial Installation
|
||||||
|
|
||||||
@@ -59,9 +60,9 @@ FN Layer
|
|||||||
,-----------------------------------------------------------------------------------------.
|
,-----------------------------------------------------------------------------------------.
|
||||||
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
|-----------------------------------------------------------------------------------------+
|
|-----------------------------------------------------------------------------------------+
|
||||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next |
|
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||||
|-----------------------------------------------------------------------------------------+
|
|-----------------------------------------------------------------------------------------+
|
||||||
| | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||||
|-----------------------------------------------------------------------------------------+
|
|-----------------------------------------------------------------------------------------+
|
||||||
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
||||||
|-----------------------------------------------------------------------------------------+
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,
|
KC_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,
|
||||||
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_BSLS, KC_ENT,
|
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_BSLS, 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_PSCR,
|
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_PSCR,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL),
|
||||||
|
|
||||||
LAYOUT_60_iso_split_space_bs_rshift(
|
LAYOUT_60_iso_split_space_bs_rshift(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
|
||||||
KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO,
|
KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO,
|
||||||
KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS,
|
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL),
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -32,7 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -53,7 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern bool g_suspend_state;
|
|
||||||
|
|
||||||
enum dz60rgb_layers {
|
enum dz60rgb_layers {
|
||||||
_QWERTY,
|
_QWERTY,
|
||||||
@@ -26,7 +25,6 @@ enum dz60rgb_keycodes {
|
|||||||
#define _V_V_V_ KC_TRNS
|
#define _V_V_V_ KC_TRNS
|
||||||
#define LT_CAPS LT(_NAV, KC_CAPS)
|
#define LT_CAPS LT(_NAV, KC_CAPS)
|
||||||
#define LT_DEL LT(_RGB, KC_DEL)
|
#define LT_DEL LT(_RGB, KC_DEL)
|
||||||
extern rgb_config_t rgb_matrix_config;
|
|
||||||
extern bool autoshift_enabled;
|
extern bool autoshift_enabled;
|
||||||
#define MT_SLSH RSFT_T(KC_SLSH)
|
#define MT_SLSH RSFT_T(KC_SLSH)
|
||||||
#define MT_APP RALT_T(KC_APP)
|
#define MT_APP RALT_T(KC_APP)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
#define _LAYER2 2
|
#define _LAYER2 2
|
||||||
@@ -50,8 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern led_config_t g_led_config;
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
|
|||||||
@@ -26,4 +26,4 @@
|
|||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
#define DRIVER_1_LED_TOTAL 35
|
#define DRIVER_1_LED_TOTAL 35
|
||||||
#define DRIVER_2_LED_TOTAL 33
|
#define DRIVER_2_LED_TOTAL 33
|
||||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
#define _LAYER0 0
|
#define _LAYER0 0
|
||||||
#define _LAYER1 1
|
#define _LAYER1 1
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
#define DRIVER_1_LED_TOTAL 24
|
#define DRIVER_1_LED_TOTAL 24
|
||||||
#define DRIVER_2_LED_TOTAL 24
|
#define DRIVER_2_LED_TOTAL 24
|
||||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
|
||||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||||
|
|||||||
@@ -0,0 +1,330 @@
|
|||||||
|
// pvinis ergodox ez
|
||||||
|
// ,------------------------------------. ,------------------------------------.
|
||||||
|
// | | | | | | | | | | | | | | | |
|
||||||
|
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||||
|
// | | | | | | | | | | | | | | | |
|
||||||
|
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||||
|
// | | | | | | |----| |----| | | | | | |
|
||||||
|
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||||
|
// | | | | | | | | | | | | | | | |
|
||||||
|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||||
|
// | | | | | | | | | | | |
|
||||||
|
// `------------------------' `------------------------'
|
||||||
|
// ,---------. ,---------.
|
||||||
|
// | | | | | |
|
||||||
|
// ,----+----+----| |----+----+----.
|
||||||
|
// | | | | | | | |
|
||||||
|
// | | |----| |----| | |
|
||||||
|
// | | | | | | | |
|
||||||
|
// `--------------' `--------------'
|
||||||
|
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "pvinis.h"
|
||||||
|
#include "mousekey.h"
|
||||||
|
|
||||||
|
|
||||||
|
// layers
|
||||||
|
enum {
|
||||||
|
MOUSE = 8,
|
||||||
|
};
|
||||||
|
|
||||||
|
// extra keys
|
||||||
|
enum {
|
||||||
|
NONE = 30,
|
||||||
|
TD_LAYR, // SYSCTL and MOUSE layer switch
|
||||||
|
};
|
||||||
|
|
||||||
|
// application selection
|
||||||
|
// this is sending ctrl-alt-gui-<key>, and this is picked up by hammerspoon
|
||||||
|
#define AP_SLCK ALLM(KC_S)
|
||||||
|
#define AP_XCOD ALLM(KC_X)
|
||||||
|
#define AP_MSGR ALLM(KC_M)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// ,------------------------------------. ,------------------------------------.
|
||||||
|
// |4xFLSH| | | | | |Opt | | | | | | | | |
|
||||||
|
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||||
|
// | Tab | | | | | | | | | | | | | | |
|
||||||
|
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||||
|
// |EscCtl| | | | | |----| |----| | | | | | Ent |
|
||||||
|
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||||
|
// |LShift| | | | | | | | | | | | | |RShift|
|
||||||
|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||||
|
// | | | | |Cmd | | | | | | |
|
||||||
|
// `------------------------' `------------------------'
|
||||||
|
// ,---------. ,---------.
|
||||||
|
// |QWER| | | | |
|
||||||
|
// ,----+----+----| |----+----+----.
|
||||||
|
// | Ba | L | | | | | |
|
||||||
|
// | ck |Shi |----| |----| |Spc |
|
||||||
|
// | spc| ft | | | | | |
|
||||||
|
// `--------------' `--------------'
|
||||||
|
[LR_BASE] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
|
||||||
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||||
|
_______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______,
|
||||||
|
QWERTY , CARPALX, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
KC_BSPC, _______, _______, _______, _______, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
// ,------------------------------------. ,------------------------------------.
|
||||||
|
// | | NUMBERS_L | | | - | NUMBERS_R | = |
|
||||||
|
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||||
|
// | | | [ | | ] | | |
|
||||||
|
// |------+ | | | | +------|
|
||||||
|
// | | QWERTY_L |----| |----| QWERTY_R | |
|
||||||
|
// |------+ | ( | | ) | +------|
|
||||||
|
// | | | | | | | |
|
||||||
|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||||
|
// | | ` | | | | | | | | ' | |
|
||||||
|
// `------------------------' `------------------------'
|
||||||
|
// ,---------. ,---------.
|
||||||
|
// | | | | | |
|
||||||
|
// ,----+----+----| |----+----+----.
|
||||||
|
// | | | | | | | |
|
||||||
|
// | | |----| |----| | |
|
||||||
|
// | | | | | | | |
|
||||||
|
// `--------------' `--------------'
|
||||||
|
// See `users/pvinis/pvinis.h`
|
||||||
|
[LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
_______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL ,
|
||||||
|
_______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______,
|
||||||
|
_______, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______,
|
||||||
|
_______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______,
|
||||||
|
_______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
// ,------------------------------------. ,------------------------------------.
|
||||||
|
// | | NUMBERS_L | | | | NUMBERS_R | |
|
||||||
|
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||||
|
// | | | | | | | |
|
||||||
|
// |------+ | | | | +------|
|
||||||
|
// | | CARPALX_L |----| |----| CARPALX_R | |
|
||||||
|
// |------+ | | | | +------|
|
||||||
|
// | | | | | | | |
|
||||||
|
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||||
|
// | | | | | | | | | | | |
|
||||||
|
// `------------------------' `------------------------'
|
||||||
|
// ,---------. ,---------.
|
||||||
|
// | | | | | |
|
||||||
|
// ,----+----+----| |----+----+----.
|
||||||
|
// | | | | | | | |
|
||||||
|
// | | |----| |----| | |
|
||||||
|
// | | | | | | | |
|
||||||
|
// `--------------' `--------------'
|
||||||
|
// See `users/pvinis/pvinis.h`
|
||||||
|
[LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
_______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______,
|
||||||
|
_______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______,
|
||||||
|
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
|
||||||
|
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
// See `users/pvinis/pvinis.h`
|
||||||
|
[LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
_______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______,
|
||||||
|
_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______,
|
||||||
|
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
|
||||||
|
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
// See `users/pvinis/pvinis.h`
|
||||||
|
[LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
// See `users/pvinis/pvinis.h`
|
||||||
|
[LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* MOUSE
|
||||||
|
* a keymap to control my system.
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ^ | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | MsUp | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | |MidClk|
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | |Left |Right |
|
||||||
|
* | | |------| |------| Click| Click|
|
||||||
|
* | | | ^ | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[MOUSE] = LAYOUT_ergodox_pretty(
|
||||||
|
KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
|
||||||
|
,KC_NO ,KC_NO
|
||||||
|
,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_TRNS
|
||||||
|
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||||
|
|
||||||
|
,KC_NO ,KC_NO
|
||||||
|
,KC_NO
|
||||||
|
,KC_NO ,KC_NO ,KC_NO
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// keyboard initialization
|
||||||
|
void keyboard_post_init_user_local(void) {
|
||||||
|
ergodox_led_all_on();
|
||||||
|
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
|
||||||
|
ergodox_led_all_set(i);
|
||||||
|
wait_ms(5);
|
||||||
|
}
|
||||||
|
wait_ms(1000);
|
||||||
|
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
|
||||||
|
ergodox_led_all_set(i);
|
||||||
|
wait_ms(10);
|
||||||
|
}
|
||||||
|
ergodox_led_all_off();
|
||||||
|
|
||||||
|
// restore default brightness for future use
|
||||||
|
ergodox_led_all_set(LED_BRIGHTNESS_HI);
|
||||||
|
}
|
||||||
|
|
||||||
|
// light up leds based on the layer
|
||||||
|
uint32_t layer_state_set_user_local(uint32_t state) {
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case LR_SYSCTL:
|
||||||
|
ergodox_right_led_3_on(); // blue
|
||||||
|
break;
|
||||||
|
case LR_KBCTL:
|
||||||
|
ergodox_right_led_1_on(); // red
|
||||||
|
break;
|
||||||
|
case LR_SYMBOL:
|
||||||
|
ergodox_right_led_2_on(); // green
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
// extra keys
|
||||||
|
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
// switch (id) {
|
||||||
|
// }
|
||||||
|
// return MACRO_NONE;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// tap dances
|
||||||
|
|
||||||
|
// flash keyboard on 4x tap, with leds
|
||||||
|
// void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
// switch (state->count) {
|
||||||
|
// case 1:
|
||||||
|
// ergodox_right_led_3_on();
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// ergodox_right_led_2_on();
|
||||||
|
// break;
|
||||||
|
// case 3:
|
||||||
|
// ergodox_right_led_1_on();
|
||||||
|
// break;
|
||||||
|
// case 4:
|
||||||
|
// ergodox_right_led_3_off();
|
||||||
|
// wait_ms(50);
|
||||||
|
// ergodox_right_led_2_off();
|
||||||
|
// wait_ms(50);
|
||||||
|
// ergodox_right_led_1_off();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
// if (state->count >= 4) {
|
||||||
|
// reset_keyboard();
|
||||||
|
// reset_tap_dance(state);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
// ergodox_right_led_1_off();
|
||||||
|
// wait_ms(50);
|
||||||
|
// ergodox_right_led_2_off();
|
||||||
|
// wait_ms(50);
|
||||||
|
// ergodox_right_led_3_off();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// SYSCTL on first tap, MOUSE ON second tap
|
||||||
|
// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
// uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
// switch(state->count) {
|
||||||
|
// case 1:
|
||||||
|
// switch(layer) {
|
||||||
|
// case LR_SYSCTL:
|
||||||
|
// layer_off(LR_SYSCTL);
|
||||||
|
// break;
|
||||||
|
// case MOUSE:
|
||||||
|
// layer_off(MOUSE);
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// layer_on(LR_SYSCTL);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// layer_on(MOUSE);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
|
||||||
|
// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ),
|
||||||
|
// };
|
||||||
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Crokto
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x6D6D
|
||||||
|
#define PRODUCT_ID 0x0001
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER MetaMechs
|
||||||
|
#define PRODUCT Daishi
|
||||||
|
#define DESCRIPTION Compact Battlecruiser
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 7
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D6, D7, E0, E1, C0, C1, C2 }
|
||||||
|
#define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Set up rotary encoder */
|
||||||
|
#define NUMBER_OF_ENCODERS 1
|
||||||
|
#define ENCODERS_PAD_A { F1 }
|
||||||
|
#define ENCODERS_PAD_B { F0 }
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
|
||||||
|
/* Set delay for tap_code on rotary encoder */
|
||||||
|
#define TAP_CODE_DELAY 10
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#include "daishi.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
|
||||||
|
|
||||||
|
// The first section contains all of the arguments
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5D, K5E, K5F, K5G, K5H, \
|
||||||
|
K60, K61, K62, K65, K69, K6A, K6C, K6D, K6E, K6F, K6G \
|
||||||
|
){ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, KC_NO, K5D, K5E, K5F, K5G, K5H }, \
|
||||||
|
{ K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, KC_NO, K6C, K6D, K6E, K6F, K6G, KC_NO } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
#define _QW 0
|
||||||
|
#define _FN 1
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
M_EXAMPLE1 = SAFE_RANGE,
|
||||||
|
M_EXAMPLE2,
|
||||||
|
DYNAMIC_MACRO_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | | | | | | | | | | DM1 | DM2 | DMSTOP | PRINT | SCROLL | PAUSE | FN | VOL |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | HOME | PGUP | END | INS | NUM |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACK | PGDN | / | * | - |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | + |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | 4 | 5 | 6 | = |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | | UP | 1 | 2 | 3 | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | LCTRL | LGUI | LALT | | | SPACE | | | | RALT | RCTRL | | LEFT | DOWN | RIGHT | 0 | . | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QW] = LAYOUT( /* QWERTY */
|
||||||
|
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE,
|
||||||
|
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_HOME, KC_PGUP, KC_END , KC_INS , KC_NLCK,
|
||||||
|
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_PGDN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
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_PPLS,
|
||||||
|
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_P4 , KC_P5 , KC_P6 , KC_EQL ,
|
||||||
|
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_P1 , KC_P2 , KC_P3 , KC_PENT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | RESET | F13 | F14 | F15 | f16 | f17 | f18 | F19 | F20 | F21 | DM1 R | DM2 R | DMSTOP | | | | FN | DEBUG |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN] = LAYOUT( /* Function */
|
||||||
|
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case M_EXAMPLE1:
|
||||||
|
SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter
|
||||||
|
return false;
|
||||||
|
case M_EXAMPLE2:
|
||||||
|
SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update(bool clockwise) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
// Call the keymap level matrix init.
|
||||||
|
|
||||||
|
// Set our LED pins as output
|
||||||
|
setPinOutput(C4);
|
||||||
|
setPinOutput(C5);
|
||||||
|
setPinOutput(C6);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) {
|
||||||
|
writePinLow(C4);
|
||||||
|
} else {
|
||||||
|
writePinHigh(C4);
|
||||||
|
}
|
||||||
|
if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
writePinLow(C5);
|
||||||
|
} else {
|
||||||
|
writePinHigh(C5);
|
||||||
|
}
|
||||||
|
if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||||
|
writePinLow(C6);
|
||||||
|
} else {
|
||||||
|
writePinHigh(C6);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Default Daishi Layout
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is the default layout that comes on the Daishi. For more information on the design of this layout, check out [kb.metamechs.com](http://kb.metamechs.com/daishi/).
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Daishi
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A compact battlecruiser using the CBC1 PCB. [More info on kb.metamechs.com](http://kb.metamechs.com/daishi/)
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Crokto](https://github.com/Croktopus/)
|
||||||
|
Hardware Supported: CBC1 PCB
|
||||||
|
Hardware Availability: [kb.metamechs.com](http://kb.metamechs.com/daishi/get-your-own-daishi/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/daishi:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = at90usb1286
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# QMK Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
ENCODER_ENABLE = yes # Add rotary encoder support
|
||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 }
|
#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 }
|
||||||
#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 SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6
|
||||||
//#define USE_I2C
|
//#define USE_I2C
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
@@ -62,20 +62,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGB_DI_PIN D4
|
#define RGB_DI_PIN D4
|
||||||
#ifdef RGB_DI_PIN
|
#ifdef RGB_DI_PIN
|
||||||
#define RGBLED_NUM 8
|
#define RGBLED_NUM 16
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
/*== or choose animations ==*/
|
/*== or choose animations ==*/
|
||||||
#define RGBLIGHT_EFFECT_BREATHING
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
#define RGBLIGHT_EFFECT_SNAKE
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
@@ -244,3 +244,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
#define EEHANDS
|
#define EEHANDS
|
||||||
*/
|
*/
|
||||||
|
#define RGBLED_SPLIT {8,8}
|
||||||
@@ -62,8 +62,8 @@ BOOTLOADER = caterina
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # 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 = yes # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
@@ -72,7 +72,7 @@ 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 = no # Enable keyboard backlight functionality on B7 by default
|
||||||
RGBLIGHT_ENABLE = no # 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)
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|||||||
@@ -39,15 +39,15 @@ enum layers{
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[DF]=LAYOUT(\
|
[DF]=LAYOUT(\
|
||||||
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_NUHS,KC_GRV,\
|
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_NUHS,KC_GRV,\
|
||||||
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_DEL,\
|
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\
|
||||||
KC_LCTRL ,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_LCTRL ,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_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\
|
KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\
|
||||||
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
||||||
),
|
),
|
||||||
[FN]=LAYOUT(\
|
[FN]=LAYOUT(\
|
||||||
KC_ESC,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6, KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_INS,KC_DEL,\
|
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_INS,KC_DEL,\
|
||||||
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\
|
KC_TAB ,KC_9,KC_7,KC_5,KC_3,KC_1,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\
|
||||||
KC_CAPS ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\
|
KC_CAPS ,KC_8,KC_6,KC_4,KC_2,KC_0, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\
|
||||||
KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\
|
KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\
|
||||||
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
||||||
),
|
),
|
||||||
@@ -75,6 +75,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state)
|
||||||
|
{
|
||||||
|
uint8_t layer=biton32(state);
|
||||||
|
switch(layer)
|
||||||
|
{
|
||||||
|
case DF:
|
||||||
|
rgblight_sethsv_noeeprom(180,255,255);
|
||||||
|
break;
|
||||||
|
case FN:
|
||||||
|
rgblight_sethsv_noeeprom(0,255,255);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,4 +134,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DRIVER_2_LED_TOTAL 32
|
#define DRIVER_2_LED_TOTAL 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
@@ -17,33 +17,33 @@
|
|||||||
#include "stanrc85.h"
|
#include "stanrc85.h"
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_60_ansi(
|
[0] = LAYOUT_60_ansi(
|
||||||
TD_TESC, 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,
|
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_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_CTLE, 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_CTLE, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
|
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
|
||||||
|
|
||||||
[1] = LAYOUT_60_ansi(
|
[1] = LAYOUT_60_ansi(
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
|
||||||
|
|
||||||
[2] = LAYOUT_60_ansi(
|
[2] = LAYOUT_60_ansi(
|
||||||
KC_TILD, 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_TILD, 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,
|
||||||
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS,
|
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
|
||||||
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||||
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
|
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
[3] = LAYOUT_60_ansi(
|
[3] = LAYOUT_60_ansi(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||||
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
||||||
TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
|
_______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______)
|
_______, _______, _______, _______, _______, _______, _______, TG(1))
|
||||||
};
|
};
|
||||||
|
|
||||||
// Backlight specific keys:
|
// Backlight specific keys:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# project specific files
|
# project specific files
|
||||||
SRC = keyboards/zeal60/zeal60.c \
|
SRC = keyboards/zeal60/zeal60.c \
|
||||||
keyboards/zeal60/rgb_backlight.c \
|
keyboards/zeal60/rgb_backlight.c \
|
||||||
drivers/issi/is31fl3733.c \
|
drivers/issi/is31fl3733.c \
|
||||||
quantum/color.c \
|
quantum/color.c \
|
||||||
drivers/arm/i2c_master.c
|
drivers/arm/i2c_master.c
|
||||||
|
|
||||||
## chip/board settings
|
## chip/board settings
|
||||||
# the next two should match the directories in
|
# the next two should match the directories in
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# hotswap
|
# KBD67 hotswap
|
||||||
|
|
||||||
A 65% hot swap board with blocker and USB Type C port.
|
A 65% hot swap board with blocker and USB Type C port.
|
||||||
|
|
||||||
@@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-m
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make kbd67/hotswap:default
|
make kbdfans/kbd67/hotswap:default
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -1,17 +1,22 @@
|
|||||||
# KBD67
|
# KBD67
|
||||||
|
|
||||||
A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts.
|
A 65% keyboard sold in three variants.
|
||||||
Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
|
1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts.
|
||||||
|
2. HotSwap: Released in late 2018, Hotswap single layout keyboard.
|
||||||
|
3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts.
|
||||||
|
|
||||||
The rev1 PCB for the KBD67 is sold under the name "KBD65."
|
**Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
|
||||||
|
|
||||||
|
The rev1 PCB is sold under the name "KBD65".
|
||||||
|
|
||||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
Hardware Supported: KBD67
|
Hardware Supported: KBD67 rev1, rev2, hotswap
|
||||||
Hardware Availability: KBDFans
|
Hardware Availability: KBDFans
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make examples for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make kbdfans/kbd67/rev1:default
|
make kbdfans/kbd67/rev1:default
|
||||||
|
make kbdfans/kbd67/rev2:default
|
||||||
make kbdfans/kbd67/hotswap:default
|
make kbdfans/kbd67/hotswap:default
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# kbd67
|
# KBD67 rev1
|
||||||
|
|
||||||
65% keyboard with blocker.
|
65% keyboard with blocker.
|
||||||
|
|
||||||
@@ -8,6 +8,6 @@ Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make kbd67/rev1:default
|
make kbdfans/kbd67/rev1:default
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Vorror
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER KBDFans
|
||||||
|
#define PRODUCT KBD67v2
|
||||||
|
#define DESCRIPTION 65% Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 }
|
||||||
|
#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 18
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 240
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "kbd67v2",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_65_ansi": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2018 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
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/* Copyright 2018 '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
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
QMKBEST = SAFE_RANGE,
|
||||||
|
QMKURL
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_65_ansi(
|
||||||
|
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_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_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_PGDN, \
|
||||||
|
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_END, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap Fn Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | | |End|PDn|Dow| |PUp| |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | |Hom|PDn|End |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_65_ansi(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,KC_INS, \
|
||||||
|
KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \
|
||||||
|
_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \
|
||||||
|
_______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QMKBEST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode QMKBEST is pressed
|
||||||
|
SEND_STRING("QMK is the best thing ever!");
|
||||||
|
} else {
|
||||||
|
// when keycode QMKBEST is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case QMKURL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode QMKURL is pressed
|
||||||
|
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||||
|
} else {
|
||||||
|
// when keycode QMKURL is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for kbd67
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2019 Daisuke Kobayashi
|
||||||
|
*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/* Copyright 2019 Daisuke Kobayashi
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#include "keymap_jp.h"
|
||||||
|
|
||||||
|
#define RGB_RMO RGB_RMOD
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp|
|
||||||
|
* |------------------------------------------------------. |----|
|
||||||
|
* |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig |
|
||||||
|
* `------------------------------------------------' `------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \
|
||||||
|
KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \
|
||||||
|
KC_LSFT, XXXXXXX, 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_PSCR, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap Fn Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | |
|
||||||
|
* |------------------------------------------------------. |----|
|
||||||
|
* |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End |
|
||||||
|
* `------------------------------------------------' `------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
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, XXXXXXX,_______,KC_INS, \
|
||||||
|
_______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \
|
||||||
|
KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \
|
||||||
|
_______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \
|
||||||
|
_______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END),
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Koba's keymap for KBD67
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- JIS layout.
|
||||||
|
- Fn layer is arranged like HHKB.
|
||||||
|
- 3 splitted space bar. (Space-Fn-Space)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# KBD67 rev2
|
||||||
|
|
||||||
|
65% pcb with blocker. Revision 2 (Manufactured after 05/01/19).
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Vorror](https://github.com/vorror)
|
||||||
|
Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65")
|
||||||
|
Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make kbdfans/kbd67/rev2:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/* Copyright 2019 Vorror
|
||||||
|
*
|
||||||
|
* 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 "rev2.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright 2018 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
|
||||||
|
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
|
||||||
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||||
|
K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, 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, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_65_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
|
||||||
|
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
|
||||||
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||||
|
K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, 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, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||||
|
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
|
LAYOUTS = 65_ansi
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#define MK_3_SPEED
|
||||||
|
#define TERMINAL_HELP
|
||||||
|
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/* Copyright 2019 Danny Nguyen <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
bool is_alt_tab_active = false; // ADD this near the begining of keymap.c
|
||||||
|
uint16_t alt_tab_timer = 0; // we will be using them soon.
|
||||||
|
|
||||||
|
enum custom_keycodes { // Make sure have the awesome keycode ready
|
||||||
|
ALT_TAB = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3,
|
||||||
|
KC_WH_U, ALT_TAB, KC_WH_L,
|
||||||
|
KC_WH_D, TT(1), KC_WH_R
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
RESET, KC_ACL0, KC_ACL1,
|
||||||
|
KC_VOLU, KC_ACL2, KC_BRIU,
|
||||||
|
KC_VOLD, TO(1), KC_BRID
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_LEFT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_RIGHT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_U);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) { // This will do most of the grunt work with the keycodes.
|
||||||
|
case ALT_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!is_alt_tab_active) {
|
||||||
|
is_alt_tab_active = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
alt_tab_timer = timer_read();
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) { // The very important timer.
|
||||||
|
if (is_alt_tab_active) {
|
||||||
|
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
is_alt_tab_active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Mousepad layout for BDN9
|
||||||
|
##### 2 encoders required
|
||||||
|
Why use a movable mouse when you can "Etech-a-sketch" style mousepad.
|
||||||
|
The left encoder will move the X axis; leaving the right to handle the Y axis
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:-:|:-:|:-:|
|
||||||
|
| Left Click | Middle Click | Right Click |
|
||||||
|
| Scroll Up | Super ALT↯TAB | Scroll Left |
|
||||||
|
| Scroll Down | ADJUSTMENT Layer | Scroll Right|
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:-:|:-:|:-:|
|
||||||
|
| RESET | Mouse ACL0 | Mouse ACL1 |
|
||||||
|
| VOL UP | Mouse ACL2 | Brightness UP |
|
||||||
|
| VOL Down | Adjustment Layer OFF | Brightness Down |
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
TAPDANCE_ENABLE = yes
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef PRODUCT
|
||||||
|
#undef PRODUCT
|
||||||
|
#define PRODUCT Iris Keyboard - pvinis
|
||||||
|
#endif // PRODUCT
|
||||||
|
|
||||||
|
|
||||||
|
// Use I2C or Serial, not both
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
|
||||||
|
// Select hand configuration
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
|
||||||
|
// choose pin to use for audio. c6 is the one iris uses.
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define C6_AUDIO
|
||||||
|
#endif // AUDIO_ENABLE
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
// pvinis iris
|
||||||
|
// ,-----------------------------. ,-----------------------------.
|
||||||
|
// | | | | | | | | | | | | | |
|
||||||
|
// |----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
// | | | | | | | | | | | | | |
|
||||||
|
// |----+----+----+----x----x----| |----x----x----+----+----+----|
|
||||||
|
// | | | | | | | | | | | | | |
|
||||||
|
// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----|
|
||||||
|
// | | | | | | | | | | | | | | | |
|
||||||
|
// `-------------------+----+----+----/ \----+----+----+-------------------'
|
||||||
|
// | | | | | | | |
|
||||||
|
// `----+---------' `--------------'
|
||||||
|
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "pvinis.h"
|
||||||
|
//#include "iris.h"
|
||||||
|
//#include "action_layer.h"
|
||||||
|
//#include "eeconfig.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
//#define STARTUP_SONG SONG(SONIC_RING)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_sonic[][2] = SONG(IN_LIKE_FLINT);
|
||||||
|
float tone_1[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_2[][2] = SONG(OLD_SPICE);
|
||||||
|
float tone_3[][2] = SONG(OVERWATCH_THEME);
|
||||||
|
float tone_4[][2] = SONG(QWERTY_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
// ,-----------------------------. ,-----------------------------.
|
||||||
|
// | | | | | |QWER| | | | | | | |
|
||||||
|
// |----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
// |Tab | | | | |CARP| | | | | | |Del |
|
||||||
|
// |----+----+----+----x----x----| |----x----x----+----+----+----|
|
||||||
|
// |EscC| | | | | | | | | | | |Ent |
|
||||||
|
// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----|
|
||||||
|
// |LSft| | | | | |Home| |End | | | | | |Rsft|
|
||||||
|
// `-------------------+----+----+----/ \----+----+----+-------------------'
|
||||||
|
// |Cmd |LOWR|Bspc| |Spc |RASE|RAlt|
|
||||||
|
// `----+---------' `--------------'
|
||||||
|
[LR_BASE] = LAYOUT_wrapper(
|
||||||
|
_______, _______, _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_TAB , _______, _______, _______, _______, CARPALX, _______, _______, _______, _______, _______, KC_DEL ,
|
||||||
|
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
|
||||||
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||||
|
KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
// ,-----------------------------. ,-----------------------------.
|
||||||
|
// | | NUMBERS_L | | NUMBERS_R | |
|
||||||
|
// |----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
// | | | | | |
|
||||||
|
// |----+ | | +----|
|
||||||
|
// | | QWERTY_L | | QWERTY_R | |
|
||||||
|
// |----+ +----. ,----| +----|
|
||||||
|
// | | | | | | | |
|
||||||
|
// `-------------------+----+----+----/ \----+----+----+-------------------'
|
||||||
|
// | | | | | | | |
|
||||||
|
// `----+---------' `--------------'
|
||||||
|
[LR_QWERTY] = LAYOUT_wrapper(
|
||||||
|
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
|
||||||
|
_______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______,
|
||||||
|
_______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______,
|
||||||
|
_______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
// ,-----------------------------. ,-----------------------------.
|
||||||
|
// | | NUMBERS_L | | NUMBERS_R | |
|
||||||
|
// |----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
// | | | | | |
|
||||||
|
// |----+ | | +----|
|
||||||
|
// | | CARPALX_L | | CARPALX_R | |
|
||||||
|
// |----+ +----. ,----| +----|
|
||||||
|
// | | | | | | | |
|
||||||
|
// `-------------------+----+----+----/ \----+----+----+-------------------'
|
||||||
|
// | | | | | | | |
|
||||||
|
// `----+---------' `--------------'
|
||||||
|
[LR_CARPALX] = LAYOUT_wrapper(
|
||||||
|
_______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______,
|
||||||
|
_______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______,
|
||||||
|
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
|
||||||
|
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[LR_SYMBOL] = LAYOUT_wrapper(
|
||||||
|
KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 ,
|
||||||
|
_______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______,
|
||||||
|
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
|
||||||
|
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[LR_SYSCTL] = LAYOUT_wrapper(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[LR_KBCTL] = LAYOUT_wrapper(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX,
|
||||||
|
XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX,
|
||||||
|
BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
|
||||||
|
XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
AUDIO_ENABLE = no # off for now
|
||||||
|
RGBLIGHT_ENABLE = no # off for now
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
extern bool g_suspend_state;
|
|
||||||
|
|
||||||
enum ctrl_layers {
|
enum ctrl_layers {
|
||||||
_QWERTY,
|
_QWERTY,
|
||||||
@@ -31,7 +30,6 @@ enum ctrl_keycodes {
|
|||||||
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
||||||
#define LT_CAPS LT(_NAV, KC_CAPS)
|
#define LT_CAPS LT(_NAV, KC_CAPS)
|
||||||
#define _V_V_V_ KC_TRNS
|
#define _V_V_V_ KC_TRNS
|
||||||
extern rgb_config_t rgb_matrix_config;
|
|
||||||
extern bool autoshift_enabled;
|
extern bool autoshift_enabled;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Mike Roberts
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER miker
|
||||||
|
#define PRODUCT nek_type_a
|
||||||
|
#define DESCRIPTION NEK Type A
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 6
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/* left columns are all onboard, right columns all on expander */
|
||||||
|
#define COL_EXPANDED { false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true}
|
||||||
|
#define MATRIX_COL_PINS { C6, D7, B5, B6, B7, D6, D3, GPA0, GPA1, GPA2, GPA3, GPA4, GPA5, GPA6, GPA7, GPB0, GPB1, GPB2 }
|
||||||
|
#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
File renamed without changes.
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2018 Mike Roberts
|
||||||
|
*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/* Copyright 2018 Mike Roberts
|
||||||
|
*
|
||||||
|
* 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(
|
||||||
|
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__MUTE, KC__VOLDOWN, KC__VOLUP, \
|
||||||
|
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_INSERT, 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_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_DELETE, KC_END, KC_PGDOWN, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, \
|
||||||
|
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, \
|
||||||
|
KC_LCTRL, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTRL, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Default NEK Type A Keymap
|
||||||
@@ -0,0 +1,412 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012-2018 Jun Wako, Jack Humbert, Mike Roberts
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This matrix.c has been hacked up to support some columns being on an ex pander in ROW2COL mode.
|
||||||
|
* The columns are only ever selected and unselected, never read. Unselecting a single column via the expander is not
|
||||||
|
* implemented because updating one column costs the same as updating all the columns in a bank. Currently both banks
|
||||||
|
* are unselected but two i2c transactions could be removed if we only unselect the the proper half.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#if defined(__AVR__)
|
||||||
|
#include <avr/io.h>
|
||||||
|
#endif
|
||||||
|
#include "wait.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "mcp23017.h"
|
||||||
|
#include "outputselect.h"
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (DEBOUNCING_DELAY > 0)
|
||||||
|
static uint16_t debouncing_time;
|
||||||
|
static bool debouncing = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||||
|
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||||
|
# define ROW_SHIFTER ((uint8_t)1)
|
||||||
|
#elif (MATRIX_COLS <= 16)
|
||||||
|
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||||
|
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||||
|
# define ROW_SHIFTER ((uint16_t)1)
|
||||||
|
#elif (MATRIX_COLS <= 32)
|
||||||
|
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||||
|
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||||
|
# define ROW_SHIFTER ((uint32_t)1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MATRIX_MASKED
|
||||||
|
extern const matrix_row_t matrix_mask[];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
|
||||||
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
|
static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
static void init_cols(void);
|
||||||
|
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
static void unselect_row(uint8_t row);
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
static void init_rows(void);
|
||||||
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||||
|
static void unselect_cols(void);
|
||||||
|
static void unselect_col(uint8_t col);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_quantum(void) {
|
||||||
|
expander_init();
|
||||||
|
matrix_init_kb();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_quantum(void) {
|
||||||
|
matrix_scan_kb();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void) {
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void) {
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
// initialize row and col
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
unselect_cols();
|
||||||
|
init_rows();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
set_output(OUTPUT_AUTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
|
// Set row, read cols
|
||||||
|
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
|
||||||
|
|
||||||
|
if (matrix_changed) {
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
}
|
||||||
|
|
||||||
|
# else
|
||||||
|
read_cols_on_row(matrix, current_row);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
|
// Set col, read rows
|
||||||
|
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
|
||||||
|
if (matrix_changed) {
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
read_rows_on_col(matrix, current_col);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
debouncing = false;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void)
|
||||||
|
{
|
||||||
|
#if (DEBOUNCING_DELAY > 0)
|
||||||
|
if (debouncing) return false;
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
// Matrix mask lets you disable switches in the returned matrix data. For example, if you have a
|
||||||
|
// switch blocker installed and the switch is always pressed.
|
||||||
|
#ifdef MATRIX_MASKED
|
||||||
|
return matrix[row] & matrix_mask[row];
|
||||||
|
#else
|
||||||
|
return matrix[row];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print_matrix_header();
|
||||||
|
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
print_matrix_row(row);
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += matrix_bitpop(i);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
|
static void init_cols(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
uint8_t pin = col_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
|
{
|
||||||
|
// Store last value of row prior to reading
|
||||||
|
matrix_row_t last_row_value = current_matrix[current_row];
|
||||||
|
|
||||||
|
// Clear data in matrix row
|
||||||
|
current_matrix[current_row] = 0;
|
||||||
|
|
||||||
|
// Select row and wait for row selecton to stabilize
|
||||||
|
select_row(current_row);
|
||||||
|
wait_us(30);
|
||||||
|
|
||||||
|
// For each col...
|
||||||
|
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||||
|
|
||||||
|
// Select the col pin to read (active low)
|
||||||
|
uint8_t pin = col_pins[col_index];
|
||||||
|
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
|
||||||
|
|
||||||
|
// Populate the matrix row with the state of the col pin
|
||||||
|
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect row
|
||||||
|
unselect_row(current_row);
|
||||||
|
|
||||||
|
return (last_row_value != current_matrix[current_row]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row)
|
||||||
|
{
|
||||||
|
uint8_t pin = row_pins[row];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||||
|
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_row(uint8_t row)
|
||||||
|
{
|
||||||
|
uint8_t pin = row_pins[row];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_rows(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||||
|
uint8_t pin = row_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
|
static void init_rows(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||||
|
uint8_t pin = row_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||||
|
{
|
||||||
|
bool matrix_changed = false;
|
||||||
|
|
||||||
|
// Select col and wait for col selecton to stabilize
|
||||||
|
select_col(current_col);
|
||||||
|
wait_us(30);
|
||||||
|
|
||||||
|
// For each row...
|
||||||
|
for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
|
||||||
|
{
|
||||||
|
// Store last value of row prior to reading
|
||||||
|
matrix_row_t last_row_value = current_matrix[row_index];
|
||||||
|
|
||||||
|
// Check row pin state
|
||||||
|
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
|
||||||
|
{
|
||||||
|
// Pin LO, set col bit
|
||||||
|
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Pin HI, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine if the matrix changed state
|
||||||
|
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||||
|
{
|
||||||
|
matrix_changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect col
|
||||||
|
unselect_col(current_col);
|
||||||
|
|
||||||
|
return matrix_changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col)
|
||||||
|
{
|
||||||
|
uint8_t pin = col_pins[col];
|
||||||
|
if (col_expanded[col])
|
||||||
|
{
|
||||||
|
expander_select(pin);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||||
|
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void unselect_col(uint8_t col)
|
||||||
|
{
|
||||||
|
uint8_t pin = col_pins[col];
|
||||||
|
if (col_expanded[col])
|
||||||
|
{
|
||||||
|
expander_unselect_all();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_cols(void)
|
||||||
|
{
|
||||||
|
expander_unselect_all();
|
||||||
|
|
||||||
|
for(uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
uint8_t pin = col_pins[col];
|
||||||
|
if (!col_expanded[col])
|
||||||
|
{
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
/* Copyright 2018 Mike Roberts
|
||||||
|
*
|
||||||
|
* 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 <stdbool.h>
|
||||||
|
#include "action.h"
|
||||||
|
#include "lib/lufa/LUFA/Drivers/Peripheral/TWI.h"
|
||||||
|
#include "lib/lufa/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c"
|
||||||
|
#include "mcp23017.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "wait.h"
|
||||||
|
|
||||||
|
uint8_t bit_for_pin(uint8_t pin);
|
||||||
|
|
||||||
|
uint8_t expander_write(uint8_t reg, uint8_t data);
|
||||||
|
|
||||||
|
uint8_t expander_read(uint8_t reg, uint8_t *data);
|
||||||
|
|
||||||
|
void expander_config(void);
|
||||||
|
|
||||||
|
static const char *twi_err_str(uint8_t res) {
|
||||||
|
switch (res) {
|
||||||
|
case TWI_ERROR_NoError:
|
||||||
|
return "OK";
|
||||||
|
case TWI_ERROR_BusFault:
|
||||||
|
return "BUSFAULT";
|
||||||
|
case TWI_ERROR_BusCaptureTimeout:
|
||||||
|
return "BUSTIMEOUT";
|
||||||
|
case TWI_ERROR_SlaveResponseTimeout:
|
||||||
|
return "SLAVETIMEOUT";
|
||||||
|
case TWI_ERROR_SlaveNotReady:
|
||||||
|
return "SLAVENOTREADY";
|
||||||
|
case TWI_ERROR_SlaveNAK:
|
||||||
|
return "SLAVENAK";
|
||||||
|
default:
|
||||||
|
return "UNKNOWN";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void expander_init(void) {
|
||||||
|
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 400000));
|
||||||
|
}
|
||||||
|
|
||||||
|
// set IN and HI
|
||||||
|
void expander_unselect_all() {
|
||||||
|
expander_write(EXPANDER_REG_IODIRA, 0xff);
|
||||||
|
expander_write(EXPANDER_REG_IODIRB, 0xff);
|
||||||
|
expander_write(EXPANDER_REG_OLATA, 0xff);
|
||||||
|
expander_write(EXPANDER_REG_OLATB, 0xff);
|
||||||
|
wait_us(EXPANDER_PAUSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set OUT and LOW
|
||||||
|
void expander_select(uint8_t pin) {
|
||||||
|
const uint8_t mask = 0xff & ~(1 << bit_for_pin(pin));
|
||||||
|
if (pin < 8) {
|
||||||
|
expander_write(EXPANDER_REG_IODIRA, mask);
|
||||||
|
expander_write(EXPANDER_REG_OLATA, mask);
|
||||||
|
} else {
|
||||||
|
expander_write(EXPANDER_REG_IODIRB, mask);
|
||||||
|
expander_write(EXPANDER_REG_OLATB, mask);
|
||||||
|
}
|
||||||
|
wait_us(EXPANDER_PAUSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void expander_config() {
|
||||||
|
// set everything to input
|
||||||
|
expander_write(EXPANDER_REG_IODIRA, 0xff);
|
||||||
|
expander_write(EXPANDER_REG_IODIRB, 0xff);
|
||||||
|
|
||||||
|
// turn on pull-ups
|
||||||
|
expander_write(EXPANDER_REG_GPPUA, 0xff);
|
||||||
|
expander_write(EXPANDER_REG_GPPUB, 0xff);
|
||||||
|
|
||||||
|
// disable interrupts
|
||||||
|
expander_write(EXPANDER_REG_GPINTENA, 0x0);
|
||||||
|
expander_write(EXPANDER_REG_GPINTENB, 0x0);
|
||||||
|
|
||||||
|
// polarity
|
||||||
|
expander_write(EXPANDER_REG_IPOLA, 0x0);
|
||||||
|
expander_write(EXPANDER_REG_IPOLB, 0x0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t bit_for_pin(uint8_t pin) {
|
||||||
|
return pin % 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t expander_write(uint8_t reg, unsigned char val) {
|
||||||
|
uint8_t addr = reg;
|
||||||
|
uint8_t result = TWI_WritePacket(EXPANDER_ADDR << 1, I2C_TIMEOUT, &addr, sizeof(addr), &val, sizeof(val));
|
||||||
|
if (result) {
|
||||||
|
xprintf("mcp: set_register %d = %d failed: %s\n", reg, val, twi_err_str(result));
|
||||||
|
}
|
||||||
|
return result == 0;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/* Copyright 2018 Mike Roberts
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef MAP23017_H
|
||||||
|
#define MAP23017_H
|
||||||
|
|
||||||
|
#define EXPANDER_ADDR 0x27
|
||||||
|
#define I2C_TIMEOUT 200 // milliseconds
|
||||||
|
#define EXPANDER_PAUSE 0 // microseconds
|
||||||
|
|
||||||
|
enum EXPANDER_REGISTERS {
|
||||||
|
EXPANDER_REG_IODIRA = 0x00,
|
||||||
|
EXPANDER_REG_IODIRB = 0x01,
|
||||||
|
EXPANDER_REG_IPOLA = 0x02,
|
||||||
|
EXPANDER_REG_IPOLB = 0x03,
|
||||||
|
EXPANDER_REG_GPINTENA = 0x04,
|
||||||
|
EXPANDER_REG_GPINTENB = 0x05,
|
||||||
|
EXPANDER_REG_DEFVALA = 0x06,
|
||||||
|
EXPANDER_REG_DEFVALB = 0x07,
|
||||||
|
EXPANDER_REG_INTCONA = 0x08,
|
||||||
|
EXPANDER_REG_INTCONB = 0x09,
|
||||||
|
EXPANDER_REG_IOCONA = 0x0A,
|
||||||
|
EXPANDER_REG_IOCONB = 0x0B,
|
||||||
|
EXPANDER_REG_GPPUA = 0x0C,
|
||||||
|
EXPANDER_REG_GPPUB = 0x0D,
|
||||||
|
EXPANDER_REG_INTFA = 0x0E,
|
||||||
|
EXPANDER_REG_INTFB = 0x0F,
|
||||||
|
EXPANDER_REG_INTCAPA = 0x10,
|
||||||
|
EXPANDER_REG_INTCAPB = 0x11,
|
||||||
|
EXPANDER_REG_GPIOA = 0x12,
|
||||||
|
EXPANDER_REG_GPIOB = 0x13,
|
||||||
|
EXPANDER_REG_OLATA = 0x14,
|
||||||
|
EXPANDER_REG_OLATB = 0x15
|
||||||
|
};
|
||||||
|
|
||||||
|
#define GPA0 0x0
|
||||||
|
#define GPA1 0x1
|
||||||
|
#define GPA2 0x2
|
||||||
|
#define GPA3 0x3
|
||||||
|
#define GPA4 0x4
|
||||||
|
#define GPA5 0x5
|
||||||
|
#define GPA6 0x6
|
||||||
|
#define GPA7 0x7
|
||||||
|
#define GPB0 0x8
|
||||||
|
#define GPB1 0x9
|
||||||
|
#define GPB2 0xA
|
||||||
|
#define GPB3 0xB
|
||||||
|
#define GPB4 0xC
|
||||||
|
#define GPB5 0xD
|
||||||
|
#define GPB6 0xE
|
||||||
|
#define GPB7 0xF
|
||||||
|
|
||||||
|
|
||||||
|
void expander_init(void);
|
||||||
|
void expander_select(uint8_t pin);
|
||||||
|
void expander_unselect(uint8_t pin);
|
||||||
|
void expander_unselect_all(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2018 Mike Roberts
|
||||||
|
*
|
||||||
|
* 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 "nek_type_a.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef NEK_TYPE_A_H
|
||||||
|
#define NEK_TYPE_A_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
|
||||||
|
#define I2C_ADDR 0b0100000
|
||||||
|
#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
|
||||||
|
#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
|
||||||
|
#define IODIRA 0x00 // i/o direction register
|
||||||
|
#define IODIRB 0x01
|
||||||
|
#define GPPUA 0x0C // GPIO pull-up resistor register
|
||||||
|
#define GPPUB 0x0D
|
||||||
|
#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
|
||||||
|
#define GPIOB 0x13
|
||||||
|
#define OLATA 0x14 // output latch register
|
||||||
|
#define OLATB 0x15
|
||||||
|
|
||||||
|
extern uint8_t expander_status;
|
||||||
|
extern uint8_t expander_input_pin_mask;
|
||||||
|
extern bool i2c_initialized;
|
||||||
|
|
||||||
|
void init_expander(void);
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L12, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B, \
|
||||||
|
L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, R28, R29, R2A, R2B, \
|
||||||
|
L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B, \
|
||||||
|
L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \
|
||||||
|
L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \
|
||||||
|
L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KC_NO, L12, KC_NO, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \
|
||||||
|
{ L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, KC_NO, R28, R29, R2A, R2B }, \
|
||||||
|
{ L31, L32, L33, L34, L35, L36, KC_NO, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \
|
||||||
|
{ L41, L42, L43, L44, L45, L46, KC_NO, R41, R42, R43, R44, R45, R46, KC_NO, R48, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ L51, L52, L53, L54, L55, L56, KC_NO, R51, R52, R53, R54, R55, KC_NO, KC_NO, R58, KC_NO, R5A, KC_NO }, \
|
||||||
|
{ L61, L62, L63, KC_NO, L65, KC_NO, KC_NO, R61, KC_NO, R63, KC_NO, R65, R66, KC_NO, R68, R69, R6A, R6B }, \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# nek_type_a
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Natural Ergonomic Keyboard, Type A
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Mike Roberts](https://github.com/ecopoesis)
|
||||||
|
Hardware Supported: Custom PCBs from https://github.com/ecopoesis/nek-type-a
|
||||||
|
Hardware Availability: https://github.com/ecopoesis/nek-type-a
|
||||||
|
|
||||||
|
## Design
|
||||||
|
|
||||||
|
This is a column-driven split keyboard using three custom PCBs connected with ribbon cables. The left and right PCBs are
|
||||||
|
passive: they only have the diodes and switches needed to make the matrix. The center PCB has an Adafruit Feather 32u4 and
|
||||||
|
MCP23017 expander.
|
||||||
|
|
||||||
|
The left matrix has its rows and columns directly connected to the Feather. The right matrix has its rows connect to the
|
||||||
|
Feather (using the same pins as the left matrix) and its columns connected to the expander. The expander uses the LUFA
|
||||||
|
hardware TWI driver.
|
||||||
|
|
||||||
|
Bluetooth is enabled.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Make and install this keyboard (after setting up your build environment):
|
||||||
|
```
|
||||||
|
make nek_type_a:default:avrdude
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
SRC = matrix.c mcp23017.c
|
||||||
|
|
||||||
|
MCU = atmega32u4
|
||||||
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
ARCH = AVR8
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
DEBUG_ENABLE = yes
|
||||||
|
BLUETOOTH = AdafruitBLE
|
||||||
@@ -224,10 +224,6 @@ bool music_mask_user(uint16_t keycode) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
|
||||||
extern led_config_t g_led_config;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
void rgb_matrix_indicators_user(void) {
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
#define DRIVER_1_LED_TOTAL 25
|
#define DRIVER_1_LED_TOTAL 25
|
||||||
#define DRIVER_2_LED_TOTAL 24
|
#define DRIVER_2_LED_TOTAL 24
|
||||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
File renamed without changes.
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+43
-68
@@ -1,5 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "bootloader.h"
|
|
||||||
#ifdef PROTOCOL_LUFA
|
#ifdef PROTOCOL_LUFA
|
||||||
#include "lufa.h"
|
#include "lufa.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
@@ -41,80 +41,55 @@ enum macro_keycodes {
|
|||||||
#define FN_ESC LT(_FN, KC_ESC)
|
#define FN_ESC LT(_FN, KC_ESC)
|
||||||
#define FN_CAPS LT(_FN, KC_CAPS)
|
#define FN_CAPS LT(_FN, KC_CAPS)
|
||||||
|
|
||||||
// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Base Layout
|
/* Qwerty
|
||||||
* ,------------------------------------------------. ,------------------------------------------------.
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
* | GESC | | | | | | - | | = | | | | | | BkSp |
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
* | Tab | | | | | | [ | | ] | | | | | | \ |
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
* |FN(CAPS)| | | | | | ( | | ) | | | | | | ' |
|
* |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* |Shift | | | | | | { | | } | | | | | |Shift |
|
* |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right |
|
* | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
* | Space| DEL | | Enter| Space|
|
* | Space| DEL | | Enter| Space|
|
||||||
* `-------------' `-------------'
|
* `-------------' `-------------'
|
||||||
*/
|
*/
|
||||||
#define BASE_LAYOUT( \
|
[_QWERTY] = LAYOUT( \
|
||||||
_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
_10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
|
||||||
_20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \
|
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
) \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
|
||||||
LAYOUT( \
|
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
KC_SPC, KC_DEL, KC_ENT, KC_SPC \
|
||||||
KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \
|
|
||||||
FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \
|
|
||||||
KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \
|
|
||||||
KC_SPC, KC_DEL, KC_ENT, KC_SPC \
|
|
||||||
)
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
/* Qwerty
|
|
||||||
* ,------------------------------------------------. ,------------------------------------------------.
|
|
||||||
* | | | | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
|
||||||
* | | Q | W | E | R | T | | | | Y | U | I | O | P | |
|
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
|
||||||
* | | A | S | D | F | G | | | | H | J | K | L | ; | |
|
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
|
||||||
* | | Z | X | C | V | B | | | | N | M | , | . | / | |
|
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | | | | |
|
|
||||||
* `------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
|
||||||
* | | | | | |
|
|
||||||
* `-------------' `--------=----'
|
|
||||||
*/
|
|
||||||
[_QWERTY] = BASE_LAYOUT( \
|
|
||||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
|
|
||||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
|
|
||||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Colemak
|
/* Colemak
|
||||||
* ,------------------------------------------------. ,------------------------------------------------.
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
* | | | | | | | | | | | | | | | |
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
* | | Q | W | F | P | G | | | | J | L | U | Y | ; | |
|
* | Tab | Q | W | F | P | B | [ | | ] | J | L | U | Y | ; | \ |
|
||||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
* | | A | R | S | T | D | | | | H | N | E | I | O | |
|
* |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* | | Z | X | C | V | B | | | | K | M | , | . | / | |
|
* |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | | | |
|
* | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right |
|
||||||
* `------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
* | | | | | |
|
* | Space| DEL | | Enter| Space|
|
||||||
* `-------------' `--------=----'
|
* `-------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[_COLEMAK] = BASE_LAYOUT( \
|
[_COLEMAK] = LAYOUT( \
|
||||||
KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \
|
||||||
KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \
|
FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LPRN, KC_RPRN, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCBR, KC_RCBR, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \
|
||||||
|
KC_SPC, KC_DEL, KC_ENT, KC_SPC \
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
/* FN
|
/* FN
|
||||||
* ,------------------------------------------------. ,------------------------------------------------.
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
* | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
@@ -131,13 +106,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-------------' `-------------'
|
* `-------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[_FN] = LAYOUT( \
|
[_FN] = LAYOUT( \
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||||
_______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \
|
_______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \
|
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \
|
||||||
_______, _______, _______, _______ \
|
_______, _______, _______, _______ \
|
||||||
),
|
),
|
||||||
|
|
||||||
/* ADJ
|
/* ADJ
|
||||||
* ,------------------------------------------------. ,------------------------------------------------.
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
@@ -156,13 +131,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[_ADJ] = LAYOUT( \
|
[_ADJ] = LAYOUT( \
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
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_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \
|
_______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
||||||
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \
|
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \
|
||||||
_______, _______, _______, _______ \
|
_______, _______, _______, _______ \
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
# The Default Sol Layout
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
### Qwerty layout
|
||||||
|
```
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | Space| DEL | | Enter| Space|
|
||||||
|
* `-------------' `-------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Colemak layout
|
||||||
|
```
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | F | P | B | [ | | ] | J | L | U | Y | ; | \ |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | Space| DEL | | Enter| Space|
|
||||||
|
* `-------------' `-------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Function (FN)
|
||||||
|
```
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | | PGDN | UP | PGUP | | | | | | | PGDN | UP | PGUP | PRINT| HOME |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | | LEFT | DOWN | RIGHT| | | | | | | LEFT | DOWN | RIGHT|INSERT| END |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | |RGBMOD| | | | | | | PLAY | NEXT | MUTE | VOL- | VOL+ |
|
||||||
|
* `------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-------------' `-------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adjust (ADJ)
|
||||||
|
```
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | | SAD | VAI | SAI | RESET| | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | |RGBMOD| | | | | | | |RGBSMOD| HUD | SAD | VAD |
|
||||||
|
* `------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-------------' `-------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Customize
|
||||||
|
|
||||||
|
see `qmk_firmware/keyboards/sol/rev1/keymaps/default/rules.mk`
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
# Variables you can set for SOL
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix
|
||||||
|
RGBLIGHT_ANIMATIONS = yes # LED animations
|
||||||
|
LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
||||||
|
RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
||||||
|
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
|
||||||
|
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
|
OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000)
|
||||||
|
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
## Compile
|
||||||
|
|
||||||
|
go to qmk top directory.
|
||||||
|
```
|
||||||
|
$ cd qmk_firmware
|
||||||
|
```
|
||||||
|
|
||||||
|
build
|
||||||
|
```
|
||||||
|
$ make rgbkb/sol:default
|
||||||
|
```
|
||||||
|
|
||||||
|
After the initial flash with AVRdudess, you should be able to flash using this:
|
||||||
|
```
|
||||||
|
$ make rgbkb/sol:default:dfu
|
||||||
|
```
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] |
|
* | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl |
|
* | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctl= |
|
||||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
* | Space| DEL | | Enter| Space|
|
* | Space| DEL | | Enter| Space|
|
||||||
* `-------------' `-------------'
|
* `-------------' `-------------'
|
||||||
@@ -92,7 +92,6 @@ static void render_logo(void) {
|
|||||||
oled_write_P(sol_logo, false);
|
oled_write_P(sol_logo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern rgb_config_t rgb_matrix_config;
|
|
||||||
|
|
||||||
static void render_status(void) {
|
static void render_status(void) {
|
||||||
// Render to mode icon
|
// Render to mode icon
|
||||||
@@ -12,7 +12,7 @@ RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable
|
|||||||
RGBLIGHT_ANIMATIONS = no # LED animations
|
RGBLIGHT_ANIMATIONS = no # LED animations
|
||||||
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
||||||
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
||||||
RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very laggy (+1500)
|
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
|
||||||
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
@@ -10,6 +10,6 @@ Hardware Availability: [RGBKB](https://www.rgbkb.net)
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make sol:default
|
make rgbkb/sol:default
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
File renamed without changes.
@@ -77,14 +77,10 @@
|
|||||||
{"label":"R43", "x":13.5, "y":4},
|
{"label":"R43", "x":13.5, "y":4},
|
||||||
{"label":"R44", "x":14.5, "y":4},
|
{"label":"R44", "x":14.5, "y":4},
|
||||||
{"label":"R45", "x":15.5, "y":4, "w":1.5},
|
{"label":"R45", "x":15.5, "y":4, "w":1.5},
|
||||||
{"label":"Left Encoder, Counter-Clockwise", "x":2.5, "y":5.5},
|
|
||||||
{"label":"Left Encoder, Clockwise", "x":3.5, "y":5.5},
|
|
||||||
{"label":"L55", "x":6, "y":5.5},
|
{"label":"L55", "x":6, "y":5.5},
|
||||||
{"label":"L56", "x":7, "y":5.5},
|
{"label":"L56", "x":7, "y":5.5},
|
||||||
{"label":"R56", "x":9, "y":5.5},
|
{"label":"R56", "x":9, "y":5.5},
|
||||||
{"label":"R50", "x":10, "y":5.5},
|
{"label":"R50", "x":10, "y":5.5}
|
||||||
{"label":"Right Encoder, Counter-Clockwise", "x":12.5, "y":5.5},
|
|
||||||
{"label":"Right Encoder, Clockwise", "x":13.5, "y":5.5}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
Loaded 100 of 236 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user