pull/5751/head
RoguePullRequest 6 years ago
commit 34a6c33c94

1
.gitignore vendored

@ -54,6 +54,7 @@ util/Win_Check_Output.txt
.vscode/tasks.json .vscode/tasks.json
.vscode/last.sql .vscode/last.sql
.vscode/temp.sql .vscode/temp.sql
.vscode/ipch/
.stfolder .stfolder
.tags .tags

@ -178,6 +178,14 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
SRC += ws2812.c SRC += ws2812.c
endif endif
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
endif
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
@ -343,3 +351,9 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
QUANTUM_LIB_SRC += i2c_master.c QUANTUM_LIB_SRC += i2c_master.c
SRC += oled_driver.c SRC += oled_driver.c
endif endif
SPACE_CADET_ENABLE ?= yes
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
OPT_DEFS += -DSPACE_CADET_ENABLE
endif

@ -63,13 +63,13 @@
* [LED Matrix](feature_led_matrix.md) * [LED Matrix](feature_led_matrix.md)
* [Macros](feature_macros.md) * [Macros](feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md) * [Mouse Keys](feature_mouse_keys.md)
* [OLED Driver](feature_oled_driver)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](feature_pointing_device.md) * [Pointing Device](feature_pointing_device.md)
* [PS/2 Mouse](feature_ps2_mouse.md) * [PS/2 Mouse](feature_ps2_mouse.md)
* [RGB Lighting](feature_rgblight.md) * [RGB Lighting](feature_rgblight.md)
* [RGB Matrix](feature_rgb_matrix.md) * [RGB Matrix](feature_rgb_matrix.md)
* [Space Cadet Shift](feature_space_cadet_shift.md) * [Space Cadet](feature_space_cadet.md)
* [Space Cadet Shift Enter](feature_space_cadet_shift_enter.md)
* [Stenography](feature_stenography.md) * [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md) * [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md) * [Tap Dance](feature_tap_dance.md)

@ -127,13 +127,13 @@ Configure the hardware via your `config.h`:
From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example: From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
```C ```C
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4} /* {row | col << 4}
* | {x=0..224, y=0..64} * | {x=0..224, y=0..64}
* | | modifier * | | flags
* | | | */ * | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, {{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
.... ....
} }
``` ```
@ -147,7 +147,19 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). `flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
## Flags
|Define |Description |
|------------------------------------|-------------------------------------------|
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
## Keycodes ## Keycodes
@ -177,7 +189,7 @@ enum rgb_matrix_effects {
RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
RGB_MATRIX_BREATHING, // Single hue brightness cycling animation RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
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_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
@ -203,7 +215,7 @@ enum rgb_matrix_effects {
RGB_MATRIX_EFFECT_MAX RGB_MATRIX_EFFECT_MAX
}; };
``` ```
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
@ -236,17 +248,60 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | |`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
## Custom layer effects ## Custom RGB Matrix Effects
Custom layer effects can be done by defining this in your `<keyboard>.c`: By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rule.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks something like this:
`rgb_matrix_user.inc` should go in the root of the keymap directory.
`rgb_matrix_kb.inc` should go in the root of the keyboard directory.
```C ```C
void rgb_matrix_indicators_kb(void) { // !!! DO NOT ADD #pragma once !!! //
rgb_matrix_set_color(index, red, green, blue);
// Step 1.
// Declare custom effects using the RGB_MATRIX_EFFECT macro
// (note the lack of semicolon after the macro!)
RGB_MATRIX_EFFECT(my_cool_effect)
RGB_MATRIX_EFFECT(my_cool_effect2)
// Step 2.
// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
// e.g: A simple effect, self-contained within a single method
static bool my_cool_effect(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
rgb_matrix_set_color(i, 0xff, 0xff, 0x00);
}
return led_max < DRIVER_LED_TOTAL;
} }
// e.g: A more complex effect, relying on external methods and state, with
// dedicated init and run methods
static uint8_t some_global_state;
static void my_cool_effect2_complex_init(effect_params_t* params) {
some_global_state = 1;
}
static bool my_cool_effect2_complex_run(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff);
}
return led_max < DRIVER_LED_TOTAL;
}
static bool my_cool_effect2(effect_params_t* params) {
if (params->init) my_cool_effect2_complex_init(params);
return my_cool_effect2_complex_run(params);
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
``` ```
A similar function works in the keymap as `rgb_matrix_indicators_user`. For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
## Colors ## Colors

@ -0,0 +1,59 @@
# Space Cadet: The Future, Built In
Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds, and now even cooler supporting Control and Alt as well!
## Usage
Firstly, in your keymap, do one of the following:
- Replace the Left Shift key with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
- Replace the Left Control key with `KC_LCPO` (Left Control, Parenthesis Open), and Right Control with `KC_RCPC` (Right Control, Parenthesis Close).
- Replace the Left Alt key with `KC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `KC_RAPC` (Right Alt, Parenthesis Close).
- Replace any Shift key in your keymap with `KC_SFTENT` (Right Shift, Enter).
## Keycodes
|Keycode |Description |
|-----------|-------------------------------------------|
|`KC_LSPO` |Left 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 |
## Caveats
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command.md) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
## Configuration
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `KC_LSPO` key with `KC_TRNS` as the `Tap Modifer`.
|Define |Default |Description |
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|`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`. |
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|`RCPO_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` 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. |
|`RAPO_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` 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. |
## Obsolete Configuration
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define KC_LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`
|Define |Default |Description |
|------------------------------|-------------|------------------------------------------------------------------|
|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
|`LSPO_MOD` |`KC_LSFT` |The modifier to apply to `LSPO_KEY` |
|`RSPC_MOD` |`KC_RSFT` |The modifier to apply to `RSPC_KEY` |
|`SFTENT_KEY` |`KC_ENT` |The keycode to send when the Shift key is tapped |
|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet from applying a modifier |

@ -1,37 +0,0 @@
# Space Cadet Shift: The Future, Built In
Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds.
## Usage
Replace the Left Shift key in your keymap with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
## Keycodes
|Keycode |Description |
|---------|--------------------------------------|
|`KC_LSPO`|Left Shift when held, `(` when tapped |
|`KC_RSPC`|Right Shift when held, `)` when tapped|
## Caveats
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. Make sure that Command is disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
## Configuration
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`.
You can also disable the rollover, allowing you to use the opposite Shift key to cancel the Space Cadet state in the event of an erroneous press, instead of emitting a pair of parentheses when the keys are released.
Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`.
|Define |Default |Description |
|------------------------------|-------------|--------------------------------------------------------------------------------|
|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
|`LSPO_MOD` |`KC_LSFT` |The keycode to send when Left Shift is tapped |
|`RSPC_MOD` |`KC_RSFT` |The keycode to send when Right Shift is tapped |
|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet |
|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY|

@ -1,31 +0,0 @@
# Space Cadet Shift Enter
Based on the [Space Cadet Shift](feature_space_cadet_shift.md) feature. Tap the Shift key on its own, and it behaves like Enter. When held, the Shift functions as normal.
## Usage
Replace any Shift key in your keymap with `KC_SFTENT` (Shift, Enter), and you're done.
## Keycodes
|Keycode |Description |
|-----------|----------------------------------------|
|`KC_SFTENT`|Right Shift when held, Enter when tapped|
## Caveats
As with Space Cadet Shift, this feature may conflict with Command, so it should be disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
This feature also uses the same timers as Space Cadet Shift, so using them in tandem may produce strange results.
## Configuration
By default Space Cadet assumes a US ANSI layout, but if you'd like to use a different key for Enter, you can redefine it in your `config.h`:
|Define |Default |Description |
|------------|--------|------------------------------------------------|
|`SFTENT_KEY`|`KC_ENT`|The keycode to send when the Shift key is tapped|

@ -198,15 +198,17 @@ From here, you should have a working keyboard once you program a firmware. Befor
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project:
``` ```
util/new_project.sh <project_name> ./util/new_keyboard.sh
``` ```
You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies: You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies:
cd keyboards/<project_name> ```
cd keyboards/<project_name>
```
### `config.h` ### `config.h`
@ -326,7 +328,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not. 2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work. 3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides. 4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable. 5. Check the `<project_name>.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly. 6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
@ -335,4 +337,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)

@ -6,14 +6,26 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_
## Adding Your AVR Keyboard to QMK ## Adding Your AVR Keyboard to QMK
QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script: QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script:
```bash ```
$ util/new_project.sh my_awesome_keyboard $ ./util/new_keyboard.sh
###################################################### Generating a new QMK keyboard directory
# /keyboards/my_awesome_keyboard project created. To start
# working on things, cd into keyboards/my_awesome_keyboard Keyboard Name: mycoolkb
###################################################### Keyboard Type [avr]:
Your Name [John Smith]:
Copying base template files... done
Copying avr template files... done
Renaming keyboard files... done
Replacing %KEYBOARD% with mycoolkb... done
Replacing %YOUR_NAME% with John Smith... done
Created a new keyboard called mycoolkb.
To start working on things, cd into keyboards/mycoolkb,
or open the directory in your favourite text editor.
``` ```
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.

@ -1,14 +1,24 @@
Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh <keyboard>` to create a new project: Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by running `util/new_keyboard.sh`:
``` ```
$ util/new_project.sh simontester $ ./util/new_keyboard.sh
###################################################### Generating a new QMK keyboard directory
# /keyboards/simontester project created. To start
# working on things, cd into keyboards/simontester Keyboard Name: mycoolkb
###################################################### Keyboard Type [avr]:
``` Your Name [John Smith]:
Copying base template files... done
Copying avr template files... done
Renaming keyboard files... done
Replacing %KEYBOARD% with mycoolkb... done
Replacing %YOUR_NAME% with John Smith... done
Created a new keyboard called mycoolkb.
To start working on things, cd into keyboards/mycoolkb,
or open the directory in your favourite text editor.
```
# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS # END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS

@ -158,7 +158,7 @@ void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b) void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
{ {
for (int i = 0; i < RGBLED_NUM; i++) { for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) {
led[i].r = r; led[i].r = r;
led[i].g = g; led[i].g = g;
led[i].b = b; led[i].b = b;

@ -0,0 +1,19 @@
#include "adkb96.h"
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}},
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}},
{{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, {6, 8}, {7, 8}},
{{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}, {6, 9}, {7, 9}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}, {6,10}, {7,10}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}, {6,11}, {7,11}},
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}},
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}},
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}},
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}},
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}},
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}
};
#endif

@ -0,0 +1,28 @@
#pragma once
#include "quantum.h"
#ifdef KEYBOARD_adkb96_rev1
#include "rev1.h"
#endif
// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc_ortho_6x16( \
L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \
L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \
L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \
L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \
L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46, KC_##R47, \
KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##L56, KC_##L57, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, KC_##R55, KC_##R56 ,KC_##R57 \
)
#define LAYOUT_kc LAYOUT_kc_ortho_6x16

@ -0,0 +1,22 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"

@ -0,0 +1,494 @@
{
"keyboard_name": "adkb96",
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 6,
"layouts": {
"LAYOUT_ortho_6x16": {
"key_count": 96,
"layout": [
{
"label": "L00",
"x": 0,
"y": 0
},
{
"label": "L01",
"x": 1,
"y": 0
},
{
"label": "L02",
"x": 2,
"y": 0
},
{
"label": "L03",
"x": 3,
"y": 0
},
{
"label": "L04",
"x": 4,
"y": 0
},
{
"label": "L05",
"x": 5,
"y": 0
},
{
"label": "L06",
"x": 6,
"y": 0
},
{
"label": "L07",
"x": 7,
"y": 0
},
{
"label": "R00",
"x": 8,
"y": 0
},
{
"label": "R01",
"x": 9,
"y": 0
},
{
"label": "R02",
"x": 10,
"y": 0
},
{
"label": "R03",
"x": 11,
"y": 0
},
{
"label": "R04",
"x": 12,
"y": 0
},
{
"label": "R05",
"x": 13,
"y": 0
},
{
"label": "R06",
"x": 14,
"y": 0
},
{
"label": "R07",
"x": 15,
"y": 0
},
{
"label": "L10",
"x": 0,
"y": 1
},
{
"label": "L11",
"x": 1,
"y": 1
},
{
"label": "L12",
"x": 2,
"y": 1
},
{
"label": "L13",
"x": 3,
"y": 1
},
{
"label": "L14",
"x": 4,
"y": 1
},
{
"label": "L15",
"x": 5,
"y": 1
},
{
"label": "L16",
"x": 6,
"y": 1
},
{
"label": "L17",
"x": 7,
"y": 1
},
{
"label": "R10",
"x": 8,
"y": 1
},
{
"label": "R11",
"x": 9,
"y": 1
},
{
"label": "R12",
"x": 10,
"y": 1
},
{
"label": "R13",
"x": 11,
"y": 1
},
{
"label": "R14",
"x": 12,
"y": 1
},
{
"label": "R15",
"x": 13,
"y": 1
},
{
"label": "R16",
"x": 14,
"y": 1
},
{
"label": "R17",
"x": 15,
"y": 1
},
{
"label": "L20",
"x": 0,
"y": 2
},
{
"label": "L21",
"x": 1,
"y": 2
},
{
"label": "L22",
"x": 2,
"y": 2
},
{
"label": "L23",
"x": 3,
"y": 2
},
{
"label": "L24",
"x": 4,
"y": 2
},
{
"label": "L25",
"x": 5,
"y": 2
},
{
"label": "L26",
"x": 6,
"y": 2
},
{
"label": "L27",
"x": 7,
"y": 2
},
{
"label": "R20",
"x": 8,
"y": 2
},
{
"label": "R21",
"x": 9,
"y": 2
},
{
"label": "R22",
"x": 10,
"y": 2
},
{
"label": "R23",
"x": 11,
"y": 2
},
{
"label": "R24",
"x": 12,
"y": 2
},
{
"label": "R25",
"x": 13,
"y": 2
},
{
"label": "R26",
"x": 14,
"y": 2
},
{
"label": "R27",
"x": 15,
"y": 2
},
{
"label": "L30",
"x": 0,
"y": 3
},
{
"label": "L31",
"x": 1,
"y": 3
},
{
"label": "L32",
"x": 2,
"y": 3
},
{
"label": "L33",
"x": 3,
"y": 3
},
{
"label": "L34",
"x": 4,
"y": 3
},
{
"label": "L35",
"x": 5,
"y": 3
},
{
"label": "L36",
"x": 6,
"y": 3
},
{
"label": "L37",
"x": 7,
"y": 3
},
{
"label": "R30",
"x": 8,
"y": 3
},
{
"label": "R31",
"x": 9,
"y": 3
},
{
"label": "R32",
"x": 10,
"y": 3
},
{
"label": "R33",
"x": 11,
"y": 3
},
{
"label": "R34",
"x": 12,
"y": 3
},
{
"label": "R35",
"x": 13,
"y": 3
},
{
"label": "R36",
"x": 14,
"y": 3
},
{
"label": "R37",
"x": 15,
"y": 3
},
{
"label": "L40",
"x": 0,
"y": 4
},
{
"label": "L41",
"x": 1,
"y": 4
},
{
"label": "L42",
"x": 2,
"y": 4
},
{
"label": "L43",
"x": 3,
"y": 4
},
{
"label": "L44",
"x": 4,
"y": 4
},
{
"label": "L45",
"x": 5,
"y": 4
},
{
"label": "L46",
"x": 6,
"y": 4
},
{
"label": "L47",
"x": 7,
"y": 4
},
{
"label": "R40",
"x": 8,
"y": 4
},
{
"label": "R41",
"x": 9,
"y": 4
},
{
"label": "R42",
"x": 10,
"y": 4
},
{
"label": "R43",
"x": 11,
"y": 4
},
{
"label": "R44",
"x": 12,
"y": 4
},
{
"label": "R45",
"x": 13,
"y": 4
},
{
"label": "R46",
"x": 14,
"y": 4
},
{
"label": "R47",
"x": 15,
"y": 4
},
{
"label": "L50",
"x": 0,
"y": 5
},
{
"label": "L51",
"x": 1,
"y": 5
},
{
"label": "L52",
"x": 2,
"y": 5
},
{
"label": "L53",
"x": 3,
"y": 5
},
{
"label": "L54",
"x": 4,
"y": 5
},
{
"label": "L55",
"x": 5,
"y": 5
},
{
"label": "L56",
"x": 6,
"y": 5
},
{
"label": "L57",
"x": 7,
"y": 5
},
{
"label": "R50",
"x": 8,
"y": 5
},
{
"label": "R51",
"x": 9,
"y": 5
},
{
"label": "R52",
"x": 10,
"y": 5
},
{
"label": "R53",
"x": 11,
"y": 5
},
{
"label": "R54",
"x": 12,
"y": 5
},
{
"label": "R55",
"x": 13,
"y": 5
},
{
"label": "R56",
"x": 14,
"y": 5
},
{
"label": "R57",
"x": 15,
"y": 5
}
]
}
}
}

@ -0,0 +1,34 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Use I2C or Serial, not both */
#define USE_SERIAL
//#define USE_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define FORCE_NKRO

@ -0,0 +1,15 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, XXXXXXX,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_DELT,
KC_ZKHK,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_JYEN,KC_BSPC,KC_BSPC,
KC_TAB, 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_ENT, KC_ENT,
KC_CAPS,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_BSLS,KC_ENT, KC_ENT,
KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_UP, KC_RSFT,KC_RSFT,
KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN,KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_HENK,KC_KANA,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX
)
};

@ -0,0 +1,17 @@
# ADKB96
![ADKB96](http://btoshop.jp/wp-content/uploads/sites/3/2019/04/ADKB96_ALL.png)
A 16x6 ortholinear keyboard kit made and sold by Bit Trade One Ltd. [More info on Web](http://bit-trade-one.co.jp/selfmadekb/adkb96/)
Keyboard Maintainer: [Bit Trade One Ltd.](http://bit-trade-one.co.jp/)
Hardware Supported: ADKB96 PCB, Pro Micro
Hardware Availability: [PCB & case Data](https://github.com/bit-trade-one/ADKB96-hardware), [BTOS Shop](http://btoshop.jp/2019/04/11/4562469772424/)
Make example for this keyboard (after setting up your build environment):
```sh
make adkb96/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).

@ -0,0 +1,78 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* USB Device descriptor parameter */
#define VENDOR_ID 0x00a5
#define PRODUCT_ID 0xad96
#define DEVICE_VER 0x0001
#define MANUFACTURER Bit Trade One
#define PRODUCT ADKB96
#define DESCRIPTION
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 12
#define MATRIX_COLS 8
// wiring of each half
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
#define SOFT_SERIAL_PIN D0
/* define tapping term */
#define TAPPING_TERM 100
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
/* 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
/* ws2812 RGB LED */
/*
#define RGB_DI_PIN D3
#define RGBLED_NUM 12 // Number of LEDs
*/
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

@ -0,0 +1,15 @@
#include "adkb96.h"
void matrix_init_kb(void) {
// // green led on
// DDRD |= (1<<5);
// PORTD &= ~(1<<5);
// // orange led on
// DDRB |= (1<<0);
// PORTB &= ~(1<<0);
matrix_init_user();
};

@ -0,0 +1,44 @@
#pragma once
#include "adkb96.h"
//void promicro_bootloader_jmp(bool program);
#ifdef USE_I2C
#include <stddef.h>
#ifdef __AVR__
#include <avr/io.h>
#include <avr/interrupt.h>
#endif
#endif
//void promicro_bootloader_jmp(bool program);
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
#define LAYOUT_ortho_6x16( \
L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \
L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \
L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \
L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \
L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06, L07 }, \
{ L10, L11, L12, L13, L14, L15, L16, L17 }, \
{ L20, L21, L22, L23, L24, L25, L26, L27 }, \
{ L30, L31, L32, L33, L34, L35, L36, L37 }, \
{ L40, L41, L42, L43, L44, L45, L46, L47 }, \
{ L50, L51, L52, L53, L54, L55, L56, L57 }, \
{ R00, R01, R02, R03, R04, R05, R06, R07 }, \
{ R10, R11, R12, R13, R14, R15, R16, R17 }, \
{ R20, R21, R22, R23, R24, R25, R26, R27 }, \
{ R30, R31, R32, R33, R34, R35, R36, R37 }, \
{ R40, R41, R42, R43, R44, R45, R46, R47 }, \
{ R50, R51, R52, R53, R54, R55, R56, R57 } \
}
#define LAYOUT LAYOUT_ortho_6x16

@ -1,5 +1,3 @@
# MCU name # MCU name
#MCU = at90usb1287 #MCU = at90usb1287
MCU = atmega32u4 MCU = atmega32u4
@ -36,39 +34,45 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU) F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
ifeq ($(strip $(KEYBOARD)), preonic/rev1)
BOOTLOADER = atmel-dfu
endif
ifeq ($(strip $(KEYBOARD)), preonic/rev2)
BOOTLOADER = qmk-dfu
endif
# Interrupt driven control endpoint task(+60) # Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 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 = caterina
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options # Build Options
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # 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 = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration 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 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 = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_5x12 SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = adkb96/rev1

@ -123,7 +123,7 @@
{"label":";", "x":10.75, "y":2}, {"label":";", "x":10.75, "y":2},
{"label":"'", "x":11.75, "y":2}, {"label":"'", "x":11.75, "y":2},
{"label":"ISO #", "x":12.75, "y":2}, {"label":"ISO #", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":3}, {"label":"ISO \\", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3}, {"label":"Z", "x":2.25, "y":3},

@ -6,7 +6,7 @@ Baguette
This is a custom keyboard with backlight inspired by France. This is a custom keyboard with backlight inspired by France.
Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
Hardware Supported: ATMEGA 32u4 MCU with backlight support. Hardware Supported: ATMEGA 32u4 MCU with backlight support.
Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy) Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):

@ -0,0 +1,15 @@
#pragma once
#include "quantum.h"
#define LAYOUT_ortho_4x4( \
K00, K01, K02, K03, \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K30, K31, K32, K33 \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 } \
}

@ -0,0 +1,46 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER KPrepublic
#define PRODUCT bm16s
#define DESCRIPTION KPrepublic bm16s
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 4
/* key matrix pins */
#define MATRIX_ROW_PINS { D1, D0, D3, D2 }
#define MATRIX_COL_PINS { F7, F6, D4, D6 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#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 16
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

@ -0,0 +1,30 @@
{
"keyboard_name": "bm16s",
"url": "",
"maintainer": "qmk",
"width": 4,
"height": 4,
"layouts": {
"LAYOUT_ortho_4x4": {
"key_count": 16,
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},
{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},
{"x":3, "y":2},
{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":3}
]
}
}
}

@ -0,0 +1,16 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4(
KC_KP_7, KC_KP_8, KC_KP_9, MO(1), \
KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, \
KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT \
),
[1] = LAYOUT_ortho_4x4(
RESET, BL_STEP, _______, KC_VOLU, \
BL_TOGG, BL_DEC, BL_INC, KC_VOLD, \
RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, \
RGB_SAI, RGB_SAD, RGB_HUD, _______ \
),
};

@ -0,0 +1,20 @@
#include QMK_KEYBOARD_H
#define RGB_BRU RGB_VAI
#define RGB_BRD RGB_VAD
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4(
KC_BRIU, _______, _______, KC_VOLU, \
KC_BRID, _______, _______, KC_VOLD, \
_______, _______, _______, KC_MUTE, \
KC_MPRV, KC_MPLY, KC_MNXT, MO(1) \
),
[1] = LAYOUT_ortho_4x4(
RESET, _______, _______, _______, \
RGB_SPD, RGB_BRU, RGB_SPI, _______, \
RGB_RMOD, RGB_BRD, RGB_MOD, _______, \
RGB_TOG, _______, _______, _______ \
),
};

@ -0,0 +1,13 @@
# bm16s
A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches.
Keyboard Maintainer: QMK Community
Hardware Supported: The PCBs, controllers supported
Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169)
Make example for this keyboard (after setting up your build environment):
make bm16s: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,72 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
LAYOUTS = ortho_4x4

@ -21,17 +21,17 @@
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#include "rgblight.h" #include "rgblight.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4} /*{row | col << 4}
| {x=0..224, y=0..64} | {x=0..224, y=0..64}
| | modifier | | modifier
| | | */ | | | */
{{1|(3<<4)}, {188, 16}, 0}, {{1|(3<<4)}, {188, 16}, 4},
{{3|(3<<4)}, {187, 48}, 0}, {{3|(3<<4)}, {187, 48}, 4},
{{4|(2<<4)}, {149, 64}, 0}, {{4|(2<<4)}, {149, 64}, 4},
{{4|(1<<4)}, {112, 64}, 0}, {{4|(1<<4)}, {112, 64}, 4},
{{3|(0<<4)}, {37, 48}, 0}, {{3|(0<<4)}, {37, 48}, 4},
{{1|(0<<4)}, {38, 16}, 0} {{1|(0<<4)}, {38, 16}, 4}
}; };
#endif #endif

@ -0,0 +1,56 @@
/* Copyright 2019 Jeremy Bernhardt
*
* 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 "butterstick.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
/*
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) {
#ifdef DEBUG_MATRIX
for (uint8_t c = 0; c < MATRIX_COLS; c++)
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
#endif
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,11 @@
#pragma once
#include "quantum.h"
#define LAYOUT_butter( \
k09, k08, k07, k06, k05, k04, k03, k02, k01, k00, \
k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
}

@ -0,0 +1,26 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1337
#define DEVICE_VER 0x0001
#define MANUFACTURER g Heavy Industries
#define PRODUCT Butter Stick
#define DESCRIPTION Its a stick of butter
#define VERSION "Paula Deen"
#define DEBOUNCING_DELAY 5
#define FORCE_NKRO
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 10
#define MATRIX_ROW_PINS { F4, F5 }
#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7}
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL

@ -0,0 +1,183 @@
#include QMK_KEYBOARD_H
#include "sten.h"
/*
* Key names are inherited from steno machines
* .-----------------------------------------------------.
* | LSU | LFT | LP | LH | ST1 | RF | RP | RL | RT | RD |
* |-----------------------------------------------------|
* | LSD | LK | LW | LR | ST2 | RR | RB | RG | RS | RZ |
* '-----------------------------------------------------'
*/
// Function prefixes
#define MEDIA (LSD | LK | LW | LR)
#define FUNCT (LSD | LK | LP | LH)
#define MOVE (LSU | LFT | LP | LH)
#define SYMB (RD | RZ)
#define NUMA (LW | LR)
#define NUMB (RR | RB)
// QMK Layer Numbers
#define BASE 0
#define GAME 1
// Do not change QMK Layer 0! This is your main keyboard.
// Make your QMK modifications to the later layers, to add
// keys/customize on the first layer modify processQwerty():
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_butter(
STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR
),
// I don't game don't roast me thanks
[GAME] = LAYOUT_butter(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_ENT,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(BASE)
)
};
// Note: You can only use basic keycodes here!
// P() is just a wrapper to make your life easier, any C code can be executed.
// Only the longest matched chord is run!
//
// http://docs.gboards.ca
uint32_t processQwerty(bool lookup) {
// SECRET AGENT CHORDS
P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
P( LSD | RZ, SEND(KC_SPC));
// Dual chords
P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
P( LSU | LFT, SEND(KC_ESC));
P( LSD | LK, SEND(KC_LSFT));
P( RZ | RS, SEND(KC_LSFT));
P( ST2 | RR, SEND(KC_SPC));
P( RP | RL, SEND(KC_LGUI));
P( RT | RD, SEND(KC_LCTL));
P( RL | RT, SEND(KC_LALT));
P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
P( RS | RT | RD | RZ, SEND(KC_ENT));
// Function Layer
P( FUNCT | RF, SEND(KC_F1));
P( FUNCT | RP, SEND(KC_F2));
P( FUNCT | RL, SEND(KC_F3));
P( FUNCT | RT, SEND(KC_F4));
P( FUNCT | RF | RR, SEND(KC_F5));
P( FUNCT | RP | RB, SEND(KC_F6));
P( FUNCT | RL | RG, SEND(KC_F7));
P( FUNCT | RT | RS, SEND(KC_F8));
P( FUNCT | RR, SEND(KC_F9));
P( FUNCT | RB, SEND(KC_F10));
P( FUNCT | RG, SEND(KC_F11));
P( FUNCT | RS, SEND(KC_F12));
// Movement Layer
P( MOVE | RF, SEND(KC_LEFT));
P( MOVE | RP, SEND(KC_DOWN));
P( MOVE | RL, SEND(KC_UP));
P( MOVE | RT, SEND(KC_RIGHT));
P( MOVE | ST1, SEND(KC_PGUP));
P( MOVE | ST2, SEND(KC_PGDN));
// Media Layer
P( MEDIA | RF, SEND(KC_MPRV));
P( MEDIA | RP, SEND(KC_MPLY));
P( MEDIA | RL, SEND(KC_MPLY));
P( MEDIA | RT, SEND(KC_MNXT));
P( MEDIA | RG, SEND(KC_VOLU));
P( MEDIA | RB, SEND(KC_VOLD));
P( MEDIA | RS, SEND(KC_MUTE));
// Number Row, Right
P( NUMB | LSU, SEND(KC_1));
P( NUMB | LFT, SEND(KC_2));
P( NUMB | LP, SEND(KC_3));
P( NUMB | LH, SEND(KC_4));
P( NUMB | ST1, SEND(KC_5));
P( NUMB | RF, SEND(KC_6));
P( NUMB | RP, SEND(KC_7));
P( NUMB | RL, SEND(KC_8));
P( NUMB | RT, SEND(KC_9));
P( NUMB | RD, SEND(KC_0));
// Number Row, Left
P( NUMA | LSU, SEND(KC_1));
P( NUMA | LFT, SEND(KC_2));
P( NUMA | LP, SEND(KC_3));
P( NUMA | LH, SEND(KC_4));
P( NUMA | ST1, SEND(KC_5));
P( NUMA | RF, SEND(KC_6));
P( NUMA | RP, SEND(KC_7));
P( NUMA | RL, SEND(KC_8));
P( NUMA | RT, SEND(KC_9));
P( NUMA | RD, SEND(KC_0));
// Symbols and Numbers
P( SYMB | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
P( SYMB | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
P( SYMB | ST1 | ST2, SEND(KC_GRV)); // `
P( SYMB | RR | RF, SEND(KC_LSFT); SEND(KC_3)); // #
P( SYMB | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
P( SYMB | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
P( SYMB | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
P( SYMB | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
P( SYMB | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
P( SYMB | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
P( SYMB | LW, SEND(KC_LBRC));
P( SYMB | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
P( SYMB | LR, SEND(KC_RBRC));
P( SYMB | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
P( SYMB | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
P( SYMB | RP | RB, SEND(KC_QUOT));
P( SYMB | RP | RG, SEND(KC_LSFT); SEND(KC_QUOT)); // "
P( SYMB | RF, SEND(KC_KP_PLUS));
P( SYMB | RR, SEND(KC_LSFT); SEND(KC_7)); // &
P( SYMB | RP, SEND(KC_MINS));
P( SYMB | RB, SEND(KC_EQL));
P( SYMB | RL, SEND(KC_SLSH));
P( SYMB | RG, SEND(KC_COMM));
P( SYMB | RT, SEND(KC_PAST));
P( SYMB | RS, SEND(KC_DOT));
// Letters
P( LSU | LSD, SEND(KC_A));
P( LFT | LK, SEND(KC_S));
P( LP | LW, SEND(KC_D));
P( LH | LR, SEND(KC_F));
P( ST1 | ST2, SEND(KC_G));
P( RF | RR, SEND(KC_H));
P( RT | RS, SEND(KC_L));
P( RD | RZ, SEND(KC_SCLN));
P( RG | RL, SEND(KC_K));
P( RP | RB, SEND(KC_J));
P( LSU, SEND(KC_Q));
P( LSD, SEND(KC_Z));
P( LFT, SEND(KC_W));
P( LK, SEND(KC_X));
P( LP, SEND(KC_E));
P( LW, SEND(KC_C));
P( LH, SEND(KC_R));
P( LR, SEND(KC_V));
P( ST1, SEND(KC_T));
P( ST2, SEND(KC_B));
P( RF, SEND(KC_Y));
P( RR, SEND(KC_N));
P( RP, SEND(KC_U));
P( RB, SEND(KC_M));
P( RL, SEND(KC_I));
P( RG, SEND(KC_COMM));
P( RT, SEND(KC_O));
P( RS, SEND(KC_DOT));
P( RD, SEND(KC_P));
P( RZ, SEND(KC_SLSH));
return 0;
}
// Don't fuck with this, thanks.
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);

@ -0,0 +1,14 @@
# Butter Stick
![Butter Stick](https://i.redd.it/mvteaomko7s21.jpg)
A chorded 20% keyboard packing full sized useage into your pocket. More info on [gboards.ca](http://docs.gboards.ca/Meet-Butter-Stick)!
Keyboard Maintainer: [Germ](https://github.com/germ)
Hardware Availability: [g Heavy Industries](https://www.gboards.ca/product/butter-stick-limited-edition)
Make example for this keyboard (after setting up your build environment):
make butterstick: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,19 @@
# MCU name
MCU = atmega32u4
F_CPU = 16000000
ARCH = AVR8
F_USB = $(F_CPU)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX
SRC += sten.c
EXTRAFLAGS += -flto
BOOTLOADER = atmel-dfu
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
NKRO_ENABLE = yes # USB Nkey Rollover
STENO_ENABLE = yes # Needed for chording

@ -0,0 +1,367 @@
#include "sten.h"
// Chord state
uint32_t cChord = 0; // Current Chord
int chordIndex = 0; // Keys in previousachord
int32_t chordState[32]; // Full Chord history
#define QWERBUF 24 // Size of chords to buffer for output
bool repeatFlag = false; // Should we repeat?
uint32_t pChord = 0; // Previous Chord
int pChordIndex = 0; // Keys in previousachord
uint32_t pChordState[32]; // Previous chord sate
uint32_t stickyBits = 0; // Or'd with every incoming press
// Mode state
enum MODE { STENO = 0, QWERTY, COMMAND };
enum MODE pMode;
bool QWERSTENO = false;
#ifdef ONLYQWERTY
enum MODE cMode = QWERTY;
#else
enum MODE cMode = STENO;
#endif
// Command State
#define MAX_CMD_BUF 20
uint8_t CMDLEN = 0;
uint8_t CMDBUF[MAX_CMD_BUF];
// Key Repeat state
bool inChord = false;
bool repEngaged = false;
uint16_t repTimer = 0;
#define REP_INIT_DELAY 750
#define REP_DELAY 25
// Mousekeys state
bool inMouse = false;
int8_t mousePress;
// All processing done at chordUp goes through here
// Note, this is a gutted version of the Georgi sten.h
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
// Check for mousekeys, this is release
#ifdef MOUSEKEY_ENABLE
if (inMouse) {
inMouse = false;
mousekey_off(mousePress);
mousekey_send();
}
#endif
// handle command mode
if (cChord == (LSU | LSD | RD | RZ)) {
if (cMode != COMMAND) { // Entering Command Mode
CMDLEN = 0;
pMode = cMode;
cMode = COMMAND;
} else { // Exiting Command Mode
cMode = pMode;
// Press all and release all
for (int i = 0; i < CMDLEN; i++) {
register_code(CMDBUF[i]);
}
clear_keyboard();
}
goto out;
}
// Handle Gaming Toggle,
if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) {
#ifndef NO_DEBUG
uprintf("Switching to QMK\n");
#endif
layer_on(1);
goto out;
}
// Do QWERTY and Momentary QWERTY
if (cMode == QWERTY || (cMode == COMMAND)) {
processChord(false);
goto out;
}
out:
cChord = 0;
inChord = false;
chordIndex = 0;
clear_keyboard();
repEngaged = false;
for (int i = 0; i < 32; i++)
chordState[i] = 0xFFFF;
return false;
}
// Update Chord State
bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
// Everything happens in here when steno keys come in.
// Bail on keyup
if (!record->event.pressed) return true;
// Update key repeat timers
repTimer = timer_read();
inChord = true;
// Switch on the press adding to chord
bool pr = record->event.pressed;
switch (keycode) {
// Mods and stuff
case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break;
case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break;
// All the letter keys
case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
}
// Store previous state for fastQWER
if (pr) {
chordState[chordIndex] = cChord;
chordIndex++;
}
return true;
}
void matrix_scan_user(void) {
// We abuse this for early sending of key
// Key repeat only on QWER/SYMB layers
if (cMode != QWERTY || !inChord) return;
// Check timers
#ifndef NO_REPEAT
if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) {
// Process Key for report
processChord(false);
// Send report to host
send_keyboard_report();
clear_keyboard();
repTimer = timer_read();
}
if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) {
repEngaged = true;
}
#endif
};
// For Plover NKRO
uint32_t processFakeSteno(bool lookup) {
P( LSU, SEND(KC_Q););
P( LSD, SEND(KC_A););
P( LFT, SEND(KC_W););
P( LP, SEND(KC_E););
P( LH, SEND(KC_R););
P( LK, SEND(KC_S););
P( LW, SEND(KC_D););
P( LR, SEND(KC_F););
P( ST1, SEND(KC_T););
P( ST2, SEND(KC_G););
P( LA, SEND(KC_C););
P( LO, SEND(KC_V););
P( RE, SEND(KC_N););
P( RU, SEND(KC_M););
P( ST3, SEND(KC_Y););
P( ST4, SEND(KC_H););
P( RF, SEND(KC_U););
P( RP, SEND(KC_I););
P( RL, SEND(KC_O););
P( RT, SEND(KC_P););
P( RD, SEND(KC_LBRC););
P( RR, SEND(KC_J););
P( RB, SEND(KC_K););
P( RG, SEND(KC_L););
P( RS, SEND(KC_SCLN););
P( RZ, SEND(KC_COMM););
P( LNO, SEND(KC_1););
P( RNO, SEND(KC_1););
return 0;
}
// Traverse the chord history to a given point
// Returns the mask to use
void processChord(bool useFakeSteno) {
// Save the clean chord state
uint32_t savedChord = cChord;
// Apply Stick Bits if needed
if (stickyBits != 0) {
cChord |= stickyBits;
for (int i = 0; i <= chordIndex; i++)
chordState[i] |= stickyBits;
}
// Strip FN
if (cChord & FN) cChord ^= FN;
// First we test if a whole chord was passsed
// If so we just run it handling repeat logic
if (useFakeSteno && processFakeSteno(true) == cChord) {
processFakeSteno(false);
return;
} else if (processQwerty(true) == cChord) {
processQwerty(false);
// Repeat logic
if (repeatFlag) {
restoreState();
repeatFlag = false;
processChord(false);
} else {
saveState(cChord);
}
return;
}
// Iterate through chord picking out the individual
// and longest chords
uint32_t bufChords[QWERBUF];
int bufLen = 0;
uint32_t mask = 0;
// We iterate over it multiple times to catch the longest
// chord. Then that gets addded to the mask and re run.
while (savedChord != mask) {
uint32_t test = 0;
uint32_t longestChord = 0;
for (int i = 0; i <= chordIndex; i++) {
cChord = chordState[i] & ~mask;
if (cChord == 0)
continue;
// Assume mid parse Sym is new chord
if (i != 0 && test != 0 && (cChord ^ test) == PWR) {
longestChord = test;
break;
}
// Lock SYM layer in once detected
if (mask & PWR)
cChord |= PWR;
// Testing for keycodes
if (useFakeSteno) {
test = processFakeSteno(true);
} else {
test = processQwerty(true);
}
if (test != 0) {
longestChord = test;
}
}
mask |= longestChord;
bufChords[bufLen] = longestChord;
bufLen++;
// That's a loop of sorts, halt processing
if (bufLen >= QWERBUF) {
return;
}
}
// Now that the buffer is populated, we run it
for (int i = 0; i < bufLen ; i++) {
cChord = bufChords[i];
if (useFakeSteno) {
processFakeSteno(false);
} else {
processQwerty(false);
}
}
// Save state in case of repeat
if (!repeatFlag) {
saveState(savedChord);
}
// Restore cChord for held repeat
cChord = savedChord;
return;
}
void saveState(uint32_t cleanChord) {
pChord = cleanChord;
pChordIndex = chordIndex;
for (int i = 0; i < 32; i++)
pChordState[i] = chordState[i];
}
void restoreState() {
cChord = pChord;
chordIndex = pChordIndex;
for (int i = 0; i < 32; i++)
chordState[i] = pChordState[i];
}
// Macros for calling from keymap.c
void SEND(uint8_t kc) {
// Send Keycode, Does not work for Quantum Codes
if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
#ifndef NO_DEBUG
uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
#endif
CMDBUF[CMDLEN] = kc;
CMDLEN++;
}
if (cMode != COMMAND) register_code(kc);
return;
}
void REPEAT(void) {
if (cMode != QWERTY)
return;
repeatFlag = true;
return;
}
void SET_STICKY(uint32_t stick) {
stickyBits = stick;
return;
}
void SWITCH_LAYER(int layer) {
if (keymapsCount >= layer)
layer_on(layer);
}
void CLICK_MOUSE(uint8_t kc) {
#ifdef MOUSEKEY_ENABLE
mousekey_on(kc);
mousekey_send();
// Store state for later use
inMouse = true;
mousePress = kc;
#endif
}

@ -0,0 +1,77 @@
// 2019, g Heavy Industries
// Blessed mother of Christ, please keep this readable
// and protect us from segfaults. For thine is the clock,
// the slave and the master. Until we return from main.
//
// Amen.
#include QMK_KEYBOARD_H
#include "mousekey.h"
#include "keymap.h"
#include "keymap_steno.h"
#include "wait.h"
extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
// Function defs
void processChord(bool useFakeSteno);
uint32_t processQwerty(bool lookup);
uint32_t processFakeSteno(bool lookup);
void saveState(uint32_t cChord);
void restoreState(void);
// Macros for use in keymap.c
void SEND(uint8_t kc);
void REPEAT(void);
void SET_STICKY(uint32_t);
void SWITCH_LAYER(int);
void CLICK_MOUSE(uint8_t);
// Keymap helper
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
// Shift to internal representation
// i.e) S(teno)R(ight)F
#define STN(n) (1L<<n)
enum ORDER {
SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUML, SNUMR,
SLSU, SLSD, SLT, SLK, SLP, SLW, SLH, SLR, SLA, SLO,
SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ, SRES1, SRES2
};
// Break it all out
#define FN STN(SFN)
#define PWR STN(SPWR)
#define ST1 STN(SST1)
#define ST2 STN(SST2)
#define ST3 STN(SST3)
#define ST4 STN(SST4)
#define LNO STN(SNUML) // STN1-6
#define RNO STN(SNUMR) // STN7-C
#define RES1 STN(SRES1) // Use reserved for sticky state
#define RES2 STN(SRES2)
#define LSU STN(SLSU)
#define LSD STN(SLSD)
#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict
#define LK STN(SLK)
#define LP STN(SLP)
#define LW STN(SLW)
#define LH STN(SLH)
#define LR STN(SLR)
#define LA STN(SLA)
#define LO STN(SLO)
#define RE STN(SRE)
#define RU STN(SRU)
#define RF STN(SRF)
#define RR STN(SRR)
#define RP STN(SRP)
#define RB STN(SRB)
#define RL STN(SRL)
#define RG STN(SRG)
#define RT STN(SRT)
#define RS STN(SRS)
#define RD STN(SRD)
#define RZ STN(SRZ)

@ -76,7 +76,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Bump this every time we change what we store // Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults // This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM // and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x0F #define EEPROM_VERSION 0x01
#define EEPROM_VERSION_ADDR 34 #define EEPROM_VERSION_ADDR 34
// Dynamic keymap starts after EEPROM version // Dynamic keymap starts after EEPROM version

@ -42,8 +42,8 @@ static const I2CConfig i2cconfig = {
0 0
}; };
static i2c_status_t chibios_to_qmk(const msg_t* status) { static i2c_status_t chibios_to_qmk(const msg_t status) {
switch (*status) { switch (status) {
case I2C_NO_ERROR: case I2C_NO_ERROR:
return I2C_STATUS_SUCCESS; return I2C_STATUS_SUCCESS;
case I2C_TIMEOUT: case I2C_TIMEOUT:
@ -83,7 +83,7 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length,
i2cAcquireBus(&I2C_DRIVER); i2cAcquireBus(&I2C_DRIVER);
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
i2cReleaseBus(&I2C_DRIVER); i2cReleaseBus(&I2C_DRIVER);
return chibios_to_qmk(&status); return chibios_to_qmk(status);
} }
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
@ -91,7 +91,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
i2c_address = address; i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig); i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
return chibios_to_qmk(&status); return chibios_to_qmk(status);
} }
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)
@ -107,7 +107,7 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
complete_packet[0] = regaddr; complete_packet[0] = regaddr;
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
return chibios_to_qmk(&status); return chibios_to_qmk(status);
} }
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
@ -115,7 +115,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint1
i2c_address = devaddr; i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig); i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
return chibios_to_qmk(&status); return chibios_to_qmk(status);
} }
void i2c_stop(void) void i2c_stop(void)

@ -0,0 +1,37 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_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_DEL, ENC_PRESS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENTER, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_all(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, OLED_TOGG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

@ -17,25 +17,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default( [0] = LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_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, ENC_PRESS, 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_DEL, ENC_PRESS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENTER, KC_PGUP,
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_PGDN, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
), ),
[1] = LAYOUT_default( [1] = LAYOUT_all(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) )
}; };
void matrix_init_user(void) { void matrix_init_user(void) {
//user initialization //user initialization
} }

@ -56,70 +56,70 @@ void led_set_kb(uint8_t usb_led) {
* | | | modifier * | | | modifier
* | | | */ * | | | */
#define RGB_MATRIX_LEFT_LEDS \ #define RGB_MATRIX_LEFT_LEDS \
{ { 0xFF }, { 85, 16 }, 0 }, /* 1 */ \ { { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \
{ { 0xFF }, { 50, 13 }, 0 }, /* 2 */ \ { { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \
{ { 0xFF }, { 16, 20 }, 0 }, /* 3 */ \ { { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \
{ { 0xFF }, { 16, 38 }, 0 }, /* 4 */ \ { { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \
{ { 0xFF }, { 50, 48 }, 0 }, /* 5 */ \ { { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \
{ { 0xFF }, { 85, 52 }, 0 }, /* 6 */ \ { { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \ { { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 0 }, /* 8 */ \ { { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, /* 9 */ \ { { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, /* 10 */ \ { { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, /* 11 */ \ { { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, /* 12 */ \ { { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, /* 13 */ \ { { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \ { { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \ { { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 0 }, /* 16 */ \ { { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, /* 17 */ \ { { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, /* 18 */ \ { { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, /* 19 */ \ { { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, /* 20 */ \ { { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, /* 21 */ \ { { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, /* 22 */ \ { { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, /* 23 */ \ { { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, /* 24 */ \ { { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \ { { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \ { { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */ { { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */
#define RGB_MATRIX_RIGHT_LEDS \ #define RGB_MATRIX_RIGHT_LEDS \
{ { 0xFF }, { 139, 16 }, 0 }, /* 1 */ \ { { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \
{ { 0xFF }, { 174, 13 }, 0 }, /* 2 */ \ { { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \
{ { 0xFF }, { 208, 20 }, 0 }, /* 3 */ \ { { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \
{ { 0xFF }, { 208, 38 }, 0 }, /* 4 */ \ { { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \
{ { 0xFF }, { 174, 48 }, 0 }, /* 5 */ \ { { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \
{ { 0xFF }, { 139, 52 }, 0 }, /* 6 */ \ { { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \ { { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 0 }, /* 8 */ \ { { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, /* 9 */ \ { { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, /* 10 */ \ { { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, /* 11 */ \ { { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, /* 12 */ \ { { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, /* 13 */ \ { { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \ { { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \ { { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 0 }, /* 16 */ \ { { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, /* 17 */ \ { { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, /* 18 */ \ { { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, /* 19 */ \ { { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, /* 20 */ \ { { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, /* 21 */ \ { { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, /* 22 */ \ { { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, /* 23 */ \ { { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, /* 24 */ \ { { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \ { { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \ { { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */ { { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */
#ifdef RGB_MATRIX_SPLIT_RIGHT #ifdef RGB_MATRIX_SPLIT_RIGHT
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_RIGHT_LEDS RGB_MATRIX_RIGHT_LEDS
RGB_MATRIX_LEFT_LEDS RGB_MATRIX_LEFT_LEDS
}; };
#else #else
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_LEFT_LEDS RGB_MATRIX_LEFT_LEDS
RGB_MATRIX_RIGHT_LEDS RGB_MATRIX_RIGHT_LEDS
}; };

@ -1,5 +1,12 @@
# Default Doro67 ANSI layout. # Default Doro67 ANSI layout.
**THIS IS THE DEFAULT ANSI KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased an RGB PCB, please see the 'rgb' directory.
This is the default ANSI layout that comes flashed on the Doro67 multi PCB with This is the default ANSI layout that comes flashed on the Doro67 multi PCB with
the exception of adding backtick as it was not mapped. the exception of adding backtick as it was not mapped.

@ -1,5 +1,12 @@
# Default Doro67 ISO layout. # Default Doro67 ISO layout.
**THIS IS THE DEFAULT ISO KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased an RGB PCB, please see the 'rgb' directory.
This is the default ISO layout that comes flashed on the Doro67 multi PCB with This is the default ISO layout that comes flashed on the Doro67 multi PCB with
the exception of adding backtick and UK ISO specific keycodes as they were not mapped. the exception of adding backtick and UK ISO specific keycodes as they were not mapped.

@ -1,5 +1,12 @@
# Default Doro67 Multi layout. # Default Doro67 Multi layout.
**THIS IS THE DEFAULT MULTI-LAYOUT (SPLIT BACKSPACE) KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased an RGB PCB, please see the 'rgb' directory.
This is the default Multi layout that comes flashed on the Doro67 multi PCB with This is the default Multi layout that comes flashed on the Doro67 multi PCB with
the exception of adding backtick as it was not mapped. the exception of adding backtick as it was not mapped.

@ -2,6 +2,13 @@
65% custom keyboard made by 80ultraman/Alf/Backprop Studios with multiple layout support. Despite the layout options available, layout is dictated by the selected integrated plate. 65% custom keyboard made by 80ultraman/Alf/Backprop Studios with multiple layout support. Despite the layout options available, layout is dictated by the selected integrated plate.
**MULTI-LAYOUT PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased an RGB PCB, please see the 'rgb' directory.
Keyboard Maintainer: [ShadeDream](https://github.com/shadedream) Keyboard Maintainer: [ShadeDream](https://github.com/shadedream)
Hardware Supported: Doro67 Multi PCB Hardware Supported: Doro67 Multi PCB
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)

@ -1 +1,5 @@
# The default keymap for doro67 # The default keymap for doro67
**THIS IS THE DEFAULT KEYMAP DIRECTORY (AVAILABILITY: CHINA GB ONLY)**
If you are a non-china buyer, you probably have the multi PCB or rgb PCB.
Please look at the "multi" and "rgb" readme files.

@ -4,6 +4,10 @@
This is not the PCB with RGB support. Do not flash RGB firmware for this board. This is not the PCB with RGB support. Do not flash RGB firmware for this board.
**REGULAR PCB (AVAILABILITY: CHINA GB ONLY)*
If you are a non-china buyer, you probably have the multi PCB or rgb PCB.
Please look at the "multi" and "rgb" readme files.
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Doro67 Regular PCB Hardware Supported: Doro67 Regular PCB
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)

@ -1 +1,7 @@
# The default keymap for rgb # The default keymap for rgb
**RGB PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "rgb" directory includes the keymap for the RGB PCB.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased a non-rgb PCB, please see the 'multi' directory.

@ -4,6 +4,12 @@
Flashing the regular PCB firmware on this board will work, but will disable RGB lighting. Flashing the regular PCB firmware on this board will work, but will disable RGB lighting.
**THIS IS THE RGB PCB DIRECTORY (AVAILABILITY: CHINA + INTERNATIONAL GB)**
The "rgb" directory includes the keymap for the RGB PCB.
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
If you purchased a non-rgb PCB, please see the 'multi' directory.
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Doro 67 RGB PCB Hardware Supported: Doro 67 RGB PCB
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)

@ -52,73 +52,73 @@ void led_set_kb(uint8_t usb_led) {
led_set_user(usb_led); led_set_user(usb_led);
} }
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(0<<4)}, {15*0, 0}, 0}, // Esc {{0|(0<<4)}, {15*0, 0}, 4}, // Esc
{{0|(1<<4)}, {15*1, 0}, 0}, // 1 {{0|(1<<4)}, {15*1, 0}, 4}, // 1
{{0|(2<<4)}, {15*2, 0}, 0}, // 2 {{0|(2<<4)}, {15*2, 0}, 4}, // 2
{{0|(3<<4)}, {15*3, 0}, 0}, // 3 {{0|(3<<4)}, {15*3, 0}, 4}, // 3
{{0|(4<<4)}, {15*4, 0}, 0}, // 4 {{0|(4<<4)}, {15*4, 0}, 4}, // 4
{{0|(5<<4)}, {15*5, 0}, 0}, // 5 {{0|(5<<4)}, {15*5, 0}, 4}, // 5
{{0|(6<<4)}, {15*6, 0}, 0}, // 6 {{0|(6<<4)}, {15*6, 0}, 4}, // 6
{{0|(7<<4)}, {15*7, 0}, 0}, // 7 {{0|(7<<4)}, {15*7, 0}, 4}, // 7
{{0|(8<<4)}, {15*8, 0}, 0}, // 8 {{0|(8<<4)}, {15*8, 0}, 4}, // 8
{{0|(9<<4)}, {15*9, 0}, 0}, // 9 {{0|(9<<4)}, {15*9, 0}, 4}, // 9
{{0|(10<<4)}, {15*10, 0}, 0}, // 0 {{0|(10<<4)}, {15*10, 0}, 4}, // 0
{{0|(11<<4)}, {15*11, 0}, 0}, // - {{0|(11<<4)}, {15*11, 0}, 4}, // -
{{0|(12<<4)}, {15*12, 0}, 0}, // = {{0|(12<<4)}, {15*12, 0}, 4}, // =
{{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace {{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
{{0|(14<<4)}, {15*15, 0}, 1}, // Ins {{0|(14<<4)}, {15*15, 0}, 1}, // Ins
{{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab {{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
{{1|(1<<4)}, {15*1.5, 16}, 0}, // Q {{1|(1<<4)}, {15*1.5, 16}, 4}, // Q
{{1|(2<<4)}, {15*2.5, 16}, 0}, // W {{1|(2<<4)}, {15*2.5, 16}, 4}, // W
{{1|(3<<4)}, {15*3.5, 16}, 0}, // E {{1|(3<<4)}, {15*3.5, 16}, 4}, // E
{{1|(4<<4)}, {15*4.5, 16}, 0}, // R {{1|(4<<4)}, {15*4.5, 16}, 4}, // R
{{1|(5<<4)}, {15*5.5, 16}, 0}, // T {{1|(5<<4)}, {15*5.5, 16}, 4}, // T
{{1|(6<<4)}, {15*6.5, 16}, 0}, // Y {{1|(6<<4)}, {15*6.5, 16}, 4}, // Y
{{1|(7<<4)}, {15*7.5, 16}, 0}, // U {{1|(7<<4)}, {15*7.5, 16}, 4}, // U
{{1|(8<<4)}, {15*8.5, 16}, 0}, // I {{1|(8<<4)}, {15*8.5, 16}, 4}, // I
{{1|(9<<4)}, {15*9.5, 16}, 0}, // O {{1|(9<<4)}, {15*9.5, 16}, 4}, // O
{{1|(10<<4)}, {15*10.5, 16}, 0}, // P {{1|(10<<4)}, {15*10.5, 16}, 4}, // P
{{1|(11<<4)}, {15*11.5, 16}, 0}, // [ {{1|(11<<4)}, {15*11.5, 16}, 4}, // [
{{1|(12<<4)}, {15*12.5, 16}, 0}, // ] {{1|(12<<4)}, {15*12.5, 16}, 4}, // ]
{{1|(13<<4)}, {15*13.75, 16}, 1}, // {{1|(13<<4)}, {15*13.75, 16}, 1}, //
{{1|(14<<4)}, {15*15, 16}, 1}, // Del {{1|(14<<4)}, {15*15, 16}, 1}, // Del
{{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock {{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
{{2|(1<<4)}, {15*1.75, 32}, 0}, // A {{2|(1<<4)}, {15*1.75, 32}, 4}, // A
{{2|(2<<4)}, {15*2.75, 32}, 0}, // S {{2|(2<<4)}, {15*2.75, 32}, 4}, // S
{{2|(3<<4)}, {15*3.75, 32}, 0}, // D {{2|(3<<4)}, {15*3.75, 32}, 4}, // D
{{2|(4<<4)}, {15*4.75, 32}, 0}, // F {{2|(4<<4)}, {15*4.75, 32}, 4}, // F
{{2|(5<<4)}, {15*5.75, 32}, 0}, // G {{2|(5<<4)}, {15*5.75, 32}, 4}, // G
{{2|(6<<4)}, {15*6.75, 32}, 0}, // H {{2|(6<<4)}, {15*6.75, 32}, 4}, // H
{{2|(7<<4)}, {15*7.75, 32}, 0}, // J {{2|(7<<4)}, {15*7.75, 32}, 4}, // J
{{2|(8<<4)}, {15*8.75, 32}, 0}, // K {{2|(8<<4)}, {15*8.75, 32}, 4}, // K
{{2|(9<<4)}, {15*9.75, 32}, 0}, // L {{2|(9<<4)}, {15*9.75, 32}, 4}, // L
{{2|(10<<4)}, {15*10.75, 32}, 0}, // ; {{2|(10<<4)}, {15*10.75, 32}, 4}, // ;
{{2|(11<<4)}, {15*11.75, 32}, 0}, // ' {{2|(11<<4)}, {15*11.75, 32}, 4}, // '
{{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter {{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
{{2|(14<<4)}, {15*15, 32}, 1}, // Pgup {{2|(14<<4)}, {15*15, 32}, 1}, // Pgup
{{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift {{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
{{3|(2<<4)}, {15*2, 48}, 0}, // Z {{3|(2<<4)}, {15*2, 48}, 4}, // Z
{{3|(3<<4)}, {15*3, 48}, 0}, // X {{3|(3<<4)}, {15*3, 48}, 4}, // X
{{3|(4<<4)}, {15*4, 48}, 0}, // C {{3|(4<<4)}, {15*4, 48}, 4}, // C
{{3|(5<<4)}, {15*5, 48}, 0}, // V {{3|(5<<4)}, {15*5, 48}, 4}, // V
{{3|(6<<4)}, {15*6, 48}, 0}, // B {{3|(6<<4)}, {15*6, 48}, 4}, // B
{{3|(7<<4)}, {15*7, 48}, 0}, // N {{3|(7<<4)}, {15*7, 48}, 4}, // N
{{3|(8<<4)}, {15*8, 48}, 0}, // M {{3|(8<<4)}, {15*8, 48}, 4}, // M
{{3|(9<<4)}, {15*9, 48}, 0}, // , {{3|(9<<4)}, {15*9, 48}, 4}, // ,
{{3|(10<<4)}, {15*10, 48}, 0}, // . {{3|(10<<4)}, {15*10, 48}, 4}, // .
{{3|(11<<4)}, {15*11, 48}, 0}, // / {{3|(11<<4)}, {15*11, 48}, 4}, // /
{{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift {{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
{{3|(13<<4)}, {15*14, 48}, 1}, // Up {{3|(13<<4)}, {15*14, 48}, 1}, // Up
{{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn {{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn
{{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl {{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
{{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI {{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
{{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt {{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
{{4|(3<<4)}, {15*6.75, 64}, 0}, // Space {{4|(3<<4)}, {15*6.75, 64}, 4}, // Space
{{4|(9<<4)}, {15*9, 64}, 1}, // RAlt {{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
{{4|(10<<4)}, {15*10.25, 64}, 1}, // FN {{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
{{4|(12<<4)}, {15*13, 64}, 1}, // Left {{4|(12<<4)}, {15*13, 64}, 1}, // Left

@ -2,10 +2,6 @@
Non official firmware for custom Korean keyboard with 60% key layout made by Duck. Non official firmware for custom Korean keyboard with 60% key layout made by Duck.
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127)
Make example for this keyboard (after setting up your build environment): 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).
make duck/eagle_viper/v2:default

@ -123,31 +123,27 @@ void matrix_print(void) {
} }
} }
/* Row pin configuration /* Row pin configuration - diode connected
* row: 0 1 2 3 4 5 * row: 0 1 2 3 4
* pin: PB7 PD0 PD1 PD2 PD3 PD5 * pin: PD0 PD1 PD2 PD3 PD5
* *
* Esc uses its own pin PE2 * Caps Lock uses its own pin PE2 on the column pin, row pin is grounded
*/ */
static void init_rows(void) { static void init_rows(void) {
DDRD &= ~0b00101111; DDRD &= ~0b00101111;
PORTD &= ~0b00101111; PORTD &= ~0b00101111;
DDRB &= ~0b10000000;
PORTB &= ~0b10000000;
DDRE &= ~0b00000100; DDRE &= ~0b00000100;
PORTE |= 0b00000100; PORTE |= 0b00000100;
} }
static uint8_t read_rows(uint8_t col) { static uint8_t read_rows(uint8_t col) {
return (PIND&(1<<0) ? (1<<0) : 0) | return (PIND&(1<<0) ? (1<<0) : 0) |
(PIND&(1<<1) ? (1<<1) : 0) | (PIND&(1<<1) ? (1<<1) : 0) |
(PIND&(1<<2) ? (1<<2) : 0) | (PIND&(1<<2) ? (1<<2) : 0) |
(PIND&(1<<3) ? (1<<3) : 0) | (PIND&(1<<3) ? (1<<3) : 0) |
(PIND&(1<<5) ? (1<<4) : 0) | (PIND&(1<<5) ? (1<<4) : 0) |
(PINB&(1<<7) ? (1<<5) : 0) |
(col==0 ? ((PINE&(1<<2) ? 0 : (1<<2))) : 0); (col==0 ? ((PINE&(1<<2) ? 0 : (1<<2))) : 0);
} }
@ -158,24 +154,31 @@ uint8_t read_fwkey(void)
} }
/* Columns 0 - 15 /* Columns 0 - 15
*
* atmega32u4 decoder pin
* PC6 U1 E3
* PB6 U2 E3
* PF0 U1, U2 A0
* PF1 U1, U2 A1
* PC7 U1, U2 A2
*
* These columns uses two 74HC237D 3 to 8 bit demultiplexers. * These columns uses two 74HC237D 3 to 8 bit demultiplexers.
* col / pin: PC6 PB6 PF0 PF1 PC7 * col / pin: PC6 PB6 PF0 PF1 PC7 Decoder Pin
* 0: 1 0 0 0 0 * 0: 1 0 0 0 0 U1 Y0
* 1: 1 0 1 0 0 * 1: 1 0 1 0 0 U1 Y1
* 2: 1 0 0 1 0 * 2: 1 0 0 1 0 U1 Y2
* 3: 1 0 1 1 0 * 3: 1 0 1 1 0 U1 Y3
* 4: 1 0 0 0 1 * 4: 1 0 0 0 1 U1 Y4
* 5: 1 0 1 0 1 * 5: 1 0 1 0 1 U1 Y5
* 6: 1 0 0 1 1 * 6: 1 0 0 1 1 U1 Y6
* 7: 1 0 1 1 1 * 7: 1 0 1 1 1 U1 Y7
* 8: 0 1 0 0 0 * 8: 0 1 0 0 0 U2 Y0
* 9: 0 1 1 0 0 * 9: 0 1 1 0 0 U2 Y1
* 10: 0 1 0 1 0 * 10: 0 1 0 1 0 U2 Y2
* 11: 0 1 1 1 0 * 11: 0 1 1 1 0 U2 Y3
* 12: 0 1 0 0 1 * 12: 0 1 0 0 1 U2 Y4
* 13: 0 1 1 0 1 * 13: 0 1 1 0 1 U2 Y5
* 14: 0 1 0 1 1 * 14: 0 1 0 1 1 U2 Y6
* 15: 0 1 1 1 1
* *
*/ */
static void unselect_cols(void) { static void unselect_cols(void) {
@ -251,10 +254,5 @@ static void select_col(uint8_t col) {
PORTF |= 0b00000010; PORTF |= 0b00000010;
PORTC |= 0b10000000; PORTC |= 0b10000000;
break; break;
case 15:
PORTB |= 0b01000000;
PORTF |= 0b00000011;
PORTC |= 0b10000000;
break;
} }
} }

@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment):
**Reset Key:** To put the Eagle/Viper V2 into reset, hold caps lock key (`K2A`) while plugging in. **Reset Key:** To put the Eagle/Viper V2 into reset, hold caps lock key (`K2A`) while plugging in.
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. 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).
## Hardware Notes ## Hardware Notes

@ -0,0 +1,25 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL),
LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_SCROLLLOCK, KC_PAUSE, KC_HOME, KC_END, KC_INSERT, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
LAYOUT(
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

@ -71,7 +71,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(11<<4)}, {20.36*11, 0}, 1}, {{0|(11<<4)}, {20.36*11, 0}, 1},
{{0|(10<<4)}, {20.36*10, 0}, 1}, {{0|(10<<4)}, {20.36*10, 0}, 1},
@ -90,32 +90,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
{{1|(11<<4)}, {20.36*11, 21.33}, 1}, {{1|(11<<4)}, {20.36*11, 21.33}, 1},
{{1|(10<<4)}, {20.36*10, 21.33}, 0}, {{1|(10<<4)}, {20.36*10, 21.33}, 4},
{{1|(9<<4)}, {20.36*9, 21.33}, 0}, {{1|(9<<4)}, {20.36*9, 21.33}, 4},
{{1|(8<<4)}, {20.36*8, 21.33}, 0}, {{1|(8<<4)}, {20.36*8, 21.33}, 4},
{{1|(7<<4)}, {20.36*7, 21.33}, 0}, {{1|(7<<4)}, {20.36*7, 21.33}, 4},
{{1|(6<<4)}, { 20.36*6, 21.33}, 0}, {{1|(6<<4)}, { 20.36*6, 21.33}, 4},
{{1|(5<<4)}, { 20.36*5, 21.33}, 0}, {{1|(5<<4)}, { 20.36*5, 21.33}, 4},
{{1|(4<<4)}, { 20.36*4, 21.33}, 0}, {{1|(4<<4)}, { 20.36*4, 21.33}, 4},
{{1|(3<<4)}, { 20.36*3, 21.33}, 0}, {{1|(3<<4)}, { 20.36*3, 21.33}, 4},
{{1|(2<<4)}, { 20.36*2, 21.33}, 0}, {{1|(2<<4)}, { 20.36*2, 21.33}, 4},
{{1|(1<<4)}, { 20.36*1, 21.33}, 0}, {{1|(1<<4)}, { 20.36*1, 21.33}, 4},
{{1|(0<<4)}, { 20.36*0, 21.33}, 1}, {{1|(0<<4)}, { 20.36*0, 21.33}, 1},
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, {{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, {{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
@ -205,7 +205,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(11<<4)}, {20.36*11, 0}, 1}, {{0|(11<<4)}, {20.36*11, 0}, 1},
{{0|(10<<4)}, {20.36*10, 0}, 1}, {{0|(10<<4)}, {20.36*10, 0}, 1},
@ -224,32 +224,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
{{1|(11<<4)}, {20.36*11, 21.33}, 1}, {{1|(11<<4)}, {20.36*11, 21.33}, 1},
{{1|(10<<4)}, {20.36*10, 21.33}, 0}, {{1|(10<<4)}, {20.36*10, 21.33}, 4},
{{1|(9<<4)}, {20.36*9, 21.33}, 0}, {{1|(9<<4)}, {20.36*9, 21.33}, 4},
{{1|(8<<4)}, {20.36*8, 21.33}, 0}, {{1|(8<<4)}, {20.36*8, 21.33}, 4},
{{1|(7<<4)}, {20.36*7, 21.33}, 0}, {{1|(7<<4)}, {20.36*7, 21.33}, 4},
{{1|(6<<4)}, { 20.36*6, 21.33}, 0}, {{1|(6<<4)}, { 20.36*6, 21.33}, 4},
{{1|(5<<4)}, { 20.36*5, 21.33}, 0}, {{1|(5<<4)}, { 20.36*5, 21.33}, 4},
{{1|(4<<4)}, { 20.36*4, 21.33}, 0}, {{1|(4<<4)}, { 20.36*4, 21.33}, 4},
{{1|(3<<4)}, { 20.36*3, 21.33}, 0}, {{1|(3<<4)}, { 20.36*3, 21.33}, 4},
{{1|(2<<4)}, { 20.36*2, 21.33}, 0}, {{1|(2<<4)}, { 20.36*2, 21.33}, 4},
{{1|(1<<4)}, { 20.36*1, 21.33}, 0}, {{1|(1<<4)}, { 20.36*1, 21.33}, 4},
{{1|(0<<4)}, { 20.36*0, 21.33}, 1}, {{1|(0<<4)}, { 20.36*0, 21.33}, 1},
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, {{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, {{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},

@ -35,10 +35,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -58,10 +58,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -64,7 +64,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16}, {0, H_16, G_16, I_16},
{0, K_16, J_16, L_16}, {0, K_16, J_16, L_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1}, {{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1}, {{0|(12<<4)}, {16*12, 0}, 1},
{{0|(11<<4)}, {16*11, 0}, 1}, {{0|(11<<4)}, {16*11, 0}, 1},
@ -80,49 +81,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1}, {{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1}, {{0|(0<<4)}, {16*0, 0}, 1},
{{2|(13<<4)}, {16*13.75, 24}, 1}, {{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0}, {{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 0}, {{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 0}, {{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 0}, {{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 0}, {{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 0}, {{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 0}, {{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 0}, {{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 0}, {{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 0}, {{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 0}, {{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 0}, {{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1}, {{1|(0<<4)}, { 16*0.25, 16}, 1},
{{1|(13<<4)}, {16*12.75, 32}, 1}, {{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0}, {{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 0}, {{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 0}, {{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 0}, {{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 0}, {{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 0}, {{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 0}, {{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 0}, {{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 0}, {{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 0}, {{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 0}, {{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1}, {{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(11<<4)}, {16*13.125, 48}, 1}, {{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0}, {{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 0}, {{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 0}, {{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 0}, {{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 0}, {{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 0}, {{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 0}, {{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 0}, {{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 0}, {{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 0}, {{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1}, {{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.875, 64}, 1}, {{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1}, {{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1}, {{4|(10<<4)}, {16*11.375, 64}, 1},
{{4|(9<<4)}, {16*10.125, 64}, 1}, {{4|(9<<4)}, {16*10.125, 64}, 1},
{{4|(5<<4)}, { 16*6.375, 64}, 0}, {{4|(5<<4)}, { 16*6.375, 64}, 4},
{{4|(2<<4)}, { 16*2.625, 64}, 1}, {{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1}, {{4|(1<<4)}, { 16*1.375, 64}, 1},
{{4|(0<<4)}, { 16*0.125, 64}, 1}, {{4|(0<<4)}, { 16*0.125, 64}, 1},
@ -192,7 +193,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16}, {0, H_16, G_16, I_16},
{0, K_16, J_16, L_16}, {0, K_16, J_16, L_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1}, {{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1}, {{0|(13<<4)}, {16*13, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1}, {{0|(12<<4)}, {16*12, 0}, 1},
@ -209,49 +211,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1}, {{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1}, {{0|(0<<4)}, {16*0, 0}, 1},
{{1|(13<<4)}, {16*13.75, 16}, 1}, {{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0}, {{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 0}, {{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 0}, {{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 0}, {{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 0}, {{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 0}, {{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 0}, {{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 0}, {{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 0}, {{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 0}, {{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 0}, {{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 0}, {{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1}, {{1|(0<<4)}, { 16*0.25, 16}, 1},
{{2|(13<<4)}, {16*12.75, 32}, 1}, {{2|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0}, {{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 0}, {{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 0}, {{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 0}, {{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 0}, {{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 0}, {{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 0}, {{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 0}, {{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 0}, {{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 0}, {{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 0}, {{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1}, {{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(13<<4)}, {16*14, 48}, 1}, {{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0}, {{3|(11<<4)}, {16*12.625, 48}, 4},
{{3|(10<<4)}, {16*11.25, 48}, 0}, {{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 0}, {{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 0}, {{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 0}, {{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 0}, {{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 0}, {{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 0}, {{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 0}, {{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 0}, {{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 0}, {{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1}, {{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.625, 64}, 1}, {{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1}, {{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1}, {{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0}, {{4|(5<<4)}, { 16*7, 64}, 4},
{{4|(2<<4)}, { 16*2.875, 64}, 1}, {{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1}, {{4|(1<<4)}, { 16*1.625, 64}, 1},
{{4|(0<<4)}, { 16*0.375, 64}, 1}, {{4|(0<<4)}, { 16*0.375, 64}, 1},
@ -321,7 +323,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16}, {0, H_16, G_16, I_16},
{0, K_16, J_16, L_16}, {0, K_16, J_16, L_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1}, {{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1}, {{0|(13<<4)}, {16*13, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1}, {{0|(12<<4)}, {16*12, 0}, 1},
@ -338,49 +341,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1}, {{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1}, {{0|(0<<4)}, {16*0, 0}, 1},
{{2|(13<<4)}, {16*13.75, 24}, 1}, {{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0}, {{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 0}, {{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 0}, {{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 0}, {{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 0}, {{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 0}, {{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 0}, {{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 0}, {{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 0}, {{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 0}, {{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 0}, {{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 0}, {{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1}, {{1|(0<<4)}, { 16*0.25, 16}, 1},
{{1|(13<<4)}, {16*12.75, 32}, 1}, {{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0}, {{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 0}, {{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 0}, {{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 0}, {{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 0}, {{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 0}, {{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 0}, {{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 0}, {{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 0}, {{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 0}, {{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 0}, {{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1}, {{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(13<<4)}, {16*14, 48}, 1}, {{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0}, {{3|(11<<4)}, {16*12.625, 48}, 4},
{{3|(10<<4)}, {16*11.25, 48}, 0}, {{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 0}, {{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 0}, {{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 0}, {{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 0}, {{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 0}, {{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 0}, {{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 0}, {{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 0}, {{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 0}, {{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1}, {{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.625, 64}, 1}, {{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1}, {{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1}, {{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0}, {{4|(5<<4)}, { 16*7, 64}, 4},
{{4|(2<<4)}, { 16*2.875, 64}, 1}, {{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1}, {{4|(1<<4)}, { 16*1.625, 64}, 1},
{{4|(0<<4)}, { 16*0.375, 64}, 1}, {{4|(0<<4)}, { 16*0.375, 64}, 1},
@ -449,7 +452,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16}, {0, H_16, G_16, I_16},
{0, K_16, J_16, L_16}, {0, K_16, J_16, L_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1}, {{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1}, {{0|(12<<4)}, {16*12, 0}, 1},
{{0|(11<<4)}, {16*11, 0}, 1}, {{0|(11<<4)}, {16*11, 0}, 1},
@ -465,49 +469,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1}, {{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1}, {{0|(0<<4)}, {16*0, 0}, 1},
{{1|(13<<4)}, {16*13.75, 16}, 1}, {{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0}, {{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 0}, {{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 0}, {{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 0}, {{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 0}, {{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 0}, {{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 0}, {{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 0}, {{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 0}, {{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 0}, {{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 0}, {{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 0}, {{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1}, {{1|(0<<4)}, { 16*0.25, 16}, 1},
{{2|(13<<4)}, {16*13.375, 24}, 1}, {{2|(13<<4)}, {16*13.375, 24}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0}, {{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 0}, {{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 0}, {{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 0}, {{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 0}, {{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 0}, {{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 0}, {{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 0}, {{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 0}, {{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 0}, {{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 0}, {{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1}, {{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(11<<4)}, {16*13.125, 48}, 1}, {{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0}, {{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 0}, {{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 0}, {{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 0}, {{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 0}, {{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 0}, {{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 0}, {{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 0}, {{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 0}, {{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 0}, {{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1}, {{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.875, 64}, 1}, {{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1}, {{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1}, {{4|(10<<4)}, {16*11.375, 64}, 1},
{{4|(9<<4)}, {16*10.125, 64}, 1}, {{4|(9<<4)}, {16*10.125, 64}, 1},
{{4|(5<<4)}, { 16*6.375, 64}, 0}, {{4|(5<<4)}, { 16*6.375, 64}, 4},
{{4|(2<<4)}, { 16*2.625, 64}, 1}, {{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1}, {{4|(1<<4)}, { 16*1.375, 64}, 1},
{{4|(0<<4)}, { 16*0.125, 64}, 1}, {{4|(0<<4)}, { 16*0.125, 64}, 1},
@ -578,7 +582,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16}, {0, H_16, G_16, I_16},
{0, K_16, J_16, L_16}, {0, K_16, J_16, L_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {17.23*13, 0}, 1}, {{0|(13<<4)}, {17.23*13, 0}, 1},
{{0|(12<<4)}, {17.23*12, 0}, 1}, {{0|(12<<4)}, {17.23*12, 0}, 1},
{{0|(11<<4)}, {17.23*11, 0}, 1}, {{0|(11<<4)}, {17.23*11, 0}, 1},
@ -594,51 +599,51 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, { 17.23*1, 0}, 1}, {{0|(1<<4)}, { 17.23*1, 0}, 1},
{{0|(0<<4)}, { 17.23*0, 0}, 1}, {{0|(0<<4)}, { 17.23*0, 0}, 1},
{{1|(13<<4)}, {17.23*13, 16}, 1}, {{1|(13<<4)}, {17.23*13, 16}, 1},
{{1|(12<<4)}, {17.23*12, 16}, 0}, {{1|(12<<4)}, {17.23*12, 16}, 4},
{{1|(11<<4)}, {17.23*11, 16}, 0}, {{1|(11<<4)}, {17.23*11, 16}, 4},
{{1|(10<<4)}, {17.23*10, 16}, 0}, {{1|(10<<4)}, {17.23*10, 16}, 4},
{{1|(9<<4)}, {17.23*9, 16}, 0}, {{1|(9<<4)}, {17.23*9, 16}, 4},
{{1|(8<<4)}, {17.23*8, 16}, 0}, {{1|(8<<4)}, {17.23*8, 16}, 4},
{{1|(7<<4)}, {17.23*7, 16}, 0}, {{1|(7<<4)}, {17.23*7, 16}, 4},
{{1|(6<<4)}, { 17.23*6, 16}, 0}, {{1|(6<<4)}, { 17.23*6, 16}, 4},
{{1|(5<<4)}, { 17.23*5, 16}, 0}, {{1|(5<<4)}, { 17.23*5, 16}, 4},
{{1|(4<<4)}, { 17.23*4, 16}, 0}, {{1|(4<<4)}, { 17.23*4, 16}, 4},
{{1|(3<<4)}, { 17.23*3, 16}, 0}, {{1|(3<<4)}, { 17.23*3, 16}, 4},
{{1|(2<<4)}, { 17.23*2, 16}, 0}, {{1|(2<<4)}, { 17.23*2, 16}, 4},
{{1|(1<<4)}, { 17.23*1, 16}, 0}, {{1|(1<<4)}, { 17.23*1, 16}, 4},
{{1|(0<<4)}, { 17.23*0, 16}, 1}, {{1|(0<<4)}, { 17.23*0, 16}, 1},
{{2|(13<<4)}, {17.23*13, 32}, 1}, {{2|(13<<4)}, {17.23*13, 32}, 1},
{{2|(11<<4)}, {17.23*11, 32}, 0}, {{2|(11<<4)}, {17.23*11, 32}, 4},
{{2|(10<<4)}, {17.23*10, 32}, 0}, {{2|(10<<4)}, {17.23*10, 32}, 4},
{{2|(9<<4)}, {17.23*9, 32}, 0}, {{2|(9<<4)}, {17.23*9, 32}, 4},
{{2|(8<<4)}, {17.23*8, 32}, 0}, {{2|(8<<4)}, {17.23*8, 32}, 4},
{{2|(7<<4)}, {17.23*7, 32}, 0}, {{2|(7<<4)}, {17.23*7, 32}, 4},
{{2|(6<<4)}, { 17.23*6, 32}, 0}, {{2|(6<<4)}, { 17.23*6, 32}, 4},
{{2|(5<<4)}, { 17.23*5, 32}, 0}, {{2|(5<<4)}, { 17.23*5, 32}, 4},
{{2|(4<<4)}, { 17.23*4, 32}, 0}, {{2|(4<<4)}, { 17.23*4, 32}, 4},
{{2|(3<<4)}, { 17.23*3, 32}, 0}, {{2|(3<<4)}, { 17.23*3, 32}, 4},
{{2|(2<<4)}, { 17.23*2, 32}, 0}, {{2|(2<<4)}, { 17.23*2, 32}, 4},
{{2|(1<<4)}, { 17.23*1, 32}, 0}, {{2|(1<<4)}, { 17.23*1, 32}, 4},
{{2|(0<<4)}, { 17.23*0, 32}, 1}, {{2|(0<<4)}, { 17.23*0, 32}, 1},
{{3|(13<<4)}, {17.23*13, 48}, 1}, {{3|(13<<4)}, {17.23*13, 48}, 1},
{{3|(11<<4)}, {17.23*11, 48}, 0}, {{3|(11<<4)}, {17.23*11, 48}, 4},
{{3|(10<<4)}, {17.23*10, 48}, 0}, {{3|(10<<4)}, {17.23*10, 48}, 4},
{{3|(9<<4)}, {17.23*9, 48}, 0}, {{3|(9<<4)}, {17.23*9, 48}, 4},
{{3|(8<<4)}, {17.23*8, 48}, 0}, {{3|(8<<4)}, {17.23*8, 48}, 4},
{{3|(7<<4)}, {17.23*7, 48}, 0}, {{3|(7<<4)}, {17.23*7, 48}, 4},
{{3|(6<<4)}, { 17.23*6, 48}, 0}, {{3|(6<<4)}, { 17.23*6, 48}, 4},
{{3|(5<<4)}, { 17.23*5, 48}, 0}, {{3|(5<<4)}, { 17.23*5, 48}, 4},
{{3|(4<<4)}, { 17.23*4, 48}, 0}, {{3|(4<<4)}, { 17.23*4, 48}, 4},
{{3|(3<<4)}, { 17.23*3, 48}, 0}, {{3|(3<<4)}, { 17.23*3, 48}, 4},
{{3|(2<<4)}, { 17.23*2, 48}, 0}, {{3|(2<<4)}, { 17.23*2, 48}, 4},
{{3|(1<<4)}, { 17.23*1, 48}, 0}, {{3|(1<<4)}, { 17.23*1, 48}, 4},
{{3|(0<<4)}, { 17.23*0, 48}, 1}, {{3|(0<<4)}, { 17.23*0, 48}, 1},
{{4|(13<<4)}, {17.23*13, 64}, 1}, {{4|(13<<4)}, {17.23*13, 64}, 1},
{{4|(11<<4)}, {17.23*11, 64}, 1}, {{4|(11<<4)}, {17.23*11, 64}, 1},
{{4|(10<<4)}, {17.23*10, 64}, 1}, {{4|(10<<4)}, {17.23*10, 64}, 1},
{{4|(9<<4)}, {17.23*9, 64}, 1}, {{4|(9<<4)}, {17.23*9, 64}, 1},
{{4|(8<<4)}, {17.23*8, 64}, 1}, {{4|(8<<4)}, {17.23*8, 64}, 1},
{{4|(5<<4)}, { 17.23*5, 64}, 0}, {{4|(5<<4)}, { 17.23*5, 64}, 4},
{{4|(2<<4)}, { 17.23*2, 64}, 1}, {{4|(2<<4)}, { 17.23*2, 64}, 1},
{{4|(1<<4)}, { 17.23*1, 64}, 1}, {{4|(1<<4)}, { 17.23*1, 64}, 1},
{{4|(0<<4)}, { 17.23*0, 64}, 1}, {{4|(0<<4)}, { 17.23*0, 64}, 1},

@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -56,11 +56,9 @@ void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool defa
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color(i, red, green, blue);
}
} }
} }
} }

@ -33,17 +33,10 @@ USE_FPU = yes
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS = OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys

@ -0,0 +1,50 @@
{
"keyboard_name": "NQG (Not Quite Gherkin)",
"url": "",
"maintainer": "culturalsnow",
"width": 11,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Q", "x":1, "y":0},
{"label":"W", "x":2, "y":0},
{"label":"E", "x":3, "y":0},
{"label":"R", "x":4, "y":0},
{"label":"T", "x":5, "y":0},
{"label":"Y", "x":6, "y":0},
{"label":"U", "x":7, "y":0},
{"label":"I", "x":8, "y":0},
{"label":"O", "x":9, "y":0},
{"label":"P", "x":10, "y":0},
{"label":"A", "x":1, "y":1},
{"label":"S", "x":2, "y":1},
{"label":"D", "x":3, "y":1},
{"label":"F", "x":4, "y":1},
{"label":"G", "x":5, "y":1},
{"label":"H", "x":6, "y":1},
{"label":"J", "x":7, "y":1},
{"label":"K", "x":8, "y":1},
{"label":"L", "x":9, "y":1},
{"label":"; '", "x":10, "y":1},
{"label":"Z", "x":1, "y":2},
{"label":"X", "x":2, "y":2},
{"label":"C", "x":3, "y":2},
{"label":"V", "x":4, "y":2},
{"label":"B", "x":5, "y":2},
{"label":"N", "x":6, "y":2},
{"label":"M", "x":7, "y":2},
{"label":",", "x":8, "y":2},
{"label":".", "x":9, "y":2},
{"label":"/ Enter", "x":10, "y":2},
{"label":"Shift / Tab", "x":0, "y":2},
{"label":"LT(_LOWER, KC_ESC)", "x":3, "y":3},
{"label":"Ctrl / Backspace", "x":4, "y":3},
{"label":"Ctrl / Backspace", "x":5, "y":3},
{"label":"Space", "x":6, "y":3},
{"label":"Space", "x":7, "y":3},
{"label":"MO(_RAISE)", "x":8, "y":3}
]
}
}
}

@ -4,7 +4,7 @@
NQG (Not Quite Gherkin) is a 30% ortholinear keyboard with a macro key and dedicated row for thumb keys, made by emptystring studio. NQG (Not Quite Gherkin) is a 30% ortholinear keyboard with a macro key and dedicated row for thumb keys, made by emptystring studio.
Keyboard Maintainer: [Culturalsnow](http://github.com/culturalsnow) Keyboard Maintainer: [Culturalsnow](http://github.com/culturalsnow)
Hardware Supported: NQG PCB, Pro Micro Hardware Supported: NQG PCB, Pro Micro
Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.com/SA_EndlessGame) Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.com/SA_EndlessGame)

@ -269,64 +269,64 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4} /*{row | col << 4}
| {x=0..224, y=0..64} | {x=0..224, y=0..64}
| | modifier | | flags
| | | */ | | | */
{{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 0}, // LED 1 on right > Key 6 {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6
{{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 0}, // LED 2 > Key 7 {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7
{{10|(0<<4)}, {17.2*10, 12.8*0}, 0}, // LED 3 > Key 8 {{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8
{{11|(0<<4)}, {17.2*11, 12.8*0}, 0}, // LED 4 > Key 9 {{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9
{{12|(0<<4)}, {17.2*12, 12.8*0}, 0}, // LED 5 > Key 0 {{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0
{{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 0}, // LED 6 {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6
{{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 0}, // LED 7 {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7
{{10|(1<<4)}, {17.2*10, 12.8*1}, 0}, // LED 8 {{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8
{{11|(1<<4)}, {17.2*11, 12.8*1}, 0}, // LED 9 {{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9
{{12|(1<<4)}, {17.2*12, 12.8*1}, 0}, // LED 10 {{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10
{{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 0}, // LED 11 {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11
{{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 0}, // LED 12 {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12
{{10|(2<<4)}, {17.2*10, 12.8*2}, 0}, // LED 13 {{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13
{{11|(2<<4)}, {17.2*11, 12.8*2}, 0}, // LED 14 {{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14
{{12|(2<<4)}, {17.2*12, 12.8*2}, 0}, // LED 15 {{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15
{{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 0}, // LED 16 {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16
{{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 0}, // LED 17 {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17
{{10|(3<<4)}, {17.2*10, 12.8*3}, 0}, // LED 18 {{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18
{{11|(3<<4)}, {17.2*11, 12.8*3}, 0}, // LED 19 {{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19
{{12|(3<<4)}, {17.2*12, 12.8*3}, 0}, // LED 20 {{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20
{{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21 {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21
{{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22 {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22
{{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23 {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23
{{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24 {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24
{{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 0}, // LED 1 on left > Key 5 {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5
{{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 0}, // LED 2 > Key 4 {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4
{{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 0}, // LED 3 > Key 3 {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3
{{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 0}, // LED 4 > Key 2 {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2
{{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 0}, // LED 5 > Key 1 {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1
{{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 0}, // LED 6 {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6
{{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 0}, // LED 7 {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7
{{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 0}, // LED 8 {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8
{{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 0}, // LED 9 {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9
{{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 0}, // LED 10 {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10
{{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 0}, // LED 11 {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11
{{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 0}, // LED 12 {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12
{{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 0}, // LED 13 {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13
{{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 0}, // LED 14 {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14
{{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 0}, // LED 15 {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15
{{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 0}, // LED 16 {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16
{{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 0}, // LED 17 {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17
{{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 0}, // LED 18 {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18
{{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 0}, // LED 19 {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19
{{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 0}, // LED 20 {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20
{{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21 {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21
{{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22 {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22

@ -114,80 +114,80 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_16, D_16, F_16}, {0, E_16, D_16, F_16},
{0, B_16, A_16, C_16}, {0, B_16, A_16, C_16},
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4} /* {row | col << 4}
* | {x=0..224, y=0..64} * | {x=0..224, y=0..64}
* | | modifier * | | flags
* | | | */ * | | | */
//cs1 //cs1
{{0|(0<<4)}, { 0, 0}, 1}, {{0|(0<<4)}, { 0, 0}, 1},
{{0|(1<<4)}, { 17, 0}, 0}, {{0|(1<<4)}, { 17, 0}, 4},
{{1|(0<<4)}, { 0, 16}, 1}, {{1|(0<<4)}, { 0, 16}, 1},
{{2|(0<<4)}, { 0, 32}, 1}, {{2|(0<<4)}, { 0, 32}, 1},
//cs2 //cs2
{{0|(2<<4)}, { 34, 0}, 0}, {{0|(2<<4)}, { 34, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 0}, {{0|(3<<4)}, { 51, 0}, 4},
{{1|(1<<4)}, { 17, 16}, 0}, {{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 0}, {{1|(2<<4)}, { 34, 16}, 4},
//cs3 //cs3
{{2|(1<<4)}, { 17, 32}, 0}, {{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 0}, {{2|(2<<4)}, { 34, 32}, 4},
{{3|(1<<4)}, { 17, 48}, 0}, {{3|(1<<4)}, { 17, 48}, 4},
{{3|(2<<4)}, { 34, 48}, 0}, {{3|(2<<4)}, { 34, 48}, 4},
//cs4 //cs4
{{0|(4<<4)}, { 68, 0}, 0}, {{0|(4<<4)}, { 68, 0}, 4},
{{0|(5<<4)}, { 85, 0}, 0}, {{0|(5<<4)}, { 85, 0}, 4},
{{1|(3<<4)}, { 51, 16}, 0}, {{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 0}, {{1|(4<<4)}, { 68, 16}, 4},
//cs5 //cs5
{{0|(11<<4)}, {187, 0}, 0}, {{0|(11<<4)}, {187, 0}, 4},
{{0|(12<<4)}, {204, 0}, 0}, {{0|(12<<4)}, {204, 0}, 4},
{{1|(11<<4)}, {187, 16}, 0}, {{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 0}, {{1|(12<<4)}, {204, 16}, 4},
//cs6 //cs6
{{0|(7<<4)}, {119, 0}, 0}, {{0|(7<<4)}, {119, 0}, 4},
{{0|(8<<4)}, {136, 0}, 0}, {{0|(8<<4)}, {136, 0}, 4},
{{1|(7<<4)}, {119, 16}, 0}, {{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 0}, {{1|(8<<4)}, {136, 16}, 4},
//cs7 //cs7
{{0|(9<<4)}, {153, 0}, 0}, {{0|(9<<4)}, {153, 0}, 4},
{{0|(10<<4)}, {170, 0}, 0}, {{0|(10<<4)}, {170, 0}, 4},
{{1|(9<<4)}, {153, 16}, 0}, {{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 0}, {{1|(10<<4)}, {170, 16}, 4},
//cs8 //cs8
{{0|(13<<4)}, {221, 0}, 0}, {{0|(13<<4)}, {221, 0}, 4},
{{0|(14<<4)}, {221, 0}, 0}, {{0|(14<<4)}, {221, 0}, 4},
{{1|(13<<4)}, {221, 32}, 1}, {{1|(13<<4)}, {221, 32}, 1},
{{2|(12<<4)}, {221, 16}, 1}, {{2|(12<<4)}, {221, 16}, 1},
//cs9 //cs9
{{2|(3<<4)}, { 51, 32}, 0}, {{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 0}, {{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 0}, {{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 0}, {{3|(4<<4)}, { 68, 48}, 4},
//cs10 //cs10
{{0|(6<<4)}, {102, 0}, 0}, {{0|(6<<4)}, {102, 0}, 4},
{{1|(5<<4)}, { 85, 16}, 0}, {{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 0}, {{1|(6<<4)}, {102, 16}, 4},
{{2|(5<<4)}, { 85, 32}, 0}, {{2|(5<<4)}, { 85, 32}, 4},
//cs11 //cs11
{{2|(6<<4)}, {102, 32}, 0}, {{2|(6<<4)}, {102, 32}, 4},
{{3|(5<<4)}, { 85, 48}, 0}, {{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 0}, {{3|(6<<4)}, {102, 48}, 4},
{{4|(5<<4)}, {102, 64}, 0}, {{4|(5<<4)}, {102, 64}, 4},
//cs12 //cs12
{{2|(7<<4)}, {119, 32}, 0}, {{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 0}, {{2|(8<<4)}, {136, 32}, 4},
{{3|(7<<4)}, {119, 48}, 0}, {{3|(7<<4)}, {119, 48}, 4},
{{3|(8<<4)}, {136, 48}, 0}, {{3|(8<<4)}, {136, 48}, 4},
//cs13 //cs13
{{2|(9<<4)}, {153, 32}, 0}, {{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 0}, {{2|(10<<4)}, {170, 32}, 4},
{{3|(9<<4)}, {153, 48}, 0}, {{3|(9<<4)}, {153, 48}, 4},
{{4|(6<<4)}, {136, 48}, 1}, {{4|(6<<4)}, {136, 48}, 1},
//cs14 //cs14
{{2|(11<<4)}, {187, 32}, 0}, {{2|(11<<4)}, {187, 32}, 4},
{{3|(10<<4)}, {170, 48}, 0}, {{3|(10<<4)}, {170, 48}, 4},
{{3|(11<<4)}, {187, 48}, 1}, {{3|(11<<4)}, {187, 48}, 1},
{{4|(7<<4)}, {153, 48}, 1}, {{4|(7<<4)}, {153, 48}, 1},
//cs15 //cs15

@ -43,20 +43,20 @@ uint8_t init_mcp23018(void) {
// - unused : input : 1 // - unused : input : 1
// - input : input : 1 // - input : input : 1
// - driving : output : 0 // - driving : output : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b10000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b11111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
i2c_stop(); i2c_stop();
// set pull-up // set pull-up
// - unused : on : 1 // - unused : on : 1
// - input : on : 1 // - input : on : 1
// - driving : off : 0 // - driving : off : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b10000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b11111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
out: out:
i2c_stop(); i2c_stop();

@ -1,14 +1,14 @@
#pragma once #pragma once
#include <util/delay.h>
#include "quantum.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "quantum.h"
#include "i2c_master.h" #include "i2c_master.h"
#include "matrix.h" #include <util/delay.h>
extern i2c_status_t mcp23018_status; extern i2c_status_t mcp23018_status;
#define ERGODOX_EZ_I2C_TIMEOUT 1000 #define I2C_TIMEOUT 1000
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define CPU_16MHz 0x00 #define CPU_16MHz 0x00
@ -26,18 +26,14 @@ extern i2c_status_t mcp23018_status;
#define OLATA 0x14 // output latch register #define OLATA 0x14 // output latch register
#define OLATB 0x15 #define OLATB 0x15
void init_ergodox(void);
uint8_t init_mcp23018(void); uint8_t init_mcp23018(void);
/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ /* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
#define LAYOUT_GERGO( \ #define LAYOUT_gergo( \
L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \
L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
L20,L21,L22,L23,L24,L25,L26, R20,R21,R22,R23,R24,R25,R26, \ L20,L21,L22,L23,L24,L25,L26,L30, R30,R20,R21,R22,R23,R24,R25,R26, \
L31,L32, R33,R34, \ L31,L32,L33,L34, R31,R32,R33,R34) \
L30, R30, \
L33,L34, R31,R32) \
\
/* matrix positions */ \ /* matrix positions */ \
{ \ { \
{ KC_NO, L16, L26, L30}, \ { KC_NO, L16, L26, L30}, \

@ -1,178 +0,0 @@
#ifndef _I2CMASTER_H
#define _I2CMASTER_H 1
/*************************************************************************
* Title: C include file for the I2C master interface
* (i2cmaster.S or twimaster.c)
* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
* Target: any AVR device
* Usage: see Doxygen manual
**************************************************************************/
#ifdef DOXYGEN
/**
@defgroup pfleury_ic2master I2C Master library
@code #include <i2cmaster.h> @endcode
@brief I2C (TWI) Master Software Library
Basic routines for communicating with I2C slave devices. This single master
implementation is limited to one bus master on the I2C bus.
This I2c library is implemented as a compact assembler software implementation of the I2C protocol
which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
Since the API for these two implementations is exactly the same, an application can be linked either against the
software I2C implementation or the hardware I2C implementation.
Use 4.7k pull-up resistor on the SDA and SCL pin.
Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
i2cmaster.S to your target when using the software I2C implementation !
Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
@note
The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
to GNU assembler and AVR-GCC C call interface.
Replaced the incorrect quarter period delays found in AVR300 with
half period delays.
@author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
@par API Usage Example
The following code shows typical usage of this library, see example test_i2cmaster.c
@code
#include <i2cmaster.h>
#define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
int main(void)
{
unsigned char ret;
i2c_init(); // initialize I2C library
// write 0x75 to EEPROM address 5 (Byte Write)
i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
i2c_write(0x05); // write address = 5
i2c_write(0x75); // write value 0x75 to EEPROM
i2c_stop(); // set stop conditon = release bus
// read previously written value back from EEPROM address 5
i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
i2c_write(0x05); // write address = 5
i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
ret = i2c_readNak(); // read one byte from EEPROM
i2c_stop();
for(;;);
}
@endcode
*/
#endif /* DOXYGEN */
/**@{*/
#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
#endif
#include <avr/io.h>
/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_READ 1
/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_WRITE 0
/**
@brief initialize the I2C master interace. Need to be called only once
@param void
@return none
*/
void i2c_init(void);
/**
@brief Terminates the data transfer and releases the I2C bus
@param void
@return none
*/
void i2c_stop(void);
/**
@brief Issues a start condition and sends address and transfer direction
@param addr address and transfer direction of I2C device
@retval 0 device accessible
@retval 1 failed to access device
*/
unsigned char i2c_start(unsigned char addr);
/**
@brief Issues a repeated start condition and sends address and transfer direction
@param addr address and transfer direction of I2C device
@retval 0 device accessible
@retval 1 failed to access device
*/
unsigned char i2c_rep_start(unsigned char addr);
/**
@brief Issues a start condition and sends address and transfer direction
If device is busy, use ack polling to wait until device ready
@param addr address and transfer direction of I2C device
@return none
*/
void i2c_start_wait(unsigned char addr);
/**
@brief Send one byte to I2C device
@param data byte to be transfered
@retval 0 write successful
@retval 1 write failed
*/
unsigned char i2c_write(unsigned char data);
/**
@brief read one byte from the I2C device, request more data from device
@return byte read from I2C device
*/
unsigned char i2c_readAck(void);
/**
@brief read one byte from the I2C device, read is followed by a stop condition
@return byte read from I2C device
*/
unsigned char i2c_readNak(void);
/**
@brief read one byte from the I2C device
Implemented as a macro, which calls either i2c_readAck or i2c_readNak
@param ack 1 send ack, request more data from device<br>
0 send nak, read is followed by a stop condition
@return byte read from I2C device
*/
unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
/**@}*/
#endif

@ -5,7 +5,7 @@
"keyboard_name": "Gergo", "keyboard_name": "Gergo",
"url": "http://gboards.ca", "url": "http://gboards.ca",
"layouts": { "layouts": {
"LAYOUT_GERGO": { "LAYOUT_gergo": {
"layout": [ "layout": [
{ {
"label": "L00", "label": "L00",
@ -180,6 +180,16 @@
"x": 6.5, "x": 6.5,
"y": 1.75 "y": 1.75
}, },
{
"label": "L30",
"x": 8.25,
"y": 2.75
},
{
"label": "R30",
"x": 10.25,
"y": 2.75
},
{ {
"h": 1.5, "h": 1.5,
"label": "R20", "label": "R20",
@ -227,26 +237,6 @@
"x": 6, "x": 6,
"y": 3.63 "y": 3.63
}, },
{
"label": "R33",
"x": 12.5,
"y": 3.63
},
{
"label": "R34",
"x": 13.75,
"y": 3.25
},
{
"label": "L30",
"x": 8.25,
"y": 2.75
},
{
"label": "R30",
"x": 10.25,
"y": 2.75
},
{ {
"h": 2, "h": 2,
"label": "L33", "label": "L33",
@ -270,6 +260,16 @@
"label": "R32", "label": "R32",
"x": 11.25, "x": 11.25,
"y": 3.75 "y": 3.75
},
{
"label": "R33",
"x": 12.5,
"y": 3.63
},
{
"label": "R34",
"x": 13.75,
"y": 3.25
} }
] ]
} }

@ -0,0 +1,174 @@
/* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at
*
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
*
* There's also a template for adding new layers at the bottom of this file!
*/
#include QMK_KEYBOARD_H
#define IGNORE_MOD_TAP_INTERRUPT
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define NUMB 2 // numbers/motion
enum custom_keycodes {
M1_STRING = SAFE_RANGE,
M2_URL,
};
// Blank template at the bottom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | TAB | Q | W | F | P | G | | J | L | U | Y | ; : | | \ |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | Ctrl | A | R | S | T | D |O(CMD)| |O(CTL)| H | N | E | I | O | ' " |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B |O(ALT)| | | K | M | , < | . > | / ? | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .-------. .------. .--------.
* | alt/del | | BKSP | | Space| |cmd/del |
* '----------' '-------' `------. '--------'
* ,-------. ,-------.
* | MMB | | : |
* ,------|-------| |-------|------.
* | NUMB | SYMB | | SYMB | NUMB |
* | Esc | F13 | | F14 | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[BASE] = LAYOUT_gergo(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y,KC_SCLN, KC_BSLS,
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, OSM(MOD_LGUI), OSM(MOD_LCTL), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LALT), KC_TRNS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
ALT_T(KC_DEL), KC_BSPC, KC_SPC, CMD_T(KC_DEL),
KC_BTN3, KC_COLON,
LT(SYMB, KC_ESC), LT(NUMB, KC_F13), LT(NUMB, KC_F14), LT(SYMB, KC_ENT)),
/* Keymap 1: Symbols layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | VolUp |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | [ | ] | { | } | ` | M1 | | | | - | _ | + | = | VolDn |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | ` | ~ | | | ~ | M2 | | | | | Prev |Pl/Pau| Next | Mute |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
*/
[SYMB] = LAYOUT_gergo(
KC_TRNS, KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC__VOLUP,
KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR,KC_RCBR, KC_PLUS, M1_STRING, KC_TRNS, KC_TRNS, KC_MINS, KC_UNDERSCORE, KC_PLUS, KC_EQL, KC__VOLDOWN,
KC_TRNS, KC_GRV, KC_TILD,KC_TRNS,KC_TRNS, KC_EQL, M2_URL, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_REWIND, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_FAST_FORWARD, KC__MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* Keymap 2: Pad/Function layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | PgUp |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | Home | LEFT | DOWN | UP | RIGHT| End | PgDn |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | ALT | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
*/
[NUMB] = LAYOUT_gergo(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_PGDN,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
/* Keymap template
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
[SYMB] = LAYOUT_gergo(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
*/
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
//uint8_t layer = biton32(layer_state);
biton32(layer_state);
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case M1_STRING:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("Hi!" SS_TAP(X_ENTER));
} else {
// when keycode QMKBEST is released
}
break;
case M2_URL:
if (record->event.pressed) {
SEND_STRING("https://ddg.gg" SS_TAP(X_ENTER));
}
break;
}
return true;
};

@ -0,0 +1,16 @@
# [Gergo! By g Heavy Industries](http://gboards.ca)
![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg)
This is a [Colemak](https://colemak.com/) mapping for the Gergo,
Unlike the default mapping, most symbols are at their original place on the number row to ease in the
learning curve.
You can view this layout over at
[keyboad-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/f04d6a3b0cd3db91407c51f7ba36aeb3).
## Settings
To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!

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

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

@ -1,4 +1,4 @@
/* Good on you for modifying your layout! if you don't have /* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at * time to read the QMK docs, a list of keycodes can be found at
* *
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
@ -8,7 +8,6 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define IGNORE_MOD_TAP_INTERRUPT
#define BASE 0 // default layer #define BASE 0 // default layer
#define SYMB 1 // symbols #define SYMB 1 // symbols
#define NUMB 2 // numbers/motion #define NUMB 2 // numbers/motion
@ -41,15 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[BASE] = LAYOUT_GERGO( [BASE] = LAYOUT_gergo(
LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_BSPC
MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC, ),
KC_BTN3, KC_PGDN,
LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)),
/* Keymap 1: Symbols layer /* Keymap 1: Symbols layer
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
@ -70,14 +66,12 @@ KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSP
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[SYMB] = LAYOUT_GERGO( [SYMB] = LAYOUT_gergo(
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS,
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL
KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL, ),
KC_TRNS, KC_TRNS,
KC_SCLN, KC_EQL, KC_EQL, KC_SCLN),
/* Keymap 2: Pad/Function layer /* Keymap 2: Pad/Function layer
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
@ -98,17 +92,15 @@ KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[NUMB] = LAYOUT_GERGO( [NUMB] = LAYOUT_gergo(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU,
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, ),
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
}; };
/* Keymap template /* Keymap template
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | | * | | | | | | | | | | | | | |
@ -127,25 +119,10 @@ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, K
* | | | | | | * | | | | | |
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
[SYMB] = LAYOUT_GERGO( [SYMB] = LAYOUT_gergo(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, )
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
*/ */
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
//uint8_t layer = biton32(layer_state);
biton32(layer_state);
};

@ -3,7 +3,7 @@
# Make sure you have dfu-programmer installed! # Make sure you have dfu-programmer installed!
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Firmware options # Firmware options
BALLER = yes # Enable to ball out BALLER = no # Enable to ball out
BALLSTEP = 20 # Multiple in px to move, multiplied by layer number BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
SCROLLSTEP = 1 # Lines to scroll with ball SCROLLSTEP = 1 # Lines to scroll with ball
MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
@ -26,6 +26,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
endif endif
ifeq ($(strip $(BALLER)), yes) ifeq ($(strip $(BALLER)), yes)
POINTING_DEVICE_ENABLE = yes
OPT_DEFS += -DBALLER OPT_DEFS += -DBALLER
endif endif
ifeq ($(strip $(DEBUG_BALLER)), yes) ifeq ($(strip $(DEBUG_BALLER)), yes)

@ -0,0 +1,119 @@
/* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at
*
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
*
* There's also a template for adding new layers at the bottom of this file!
*/
#include QMK_KEYBOARD_H
#include "drashna.h"
// Blank template at the bottom
enum customKeycodes {
URL = 1
};
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
#define LAYOUT_gergo_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
LAYOUT_gergo_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
KC_TAB, ALT_T(K11), K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
_______, _______, KC_SPC, LT(_LOWER, KC_BSPC), LT(_RAISE, KC_DEL), KC_ENT, _______, _______ \
)
#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_gergo_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
[_COLEMAK] = LAYOUT_gergo_base_wrapper(
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
),
[_DVORAK] = LAYOUT_gergo_base_wrapper(
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
[_WORKMAN] = LAYOUT_gergo_base_wrapper(
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
),
[_NORMAN] = LAYOUT_gergo_base_wrapper(
_________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
_________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
_________________NORMAN_L3_________________, _________________NORMAN_R3_________________
),
[_MALTRON] = LAYOUT_gergo_base_wrapper(
_________________MALTRON_L1________________, _________________MALTRON_R1________________,
_________________MALTRON_L2________________, _________________MALTRON_R2________________,
_________________MALTRON_L3________________, _________________MALTRON_R3________________
),
[_EUCALYN] = LAYOUT_gergo_base_wrapper(
_________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
_________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
_________________EUCALYN_L3________________, _________________EUCALYN_R3________________
),
[_CARPLAX] = LAYOUT_gergo_base_wrapper(
_____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
_____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
_____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
),
[_MODS] = LAYOUT_gergo_wrapper(
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
_______, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, _______,
KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT,
_______, _______, _______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT_gergo_wrapper(
KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
_______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_PIPE,
_______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[_RAISE] = LAYOUT_gergo_wrapper(
_______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
_______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_BSLS,
_______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[_ADJUST] = LAYOUT_gergo_wrapper(
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
VRSN, _________________ADJUST_L2_________________, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST,
_______, _________________ADJUST_L3_________________, _______, _______, _______, _______, _________________ADJUST_R3_________________, TG_MODS,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
/* Keymap template
[SYMB] = LAYOUT_gergo_wrapper(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
*/

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

@ -1,4 +1,4 @@
/* Good on you for modifying your layout! if you don't have /* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at * time to read the QMK docs, a list of keycodes can be found at
* *
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
@ -8,7 +8,6 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define IGNORE_MOD_TAP_INTERRUPT
#define BASE 0 // default layer #define BASE 0 // default layer
#define SYMB 1 // symbols #define SYMB 1 // symbols
#define NUMB 2 // numbers/motion #define NUMB 2 // numbers/motion
@ -41,15 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[BASE] = LAYOUT_GERGO( [BASE] = LAYOUT_gergo(
LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_BSPC
MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC, ),
KC_BTN3, KC_PGDN,
LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)),
/* Keymap 1: Symbols layer /* Keymap 1: Symbols layer
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
@ -70,14 +66,12 @@ KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSP
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[SYMB] = LAYOUT_GERGO( [SYMB] = LAYOUT_gergo(
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS,
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL
KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL, ),
KC_TRNS, KC_TRNS,
KC_SCLN, KC_EQL, KC_EQL, KC_SCLN),
/* Keymap 2: Pad/Function layer /* Keymap 2: Pad/Function layer
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
@ -98,17 +92,15 @@ KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
*/ */
[NUMB] = LAYOUT_GERGO( [NUMB] = LAYOUT_gergo(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU,
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, ),
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
}; };
/* Keymap template /* Keymap template
* *
* ,-------------------------------------------. ,-------------------------------------------. * ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | | * | | | | | | | | | | | | | |
@ -127,25 +119,10 @@ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, K
* | | | | | | * | | | | | |
* | | | | | | * | | | | | |
* `--------------' `--------------' * `--------------' `--------------'
[SYMB] = LAYOUT_GERGO( [SYMB] = LAYOUT_gergo(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, )
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
*/ */
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
//uint8_t layer = biton32(layer_state);
biton32(layer_state);
};

@ -27,6 +27,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
endif endif
ifeq ($(strip $(BALLER)), yes) ifeq ($(strip $(BALLER)), yes)
OPT_DEFS += -DBALLER OPT_DEFS += -DBALLER
POINTING_DEVICE_ENABLE = yes
endif endif
ifeq ($(strip $(DEBUG_BALLER)), yes) ifeq ($(strip $(DEBUG_BALLER)), yes)
OPT_DEFS += -DDEBUG_BALLER OPT_DEFS += -DDEBUG_BALLER

@ -29,14 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h" #include "print.h"
#include "debug.h" #include "debug.h"
#include "util.h" #include "util.h"
#include "pointing_device.h" #include "debounce.h"
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
#include "timer.h" # include "timer.h"
#endif #endif
#ifdef BALLER #ifdef BALLER
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "pointing_device.h"
#endif #endif
#ifndef DEBOUNCE #ifndef DEBOUNCE
@ -117,12 +118,11 @@ static matrix_row_t raw_matrix[MATRIX_ROWS];
// Debouncing: store for each key the number of scans until it's eligible to // Debouncing: store for each key the number of scans until it's eligible to
// change. When scanning the matrix, ignore any changes in keys that have // change. When scanning the matrix, ignore any changes in keys that have
// already changed in the last DEBOUNCE scans. // already changed in the last DEBOUNCE scans.
static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
static matrix_row_t read_cols(uint8_t row); static matrix_row_t read_cols(uint8_t row);
static void init_cols(void); static void init_cols(void);
static void unselect_rows(void); static void unselect_rows(void);
static void select_row(uint8_t row); static void select_row(uint8_t row);
static void enableInterrupts(void); static void enableInterrupts(void);
static uint8_t mcp23018_reset_loop; static uint8_t mcp23018_reset_loop;
@ -134,11 +134,9 @@ uint32_t matrix_scan_count;
#endif #endif
__attribute__ ((weak)) __attribute__ ((weak)) void matrix_init_user(void) {}
void matrix_init_user(void) {}
__attribute__ ((weak)) __attribute__ ((weak)) void matrix_scan_user(void) {}
void matrix_scan_user(void) {}
__attribute__ ((weak)) __attribute__ ((weak))
void matrix_init_kb(void) { void matrix_init_kb(void) {
@ -150,39 +148,28 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
inline inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
}
inline inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
}
void matrix_init(void) void matrix_init(void) {
{
// initialize row and col // initialize row and col
mcp23018_status = init_mcp23018(); mcp23018_status = init_mcp23018();
unselect_rows(); unselect_rows();
init_cols(); init_cols();
// initialize matrix state: all keys off // initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = 0; matrix[i] = 0;
raw_matrix[i] = 0; raw_matrix[i] = 0;
for (uint8_t j=0; j < MATRIX_COLS; ++j) { }
debounce_matrix[i * MATRIX_COLS + j] = 0;
}
}
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
matrix_timer = timer_read32(); matrix_timer = timer_read32();
matrix_scan_count = 0; matrix_scan_count = 0;
#endif #endif
debounce_init(MATRIX_ROWS);
matrix_init_quantum(); matrix_init_quantum();
} }
@ -198,130 +185,120 @@ void matrix_power_up(void) {
} }
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
matrix_timer = timer_read32(); matrix_timer = timer_read32();
matrix_scan_count = 0; matrix_scan_count = 0;
#endif #endif
} }
// Returns a matrix_row_t whose bits are set if the corresponding key should be // Reads and stores a row, returning
// eligible to change in this scan. // whether a change occurred.
matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { static inline bool store_raw_matrix_row(uint8_t index) {
matrix_row_t result = 0; matrix_row_t temp = read_cols(index);
matrix_row_t change = rawcols ^ raw_matrix[row]; if (raw_matrix[index] != temp) {
raw_matrix[row] = rawcols; raw_matrix[index] = temp;
for (uint8_t i = 0; i < MATRIX_COLS; ++i) { return true;
if (debounce_matrix[row * MATRIX_COLS + i]) {
--debounce_matrix[row * MATRIX_COLS + i];
} else {
result |= (1 << i);
}
if (change & (1 << i)) {
debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
}
} }
return result; return false;
} }
matrix_row_t debounce_read_cols(uint8_t row) {
// Read the row without debouncing filtering and store it for later usage.
matrix_row_t cols = read_cols(row);
// Get the Debounce mask.
matrix_row_t mask = debounce_mask(cols, row);
// debounce the row and return the result.
return (cols & mask) | (matrix[row] & ~mask);;
}
uint8_t matrix_scan(void)
{
// TODO: Find what is trashing interrupts
enableInterrupts();
// First we handle the mouse inputs uint8_t matrix_scan(void) {
#ifdef BALLER // TODO: Find what is trashing interrupts
uint8_t pBtn = PINE & TRKBTN; enableInterrupts();
// First we handle the mouse inputs
#ifdef BALLER
uint8_t pBtn = PINE & TRKBTN;
#ifdef DEBUG_BALLER #ifdef DEBUG_BALLER
// Compare to previous, mod report // Compare to previous, mod report
if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0)
xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6));
#endif #endif
// Modify the report // Modify the report
report_mouse_t pRprt = pointing_device_get_report(); report_mouse_t pRprt = pointing_device_get_report();
// Scroll by default, move on layer // Scroll by default, move on layer
if (layer_state == 0) { if (layer_state == 0) {
pRprt.h += tbLtCnt * SCROLLSTEP; tbLtCnt = 0; pRprt.h += tbLtCnt * SCROLLSTEP; tbLtCnt = 0;
pRprt.h -= tbRtCnt * SCROLLSTEP; tbRtCnt = 0; pRprt.h -= tbRtCnt * SCROLLSTEP; tbRtCnt = 0;
pRprt.v -= tbUpCnt * SCROLLSTEP; tbUpCnt = 0; pRprt.v -= tbUpCnt * SCROLLSTEP; tbUpCnt = 0;
pRprt.v += tbDnCnt * SCROLLSTEP; tbDnCnt = 0; pRprt.v += tbDnCnt * SCROLLSTEP; tbDnCnt = 0;
} else { } else {
pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); tbLtCnt = 0; pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); tbLtCnt = 0;
pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); tbRtCnt = 0; pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); tbRtCnt = 0;
pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); tbUpCnt = 0; pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); tbUpCnt = 0;
pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); tbDnCnt = 0; pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); tbDnCnt = 0;
} }
#ifdef DEBUG_BALLER #ifdef DEBUG_BALLER
if (pRprt.x != 0 || pRprt.y != 0) if (pRprt.x != 0 || pRprt.y != 0)
xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y);
#endif #endif
if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1;
if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1;
// Save state, push update // Save state, push update
if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn))
pointing_device_set_report(pRprt); pointing_device_set_report(pRprt);
trkBtnState = pBtn; trkBtnState = pBtn;
#endif #endif
// Then the keyboard // Then the keyboard
if (mcp23018_status) { // if there was an error if (mcp23018_status) { // if there was an error
if (++mcp23018_reset_loop == 0) { if (++mcp23018_reset_loop == 0) {
// if (++mcp23018_reset_loop >= 1300) { // if (++mcp23018_reset_loop >= 1300) {
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
// this will be approx bit more frequent than once per second // this will be approx bit more frequent than once per second
print("trying to reset mcp23018\n"); print("trying to reset mcp23018\n");
mcp23018_status = init_mcp23018(); mcp23018_status = init_mcp23018();
if (mcp23018_status) { if (mcp23018_status) {
print("left side not responding\n"); print("left side not responding\n");
} else { } else {
print("left side attached\n"); print("left side attached\n");
} }
} }
} }
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
matrix_scan_count++; matrix_scan_count++;
uint32_t timer_now = timer_read32(); uint32_t timer_now = timer_read32();
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) {
print("matrix scan frequency: "); print("matrix scan frequency: ");
pdec(matrix_scan_count); pdec(matrix_scan_count);
print("\n"); print("\n");
matrix_timer = timer_now; matrix_timer = timer_now;
matrix_scan_count = 0; matrix_scan_count = 0;
} }
#endif #endif
bool changed = false;
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
select_row(i); // select rows from left and right hands
// and select on left hand uint8_t left_index = i;
select_row(i + MATRIX_ROWS_PER_SIDE); uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
select_row(left_index);
select_row(right_index);
// we don't need a 30us delay anymore, because selecting a // we don't need a 30us delay anymore, because selecting a
// left-hand row requires more than 30us for i2c. // left-hand row requires more than 30us for i2c.
// grab cols from left hand changed |= store_raw_matrix_row(left_index);
matrix[i] = debounce_read_cols(i); changed |= store_raw_matrix_row(right_index);
// grab cols from right hand
matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
unselect_rows(); unselect_rows();
} }
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
matrix_scan_quantum(); matrix_scan_quantum();
enableInterrupts(); enableInterrupts();
#ifdef DEBUG_MATRIX #ifdef DEBUG_MATRIX
@ -338,20 +315,11 @@ bool matrix_is_modified(void) // deprecated and evidently not called.
return true; return true;
} }
inline inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & ((matrix_row_t)1<<col));
}
inline inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void) void matrix_print(void) {
{
print("\nr/c 0123456789ABCDEF\n"); print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": "); phex(row); print(": ");
@ -360,8 +328,7 @@ void matrix_print(void)
} }
} }
uint8_t matrix_key_count(void) uint8_t matrix_key_count(void) {
{
uint8_t count = 0; uint8_t count = 0;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
count += bitpop16(matrix[i]); count += bitpop16(matrix[i]);
@ -370,8 +337,7 @@ uint8_t matrix_key_count(void)
} }
// Remember this means ROWS // Remember this means ROWS
static void init_cols(void) static void init_cols(void) {
{
// init on mcp23018 // init on mcp23018
// not needed, already done as part of init_mcp23018() // not needed, already done as part of init_mcp23018()
@ -380,17 +346,16 @@ static void init_cols(void)
PORTF |= FMASK; PORTF |= FMASK;
} }
static matrix_row_t read_cols(uint8_t row) static matrix_row_t read_cols(uint8_t row) {
{
if (row < 7) { if (row < 7) {
if (mcp23018_status) { // if there was an error if (mcp23018_status) { // if there was an error
return 0; return 0;
} else { } else {
uint8_t data = 0; uint8_t data = 0;
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOB, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out; mcp23018_status = i2c_read_nack(I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
data = ~((uint8_t)mcp23018_status); data = ~((uint8_t)mcp23018_status);
mcp23018_status = I2C_STATUS_SUCCESS; mcp23018_status = I2C_STATUS_SUCCESS;
out: out:
@ -440,9 +405,9 @@ static void select_row(uint8_t row)
// select on mcp23018 // select on mcp23018
if (mcp23018_status) { // do nothing on error if (mcp23018_status) { // do nothing on error
} else { // set active row low : 0 // set other rows hi-Z : 1 } else { // set active row low : 0 // set other rows hi-Z : 1
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0xFF & ~(1<<row), I2C_TIMEOUT); if (mcp23018_status) goto out;
out: out:
i2c_stop(); i2c_stop();
} }

@ -14,7 +14,8 @@ BOOTLOADER = atmel-dfu
F_USB = $(F_CPU) F_USB = $(F_CPU)
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes
POINTING_DEVICE_ENABLE = yes
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes COMMAND_ENABLE = yes
DEBOUNCE_TYPE = eager_pr

@ -1,47 +0,0 @@
/* Copyright 2018 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef H87A_H
#define H87A_H
#include "quantum.h"
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_all(\
K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \
K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \
K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \
) { \
{ K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \
{ K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \
{ K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \
{ K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \
}
#endif

@ -1,12 +0,0 @@
{
"keyboard_name": "h87a",
"url": "",
"maintainer": "hineybush",
"width": 18.25,
"height": 6.5,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
}
}
}

@ -21,21 +21,21 @@
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#include "rgblight.h" #include "rgblight.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4} /*{row | col << 4}
| {x=0..224, y=0..64} | {x=0..224, y=0..64}
| | modifier | | modifier
| | | */ | | | */
{{1|(13<<4)}, {195, 3}, 0}, {{1|(13<<4)}, {195, 3}, 4},
{{4|(13<<4)}, {195, 16}, 0}, {{4|(13<<4)}, {195, 16}, 4},
{{4|(10<<4)}, {150, 16}, 0}, {{4|(10<<4)}, {150, 16}, 4},
{{4|(7<<4)}, {105, 16}, 0}, {{4|(7<<4)}, {105, 16}, 4},
{{4|(4<<4)}, {60, 16}, 0}, {{4|(4<<4)}, {60, 16}, 4},
{{4|(1<<4)}, {15, 16}, 0}, {{4|(1<<4)}, {15, 16}, 4},
{{1|(1<<4)}, {15, 3}, 0}, {{1|(1<<4)}, {15, 3}, 4},
{{1|(4<<4)}, {60, 3}, 0}, {{1|(4<<4)}, {60, 3}, 4},
{{1|(7<<4)}, {105, 3}, 0}, {{1|(7<<4)}, {105, 3}, 4},
{{1|(10<<4)}, {150, 3}, 0} {{1|(10<<4)}, {150, 3}, 4}
}; };
#endif #endif

@ -1277,7 +1277,7 @@ void set_output_user(uint8_t output) {
} }
void matrix_init_user() { void matrix_init_user() {
_delay_ms(500); // give time for usb to initialize wait_ms(500); // give time for usb to initialize
set_unicode_input_mode(UC_LNX); set_unicode_input_mode(UC_LNX);

@ -53,7 +53,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
} while (0) } while (0)
#endif #endif
#endif #endif
#ifdef __AVR__
#include "outputselect.h" #include "outputselect.h"
#endif
#include "led.h" #include "led.h"
#define COUNT(x) (sizeof (x) / sizeof (*(x))) #define COUNT(x) (sizeof (x) / sizeof (*(x)))
@ -1277,7 +1279,7 @@ void set_output_user(uint8_t output) {
} }
void matrix_init_user() { void matrix_init_user() {
_delay_ms(500); // give time for usb to initialize wait_ms(500); // give time for usb to initialize
set_unicode_input_mode(UC_LNX); set_unicode_input_mode(UC_LNX);

@ -72,4 +72,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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
#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep
#endif #endif

@ -0,0 +1,90 @@
/* Copyright 2018 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_all(\
K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \
K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \
K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \
) { \
{ K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \
{ K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \
{ K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \
{ K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \
}
#define LAYOUT_tkl_ansi(\
K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \
K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \
K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \
) { \
{ K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \
{KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \
{ K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \
{ K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \
}
#define LAYOUT_tkl_ansi_wkl(\
K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \
K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \
K100, K101, K113, K115, K116, K117, K108, K118 \
) { \
{ K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \
{KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \
{ K100, K101, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, K108 }, \
{KC_NO, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \
}

@ -0,0 +1,20 @@
{
"keyboard_name": "h87a",
"url": "",
"maintainer": "hineybush",
"width": 18.25,
"height": 6.5,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"label":"Bksp", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
},
"LAYOUT_tkl_ansi": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Bksp", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
},
"LAYOUT_tkl_ansi_wkl": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Bksp", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
}
}
}

@ -0,0 +1,21 @@
/* Copyright 2018 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_TRNS, KC_UP, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_all( [1] = LAYOUT_all(

@ -0,0 +1,21 @@
/* Copyright 2018 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -0,0 +1,73 @@
/* Copyright 2018 Josh Hinnebusch
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_ansi_wkl(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_tkl_ansi_wkl(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_init_ports(void) {
setPinOutput(D5);
setPinOutput(E6);
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
setPinOutput(D5);
writePinLow(D5);
} else {
setPinInput(D5);
writePinLow(D5);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
setPinOutput(E6);
writePinLow(E6);
} else {
setPinInput(E6);
writePinLow(E6);
}
}

@ -0,0 +1 @@
# The default keymap for h87a

@ -3,16 +3,16 @@ h87a
A QMK-powered replacement PCB for custom TKL keyboards. This PCB has the same size of the b.87 PCB, while using the USB port placement and spacebar stabilizer orientation as the a.87 PCB. A QMK-powered replacement PCB for custom TKL keyboards. This PCB has the same size of the b.87 PCB, while using the USB port placement and spacebar stabilizer orientation as the a.87 PCB.
Keyboard Maintainer: hineybush (Josh Hinnebusch) Keyboard Maintainer: [hineybush](https://github.com/hineybush)
Hardware Supported: h87a ver. 1.5, ver. 1.6 (normal and thin), h87alps
Hardware Supported: h87a Rev 1 Hardware Availability: hineybush.com
Hardware Availability: Currently prototyped, group buy TBD
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make h87a:default make hineybush/h87a: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).
## h87a hardware information ## h87a hardware information
Controller: Atmega32u4 Controller: Atmega32u4
@ -35,8 +35,11 @@ The H87a PCB utilizes duplex matrix organization.
Backlight Pin: B7 Backlight Pin: B7
RGB Data Pin: D3 RGB Data Pin: D3
For ver 1.5 in-switch indicators:
To connect the Caps Lock LED to the main backlight matrix, jump the middle pad and the left pad on J1. To use the Caps Lock LED as an indicator, jump the middle pad and the right pad on J1. To connect the Caps Lock LED to the main backlight matrix, jump the middle pad and the left pad on J1. To use the Caps Lock LED as an indicator, jump the middle pad and the right pad on J1.
To connect the Scroll Lock LED to the main backlight matrix, jump the middle pad and the right pad on J2. To use the Scroll Lock LED as an indicator, jump the middle pad and the left pad on J2. To connect the Scroll Lock LED to the main backlight matrix, jump the middle pad and the right pad on J2. To use the Scroll Lock LED as an indicator, jump the middle pad and the left pad on J2.
Note: The different orientations of J1 and J2 will be fixed with Rev 2. Note: The different orientations of J1 and J2 was fixed with ver. 1.6.

@ -0,0 +1,47 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER hineybush
#define PRODUCT hineyG80
#define DESCRIPTION QMK-powered PCB for Cherry G80/81-1800 Boards
/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 9
/* key matrix pins */
#define MATRIX_ROW_PINS { B2, B3, D0, B1, D2, D1, D5, D3, D6, D4, B4, D7 }
#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, B7, B0 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#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
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

@ -0,0 +1,63 @@
/* Copyright 2019 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hineyg80.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
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
// Turn numlock on
writePinHigh(C6);
} else {
// Turn numlock off
writePinLow(C6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
// Turn capslock on
writePinHigh(B6);
} else {
// Turn capslock off
writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
// Turn scrolllock on
writePinHigh(B5);
} else {
// Turn scrolllock off
writePinLow(B5);
}
led_set_user(usb_led);
}

@ -0,0 +1,89 @@
/* Copyright 2019 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define LAYOUT_all( \
K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \
K027,K016,K028,K038, \
K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K037,K047,K057,K048,K058, \
K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056, K067,K077,K068,K078, \
K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075,K066,K076, K087,K097,K088,K098, \
K080,K090,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096, K106,K116,K108,K118, \
K100,K110,K101, K102, K112,K103,K113,K104,K114, K105,K115,K117,K107 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
{ K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \
{ K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \
{ K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \
{ K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \
{ K110, KC_NO, K112, K113, K114, K115, K116, K117, K118 } \
}
/* 6U spacebar, 1U mods */
#define LAYOUT_ansi_100u_mods( \
K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \
K027,K016,K028,K038, \
K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K047,K057,K048,K058, \
K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056,K067,K077,K068,K078, \
K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075, K076,K087,K097,K088,K098, \
K080 ,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096,K106,K116,K108,K118, \
K100,K110,K101, K102, K112,K103,K113,K104,K114,K105,K115,K117,K107 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
{ K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, KC_NO, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, K067, K068 }, \
{ K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \
{ K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \
{KC_NO, K091, K092, K093, K094, K095, K096, K097, K098 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \
{ K110, KC_NO, K112, K113, K114, K115, K116, K117, K118 } \
}
/* 7U spacebar, 1.5U mods */
#define LAYOUT_ansi_150u_mods( \
K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \
K027,K016,K028,K038, \
K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K047,K057,K048,K058, \
K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056,K067,K077,K068,K078, \
K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075 ,K076,K087,K097,K088,K098, \
K080 ,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096,K106,K116,K108,K118, \
K100, K101, K102, K103, K104,K114,K105,K115,K117,K107 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
{ K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, KC_NO, K038 }, \
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, K067, K068 }, \
{ K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \
{ K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \
{KC_NO, K091, K092, K093, K094, K095, K096, K097, K098 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, K114, K115, K116, K117, K118 } \
}

@ -0,0 +1,19 @@
{
"keyboard_name": "hineyg80",
"url": "",
"maintainer": "hineybush",
"width": 19.5,
"height": 7.25,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Pause", "x":15.5, "y":0}, {"label":"Insert", "x":16.5, "y":0}, {"label":"Home", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"Scroll Lock", "x":15.5, "y":1}, {"label":"Delete", "x":16.5, "y":1}, {"label":"End", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Bksp", "x":13, "y":2}, {"x":14, "y":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"-", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"+", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"x":12.75, "y":4}, {"label":"Enter", "x":13.75, "y":4, "w":1.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":1.25}, {"x":1.25, "y":5}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6}, {"label":"Win", "x":1, "y":6}, {"label":"Alt", "x":2, "y":6}, {"x":3, "y":6, "w":6}, {"label":"Alt", "x":9, "y":6}, {"label":"Win", "x":10, "y":6}, {"label":"Menu", "x":11, "y":6}, {"label":"Ctrl", "x":12, "y":6}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}]
},
"LAYOUT_ansi_100u_mods": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"label":"Home", "x":16.5, "y":0}, {"label":"PgUp", "x":17.5, "y":0}, {"label":"Prt Sc", "x":18.5, "y":0}, {"label":"Delete", "x":15.5, "y":1}, {"label":"End", "x":16.5, "y":1}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"Scroll", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Backspace", "x":13, "y":2, "w":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"Pause", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"-", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"label":"Enter", "x":12.75, "y":4, "w":2.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"label":"+", "x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":2.25}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6}, {"label":"Win", "x":1, "y":6}, {"label":"Alt", "x":2, "y":6}, {"x":3, "y":6, "w":6}, {"label":"Alt", "x":9, "y":6}, {"label":"Win", "x":10, "y":6}, {"label":"Menu", "x":11, "y":6}, {"label":"Ctrl", "x":12, "y":6}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}]
},
"LAYOUT_ansi_150u_mods": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"label":"Home", "x":16.5, "y":0}, {"label":"PgUp", "x":17.5, "y":0}, {"label":"Prt Sc", "x":18.5, "y":0}, {"label":"Delete", "x":15.5, "y":1}, {"label":"End", "x":16.5, "y":1}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"Scroll", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Backspace", "x":13, "y":2, "w":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"Pause", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"-", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"label":"Enter", "x":12.75, "y":4, "w":2.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"label":"+", "x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":2.25}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6, "w":1.5}, {"label":"Alt", "x":1.5, "y":6, "w":1.5}, {"x":3, "y":6, "w":7}, {"label":"Menu", "x":10, "y":6, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":6, "w":1.5}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}]
}
}
}

@ -0,0 +1,19 @@
/* Copyright 2019 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -0,0 +1,58 @@
/* Copyright 2019 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
// 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] = {
[0] = LAYOUT_ansi_100u_mods( /* Base */
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_HOME, KC_PGUP, KC_PSCR,
KC_DEL, KC_END, KC_PGDN, KC_SLCK,
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_NLCK, KC_PSLS, KC_PAST, KC_PAUS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_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_P4, KC_P5, KC_P6, KC_PPLS,
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_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
[1] = LAYOUT_ansi_100u_mods( /* Fn */KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU,
KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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 hineyg80

@ -0,0 +1,19 @@
/* Copyright 2019 Josh Hinnebusch
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -0,0 +1,60 @@
/* Copyright 2019 %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/>.
*/
#include QMK_KEYBOARD_H
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL,
______ = KC_TRNS,
XXXXXX = KC_NO
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi_150u_mods( /* Base */
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_HOME, KC_PGUP, KC_PSCR,
KC_DEL, KC_END, KC_PGDN, KC_SLCK,
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_NLCK, KC_PSLS, KC_PAST, KC_PAUS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_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_P4, KC_P5, KC_P6, KC_PPLS,
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_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
[1] = LAYOUT_ansi_150u_mods( /* Fn */______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU,
______, ______, ______, KC_VOLD,
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_DEL, ______, ______, ______, ______,
______, ______, ______, ______, RESET , ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
______, ______, ______, ______, ______, ______, ______, ______, ______, ______
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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 hineyg80

@ -0,0 +1,16 @@
# hineyg80
A small-batch PCB design to be a drop-in replacement for G80-1800 and G81-1800 boards.
Keyboard Maintainer: [hineybush](https://github.com/hineybush)
Hardware Supported: hiney g80 rev 2
Hardware Availability: https://geekhack.org/index.php?topic=92389.0
Make example for this keyboard (after setting up your build environment):
make hineybush/hineyg80: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,81 @@
# MCU name
#MCU = at90usb1286
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 = no # 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 = 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 = 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)

@ -165,7 +165,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_16, C7_15, C6_15} //D16 {1, C9_16, C7_15, C6_15} //D16
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// //
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15,
@ -174,70 +174,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
/* {row | col << 4} /* {row | col << 4}
* | {x=0..224, y=0..64} * | {x=0..224, y=0..64}
* | | modifier * | | flags
* | | | */ * | | | */
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16 {{0|(13<<4)}, {224, 0}, 1}, //A1-A16
{{0|(12<<4)}, {204, 0}, 0}, {{0|(12<<4)}, {204, 0}, 4},
{{0|(11<<4)}, {187, 0}, 0}, {{0|(11<<4)}, {187, 0}, 4},
{{0|(10<<4)}, {170, 0}, 0}, {{0|(10<<4)}, {170, 0}, 4},
{{0|(9<<4)}, {153, 0}, 0}, {{0|(9<<4)}, {153, 0}, 4},
{{0|(8<<4)}, {136, 0}, 0}, {{0|(8<<4)}, {136, 0}, 4},
{{0|(7<<4)}, {119, 0}, 0}, {{0|(7<<4)}, {119, 0}, 4},
{{1|(7<<4)}, {119, 16}, 0}, {{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 0}, {{1|(8<<4)}, {136, 16}, 4},
{{1|(9<<4)}, {153, 16}, 0}, {{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 0}, {{1|(10<<4)}, {170, 16}, 4},
{{1|(11<<4)}, {187, 16}, 0}, {{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 0}, {{1|(12<<4)}, {204, 16}, 4},
{{2|(13<<4)}, {224, 32}, 1}, {{2|(13<<4)}, {224, 32}, 1},
{{2|(12<<4)}, {224, 16}, 0}, {{2|(12<<4)}, {224, 16}, 4},
{{2|(11<<4)}, {197, 32}, 0}, {{2|(11<<4)}, {197, 32}, 4},
{{3|(10<<4)}, {170, 48}, 0}, //B1-B14 {{3|(10<<4)}, {170, 48}, 4}, //B1-B14
{{3|(9<<4)}, {153, 48}, 0}, {{3|(9<<4)}, {153, 48}, 4},
{{3|(8<<4)}, {136, 48}, 0}, {{3|(8<<4)}, {136, 48}, 4},
{{3|(7<<4)}, {119, 48}, 0}, {{3|(7<<4)}, {119, 48}, 4},
{{2|(7<<4)}, {119, 32}, 0}, {{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 0}, {{2|(8<<4)}, {136, 32}, 4},
{{2|(9<<4)}, {153, 32}, 0}, {{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 0}, {{2|(10<<4)}, {170, 32}, 4},
{{3|(11<<4)}, {187, 48}, 0}, {{3|(11<<4)}, {187, 48}, 4},
{{3|(13<<4)}, {214, 48}, 1}, {{3|(13<<4)}, {214, 48}, 1},
{{4|(13<<4)}, {224, 64}, 1}, {{4|(13<<4)}, {224, 64}, 1},
{{4|(12<<4)}, {204, 64}, 1}, {{4|(12<<4)}, {204, 64}, 1},
{{4|(11<<4)}, {187, 64}, 1}, {{4|(11<<4)}, {187, 64}, 1},
{{4|(10<<4)}, {170, 64}, 1}, {{4|(10<<4)}, {170, 64}, 1},
{{0|(6<<4)}, {102, 0}, 0}, //C1-C16 {{0|(6<<4)}, {102, 0}, 4}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 0}, {{0|(5<<4)}, { 85, 0}, 4},
{{0|(4<<4)}, { 68, 0}, 0}, {{0|(4<<4)}, { 68, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 0}, {{0|(3<<4)}, { 51, 0}, 4},
{{0|(2<<4)}, { 34, 0}, 0}, {{0|(2<<4)}, { 34, 0}, 4},
{{0|(1<<4)}, { 17, 0}, 0}, {{0|(1<<4)}, { 17, 0}, 4},
{{0|(0<<4)}, { 0, 0}, 1}, {{0|(0<<4)}, { 0, 0}, 1},
{{1|(0<<4)}, { 0, 16}, 1}, {{1|(0<<4)}, { 0, 16}, 1},
{{1|(1<<4)}, { 17, 16}, 0}, {{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 0}, {{1|(2<<4)}, { 34, 16}, 4},
{{1|(3<<4)}, { 51, 16}, 0}, {{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 0}, {{1|(4<<4)}, { 68, 16}, 4},
{{1|(5<<4)}, { 85, 16}, 0}, {{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 0}, {{1|(6<<4)}, {102, 16}, 4},
{{2|(6<<4)}, {102, 32}, 0}, {{2|(6<<4)}, {102, 32}, 4},
{{2|(5<<4)}, { 85, 32}, 0}, {{2|(5<<4)}, { 85, 32}, 4},
{{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 {{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
//D2 //D2
{{3|(0<<4)}, { 10, 48}, 1}, {{3|(0<<4)}, { 10, 48}, 1},
{{2|(0<<4)}, { 0, 32}, 1}, {{2|(0<<4)}, { 0, 32}, 1},
{{2|(1<<4)}, { 17, 32}, 0}, {{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 0}, {{2|(2<<4)}, { 34, 32}, 4},
{{2|(3<<4)}, { 51, 32}, 0}, {{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 0}, {{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 0}, {{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 0}, {{3|(4<<4)}, { 68, 48}, 4},
{{3|(5<<4)}, { 85, 48}, 0}, {{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 0}, {{3|(6<<4)}, {102, 48}, 4},
{{4|(3<<4)}, {102, 64}, 0}, {{4|(3<<4)}, {102, 64}, 4},
{{4|(2<<4)}, { 34, 68}, 1}, {{4|(2<<4)}, { 34, 68}, 1},
{{4|(1<<4)}, { 17, 68}, 1}, {{4|(1<<4)}, { 17, 68}, 1},
{{4|(0<<4)}, { 0, 68}, 1} {{4|(0<<4)}, { 0, 68}, 1}
@ -319,7 +319,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_16, C7_15, C6_15} //D16 {1, C9_16, C7_15, C6_15} //D16
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// //
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---,
@ -328,70 +328,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
/* {row | col << 4} /* {row | col << 4}
* | {x=0..224, y=0..64} * | {x=0..224, y=0..64}
* | | modifier * | | flags
* | | | */ * | | | */
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16 {{0|(13<<4)}, {224, 0}, 1}, //A1-A16
{{0|(12<<4)}, {204, 0}, 0}, {{0|(12<<4)}, {204, 0}, 4},
{{0|(11<<4)}, {187, 0}, 0}, {{0|(11<<4)}, {187, 0}, 4},
{{0|(10<<4)}, {170, 0}, 0}, {{0|(10<<4)}, {170, 0}, 4},
{{0|(9<<4)}, {153, 0}, 0}, {{0|(9<<4)}, {153, 0}, 4},
{{0|(8<<4)}, {136, 0}, 0}, {{0|(8<<4)}, {136, 0}, 4},
{{0|(7<<4)}, {119, 0}, 0}, {{0|(7<<4)}, {119, 0}, 4},
{{1|(7<<4)}, {119, 16}, 0}, {{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 0}, {{1|(8<<4)}, {136, 16}, 4},
{{1|(9<<4)}, {153, 16}, 0}, {{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 0}, {{1|(10<<4)}, {170, 16}, 4},
{{1|(11<<4)}, {187, 16}, 0}, {{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 0}, {{1|(12<<4)}, {204, 16}, 4},
{{2|(13<<4)}, {224, 8}, 1}, {{2|(13<<4)}, {224, 8}, 1},
{{2|(12<<4)}, {204, 32}, 0}, {{2|(12<<4)}, {204, 32}, 4},
{{2|(11<<4)}, {187, 32}, 0}, {{2|(11<<4)}, {187, 32}, 4},
{{3|(10<<4)}, {170, 48}, 0}, //B1-B14 {{3|(10<<4)}, {170, 48}, 4}, //B1-B14
{{3|(9<<4)}, {153, 48}, 0}, {{3|(9<<4)}, {153, 48}, 4},
{{3|(8<<4)}, {136, 48}, 0}, {{3|(8<<4)}, {136, 48}, 4},
{{3|(7<<4)}, {119, 48}, 0}, {{3|(7<<4)}, {119, 48}, 4},
{{2|(7<<4)}, {119, 32}, 0}, {{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 0}, {{2|(8<<4)}, {136, 32}, 4},
{{2|(9<<4)}, {153, 32}, 0}, {{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 0}, {{2|(10<<4)}, {170, 32}, 4},
{{3|(11<<4)}, {187, 48}, 0}, {{3|(11<<4)}, {187, 48}, 4},
{{3|(13<<4)}, {214, 48}, 1}, {{3|(13<<4)}, {214, 48}, 1},
{{4|(13<<4)}, {224, 64}, 1}, {{4|(13<<4)}, {224, 64}, 1},
{{4|(12<<4)}, {204, 64}, 1}, {{4|(12<<4)}, {204, 64}, 1},
{{4|(11<<4)}, {187, 64}, 1}, {{4|(11<<4)}, {187, 64}, 1},
{{4|(10<<4)}, {170, 64}, 1}, {{4|(10<<4)}, {170, 64}, 1},
{{0|(6<<4)}, {102, 0}, 0}, //C1-C16 {{0|(6<<4)}, {102, 0}, 4}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 0}, {{0|(5<<4)}, { 85, 0}, 4},
{{0|(4<<4)}, { 68, 0}, 0}, {{0|(4<<4)}, { 68, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 0}, {{0|(3<<4)}, { 51, 0}, 4},
{{0|(2<<4)}, { 34, 0}, 0}, {{0|(2<<4)}, { 34, 0}, 4},
{{0|(1<<4)}, { 17, 0}, 0}, {{0|(1<<4)}, { 17, 0}, 4},
{{0|(0<<4)}, { 0, 0}, 1}, {{0|(0<<4)}, { 0, 0}, 1},
{{1|(0<<4)}, { 0, 16}, 1}, {{1|(0<<4)}, { 0, 16}, 1},
{{1|(1<<4)}, { 17, 16}, 0}, {{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 0}, {{1|(2<<4)}, { 34, 16}, 4},
{{1|(3<<4)}, { 51, 16}, 0}, {{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 0}, {{1|(4<<4)}, { 68, 16}, 4},
{{1|(5<<4)}, { 85, 16}, 0}, {{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 0}, {{1|(6<<4)}, {102, 16}, 4},
{{2|(6<<4)}, {102, 32}, 0}, {{2|(6<<4)}, {102, 32}, 4},
{{2|(5<<4)}, { 85, 32}, 0}, {{2|(5<<4)}, { 85, 32}, 4},
{{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 {{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
{{3|(1<<4)}, { 17, 48}, 0}, {{3|(1<<4)}, { 17, 48}, 4},
{{3|(0<<4)}, { 0, 48}, 1}, {{3|(0<<4)}, { 0, 48}, 1},
{{2|(0<<4)}, { 0, 32}, 1}, {{2|(0<<4)}, { 0, 32}, 1},
{{2|(1<<4)}, { 17, 32}, 0}, {{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 0}, {{2|(2<<4)}, { 34, 32}, 4},
{{2|(3<<4)}, { 51, 32}, 0}, {{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 0}, {{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 0}, {{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 0}, {{3|(4<<4)}, { 68, 48}, 4},
{{3|(5<<4)}, { 85, 48}, 0}, {{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 0}, {{3|(6<<4)}, {102, 48}, 4},
{{4|(3<<4)}, {102, 64}, 0}, {{4|(3<<4)}, {102, 64}, 4},
{{4|(2<<4)}, { 34, 68}, 1}, {{4|(2<<4)}, { 34, 68}, 1},
{{4|(1<<4)}, { 17, 68}, 1}, {{4|(1<<4)}, { 17, 68}, 1},
{{4|(0<<4)}, { 0, 68}, 1} {{4|(0<<4)}, { 0, 68}, 1}

@ -21,13 +21,13 @@
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
} }
// The PCB does support a grid layout, but the case does not. // The PCB does support a grid layout, but the case does not.
@ -35,11 +35,24 @@
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
#define LAYOUT_kc_ortho_4x12( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
{ \
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
} }

@ -65,7 +65,7 @@ BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # 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 = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@ -79,3 +79,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
LAYOUTS = ortho_4x12 planck_mit

@ -0,0 +1,29 @@
#include QMK_KEYBOARD_H
enum layer {
LAYER_DEFAULT,
LAYER_FUNCTION,
};
/* Switch to function layer when held. */
#define LY_FUNC MO(LAYER_FUNCTION)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */
[LAYER_DEFAULT] = 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_BSLS, KC_GRV, 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_BSPC, 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, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT \
),
/* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */
[LAYER_FUNCTION] = 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_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, _______, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______, \
KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, KC_APP, _______, _______, _______, _______ \
),
};

@ -0,0 +1,13 @@
# bcat's Quefrency 65% layout
This is pretty much a stock 65% split keyboard layout, with an HHKB-style
(split) backspace and media keys in the function layer centered around the WASD
cluster.
## Default layer
![Default layer layout](https://i.imgur.com/stwELz3.png)
## Function layer
![Function layer layout](https://i.imgur.com/K5Z5qbw.png)

@ -0,0 +1,24 @@
#pragma once
/* Use I2C rather than serial communicaiton to reduce latency. */
#define USE_I2C
/* Turn off RGB lighting when the host goes to sleep. */
#define RGBLIGHT_SLEEP
/* Use an extra LED on the right side since it's wider on the 65% PCB. */
#undef RGBLED_NUM
#define RGBLED_NUM 17
/* Set up RGB lighting so it works with either side as master. */
#define RGBLED_SPLIT { 8, 9 }
/* Make mouse operation smoother. */
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_INTERVAL 16
/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_TIME_TO_MAX 150
#define MOUSEKEY_WHEEL_MAX_SPEED 4
#define MOUSEKEY_WHEEL_TIME_TO_MAX 150

@ -0,0 +1,42 @@
#include QMK_KEYBOARD_H
enum layer {
LAYER_DEFAULT,
LAYER_FUNCTION,
LAYER_MOUSE,
};
/* Switch to function layer when held. */
#define LY_FUNC MO(LAYER_FUNCTION)
/* Switch to mouse layer when held; send menu key when tapped. */
#define LY_MOUSE LT(LAYER_MOUSE, KC_APP)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */
[LAYER_DEFAULT] = LAYOUT_65(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_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_BSPC, 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, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, LY_MOUSE, KC_LEFT, KC_DOWN, KC_RGHT \
),
/* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */
[LAYER_FUNCTION] = LAYOUT_65(
_______, 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_HUI, \
_______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, _______, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, RGB_SAI, \
KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, \
_______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD \
),
/* Mouse layer: http://www.keyboard-layout-editor.com/#/gists/05b9fbe8a34f65ed85ded659b3941152 */
[LAYER_MOUSE] = LAYOUT_65(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \
),
};

@ -0,0 +1,17 @@
# bcat's Quefrency 65% layout
This is pretty much a stock 65% split keyboard layout, with an HHKB-style
(split) backspace, media keys in the function layer centered around the WASD
cluster, and mouse keys on their own layer centered around the arrow cluster.
## Default layer
![Default layer layout](https://i.imgur.com/3riRFev.png)
## Function layer
![Function layer layout](https://i.imgur.com/Hu5wNpl.png)
## Mouse layer
![Mouse layer layout](https://i.imgur.com/LmGgJEG.png)

@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10 #define RGB_MATRIX_LED_FLUSH_LIMIT 10
#define RGB_MATRIX_EXTRA_TOG
#include "config_led.h" #include "config_led.h"

@ -20,122 +20,122 @@
// //
// There is a quick-and-dirty implementation of this under ledvis.html // There is a quick-and-dirty implementation of this under ledvis.html
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC
/* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1 /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1
/* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2 /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2
/* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3 /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3
/* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4 /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4
/* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5 /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5
/* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6 /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6
/* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7 /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7
/* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8 /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8
/* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9 /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9
/* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0 /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0
/* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS
/* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL
/* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC
/* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL
/* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB
/* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q
/* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W
/* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E
/* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R
/* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T
/* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y
/* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U
/* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I
/* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O
/* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P
/* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC
/* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC
/* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS
/* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME
/* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
/* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A
/* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S
/* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D
/* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F
/* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G
/* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H
/* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J
/* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K
/* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L
/* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN
/* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT
/* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP
/* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT
/* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z
/* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X
/* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C
/* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V
/* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B
/* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N
/* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M
/* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM
/* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT
/* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH
/* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP
/* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN
/* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL
/* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI
/* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* _________________________________________ */ // ____ /* _________________________________________ */ // ____
/* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT
/* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1) /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1)
/* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT
/* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN
/* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT
// Underglow LEDs // Underglow LEDs
{ { 255 }, { 1, 1 }, 0 }, { { 255 }, { 1, 1 }, 2 },
{ { 255 }, { 15, 0 }, 0 }, { { 255 }, { 15, 0 }, 2 },
{ { 255 }, { 31, 0 }, 0 }, { { 255 }, { 31, 0 }, 2 },
{ { 255 }, { 47, 0 }, 0 }, { { 255 }, { 47, 0 }, 2 },
{ { 255 }, { 63, 0 }, 0 }, { { 255 }, { 63, 0 }, 2 },
{ { 255 }, { 79, 0 }, 0 }, { { 255 }, { 79, 0 }, 2 },
{ { 255 }, { 95, 0 }, 0 }, { { 255 }, { 95, 0 }, 2 },
{ { 255 }, { 112, 0 }, 0 }, { { 255 }, { 112, 0 }, 2 },
{ { 255 }, { 128, 0 }, 0 }, { { 255 }, { 128, 0 }, 2 },
{ { 255 }, { 144, 0 }, 0 }, { { 255 }, { 144, 0 }, 2 },
{ { 255 }, { 160, 0 }, 0 }, { { 255 }, { 160, 0 }, 2 },
{ { 255 }, { 176, 0 }, 0 }, { { 255 }, { 176, 0 }, 2 },
{ { 255 }, { 192, 0 }, 0 }, { { 255 }, { 192, 0 }, 2 },
{ { 255 }, { 208, 0 }, 0 }, { { 255 }, { 208, 0 }, 2 },
{ { 255 }, { 222, 1 }, 0 }, { { 255 }, { 222, 1 }, 2 },
{ { 255 }, { 224, 13 }, 0 }, { { 255 }, { 224, 13 }, 2 },
{ { 255 }, { 224, 25 }, 0 }, { { 255 }, { 224, 25 }, 2 },
{ { 255 }, { 224, 38 }, 0 }, { { 255 }, { 224, 38 }, 2 },
{ { 255 }, { 224, 50 }, 0 }, { { 255 }, { 224, 50 }, 2 },
{ { 255 }, { 222, 62 }, 0 }, { { 255 }, { 222, 62 }, 2 },
{ { 255 }, { 191, 64 }, 0 }, { { 255 }, { 191, 64 }, 2 },
{ { 255 }, { 179, 64 }, 0 }, { { 255 }, { 179, 64 }, 2 },
{ { 255 }, { 167, 64 }, 0 }, { { 255 }, { 167, 64 }, 2 },
{ { 255 }, { 153, 64 }, 0 }, { { 255 }, { 153, 64 }, 2 },
{ { 255 }, { 139, 64 }, 0 }, { { 255 }, { 139, 64 }, 2 },
{ { 255 }, { 125, 64 }, 0 }, { { 255 }, { 125, 64 }, 2 },
{ { 255 }, { 112, 64 }, 0 }, { { 255 }, { 112, 64 }, 2 },
{ { 255 }, { 98, 64 }, 0 }, { { 255 }, { 98, 64 }, 2 },
{ { 255 }, { 84, 64 }, 0 }, { { 255 }, { 84, 64 }, 2 },
{ { 255 }, { 70, 64 }, 0 }, { { 255 }, { 70, 64 }, 2 },
{ { 255 }, { 56, 64 }, 0 }, { { 255 }, { 56, 64 }, 2 },
{ { 255 }, { 42, 64 }, 0 }, { { 255 }, { 42, 64 }, 2 },
{ { 255 }, { 28, 64 }, 0 }, { { 255 }, { 28, 64 }, 2 },
{ { 255 }, { 1, 62 }, 0 }, { { 255 }, { 1, 62 }, 2 },
{ { 255 }, { 0, 50 }, 0 }, { { 255 }, { 0, 50 }, 2 },
{ { 255 }, { 0, 38 }, 0 }, { { 255 }, { 0, 38 }, 2 },
{ { 255 }, { 0, 25 }, 0 }, { { 255 }, { 0, 25 }, 2 },
{ { 255 }, { 0, 13 }, 0 }, { { 255 }, { 0, 13 }, 2 },
}; };
#ifdef USB_LED_INDICATOR_ENABLE #ifdef USB_LED_INDICATOR_ENABLE

@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
return false; return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default: default:
return true; //Process all other keycodes normally return true; //Process all other keycodes normally
} }

@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
return false; return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default: default:
return true; //Process all other keycodes normally return true; //Process all other keycodes normally
} }

@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
return false; return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default: default:
return true; //Process all other keycodes normally return true; //Process all other keycodes normally
} }

@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10 #define RGB_MATRIX_LED_FLUSH_LIMIT 10
#define RGB_MATRIX_EXTRA_TOG
#include "config_led.h" #include "config_led.h"

@ -5,133 +5,133 @@
#include "rgb_matrix.h" #include "rgb_matrix.h"
#include "config_led.h" #include "config_led.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
{ { 0|(0<<4) }, { 7, 5 }, 0 }, { { 0|(0<<4) }, { 7, 5 }, 4 },
{ { 0|(1<<4) }, { 31, 5 }, 0 }, { { 0|(1<<4) }, { 31, 5 }, 4 },
{ { 0|(2<<4) }, { 43, 5 }, 0 }, { { 0|(2<<4) }, { 43, 5 }, 4 },
{ { 0|(3<<4) }, { 55, 5 }, 0 }, { { 0|(3<<4) }, { 55, 5 }, 4 },
{ { 0|(4<<4) }, { 67, 5 }, 0 }, { { 0|(4<<4) }, { 67, 5 }, 4 },
{ { 0|(5<<4) }, { 85, 5 }, 0 }, { { 0|(5<<4) }, { 85, 5 }, 4 },
{ { 0|(6<<4) }, { 97, 5 }, 0 }, { { 0|(6<<4) }, { 97, 5 }, 4 },
{ { 0|(7<<4) }, { 109, 5 }, 0 }, { { 0|(7<<4) }, { 109, 5 }, 4 },
{ { 6|(0<<4) }, { 121, 5 }, 0 }, { { 6|(0<<4) }, { 121, 5 }, 4 },
{ { 6|(1<<4) }, { 139, 5 }, 0 }, { { 6|(1<<4) }, { 139, 5 }, 4 },
{ { 6|(2<<4) }, { 151, 5 }, 0 }, { { 6|(2<<4) }, { 151, 5 }, 4 },
{ { 6|(3<<4) }, { 163, 5 }, 0 }, { { 6|(3<<4) }, { 163, 5 }, 4 },
{ { 6|(4<<4) }, { 175, 5 }, 0 }, { { 6|(4<<4) }, { 175, 5 }, 4 },
{ { 6|(5<<4) }, { 193, 5 }, 0 }, { { 6|(5<<4) }, { 193, 5 }, 4 },
{ { 6|(6<<4) }, { 205, 5 }, 1 }, { { 6|(6<<4) }, { 205, 5 }, 1 },
{ { 6|(7<<4) }, { 217, 5 }, 0 }, { { 6|(7<<4) }, { 217, 5 }, 4 },
// KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP
{ { 1|(0<<4) }, { 7, 20 }, 0 }, { { 1|(0<<4) }, { 7, 20 }, 4 },
{ { 1|(1<<4) }, { 19, 20 }, 0 }, { { 1|(1<<4) }, { 19, 20 }, 4 },
{ { 1|(2<<4) }, { 31, 20 }, 0 }, { { 1|(2<<4) }, { 31, 20 }, 4 },
{ { 1|(3<<4) }, { 43, 20 }, 0 }, { { 1|(3<<4) }, { 43, 20 }, 4 },
{ { 1|(4<<4) }, { 55, 20 }, 0 }, { { 1|(4<<4) }, { 55, 20 }, 4 },
{ { 1|(5<<4) }, { 67, 20 }, 0 }, { { 1|(5<<4) }, { 67, 20 }, 4 },
{ { 1|(6<<4) }, { 79, 20 }, 0 }, { { 1|(6<<4) }, { 79, 20 }, 4 },
{ { 1|(7<<4) }, { 91, 20 }, 0 }, { { 1|(7<<4) }, { 91, 20 }, 4 },
{ { 7|(0<<4) }, { 103, 20 }, 0 }, { { 7|(0<<4) }, { 103, 20 }, 4 },
{ { 7|(1<<4) }, { 115, 20 }, 0 }, { { 7|(1<<4) }, { 115, 20 }, 4 },
{ { 7|(2<<4) }, { 127, 20 }, 0 }, { { 7|(2<<4) }, { 127, 20 }, 4 },
{ { 7|(3<<4) }, { 139, 20 }, 0 }, { { 7|(3<<4) }, { 139, 20 }, 4 },
{ { 7|(4<<4) }, { 151, 20 }, 0 }, { { 7|(4<<4) }, { 151, 20 }, 4 },
{ { 7|(5<<4) }, { 169, 20 }, 0 }, { { 7|(5<<4) }, { 169, 20 }, 4 },
{ { 7|(6<<4) }, { 193, 20 }, 0 }, { { 7|(6<<4) }, { 193, 20 }, 4 },
{ { 7|(7<<4) }, { 205, 20 }, 0 }, { { 7|(7<<4) }, { 205, 20 }, 4 },
{ { 9|(7<<4) }, { 217, 20 }, 0 }, { { 9|(7<<4) }, { 217, 20 }, 4 },
// KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN
{ { 2|(0<<4) }, { 10, 30 }, 0 }, { { 2|(0<<4) }, { 10, 30 }, 4 },
{ { 2|(1<<4) }, { 25, 30 }, 0 }, { { 2|(1<<4) }, { 25, 30 }, 4 },
{ { 2|(2<<4) }, { 37, 30 }, 0 }, { { 2|(2<<4) }, { 37, 30 }, 4 },
{ { 2|(3<<4) }, { 49, 30 }, 0 }, { { 2|(3<<4) }, { 49, 30 }, 4 },
{ { 2|(4<<4) }, { 61, 30 }, 0 }, { { 2|(4<<4) }, { 61, 30 }, 4 },
{ { 2|(5<<4) }, { 73, 30 }, 0 }, { { 2|(5<<4) }, { 73, 30 }, 4 },
{ { 2|(6<<4) }, { 85, 30 }, 0 }, { { 2|(6<<4) }, { 85, 30 }, 4 },
{ { 2|(7<<4) }, { 97, 30 }, 0 }, { { 2|(7<<4) }, { 97, 30 }, 4 },
{ { 8|(0<<4) }, { 109, 30 }, 0 }, { { 8|(0<<4) }, { 109, 30 }, 4 },
{ { 8|(1<<4) }, { 121, 30 }, 0 }, { { 8|(1<<4) }, { 121, 30 }, 4 },
{ { 8|(2<<4) }, { 133, 30 }, 0 }, { { 8|(2<<4) }, { 133, 30 }, 4 },
{ { 8|(3<<4) }, { 145, 30 }, 0 }, { { 8|(3<<4) }, { 145, 30 }, 4 },
{ { 8|(4<<4) }, { 157, 30 }, 0 }, { { 8|(4<<4) }, { 157, 30 }, 4 },
{ { 8|(5<<4) }, { 172, 30 }, 0 }, { { 8|(5<<4) }, { 172, 30 }, 4 },
{ { 8|(6<<4) }, { 193, 30 }, 0 }, { { 8|(6<<4) }, { 193, 30 }, 4 },
{ { 8|(7<<4) }, { 205, 30 }, 0 }, { { 8|(7<<4) }, { 205, 30 }, 4 },
{ { 9|(6<<4) }, { 217, 30 }, 0 }, { { 9|(6<<4) }, { 217, 30 }, 4 },
// 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
{ { 3|(0<<4) }, { 11, 39 }, 1 }, { { 3|(0<<4) }, { 11, 39 }, 1 },
{ { 3|(1<<4) }, { 28, 39 }, 0 }, { { 3|(1<<4) }, { 28, 39 }, 4 },
{ { 3|(2<<4) }, { 40, 39 }, 0 }, { { 3|(2<<4) }, { 40, 39 }, 4 },
{ { 3|(3<<4) }, { 52, 39 }, 0 }, { { 3|(3<<4) }, { 52, 39 }, 4 },
{ { 3|(4<<4) }, { 64, 39 }, 0 }, { { 3|(4<<4) }, { 64, 39 }, 4 },
{ { 3|(5<<4) }, { 76, 39 }, 0 }, { { 3|(5<<4) }, { 76, 39 }, 4 },
{ { 3|(6<<4) }, { 88, 39 }, 0 }, { { 3|(6<<4) }, { 88, 39 }, 4 },
{ { 3|(7<<4) }, { 100, 39 }, 0 }, { { 3|(7<<4) }, { 100, 39 }, 4 },
{ { 9|(0<<4) }, { 112, 39 }, 0 }, { { 9|(0<<4) }, { 112, 39 }, 4 },
{ { 9|(1<<4) }, { 124, 39 }, 0 }, { { 9|(1<<4) }, { 124, 39 }, 4 },
{ { 9|(2<<4) }, { 136, 39 }, 0 }, { { 9|(2<<4) }, { 136, 39 }, 4 },
{ { 9|(3<<4) }, { 148, 39 }, 0 }, { { 9|(3<<4) }, { 148, 39 }, 4 },
{ { 9|(4<<4) }, { 168, 39 }, 0 }, { { 9|(4<<4) }, { 168, 39 }, 4 },
// 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_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
{ { 4|(0<<4) }, { 14, 49 }, 0 }, { { 4|(0<<4) }, { 14, 49 }, 4 },
{ { 4|(1<<4) }, { 34, 49 }, 0 }, { { 4|(1<<4) }, { 34, 49 }, 4 },
{ { 4|(2<<4) }, { 46, 49 }, 0 }, { { 4|(2<<4) }, { 46, 49 }, 4 },
{ { 4|(3<<4) }, { 58, 49 }, 0 }, { { 4|(3<<4) }, { 58, 49 }, 4 },
{ { 4|(4<<4) }, { 70, 49 }, 0 }, { { 4|(4<<4) }, { 70, 49 }, 4 },
{ { 4|(5<<4) }, { 82, 49 }, 0 }, { { 4|(5<<4) }, { 82, 49 }, 4 },
{ { 4|(6<<4) }, { 94, 49 }, 0 }, { { 4|(6<<4) }, { 94, 49 }, 4 },
{ { 4|(7<<4) }, { 106, 49 }, 0 }, { { 4|(7<<4) }, { 106, 49 }, 4 },
{ { 10|(0<<4) }, { 118, 49 }, 0 }, { { 10|(0<<4) }, { 118, 49 }, 4 },
{ { 10|(1<<4) }, { 130, 49 }, 0 }, { { 10|(1<<4) }, { 130, 49 }, 4 },
{ { 10|(2<<4) }, { 142, 49 }, 0 }, { { 10|(2<<4) }, { 142, 49 }, 4 },
{ { 10|(3<<4) }, { 165, 49 }, 0 }, { { 10|(3<<4) }, { 165, 49 }, 4 },
{ { 9|(5<<4) }, { 205, 49 }, 0 }, { { 9|(5<<4) }, { 205, 49 }, 4 },
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
{ { 5|(0<<4) }, { 8, 59 }, 0 }, { { 5|(0<<4) }, { 8, 59 }, 4 },
{ { 5|(1<<4) }, { 23, 59 }, 0 }, { { 5|(1<<4) }, { 23, 59 }, 4 },
{ { 5|(2<<4) }, { 38, 59 }, 0 }, { { 5|(2<<4) }, { 38, 59 }, 4 },
{ { 5|(3<<4) }, { 83, 59 }, 0 }, { { 5|(3<<4) }, { 83, 59 }, 4 },
{ { 5|(4<<4) }, { 129, 59 }, 0 }, { { 5|(4<<4) }, { 129, 59 }, 4 },
{ { 5|(5<<4) }, { 144, 59 }, 0 }, { { 5|(5<<4) }, { 144, 59 }, 4 },
{ { 5|(6<<4) }, { 159, 59 }, 0 }, { { 5|(6<<4) }, { 159, 59 }, 4 },
{ { 5|(7<<4) }, { 174, 59 }, 0 }, { { 5|(7<<4) }, { 174, 59 }, 4 },
{ { 10|(4<<4) }, { 193, 59 }, 0 }, { { 10|(4<<4) }, { 193, 59 }, 4 },
{ { 10|(5<<4) }, { 205, 59 }, 0 }, { { 10|(5<<4) }, { 205, 59 }, 4 },
{ { 10|(6<<4) }, { 217, 59 }, 0 }, { { 10|(6<<4) }, { 217, 59 }, 4 },
// Underglow / Border // Underglow / Border
{ { 0xFF }, { 222, 64 }, 0 }, { { 0xFF }, { 222, 64 }, 2 },
{ { 0xFF }, { 204, 64 }, 0 }, { { 0xFF }, { 204, 64 }, 2 },
{ { 0xFF }, { 186, 64 }, 0 }, { { 0xFF }, { 186, 64 }, 2 },
{ { 0xFF }, { 167, 64 }, 0 }, { { 0xFF }, { 167, 64 }, 2 },
{ { 0xFF }, { 149, 64 }, 0 }, { { 0xFF }, { 149, 64 }, 2 },
{ { 0xFF }, { 130, 64 }, 0 }, { { 0xFF }, { 130, 64 }, 2 },
{ { 0xFF }, { 112, 64 }, 0 }, { { 0xFF }, { 112, 64 }, 2 },
{ { 0xFF }, { 94, 64 }, 0 }, { { 0xFF }, { 94, 64 }, 2 },
{ { 0xFF }, { 75, 64 }, 0 }, { { 0xFF }, { 75, 64 }, 2 },
{ { 0xFF }, { 57, 64 }, 0 }, { { 0xFF }, { 57, 64 }, 2 },
{ { 0xFF }, { 38, 64 }, 0 }, { { 0xFF }, { 38, 64 }, 2 },
{ { 0xFF }, { 20, 64 }, 0 }, { { 0xFF }, { 20, 64 }, 2 },
{ { 0xFF }, { 0, 64 }, 0 }, { { 0xFF }, { 0, 64 }, 2 },
{ { 0xFF }, { 0, 47 }, 0 }, { { 0xFF }, { 0, 47 }, 2 },
{ { 0xFF }, { 0, 32 }, 0 }, { { 0xFF }, { 0, 32 }, 2 },
{ { 0xFF }, { 0, 17 }, 0 }, { { 0xFF }, { 0, 17 }, 2 },
{ { 0xFF }, { 0, 0 }, 0 }, { { 0xFF }, { 0, 0 }, 2 },
{ { 0xFF }, { 20, 0 }, 0 }, { { 0xFF }, { 20, 0 }, 2 },
{ { 0xFF }, { 38, 0 }, 0 }, { { 0xFF }, { 38, 0 }, 2 },
{ { 0xFF }, { 57, 0 }, 0 }, { { 0xFF }, { 57, 0 }, 2 },
{ { 0xFF }, { 75, 0 }, 0 }, { { 0xFF }, { 75, 0 }, 2 },
{ { 0xFF }, { 94, 0 }, 0 }, { { 0xFF }, { 94, 0 }, 2 },
{ { 0xFF }, { 112, 0 }, 0 }, { { 0xFF }, { 112, 0 }, 2 },
{ { 0xFF }, { 130, 0 }, 0 }, { { 0xFF }, { 130, 0 }, 2 },
{ { 0xFF }, { 149, 0 }, 0 }, { { 0xFF }, { 149, 0 }, 2 },
{ { 0xFF }, { 167, 0 }, 0 }, { { 0xFF }, { 167, 0 }, 2 },
{ { 0xFF }, { 186, 0 }, 0 }, { { 0xFF }, { 186, 0 }, 2 },
{ { 0xFF }, { 204, 0 }, 0 }, { { 0xFF }, { 204, 0 }, 2 },
{ { 0xFF }, { 222, 1 }, 0 }, { { 0xFF }, { 222, 1 }, 2 },
{ { 0xFF }, { 224, 17 }, 0 }, { { 0xFF }, { 224, 17 }, 2 },
{ { 0xFF }, { 224, 32 }, 0 }, { { 0xFF }, { 224, 32 }, 2 },
{ { 0xFF }, { 224, 47 }, 0 }, { { 0xFF }, { 224, 47 }, 2 },
}; };
#ifdef USB_LED_INDICATOR_ENABLE #ifdef USB_LED_INDICATOR_ENABLE

@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
return false; return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default: default:
return true; //Process all other keycodes normally return true; //Process all other keycodes normally
} }

@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
return false; return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default: default:
return true; //Process all other keycodes normally return true; //Process all other keycodes normally
} }

@ -46,34 +46,34 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) {
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
__attribute__ ((weak)) __attribute__ ((weak))
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0x73}, { 3, 35}, 0}, {{0x73}, { 3, 35}, 4},
{{0x72}, { 0, 26}, 0}, {{0x72}, { 0, 26}, 4},
{{0x71}, { 0, 17}, 0}, {{0x71}, { 0, 17}, 4},
{{0x70}, { 0, 6}, 0}, {{0x70}, { 0, 6}, 4},
{{0x60}, { 14, 5}, 0}, {{0x60}, { 14, 5}, 4},
{{0x61}, { 15, 16}, 0}, {{0x61}, { 15, 16}, 4},
{{0x62}, { 16, 25}, 0}, {{0x62}, { 16, 25}, 4},
{{0x63}, { 17, 34}, 0}, {{0x63}, { 17, 34}, 4},
{{0x53}, { 31, 29}, 0}, {{0x53}, { 31, 29}, 4},
{{0x52}, { 31, 19}, 0}, {{0x52}, { 31, 19}, 4},
{{0x51}, { 30, 11}, 0}, {{0x51}, { 30, 11}, 4},
{{0x50}, { 30, 1}, 0}, {{0x50}, { 30, 1}, 4},
{{0x40}, { 45, 0}, 0}, {{0x40}, { 45, 0}, 4},
{{0x41}, { 45, 8}, 0}, {{0x41}, { 45, 8}, 4},
{{0x42}, { 46, 17}, 0}, {{0x42}, { 46, 17}, 4},
{{0x43}, { 46, 27}, 0}, {{0x43}, { 46, 27}, 4},
{{0x33}, { 60, 27}, 0}, {{0x33}, { 60, 27}, 4},
{{0x32}, { 60, 18}, 0}, {{0x32}, { 60, 18}, 4},
{{0x31}, { 60, 9}, 0}, {{0x31}, { 60, 9}, 4},
{{0x30}, { 60, 0}, 0}, {{0x30}, { 60, 0}, 4},
{{0x20}, { 74, 2}, 0}, {{0x20}, { 74, 2}, 4},
{{0x21}, { 74, 11}, 0}, {{0x21}, { 74, 11}, 4},
{{0x22}, { 75, 20}, 0}, {{0x22}, { 75, 20}, 4},
{{0x23}, { 74, 28}, 0}, {{0x23}, { 74, 28}, 4},
{{0x12}, { 89, 30}, 0}, {{0x12}, { 89, 30}, 4},
{{0x11}, { 89, 19}, 0}, {{0x11}, { 89, 19}, 4},
{{0x10}, { 89, 7}, 0}, {{0x10}, { 89, 7}, 4},
{{0x00}, { 70, 38}, 1}, {{0x00}, { 70, 38}, 1},
{{0x01}, { 82, 41}, 1}, {{0x01}, { 82, 41}, 1},
{{0x02}, { 93, 45}, 1}, {{0x02}, { 93, 45}, 1},
@ -84,33 +84,33 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0x76}, {130, 45}, 1}, {{0x76}, {130, 45}, 1},
{{0x75}, {141, 41}, 1}, {{0x75}, {141, 41}, 1},
{{0x74}, {153, 38}, 1}, {{0x74}, {153, 38}, 1},
{{0x64}, {134, 7}, 0}, {{0x64}, {134, 7}, 4},
{{0x65}, {134, 19}, 0}, {{0x65}, {134, 19}, 4},
{{0x66}, {134, 30}, 0}, {{0x66}, {134, 30}, 4},
{{0x57}, {149, 28}, 0}, {{0x57}, {149, 28}, 4},
{{0x56}, {148, 20}, 0}, {{0x56}, {148, 20}, 4},
{{0x55}, {149, 11}, 0}, {{0x55}, {149, 11}, 4},
{{0x54}, {149, 2}, 0}, {{0x54}, {149, 2}, 4},
{{0x44}, {163, 0}, 0}, {{0x44}, {163, 0}, 4},
{{0x45}, {163, 9}, 0}, {{0x45}, {163, 9}, 4},
{{0x46}, {163, 18}, 0}, {{0x46}, {163, 18}, 4},
{{0x47}, {163, 27}, 0}, {{0x47}, {163, 27}, 4},
{{0x37}, {177, 27}, 0}, {{0x37}, {177, 27}, 4},
{{0x36}, {177, 17}, 0}, {{0x36}, {177, 17}, 4},
{{0x35}, {178, 8}, 0}, {{0x35}, {178, 8}, 4},
{{0x34}, {178, 0}, 0}, {{0x34}, {178, 0}, 4},
{{0x24}, {193, 1}, 0}, {{0x24}, {193, 1}, 4},
{{0x25}, {193, 11}, 0}, {{0x25}, {193, 11}, 4},
{{0x26}, {192, 19}, 0}, {{0x26}, {192, 19}, 4},
{{0x27}, {192, 29}, 0}, {{0x27}, {192, 29}, 4},
{{0x17}, {206, 34}, 0}, {{0x17}, {206, 34}, 4},
{{0x16}, {207, 25}, 0}, {{0x16}, {207, 25}, 4},
{{0x15}, {208, 16}, 0}, {{0x15}, {208, 16}, 4},
{{0x14}, {209, 5}, 0}, {{0x14}, {209, 5}, 4},
{{0x04}, {224, 6}, 0}, {{0x04}, {224, 6}, 4},
{{0x05}, {223, 17}, 0}, {{0x05}, {223, 17}, 4},
{{0x06}, {223, 26}, 0}, {{0x06}, {223, 26}, 4},
{{0x07}, {220, 35}, 0}, {{0x07}, {220, 35}, 4},
}; };
static struct { static struct {

@ -79,49 +79,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4} /*{row | col << 4}
| {x=0..224, y=0..64} | {x=0..224, y=0..64}
| | modifier | | flags
| | | */ | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, {{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, {{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, {{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, {{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, {{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
{{4|(0<<4)}, {20.36*6, 21.33*0}, 0}, {{4|(0<<4)}, {20.36*6, 21.33*0}, 4},
{{4|(1<<4)}, {20.36*7, 21.33*0}, 0}, {{4|(1<<4)}, {20.36*7, 21.33*0}, 4},
{{4|(2<<4)}, {20.36*8, 21.33*0}, 0}, {{4|(2<<4)}, {20.36*8, 21.33*0}, 4},
{{4|(3<<4)}, {20.36*9, 21.33*0}, 0}, {{4|(3<<4)}, {20.36*9, 21.33*0}, 4},
{{4|(4<<4)}, {20.36*10,21.33*0}, 0}, {{4|(4<<4)}, {20.36*10,21.33*0}, 4},
{{4|(5<<4)}, {20.36*11,21.33*0}, 1}, {{4|(5<<4)}, {20.36*11,21.33*0}, 1},
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, {{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, {{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, {{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, {{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, {{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, {{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
{{5|(0<<4)}, {20.36*6, 21.33*1}, 0}, {{5|(0<<4)}, {20.36*6, 21.33*1}, 4},
{{5|(1<<4)}, {20.36*7, 21.33*1}, 0}, {{5|(1<<4)}, {20.36*7, 21.33*1}, 4},
{{5|(2<<4)}, {20.36*8, 21.33*1}, 0}, {{5|(2<<4)}, {20.36*8, 21.33*1}, 4},
{{5|(3<<4)}, {20.36*9, 21.33*1}, 0}, {{5|(3<<4)}, {20.36*9, 21.33*1}, 4},
{{5|(4<<4)}, {20.36*10,21.33*1}, 0}, {{5|(4<<4)}, {20.36*10,21.33*1}, 4},
{{5|(5<<4)}, {20.36*11,21.33*1}, 1}, {{5|(5<<4)}, {20.36*11,21.33*1}, 1},
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, {{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, {{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, {{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, {{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, {{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, {{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
{{6|(0<<4)}, {20.36*6, 21.33*2}, 0}, {{6|(0<<4)}, {20.36*6, 21.33*2}, 4},
{{6|(1<<4)}, {20.36*7, 21.33*2}, 0}, {{6|(1<<4)}, {20.36*7, 21.33*2}, 4},
{{6|(2<<4)}, {20.36*8, 21.33*2}, 0}, {{6|(2<<4)}, {20.36*8, 21.33*2}, 4},
{{6|(3<<4)}, {20.36*9, 21.33*2}, 0}, {{6|(3<<4)}, {20.36*9, 21.33*2}, 4},
{{6|(4<<4)}, {20.36*10,21.33*2}, 0}, {{6|(4<<4)}, {20.36*10,21.33*2}, 4},
{{6|(5<<4)}, {20.36*11,21.33*2}, 1}, {{6|(5<<4)}, {20.36*11,21.33*2}, 1},
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, {{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
@ -129,7 +129,7 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, {{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
{{7|(3<<4)}, {20.36*3, 21.33*3}, 1}, {{7|(3<<4)}, {20.36*3, 21.33*3}, 1},
{{7|(4<<4)}, {20.36*4, 21.33*3}, 1}, {{7|(4<<4)}, {20.36*4, 21.33*3}, 1},
{{7|(5<<4)}, {20.36*5.5,21.33*3}, 0}, {{7|(5<<4)}, {20.36*5.5,21.33*3}, 4},
{{7|(0<<4)}, {20.36*7, 21.33*3}, 1}, {{7|(0<<4)}, {20.36*7, 21.33*3}, 1},
{{7|(1<<4)}, {20.36*8, 21.33*3}, 1}, {{7|(1<<4)}, {20.36*8, 21.33*3}, 1},
{{7|(2<<4)}, {20.36*9, 21.33*3}, 1}, {{7|(2<<4)}, {20.36*9, 21.33*3}, 1},

@ -1,24 +1,36 @@
# project specific files
LAYOUTS += ortho_4x12
# Cortex version # Cortex version
MCU = STM32F303 MCU = STM32F303
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Build Options # Build Options
# comment out to disable the options. # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
# #
BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file CUSTOM_MATRIX = no # Custom matrix file
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
# SERIAL_LINK_ENABLE = yes # SERIAL_LINK_ENABLE = yes
ENCODER_ENABLE = yes ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = IS31FL3737 RGB_MATRIX_ENABLE = IS31FL3737
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -0,0 +1,39 @@
#pragma once
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND) \
}
#endif
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
// Most tactile encoders have detents every 4 stages
#define ENCODER_RESOLUTION 4

@ -0,0 +1,211 @@
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "muse.h"
#include "keymap_swedish.h"
extern keymap_config_t keymap_config;
enum planck_layers {
_COLEMAK,
_LOWER,
_RAISE,
_ADJUST
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
/* These definitions can be removed once keymap_swe is properly vetted against MacOS */
#define NO_DLR_MAC_V ALGR(LALT(KC_4))
#define NO_AT_MAC_V ALGR(LALT(KC_2))
/* Esc when pressed, ctrl when used as a modifier */
#define KC_ECTL MT(MOD_LCTL, KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak_se
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | Ö | Å |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ECTR | A | R | S | T | D | H | N | E | I | O | Ä |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | SCSHE| Z | X | C | V | B | K | M | , | . | - |SCSHE |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | esc | CTRL | Alt | CMD |Lower |Space |Bksp |Raise | CMD | RALT | HYPER| MEH |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_planck_grid
(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, NO_OSLH, NO_AA,
KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, NO_AE,
KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_SFTENT,
KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | | PIPE | ' | @ | & | | DOWN | | RIGHT| ` | ´ | ~ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | ! | " | # | ? | % | LEFT | / | \ | = | + | * |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | [ | { | | UP | } | ] | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | DEL | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid
(
_______, NO_PIPE_MAC, NO_APOS, NO_AT_MAC_V, NO_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, NO_GRV, NO_GRV, NO_TILD,
_______, KC_EXLM, NO_QUO2, KC_HASH, NO_QUES, KC_PERC, KC_LEFT, NO_SLSH, NO_BSLS_MAC, NO_EQL, KC_PPLS, KC_PAST,
_______, KC_NO, KC_NO, NO_LBRC, NO_LCBR_MAC, KC_NO, KC_UP, NO_RCBR_MAC, NO_RBRC, KC_NO, KC_NO, _______,
_______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | $ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | < | ( | | | ) | > |Pg Up |Pg Dn | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_planck_grid
(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
NO_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_DLR_MAC_V,
_______, KC_NO, KC_NO, NO_LESS_MAC, NO_LPRN, KC_NO, KC_NO, NO_RPRN, NO_GRTR_MAC, KC_PGUP, KC_PGDN, KC_NO,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| Debug| | | | | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap| | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TRMon |TRMoff| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_planck_grid
(
_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
uint32_t layer_state_set_user(uint32_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
bool muse_mode = false;
uint8_t last_muse_note = 0;
uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
void encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
muse_offset++;
} else {
muse_offset--;
}
} else {
if (clockwise) {
muse_tempo+=1;
} else {
muse_tempo-=1;
}
}
} else {
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
register_code(KC_MS_WH_DOWN);
unregister_code(KC_MS_WH_DOWN);
#else
register_code(KC_PGDN);
unregister_code(KC_PGDN);
#endif
} else {
#ifdef MOUSEKEY_ENABLE
register_code(KC_MS_WH_UP);
unregister_code(KC_MS_WH_UP);
#else
register_code(KC_PGUP);
unregister_code(KC_PGUP);
#endif
}
}
}
void dip_update(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
break;
case 1:
if (active) {
muse_mode = true;
} else {
muse_mode = false;
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif
}
}
}
void matrix_scan_user(void) {
#ifdef AUDIO_ENABLE
if (muse_mode) {
if (muse_counter == 0) {
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
if (muse_note != last_muse_note) {
stop_note(compute_freq_for_midi_note(last_muse_note));
play_note(compute_freq_for_midi_note(muse_note), 0xF);
last_muse_note = muse_note;
}
}
muse_counter = (muse_counter + 1) % muse_tempo;
}
#endif
}
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case RAISE:
case LOWER:
return false;
default:
return true;
}
}

@ -0,0 +1,11 @@
# Motform Planck Layout
This layout is based off the [colemak-se](github.com/motform/colemak-se)
layout and features many tweaks to make working with Emacs and
evil-mode more ergonomi. As with the colemak layout itself, the idea
is to concentrate as much movement as possible to the home row.
To properly use the layout in Emacs, set Super to LGUI and Meta to RGUI.
Unless you are running a permutation of the MacOS Swedish QWERTY-layout,
modifiers will probably not work. For future develoment, Im planning
to add support for MS Windows SE-QWERTY in the form of a secondary layer.

@ -21,7 +21,8 @@
#define DOUBLESPACE_LAYER_ENABLE #define DOUBLESPACE_LAYER_ENABLE
// #define TOLELOT_ENABLE // #define TOLELOT_ENABLE
#define KEYMAP_CUSTOM( \ #ifdef __AVR__
#define LAYOUT( \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
@ -34,5 +35,24 @@
{k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \ {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \
{k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \
} }
#elif KEYBOARD_planck_rev6
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
tp1, tp2, tp3 \
) \
{ \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ k30, k31, k32, k39, k3a, k3b }, \
{ k06, k07, k08, k09, k0a, k0b }, \
{ k16, k17, k18, k19, k1a, k1b }, \
{ k26, k27, k28, k29, k2a, k2b }, \
{ k36, k37, k38, k33, k34, k35 } \
}
#endif
#endif #endif

@ -8,15 +8,22 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration 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 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 = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
UNICODEMAP_ENABLE = yes # Unicode map UNICODEMAP_ENABLE = yes # Unicode map
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
API_SYSEX_ENABLE = no API_SYSEX_ENABLE = no
ifeq ($(strip $(KEYBOARD)), planck/rev4)
FAUXCLICKY_ENABLE = yes FAUXCLICKY_ENABLE = yes
BACKLIGHT_ENABLE = yes
AUDIO_ENABLE = no
endif
ifeq ($(strip $(KEYBOARD)), planck/rev6)
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
endif
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

@ -231,7 +231,7 @@ void rgb_matrix_indicators_user(void) {
case _RAISE: case _RAISE:
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if ( led.modifier ) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); rgb_matrix_set_color(i, 0x6B, 0x00, 0x80);
} else { } else {
rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); rgb_matrix_set_color(i, 0x00, 0xFF, 0x00);
@ -242,7 +242,7 @@ void rgb_matrix_indicators_user(void) {
case _LOWER: case _LOWER:
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if ( led.modifier ) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00);
} else { } else {
rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); rgb_matrix_set_color(i, 0x00, 0x67, 0xC7);

@ -77,49 +77,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_14, C8_14, C7_14} {1, C9_14, C8_14, C7_14}
}; };
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4} /*{row | col << 4}
| {x=0..224, y=0..64} | {x=0..224, y=0..64}
| | modifier | | flags
| | | */ | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, {{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, {{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, {{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, {{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, {{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
{{0|(6<<4)}, {20.36*6, 21.33*0}, 0}, {{0|(6<<4)}, {20.36*6, 21.33*0}, 4},
{{0|(7<<4)}, {20.36*7, 21.33*0}, 0}, {{0|(7<<4)}, {20.36*7, 21.33*0}, 4},
{{0|(8<<4)}, {20.36*8, 21.33*0}, 0}, {{0|(8<<4)}, {20.36*8, 21.33*0}, 4},
{{0|(9<<4)}, {20.36*9, 21.33*0}, 0}, {{0|(9<<4)}, {20.36*9, 21.33*0}, 4},
{{0|(10<<4)}, {20.36*10,21.33*0}, 0}, {{0|(10<<4)}, {20.36*10,21.33*0}, 4},
{{0|(11<<4)}, {20.36*11,21.33*0}, 1}, {{0|(11<<4)}, {20.36*11,21.33*0}, 1},
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, {{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, {{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, {{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, {{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, {{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, {{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
{{1|(6<<4)}, {20.36*6, 21.33*1}, 0}, {{1|(6<<4)}, {20.36*6, 21.33*1}, 4},
{{1|(7<<4)}, {20.36*7, 21.33*1}, 0}, {{1|(7<<4)}, {20.36*7, 21.33*1}, 4},
{{1|(8<<4)}, {20.36*8, 21.33*1}, 0}, {{1|(8<<4)}, {20.36*8, 21.33*1}, 4},
{{1|(9<<4)}, {20.36*9, 21.33*1}, 0}, {{1|(9<<4)}, {20.36*9, 21.33*1}, 4},
{{1|(10<<4)}, {20.36*10,21.33*1}, 0}, {{1|(10<<4)}, {20.36*10,21.33*1}, 4},
{{1|(11<<4)}, {20.36*11,21.33*1}, 1}, {{1|(11<<4)}, {20.36*11,21.33*1}, 1},
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, {{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, {{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, {{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, {{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, {{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, {{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
{{2|(6<<4)}, {20.36*6, 21.33*2}, 0}, {{2|(6<<4)}, {20.36*6, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(10<<4)}, {20.36*10,21.33*2}, 0}, {{2|(10<<4)}, {20.36*10,21.33*2}, 4},
{{2|(11<<4)}, {20.36*11,21.33*2}, 1}, {{2|(11<<4)}, {20.36*11,21.33*2}, 1},
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, {{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
@ -127,9 +127,9 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, {{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
{{3|(3<<4)}, {20.36*3, 21.33*3}, 1}, {{3|(3<<4)}, {20.36*3, 21.33*3}, 1},
{{3|(4<<4)}, {20.36*4, 21.33*3}, 1}, {{3|(4<<4)}, {20.36*4, 21.33*3}, 1},
{{3|(5<<4)}, {20.36*5, 21.33*3}, 0}, {{3|(5<<4)}, {20.36*5, 21.33*3}, 4},
{{3|(5<<4)}, {20.36*5.5,21.33*3}, 0}, {{3|(5<<4)}, {20.36*5.5,21.33*3}, 4},
{{3|(6<<4)}, {20.36*6, 21.33*3}, 0}, {{3|(6<<4)}, {20.36*6, 21.33*3}, 4},
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, {{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, {{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, {{3|(9<<4)}, {20.36*9, 21.33*3}, 1},

@ -1,5 +1,36 @@
MIDI_ENABLE = yes # MCU name
MCU = at90usb1286
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 = yes # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # 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.
RGB_MATRIX_ENABLE = yes RGB_MATRIX_ENABLE = yes
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
MCU = at90usb1286 LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -6,7 +6,7 @@ Planck
A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/)
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, rev5, rev6; Planck Light
Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
@ -15,6 +15,7 @@ Make example for this keyboard (after setting up your build environment):
Install examples: Install examples:
make planck/rev6:default:dfu-util make planck/rev5:default:dfu # For Planck rev5 or earlier and Planck Light
make planck/rev6:default:dfu-util # For Planck rev6
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. 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 +1,29 @@
AUDIO_ENABLE = no # Audio output on port C6 # MCU name
MCU = atmega32u4
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 controls
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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -1 +1,29 @@
AUDIO_ENABLE = no # Audio output on port C6 # MCU name
MCU = atmega32u4
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 controls
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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -1 +1,35 @@
AUDIO_ENABLE = no # Audio output on port C6 # MCU name
MCU = atmega32u4
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 controls
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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -1 +1,35 @@
# MCU name
MCU = atmega32u4
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -1 +1,35 @@
# MCU name
MCU = atmega32u4
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = qmk-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -5,20 +5,35 @@ LAYOUTS += ortho_4x12
# Cortex version # Cortex version
MCU = STM32F303 MCU = STM32F303
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Build Options # Build Options
# comment out to disable the options. # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
# #
BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file CUSTOM_MATRIX = yes # Custom matrix file
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
# SERIAL_LINK_ENABLE = yes # SERIAL_LINK_ENABLE = yes
ENCODER_ENABLE = yes ENCODER_ENABLE = yes
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no

@ -1,46 +0,0 @@
# MCU name
MCU = atmega32u4
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
ifeq ($(strip $(KEYBOARD)), planck/rev3)
BOOTLOADER = atmel-dfu
endif
ifeq ($(strip $(KEYBOARD)), planck/rev4)
BOOTLOADER = atmel-dfu
endif
ifeq ($(strip $(KEYBOARD)), planck/rev5)
BOOTLOADER = qmk-dfu
endif
ifeq ($(strip $(KEYBOARD)), planck/light)
BOOTLOADER = atmel-dfu
endif
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit planck_grid
LAYOUTS_HAS_RGB = no

@ -0,0 +1,38 @@
#pragma once
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PREONIC_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND) \
}
#endif
#define MUSIC_MASK (keycode != KC_NO)
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC
#define TAP_CODE_DELAY 10
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2

@ -0,0 +1,289 @@
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "muse.h"
enum preonic_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_ADJUST
};
enum preonic_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
BACKLIT
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Caps | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_preonic_grid(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_preonic_grid(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_preonic_grid(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
#ifdef __AVR__
PORTE &= ~(1<<6);
#endif
} else {
unregister_code(KC_RSFT);
#ifdef __AVR__
PORTE |= (1<<6);
#endif
}
return false;
break;
}
return true;
};
bool muse_mode = false;
uint8_t last_muse_note = 0;
uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
void encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
void dip_update(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
break;
case 1:
if (active) {
muse_mode = true;
} else {
muse_mode = false;
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif
}
}
}
void matrix_scan_user(void) {
#ifdef AUDIO_ENABLE
if (muse_mode) {
if (muse_counter == 0) {
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
if (muse_note != last_muse_note) {
stop_note(compute_freq_for_midi_note(last_muse_note));
play_note(compute_freq_for_midi_note(muse_note), 0xF);
last_muse_note = muse_note;
}
}
muse_counter = (muse_counter + 1) % muse_tempo;
}
#endif
}
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case RAISE:
case LOWER:
return false;
default:
return true;
}
}

@ -0,0 +1 @@
# mikethetiger's Preonic layout - largely based on the Planck's

@ -6,11 +6,16 @@ Preonic
A compact 50% (12x5) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/preonic/) A compact 50% (12x5) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/preonic/)
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
Hardware Supported: Preonic PCB rev1, Teensy 2.0 Hardware Supported: Preonic PCB rev1, rev2, rev3
Hardware Availability: [OLKB.com](https://olkb.com/preonic/), [Massdrop](https://www.massdrop.com/buy/preonic-mechanical-keyboard?mode=guest_open) Hardware Availability: [OLKB.com](https://olkb.com/preonic/), [Massdrop](https://www.massdrop.com/buy/preonic-mechanical-keyboard?mode=guest_open)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make preonic:default make preonic/rev2:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Install examples:
make preonic/rev2:default:dfu # For Preonic rev1 or rev2
make preonic/rev3:default:dfu-util # For Preonic rev3
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,67 @@
# MCU name
#MCU = at90usb1287
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)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_5x12

@ -0,0 +1,67 @@
# MCU name
#MCU = at90usb1287
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)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = qmk-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = lite # 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_5x12

@ -1,24 +1,34 @@
# project specific files # project specific files
SRC = matrix.c SRC = matrix.c
LAYOUTS += ortho_5x12
# Cortex version # Cortex version
MCU = STM32F303 MCU = STM32F303
# Build Options # Build Options
# comment out to disable the options. # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
# #
BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # 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.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#SLEEP_LED_ENABLE = yes
CUSTOM_MATRIX = yes # Custom matrix file CUSTOM_MATRIX = yes # Custom matrix file
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
# SERIAL_LINK_ENABLE = yes # SERIAL_LINK_ENABLE = yes
ENCODER_ENABLE = yes ENCODER_ENABLE = yes
LAYOUTS = ortho_5x12

@ -2,74 +2,64 @@
"keyboard_name": "Signum 3.0", "keyboard_name": "Signum 3.0",
"url": "http://troyfletcher.net/", "url": "http://troyfletcher.net/",
"maintainer": "jceb", "maintainer": "jceb",
"width": 17, "width": 15,
"height": 8, "height": 6,
"layouts": { "layouts": {
"LAYOUT_ortho_4x12": { "LAYOUT_ortho_4x12": {
"key_count": 48, "key_count": 48,
"layout": [ "layout": [
{ "x": 1.25, "y": 0.75, "r": 15 }, { "x": 0, "y": 0.5, "r": 15 },
{ "x": 1.25, "y": 1.75, "r": 15 }, { "x": 1, "y": 0.5, "r": 15 },
{ "x": 1.25, "y": 2.75, "r": 15 }, { "x": 2, "y": 0.25, "r": 15 },
{ "x": 1.25, "y": 4.25, "r": 15 }, { "x": 3, "y": 0, "r": 15 },
{ "x": 4, "y": 0.25, "r": 15 },
{ "x": 5, "y": 0.5, "r": 15 },
{ "x": 9, "y": 0.5, "r": -15 },
{ "x": 10, "y": 0.25, "r": -15 },
{ "x": 11, "y": 0, "r": -15 },
{ "x": 12, "y": 0.25, "r": -15 },
{ "x": 13, "y": 0.5, "r": -15 },
{ "x": 14, "y": 0.5, "r": -15 },
{ "x": 2.25, "y": 0.75, "r": 15 }, { "x": 0, "y": 1.5, "r": 15 },
{ "x": 2.25, "y": 1.75, "r": 15 }, { "x": 1, "y": 1.5, "r": 15 },
{ "x": 2.25, "y": 2.75, "r": 15 }, { "x": 2, "y": 1.25, "r": 15 },
{ "x": 2.25, "y": 3.75, "r": 15 }, { "x": 3, "y": 1, "r": 15 },
{ "x": 4, "y": 1.25, "r": 15 },
{ "x": 5, "y": 1.5, "r": 15 },
{ "x": 9, "y": 1.5, "r": -15 },
{ "x": 10, "y": 1.25, "r": -15 },
{ "x": 11, "y": 1, "r": -15 },
{ "x": 12, "y": 1.25, "r": -15 },
{ "x": 13, "y": 1.5, "r": -15 },
{ "x": 14, "y": 1.5, "r": -15 },
{ "x": 3.25, "y": 0.5, "r": 15 }, { "x": 0, "y": 2.5, "r": 15 },
{ "x": 3.25, "y": 1.5, "r": 15 }, { "x": 1, "y": 2.5, "r": 15 },
{ "x": 3.25, "y": 2.5, "r": 15 }, { "x": 2, "y": 2.25, "r": 15 },
{ "x": 3.25, "y": 3.5, "r": 15 }, { "x": 3, "y": 2, "r": 15 },
{ "x": 4, "y": 2.25, "r": 15 },
{ "x": 5, "y": 2.5, "r": 15 },
{ "x": 9, "y": 2.5, "r": -15 },
{ "x": 10, "y": 2.25, "r": -15 },
{ "x": 11, "y": 2, "r": -15 },
{ "x": 12, "y": 2.25, "r": -15 },
{ "x": 13, "y": 2.5, "r": -15 },
{ "x": 14, "y": 2.5, "r": -15 },
{ "x": 4.25, "y": 0.25, "r": 15 }, { "x": 0, "y": 4, "r": 15 },
{ "x": 4.25, "y": 1.25, "r": 15 }, { "x": 1, "y": 3.5, "r": 15 },
{ "x": 4.25, "y": 2.25, "r": 15 }, { "x": 2, "y": 3.25, "r": 15 },
{ "x": 4, "y": 4.25, "r": 15, "h": 1.5 },
{ "x": 5.25, "y": 0.5, "r": 15 }, { "x": 5, "y": 4, "r": 15, "h": 2 },
{ "x": 5.25, "y": 1.5, "r": 15 }, { "x": 6, "y": 4.25, "r": 15, "h": 1.5 },
{ "x": 5.25, "y": 2.5, "r": 15 }, { "x": 8, "y": 4.25, "r": -15, "h": 1.5 },
{ "x": 5.25, "y": 4.5, "r": 15, "h": 1.5 }, { "x": 9, "y": 4, "r": -15, "h": 2 },
{ "x": 10, "y": 4.25, "r": -15, "h": 1.5 },
{ "x": 6.25, "y": 0.75, "r": 15 }, { "x": 12, "y": 3.25, "r": -15 },
{ "x": 6.25, "y": 1.75, "r": 15 }, { "x": 13, "y": 3.5, "r": -15 },
{ "x": 6.25, "y": 2.75, "r": 15 }, { "x": 14, "y": 4, "r": -15 }
{ "x": 6.25, "y": 4.25, "r": 15, "h": 2 },
{ "x": 7.25, "y": 4.5, "r": 15, "h": 1.5 },
{ "x": 8.25, "y": 4.5, "r": -15, "h": 1.5 },
{ "x": 9.25, "y": 0.75, "r": -15 },
{ "x": 9.25, "y": 1.75, "r": -15 },
{ "x": 9.25, "y": 2.75, "r": -15 },
{ "x": 9.25, "y": 4.25, "r": -15, "h": 2 },
{ "x": 10.25, "y": 0.5, "r": -15 },
{ "x": 10.25, "y": 1.5, "r": -15 },
{ "x": 10.25, "y": 2.5, "r": -15 },
{ "x": 10.25, "y": 4.5, "r": -15, "h": 1.5 },
{ "x": 11.25, "y": 0.25, "r": -15 },
{ "x": 11.25, "y": 1.25, "r": -15 },
{ "x": 11.25, "y": 2.25, "r": -15 },
{ "x": 12.25, "y": 0.5, "r": -15 },
{ "x": 12.25, "y": 1.5, "r": -15 },
{ "x": 12.25, "y": 2.5, "r": -15 },
{ "x": 12.25, "y": 3.5, "r": -15 },
{ "x": 13.25, "y": 0.75, "r": -15 },
{ "x": 13.25, "y": 1.75, "r": -15 },
{ "x": 13.25, "y": 2.75, "r": -15 },
{ "x": 13.25, "y": 3.75, "r": -15 },
{ "x": 14.25, "y": 0.75, "r": -15 },
{ "x": 14.25, "y": 1.75, "r": -15 },
{ "x": 14.25, "y": 2.75, "r": -15 },
{ "x": 14.25, "y": 4.25, "r": -15 }
] ]
} }

@ -1,17 +1,15 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from sortedcontainers import SortedDict import json
import layout import layout
import os
import re import re
# TODO: auto-generate mutex layers
# TODO: auto-generate update_tri_layer (_state)
def gen_uc_iter(): def gen_uc_iter():
length = len(layout.uc_dict) length = len(layout.uc_dict)
for key, value in layout.uc_dict.items(): for key, value in sorted(layout.uc_dict.items()):
length -= 1 length -= 1
if length: if length:
yield (key, value, False) yield (key, value, False)
@ -19,7 +17,7 @@ def gen_uc_iter():
yield (key, value, True) yield (key, value, True)
def translate(s): def _translate(s):
if re.match("^[0-9]$", s): if re.match("^[0-9]$", s):
return ("KC_{0}".format(s), " {0} ".format(s)) return ("KC_{0}".format(s), " {0} ".format(s))
elif re.match("^[a-z]$", s): elif re.match("^[a-z]$", s):
@ -51,80 +49,115 @@ def translate(s):
def toKC(s): def toKC(s):
(kc, lgd) = translate(s) return _translate(s)[0]
return kc
def toLgd(s): def toLgd(s):
(kc, lgd) = translate(s) return _translate(s)[1]
return lgd
if __name__ == "__main__":
template = open("km_template.txt", mode="r")
output = open("keymap.c", mode="w", encoding='utf-8')
def writeKeymap(f_template, f_keymap, columns, rows):
doCopy = False doCopy = False
for line in template: for line in f_template:
doCopy = True doCopy = True
if line.startswith("//<enum/>"): if line.startswith("//<enum/>"):
doCopy = False doCopy = False
# output.write(str(layout.uc_dict)) # f_keymap.write(str(layout.uc_dict))
for k, v, isLast in gen_uc_iter(): for k, v, isLast in gen_uc_iter():
if isLast: if isLast:
output.write(k + "\n") f_keymap.write(k + "\n")
else: else:
output.write(k + ",\n") f_keymap.write(k + ",\n")
if line.startswith("//<uc_map/>"): elif line.startswith("//<uc_map/>"):
doCopy = False doCopy = False
for k, v, isLast in gen_uc_iter(): for k, v, isLast in gen_uc_iter():
if isLast: if isLast:
output.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0)))) f_keymap.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0))))
else: else:
output.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0)))) f_keymap.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0))))
if line.startswith("//<keymaps/>"): elif line.startswith("//<keymaps/>"):
doCopy = False doCopy = False
counter = len(layout.layers) for layer, L in enumerate(layout.layers):
layer = 0 r_counter = rows
S = layout.static f_keymap.write("/* Layer %d\n" % layer)
for L in layout.layers: f_keymap.write(" * ------------------------------------------------- -------------------------------------------------\n")
counter -= 1 f_keymap.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(*map(toLgd, L[:12])))
r_counter = 4 f_keymap.write(" * ------------------------------------------------- -------------------------------------------------\n")
output.write("/* Layer %d\n" % layer) f_keymap.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(*map(toLgd, L[12:24])))
output.write(" * ------------------------------------------------- -------------------------------------------------\n") f_keymap.write(" * ------------------------------------------------- -------------------------------------------------\n")
output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[0][0]), toLgd(L[0][1]), toLgd(L[0][2]), toLgd(L[0][3]), toLgd(L[0][4]), toLgd(L[0][5]), toLgd(L[0][6]), toLgd(L[0][7]), toLgd(L[0][8]), toLgd(L[0][9]), toLgd(L[0][10]), toLgd(L[0][11]))) f_keymap.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(*map(toLgd, L[24:36])))
output.write(" * ------------------------------------------------- -------------------------------------------------\n") f_keymap.write(" * -----------------------------------------------------------------------------------------------------------------\n")
output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[1][0]), toLgd(L[1][1]), toLgd(L[1][2]), toLgd(L[1][3]), toLgd(L[1][4]), toLgd(L[1][5]), toLgd(L[1][6]), toLgd(L[1][7]), toLgd(L[1][8]), toLgd(L[1][9]), toLgd(L[1][10]), toLgd(L[1][11]))) f_keymap.write(" * {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(*map(toLgd, L[36:48])).rstrip()+"\n")
output.write(" * ------------------------------------------------- -------------------------------------------------\n") f_keymap.write(" * -------------------------------------------------\n")
output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[2][0]), toLgd(L[2][1]), toLgd(L[2][2]), toLgd(L[2][3]), toLgd(L[2][4]), toLgd(L[2][5]), toLgd(L[2][6]), toLgd(L[2][7]), toLgd(L[2][8]), toLgd(L[2][9]), toLgd(L[2][10]), toLgd(L[2][11]))) f_keymap.write(" */\n")
output.write(" * -----------------------------------------------------------------------------------------------------------------\n")
output.write(" * {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(toLgd(L[3][0]), toLgd(L[3][1]), toLgd(L[3][2]), toLgd(L[3][3]), toLgd(L[3][4]), toLgd(L[3][5]), toLgd(L[3][6]), toLgd(L[3][7]), toLgd(L[3][8]), toLgd(L[3][9]), toLgd(L[3][10]), toLgd(L[3][11])).rstrip()+"\n")
output.write(" * -------------------------------------------------\n")
output.write(" */\n")
l_code = '\tLAYOUT_ortho_4x12(\n' l_code = '\tLAYOUT_ortho_4x12(\n'
for r in range(r_counter): for r in range(r_counter):
r_counter -= 1 r_counter -= 1
c_counter = 12 c_counter = columns
l_code += '\t\t' l_code += '\t\t'
for c in range(c_counter): for c in range(c_counter):
c_counter -= 1 c_counter -= 1
if c != 0: if c != 0:
l_code += " " l_code += " "
l_code += "%s" % toKC(L[r][c]) l_code += "%s" % toKC(L[r*columns + columns-c_counter-1])
if r_counter or c_counter: if r_counter or c_counter:
l_code += "," l_code += ","
l_code += '\n' l_code += '\n'
if counter: if layer + 1 != len(layout.layers):
l_code += "\t),\n\n" l_code += "\t),\n\n"
else: else:
l_code += "\t)\n" l_code += "\t)\n"
output.write(l_code) f_keymap.write(l_code)
layer += 1
if doCopy: if doCopy:
output.write(line) f_keymap.write(line)
def getKeymapJSON(keyboard, keymap, layout, layers):
return json.dumps({
'keyboard': keyboard,
'keymap': keymap,
'layout': layout,
'layers': layers
}, sort_keys=True, indent=4)
template.close() def layersToKC(layers):
output.close() return [list(map(toKC, layer)) for layer in layers]
def pathToKeymap(path):
head, keymap = os.path.split(path)
_, keymapsdir = os.path.split(head)
if keymapsdir == 'keymaps':
return keymap
def pathToKeyboard(path):
head, keymap = os.path.split(path)
head, keymapsdir = os.path.split(head)
if keymapsdir == 'keymaps':
head, dir = os.path.split(head)
while dir not in ('/', 'keyboards'):
yield dir
head, dir = os.path.split(head)
if __name__ == "__main__":
with open("km_template.txt", mode="r") as f_template:
with open("keymap.c", mode="w", encoding='utf-8') as f_keymap:
writeKeymap(f_template, f_keymap, columns=12, rows=4)
abspath = os.path.dirname(os.path.abspath(__file__))
keyboard = list(reversed(list(pathToKeyboard(abspath))))
keymap = pathToKeymap(abspath)
keyboard_layout = 'LAYOUT_ortho_4x12'
with open("%s_%s.json" % ('_'.join(keyboard), keymap), mode="w") as f_keymapjson:
f_keymapjson.write(
getKeymapJSON(
'/'.join(keyboard),
keymap,
keyboard_layout,
layersToKC(layout.layers))
)

@ -672,8 +672,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
LAYOUT_ortho_4x12( LAYOUT_ortho_4x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC,
KC_TRNS, DF(0), DF(1), XXXXXXX, XXXXXXX, MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, KC_TRNS, DF(0), DF(1), KC_NO, KC_NO, MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL,
KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(5), KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, MO(5), KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_0, KC_TRNS, KC_TRNS, KC_TRNS TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_0, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -689,9 +689,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ------------------------------------------------- * -------------------------------------------------
*/ */
LAYOUT_ortho_4x12( LAYOUT_ortho_4x12(
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO,
KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(3), KC_F4, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, MO(3), KC_F4, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO,
KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F1, KC_F2, KC_F3, KC_NO, KC_TRNS,
TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -709,7 +709,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_4x12( LAYOUT_ortho_4x12(
KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), CTL_T(KC_PGDN), CTL_T(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, LSFT(KC_INS), KC_ESC, KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), CTL_T(KC_PGDN), CTL_T(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, LSFT(KC_INS), KC_ESC,
KC_TRNS, KC_CAPS, LGUI_T(KC_LEFT), LGUI_T(KC_TAB), LGUI_T(KC_RIGHT), LGUI_T(KC_RIGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, KC_PSCR, KC_TRNS, KC_CAPS, LGUI_T(KC_LEFT), LGUI_T(KC_TAB), LGUI_T(KC_RIGHT), LGUI_T(KC_RIGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, KC_PSCR,
KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, CTL_T(KC_PGUP), CTL_T(KC_PGUP), KC_PGUP, XXXXXXX, KC_DOWN, XXXXXXX, KC_APP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, CTL_T(KC_PGUP), CTL_T(KC_PGUP), KC_PGUP, KC_NO, KC_DOWN, KC_NO, KC_APP, KC_TRNS,
TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -725,9 +725,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ------------------------------------------------- * -------------------------------------------------
*/ */
LAYOUT_ortho_4x12( LAYOUT_ortho_4x12(
KC_TRNS, XXXXXXX, KC_MPLY, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_PWR, KC_TRNS, KC_NO, KC_MPLY, KC_VOLU, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_PWR,
KC_TRNS, XXXXXXX, KC_MPRV, KC_MUTE, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, KC_TRNS, KC_NO, KC_MPRV, KC_MUTE, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP,
KC_TRNS, XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLD, MO(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_NO, KC_NO, KC_VOLD, KC_VOLD, MO(5), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
TG(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS TG(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -743,9 +743,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ------------------------------------------------- * -------------------------------------------------
*/ */
LAYOUT_ortho_4x12( LAYOUT_ortho_4x12(
KC_TRNS, KC_ACL1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_TRNS, KC_ACL1, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, KC_NO, KC_NO,
KC_TRNS, KC_ACL2, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_TRNS, KC_ACL2, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
KC_TRNS, KC_ACL0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, KC_ACL0, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_MS_D, KC_NO, KC_NO, KC_TRNS,
TG(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS TG(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
) )
}; };

@ -1,11 +1,11 @@
from sortedcontainers import SortedDict # -*- coding: utf-8 -*-
# Add all used Unicode symbols to this list. # Add all used Unicode symbols to this list.
# The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name. # The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name.
# The key is also used in this file to define the layout, so use recognizeable names. # The key is also used in this file to define the layout, so use recognizeable names.
# The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments. # The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments.
# When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point. # When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point.
uc_dict = SortedDict({ uc_dict = {
"SNEK": "0x1f40d", ## Error "SNEK": "0x1f40d", ## Error
## qwertz ## qwertz
"ACUTE": "0x00b4", "ACUTE": "0x00b4",
@ -329,7 +329,7 @@ uc_dict = SortedDict({
"NOT_PARA": "0x2226", "NOT_PARA": "0x2226",
"TIMES_OP": "0x2297", "TIMES_OP": "0x2297",
"NOT_DIV": "0x2224" "NOT_DIV": "0x2224"
}) }
# Add all used Keycodes to this list. # Add all used Keycodes to this list.
# The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend. # The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend.
@ -338,7 +338,7 @@ qmk_dict = {
# If you find "BAD" in your keymaps, then something went wrong.) # If you find "BAD" in your keymaps, then something went wrong.)
"a": "BAD", "A": "BAD", "0": "BAD", "a": "BAD", "A": "BAD", "0": "BAD",
# Basic Keycodes # Basic Keycodes
"XXX": "XXXXXXX", "": "KC_TRNS", "XXX": "KC_NO", "": "KC_TRNS",
"!": "S(KC_1)", "@": "S(KC_2)", "#": "S(KC_3)", "$": "S(KC_4)", "%": "S(KC_5)", "!": "S(KC_1)", "@": "S(KC_2)", "#": "S(KC_3)", "$": "S(KC_4)", "%": "S(KC_5)",
"^": "S(KC_6)", "&": "S(KC_7)", "*": "S(KC_8)", "(": "S(KC_9)", ")": "S(KC_0)", "^": "S(KC_6)", "&": "S(KC_7)", "*": "S(KC_8)", "(": "S(KC_9)", ")": "S(KC_0)",
"Enter": "KC_ENT", "Esc": "KC_ESC", "BSpace": "KC_BSPC", "Tab": "KC_TAB", "Enter": "KC_ENT", "Esc": "KC_ESC", "BSpace": "KC_BSPC", "Tab": "KC_TAB",
@ -428,58 +428,58 @@ static = ["NEO", "GREEK", "GREEK", "GREEK", "GREEK", "MOUSE"]
# 0 # 0
qwerty = [ qwerty = [
["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "["], "Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[",
["LCtrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'"], "LCtrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'",
["LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)"], "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)",
["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"], "MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl",
] ]
# 1 # 1
colemak = [ colemak = [
["Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "["], "Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "[",
["LCtrl", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'"], "LCtrl", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'",
["LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)"], "LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)",
["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"], "MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl",
] ]
# 2 # 2
numpad = [ numpad = [
["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]"], "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]",
["", "DF0", "DF1", "XXX", "XXX", "MO3", "4", "4", "5", "6", "-", "="], "", "DF0", "DF1", "XXX", "XXX", "MO3", "4", "4", "5", "6", "-", "=",
["", "XXX", "XXX", "XXX", "XXX", "MO5", "1", "1", "2", "3", "\\", ""], "", "XXX", "XXX", "XXX", "XXX", "MO5", "1", "1", "2", "3", "\\", "",
["TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", ""], "TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", "",
] ]
# 3 # 3
fpad = [ fpad = [
["", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX"], "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX",
["", "XXX", "XXX", "XXX", "XXX", "MO3", "F4", "F4", "F5", "F6", "XXX", "XXX"], "", "XXX", "XXX", "XXX", "XXX", "MO3", "F4", "F4", "F5", "F6", "XXX", "XXX",
["", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "XXX", ""], "", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "XXX", "",
["TG3", "", "", "", "", "", "F10", "F11", "F12", "", "", ""], "TG3", "", "", "", "", "", "F10", "F11", "F12", "", "", "",
] ]
# 4 # 4
movement = [ movement = [
["Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc"], "Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc",
["", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr"], "", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr",
["", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "XXX", "v Arrow", "XXX", "App", ""], "", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "XXX", "v Arrow", "XXX", "App", "",
["TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", ""], "TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", "",
] ]
# 5 # 5
media = [ media = [
["", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power"], "", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power",
["", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep"], "", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep",
["", "XXX", "XXX", "Vol -", "Vol -", "MO5", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX"], "", "XXX", "XXX", "Vol -", "Vol -", "MO5", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX",
["TG5", "", "", "", "", "", "", "", "", "", "", ""], "TG5", "", "", "", "", "", "", "", "", "", "", "",
] ]
# 6 # 6
mouse = [ mouse = [
["", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX"], "", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX",
["", "acc2", "Mouse 3", "Mouse 2", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX"], "", "acc2", "Mouse 3", "Mouse 2", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX",
["", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", ""], "", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", "",
["TG6", "", "", "", "", "", "", "", "", "", "", ""], "TG6", "", "", "", "", "", "", "", "", "", "", "",
] ]
layers = [ layers = [

@ -11,10 +11,6 @@ starting point to create your own layouts for the Signum 3.0 with
# Customization # Customization
- Install `python3` and [Sorted Containers
Library](http://www.grantjenks.com/docs/sortedcontainers/), `pip
install sortedcontainers`.
- Customize `layout.py` to your liking. - Customize `layout.py` to your liking.
- Attention 1: keycodes are either translated into symbols and - Attention 1: keycodes are either translated into symbols and
function calls via the `translate()` function in `generate_km.py` function calls via the `translate()` function in `generate_km.py`
@ -24,4 +20,5 @@ starting point to create your own layouts for the Signum 3.0 with
- Attention 2: additional C functions need to be put into - Attention 2: additional C functions need to be put into
`km_template.txt` `km_template.txt`
Run `./generate_km.py` to regenerate `keymap.c`. Run `./generate_km.py` to regenerate `keymap.c` and the JSON keymap
definition that should be copied to `qmk_configurator/public/keymaps`.

@ -92,15 +92,29 @@ 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
static const char PROGMEM mode_logo[2][4] = { static const char PROGMEM mode_logo[2][3] = {
{0x97,0x98,0x0a,0}, {0x97,0x98,0},
{0xb7,0xb8,0x0a,0} }; {0xb7,0xb8,0} };
oled_write_P(mode_logo[0], false); oled_write_P(mode_logo[0], false);
#if defined(RGB_MATRIX_ENABLE)
static char buffer[20] = {0};
snprintf(buffer, sizeof(buffer), " h%3d s%3d v%3d\n", rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val);
oled_write(buffer, false);
#endif
oled_write_P(mode_logo[1], false); oled_write_P(mode_logo[1], false);
#if defined(RGB_MATRIX_ENABLE)
snprintf(buffer, sizeof(buffer), " s%3d m%3d\n", rgb_matrix_config.speed, rgb_matrix_config.mode);
oled_write(buffer, false);
#endif
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) { switch (biton32(layer_state)) {

@ -1,35 +1,35 @@
#include "sol.h" #include "sol.h"
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// Left Hand Mapped Left to Right // Left Hand Mapped Left to Right
{ { 0 | (0 << 4) }, { 0, 0 }, 1}, { { 0 | (0 << 4) }, { 0, 0 }, 1},
{ { 0 | (1 << 4) }, { 22, 0 }, 0}, { { 0 | (1 << 4) }, { 22, 0 }, 4},
{ { 0 | (2 << 4) }, { 37, 0 }, 0}, { { 0 | (2 << 4) }, { 37, 0 }, 4},
{ { 0 | (3 << 4) }, { 37, 0 }, 0}, { { 0 | (3 << 4) }, { 37, 0 }, 4},
{ { 0 | (4 << 4) }, { 67, 0 }, 0}, { { 0 | (4 << 4) }, { 67, 0 }, 4},
{ { 0 | (5 << 4) }, { 82, 0 }, 0}, { { 0 | (5 << 4) }, { 82, 0 }, 4},
{ { 0 | (6 << 4) }, { 104, 0 }, 1}, { { 0 | (6 << 4) }, { 104, 0 }, 1},
{ { 1 | (0 << 4) }, { 0, 16 }, 1}, { { 1 | (0 << 4) }, { 0, 16 }, 1},
{ { 1 | (1 << 4) }, { 22, 16 }, 0}, { { 1 | (1 << 4) }, { 22, 16 }, 4},
{ { 1 | (2 << 4) }, { 37, 16 }, 0}, { { 1 | (2 << 4) }, { 37, 16 }, 4},
{ { 1 | (3 << 4) }, { 37, 16 }, 0}, { { 1 | (3 << 4) }, { 37, 16 }, 4},
{ { 1 | (4 << 4) }, { 67, 16 }, 0}, { { 1 | (4 << 4) }, { 67, 16 }, 4},
{ { 1 | (5 << 4) }, { 82, 16 }, 0}, { { 1 | (5 << 4) }, { 82, 16 }, 4},
{ { 1 | (6 << 4) }, { 104, 16 }, 1}, { { 1 | (6 << 4) }, { 104, 16 }, 1},
{ { 2 | (0 << 4) }, { 0, 32 }, 1}, { { 2 | (0 << 4) }, { 0, 32 }, 1},
{ { 2 | (1 << 4) }, { 22, 32 }, 0}, { { 2 | (1 << 4) }, { 22, 32 }, 4},
{ { 2 | (2 << 4) }, { 37, 32 }, 0}, { { 2 | (2 << 4) }, { 37, 32 }, 4},
{ { 2 | (3 << 4) }, { 37, 32 }, 0}, { { 2 | (3 << 4) }, { 37, 32 }, 4},
{ { 2 | (4 << 4) }, { 67, 32 }, 0}, { { 2 | (4 << 4) }, { 67, 32 }, 4},
{ { 2 | (5 << 4) }, { 82, 32 }, 0}, { { 2 | (5 << 4) }, { 82, 32 }, 4},
{ { 2 | (6 << 4) }, { 104, 32 }, 1}, { { 2 | (6 << 4) }, { 104, 32 }, 1},
{ { 3 | (0 << 4) }, { 0, 48 }, 1}, { { 3 | (0 << 4) }, { 0, 48 }, 1},
{ { 3 | (1 << 4) }, { 22, 48 }, 0}, { { 3 | (1 << 4) }, { 22, 48 }, 4},
{ { 3 | (2 << 4) }, { 37, 48 }, 0}, { { 3 | (2 << 4) }, { 37, 48 }, 4},
{ { 3 | (3 << 4) }, { 37, 48 }, 0}, { { 3 | (3 << 4) }, { 37, 48 }, 4},
{ { 3 | (4 << 4) }, { 67, 48 }, 0}, { { 3 | (4 << 4) }, { 67, 48 }, 4},
{ { 3 | (5 << 4) }, { 82, 48 }, 0}, { { 3 | (5 << 4) }, { 82, 48 }, 4},
{ { 3 | (6 << 4) }, { 104, 48 }, 1}, { { 3 | (6 << 4) }, { 104, 48 }, 1},
{ { 4 | (0 << 4) }, { 0, 64 }, 1}, { { 4 | (0 << 4) }, { 0, 64 }, 1},
{ { 4 | (1 << 4) }, { 22, 64 }, 1}, { { 4 | (1 << 4) }, { 22, 64 }, 1},
@ -42,32 +42,32 @@
{ { 5 | (6 << 4) }, { 97, 55 }, 1}, { { 5 | (6 << 4) }, { 97, 55 }, 1},
// Left Hand Mapped Right to Left // Left Hand Mapped Right to Left
{ { 6 | (0 << 4) }, { 224, 0 }, 1}, { { 6 | (0 << 4) }, { 224, 0 }, 1},
{ { 6 | (1 << 4) }, { 202, 0 }, 0}, { { 6 | (1 << 4) }, { 202, 0 }, 4},
{ { 6 | (2 << 4) }, { 187, 0 }, 0}, { { 6 | (2 << 4) }, { 187, 0 }, 4},
{ { 6 | (3 << 4) }, { 172, 0 }, 0}, { { 6 | (3 << 4) }, { 172, 0 }, 4},
{ { 6 | (4 << 4) }, { 157, 0 }, 0}, { { 6 | (4 << 4) }, { 157, 0 }, 4},
{ { 6 | (5 << 4) }, { 142, 0 }, 0}, { { 6 | (5 << 4) }, { 142, 0 }, 4},
{ { 6 | (6 << 4) }, { 120, 0 }, 1}, { { 6 | (6 << 4) }, { 120, 0 }, 1},
{ { 7 | (0 << 4) }, { 224, 16 }, 1}, { { 7 | (0 << 4) }, { 224, 16 }, 1},
{ { 7 | (1 << 4) }, { 202, 16 }, 0}, { { 7 | (1 << 4) }, { 202, 16 }, 4},
{ { 7 | (2 << 4) }, { 187, 16 }, 0}, { { 7 | (2 << 4) }, { 187, 16 }, 4},
{ { 7 | (3 << 4) }, { 172, 16 }, 0}, { { 7 | (3 << 4) }, { 172, 16 }, 4},
{ { 7 | (4 << 4) }, { 157, 16 }, 0}, { { 7 | (4 << 4) }, { 157, 16 }, 4},
{ { 7 | (5 << 4) }, { 142, 16 }, 0}, { { 7 | (5 << 4) }, { 142, 16 }, 4},
{ { 7 | (6 << 4) }, { 120, 16 }, 1}, { { 7 | (6 << 4) }, { 120, 16 }, 1},
{ { 8 | (0 << 4) }, { 224, 32 }, 1}, { { 8 | (0 << 4) }, { 224, 32 }, 1},
{ { 8 | (1 << 4) }, { 202, 32 }, 0}, { { 8 | (1 << 4) }, { 202, 32 }, 4},
{ { 8 | (2 << 4) }, { 187, 32 }, 0}, { { 8 | (2 << 4) }, { 187, 32 }, 4},
{ { 8 | (3 << 4) }, { 172, 32 }, 0}, { { 8 | (3 << 4) }, { 172, 32 }, 4},
{ { 8 | (4 << 4) }, { 157, 32 }, 0}, { { 8 | (4 << 4) }, { 157, 32 }, 4},
{ { 8 | (5 << 4) }, { 142, 32 }, 0}, { { 8 | (5 << 4) }, { 142, 32 }, 4},
{ { 8 | (6 << 4) }, { 120, 32 }, 1}, { { 8 | (6 << 4) }, { 120, 32 }, 1},
{ { 9 | (0 << 4) }, { 224, 48 }, 1}, { { 9 | (0 << 4) }, { 224, 48 }, 1},
{ { 9 | (1 << 4) }, { 202, 48 }, 0}, { { 9 | (1 << 4) }, { 202, 48 }, 4},
{ { 9 | (2 << 4) }, { 187, 48 }, 0}, { { 9 | (2 << 4) }, { 187, 48 }, 4},
{ { 9 | (3 << 4) }, { 172, 48 }, 0}, { { 9 | (3 << 4) }, { 172, 48 }, 4},
{ { 9 | (4 << 4) }, { 157, 48 }, 0}, { { 9 | (4 << 4) }, { 157, 48 }, 4},
{ { 9 | (5 << 4) }, { 142, 48 }, 0}, { { 9 | (5 << 4) }, { 142, 48 }, 4},
{ { 9 | (6 << 4) }, { 120, 48 }, 1}, { { 9 | (6 << 4) }, { 120, 48 }, 1},
{ { 10 | (0 << 4) }, { 224, 64 }, 1}, { { 10 | (0 << 4) }, { 224, 64 }, 1},
{ { 10 | (1 << 4) }, { 202, 64 }, 1}, { { 10 | (1 << 4) }, { 202, 64 }, 1},

@ -1 +1,20 @@
#include "sol.h" #include "sol.h"
#if defined(RGB_MATRIX_ENABLE)
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
if (row == 4 && column == 5) {
led_i[0] = 33;
return 1;
} else if (row == 4 && column == 6) {
led_i[0] = 34;
return 1;
} else if (row == 10 && column == 5) {
led_i[0] = 68;
return 1;
} else if (row == 10 && column == 6) {
led_i[0] = 69;
return 1;
}
return 0;
}
#endif

@ -1,6 +1,6 @@
# WILBA.TECH WT60-A # WILBA.TECH WT60-A
![WILBA.TECH WT60-A](https://wilba.tech) ![WILBA.TECH WT60-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.160_PCB_1_of_1_2d7414ed-7cc5-46a5-b245-6fb7a197232d_720x.jpg?v=1546475122)
WT60-A is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) WT60-A is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/)

@ -1,8 +1,8 @@
# WILBA.TECH WT65-A # WILBA.TECH WT65-A
![WILBA.TECH WT65-A](https://wilba.tech) ![WILBA.TECH WT65-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.165_PCB_1_of_1_a85e9af1-174f-497a-aadb-bb53ce74ef8c_720x.jpg?v=1546475185)
WT65-A is a keyboard PCB supporting 65% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) WT65-A is a keyboard PCB supporting 65% layout with 0.5U blocker. [More info at wilba.tech](https://wilba.tech/)
Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
Hardware Supported: WILBA.TECH WT65-A Hardware Supported: WILBA.TECH WT65-A

@ -0,0 +1,203 @@
/* Copyright 2018 Jason Williams (Wilba)
*
* 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 0x6582 // wilba.tech
#define PRODUCT_ID 0x069A // 69-A
#define DEVICE_VER 0x0001
#define MANUFACTURER wilba.tech
#define PRODUCT wilba.tech WT69-A
#define DESCRIPTION wilba.tech WT69-A
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 17
/*
* 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 { F0, E6, F4, F6, F7 }
#define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
/* 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
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H
//#define MAGIC_KEY_HELP2 SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
// Does not use WT_MONO_BACKLIGHT
//#define WT_MONO_BACKLIGHT
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 32
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 34
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
// Dynamic macro starts after dynamic keymaps (35+(4*5*17*2)) = (35+680)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 715
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 309
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

@ -0,0 +1,13 @@
{
"keyboard_name": "wilba.tech WT69-A",
"url": "https://wilba.tech",
"maintainer": "Wilba",
"bootloader": "atmel-dfu",
"width": 18.25,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"BkSp", "x":15.25, "y":0}, {"label":"BkSp", "x":16.25, "y":0}, {"label":"Home", "x":17.25, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"PgUp", "x":17.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"PgDn", "x":17.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"End", "x":17.25, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Control", "x":2.25, "y":4, "w":1.5}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4, "w":7}, {"label":"Fn", "x":13.25, "y":4, "w":1.5}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}]
}
}
}

@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
KC_F1, KC_F2, 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_BSPC, KC_HOME,
KC_F3, KC_F4, 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_F5, KC_F6, 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_PGDN,
KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
// Fn1 Layer
[1] = LAYOUT_all(
KC_TRNS, KC_TRNS, 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn2 Layer
[2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn3 Layer
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
KC_F1, KC_F2, 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_BSPC, KC_HOME,
KC_F3, KC_F4, 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_F5, KC_F6, 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_PGDN,
KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
// Fn1 Layer
[1] = LAYOUT_all(
KC_TRNS, KC_TRNS, 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn2 Layer
[2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn3 Layer
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

@ -0,0 +1,68 @@
# project specific files
SRC = keyboards/wilba_tech/wt_main.c
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

@ -0,0 +1,15 @@
# WILBA.TECH WT69-A
![WILBA.TECH WT69-A](https://images.squarespace-cdn.com/content/5b267e429772ae4372e3b65f/1556352502542-AKHBF9R6CP5HVHOZYJHM/i69_g.png?content-type=image%2Fpng)
WT69-A is a keyboard PCB supporting 65% layout with 0.5U blocker and left side function keys. [More info at wilba.tech](https://wilba.tech/)
Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
Hardware Supported: WILBA.TECH WT69-A
Hardware Availability: Custom keyboard group buys
Make example for this keyboard (after setting up your build environment):
make wilba_tech/wt69_a: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,65 @@
# project specific files
SRC = keyboards/wilba_tech/wt_main.c
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches

@ -0,0 +1,17 @@
/* Copyright 2018 Jason Williams (Wilba)
*
* 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/>.
*/
// Nothing to see here, move along... ;-)

@ -0,0 +1,36 @@
/* Copyright 2018 Jason Williams (Wilba)
*
* 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"
#define ____ KC_NO
#define LAYOUT_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K215, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \
K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \
K400, K401, K402, K403, K404, K408, K413, K414, K415, K416 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \
{ K300, K301, K302, ____, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \
{ K400, K401, K402, K403, K404, ____, ____, ____, K408, ____, ____, ____, ____, K413, K414, K415, K416 } \
}

@ -405,10 +405,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -179,10 +179,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led; rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i]; led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) { if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
if (led.modifier) { rgb_matrix_set_color( i, red, green, blue );
rgb_matrix_set_color( i, red, green, blue );
}
} }
} }
} }

@ -28,14 +28,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | * | lctrl | lalt | ralt | lgui | lower | space | space | raise | left | down | up | right |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/ */
[_QWERTY] = LAYOUT_ortho_4x12 ( [_QWERTY] = LAYOUT_ortho_4x12 (
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT KC_LCTL, KC_LALT, KC_RALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
), ),
/* Lower /* Lower
@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | - | = | [ | ] | \ | | | | | | | * | | - | = | [ | ] | \ | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | vol- | mute | vol+ | | | | | | | | | * | | _ | + | { | } | | | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | | | | | | | | | | | | * | | | | | | | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_ortho_4x12 ( [_LOWER] = LAYOUT_ortho_4x12 (
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, 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_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______,
_______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),
@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | | * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_RAISE] = LAYOUT_ortho_4x12 ( [_RAISE] = LAYOUT_ortho_4x12 (
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
), ),
@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_ortho_4x12 ( [_ADJUST] = LAYOUT_ortho_4x12 (
_______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),
}; };

@ -1,6 +1,6 @@
# Jotix ortho 4x12 keymap # Jotix ortho 4x12 keymap
![keymap](https://i.imgur.com/1NxoqW6.png) ![keymap](https://i.imgur.com/aQQo4eb.jpg)
Tested on: Tested on:

@ -167,8 +167,8 @@ Lib8tion is pronounced like 'libation': lie-BAY-shun
#include <stdint.h> #include <stdint.h>
#define LIB8STATIC __attribute__ ((unused)) static inline #define LIB8STATIC static inline
#define LIB8STATIC_ALWAYS_INLINE __attribute__ ((always_inline)) static inline #define LIB8STATIC_ALWAYS_INLINE static inline
#if !defined(__AVR__) #if !defined(__AVR__)
#include <string.h> #include <string.h>

@ -147,7 +147,7 @@ LIB8STATIC int16_t cos16( uint16_t theta)
#endif #endif
const uint8_t b_m16_interleave[] = { 0, 49, 49, 41, 90, 27, 117, 10 }; static const uint8_t b_m16_interleave[8] = { 0, 49, 49, 41, 90, 27, 117, 10 };
/// Fast 8-bit approximation of sin(x). This approximation never varies more than /// Fast 8-bit approximation of sin(x). This approximation never varies more than
/// 2% from the floating point value you'd get by doing /// 2% from the floating point value you'd get by doing

@ -25,7 +25,7 @@ const bool ascii_to_shift_lut[0x80] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0,
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1,
@ -45,7 +45,7 @@ const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, KC_ESC, 0, 0, 0, 0, 0, 0, 0, KC_ESC, 0, 0, 0, 0,
KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_7, KC_QUOT, KC_SPC, KC_1, KC_2, KC_NUHS, KC_4, KC_5, KC_7, KC_QUOT,
KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH,

@ -0,0 +1,146 @@
/* Copyright 2019 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_space_cadet.h"
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
// ********** OBSOLETE DEFINES, STOP USING! (pls?) **********
// Shift / paren setup
#ifndef LSPO_KEY
#define LSPO_KEY KC_9
#endif
#ifndef RSPC_KEY
#define RSPC_KEY KC_0
#endif
// Shift / Enter setup
#ifndef SFTENT_KEY
#define SFTENT_KEY KC_ENT
#endif
#ifdef DISABLE_SPACE_CADET_MODIFIER
#ifndef LSPO_MOD
#define LSPO_MOD KC_TRNS
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_TRNS
#endif
#else
#ifndef LSPO_MOD
#define LSPO_MOD KC_LSFT
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_RSFT
#endif
#endif
// **********************************************************
// Shift / paren setup
#ifndef LSPO_KEYS
#define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY
#endif
#ifndef RSPC_KEYS
#define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY
#endif
// Control / paren setup
#ifndef LCPO_KEYS
#define LCPO_KEYS KC_LCTL, KC_LCTL, KC_9
#endif
#ifndef RCPO_KEYS
#define RCPO_KEYS KC_RCTL, KC_RCTL, KC_0
#endif
// Alt / paren setup
#ifndef LAPO_KEYS
#define LAPO_KEYS KC_LALT, KC_LALT, KC_9
#endif
#ifndef RAPO_KEYS
#define RAPO_KEYS KC_RALT, KC_RALT, KC_0
#endif
// Shift / Enter setup
#ifndef SFTENT_KEYS
#define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY
#endif
static uint8_t sc_last = 0;
static uint16_t sc_timer = 0;
void perform_space_cadet(keyrecord_t *record, uint8_t normalMod, uint8_t tapMod, uint8_t keycode) {
if (record->event.pressed) {
sc_last = normalMod;
sc_timer = timer_read ();
if (IS_MOD(normalMod)) {
register_mods(MOD_BIT(normalMod));
}
}
else {
if (IS_MOD(normalMod)) {
unregister_mods(MOD_BIT(normalMod));
}
if (sc_last == normalMod && timer_elapsed(sc_timer) < TAPPING_TERM) {
if (IS_MOD(tapMod)) {
register_mods(MOD_BIT(tapMod));
}
tap_code(keycode);
if (IS_MOD(tapMod)) {
unregister_mods(MOD_BIT(tapMod));
}
}
}
}
bool process_space_cadet(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case KC_LSPO: {
perform_space_cadet(record, LSPO_KEYS);
return false;
}
case KC_RSPC: {
perform_space_cadet(record, RSPC_KEYS);
return false;
}
case KC_LCPO: {
perform_space_cadet(record, LCPO_KEYS);
return false;
}
case KC_RCPC: {
perform_space_cadet(record, RCPO_KEYS);
return false;
}
case KC_LAPO: {
perform_space_cadet(record, LAPO_KEYS);
return false;
}
case KC_RAPC: {
perform_space_cadet(record, RAPO_KEYS);
return false;
}
case KC_SFTENT: {
perform_space_cadet(record, SFTENT_KEYS);
return false;
}
default: {
sc_last = 0;
break;
}
}
return true;
}

@ -0,0 +1,21 @@
/* Copyright 2019 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
void perform_space_cadet(keyrecord_t *record, uint8_t normalMod, uint8_t tapMod, uint8_t keycode);
bool process_space_cadet(uint16_t keycode, keyrecord_t *record);

@ -24,10 +24,6 @@
#include "outputselect.h" #include "outputselect.h"
#endif #endif
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
#ifndef BREATHING_PERIOD #ifndef BREATHING_PERIOD
#define BREATHING_PERIOD 6 #define BREATHING_PERIOD 6
#endif #endif
@ -196,30 +192,6 @@ void reset_keyboard(void) {
bootloader_jump(); bootloader_jump();
} }
// Shift / paren setup
#ifndef LSPO_KEY
#define LSPO_KEY KC_9
#endif
#ifndef RSPC_KEY
#define RSPC_KEY KC_0
#endif
#ifndef LSPO_MOD
#define LSPO_MOD KC_LSFT
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_RSFT
#endif
// Shift / Enter setup
#ifndef SFTENT_KEY
#define SFTENT_KEY KC_ENT
#endif
static bool shift_interrupted[2] = {0, 0};
static uint16_t scs_timer[2] = {0, 0};
/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
* Used to ensure that the correct keycode is released if the key is released. * Used to ensure that the correct keycode is released if the key is released.
*/ */
@ -328,6 +300,9 @@ bool process_record_quantum(keyrecord_t *record) {
#endif #endif
#ifdef TERMINAL_ENABLE #ifdef TERMINAL_ENABLE
process_terminal(keycode, record) && process_terminal(keycode, record) &&
#endif
#ifdef SPACE_CADET_ENABLE
process_space_cadet(keycode, record) &&
#endif #endif
true)) { true)) {
return false; return false;
@ -685,92 +660,6 @@ bool process_record_quantum(keyrecord_t *record) {
return false; return false;
} }
break; break;
case KC_LSPO: {
if (record->event.pressed) {
shift_interrupted[0] = false;
scs_timer[0] = timer_read ();
register_mods(MOD_BIT(KC_LSFT));
}
else {
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(RSPC_MOD)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) {
#ifdef DISABLE_SPACE_CADET_MODIFIER
unregister_mods(MOD_BIT(KC_LSFT));
#else
if( LSPO_MOD != KC_LSFT ){
unregister_mods(MOD_BIT(KC_LSFT));
register_mods(MOD_BIT(LSPO_MOD));
}
#endif
register_code(LSPO_KEY);
unregister_code(LSPO_KEY);
#ifndef DISABLE_SPACE_CADET_MODIFIER
if( LSPO_MOD != KC_LSFT ){
unregister_mods(MOD_BIT(LSPO_MOD));
}
#endif
}
unregister_mods(MOD_BIT(KC_LSFT));
}
return false;
}
case KC_RSPC: {
if (record->event.pressed) {
shift_interrupted[1] = false;
scs_timer[1] = timer_read ();
register_mods(MOD_BIT(KC_RSFT));
}
else {
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(LSPO_MOD)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
#ifdef DISABLE_SPACE_CADET_MODIFIER
unregister_mods(MOD_BIT(KC_RSFT));
#else
if( RSPC_MOD != KC_RSFT ){
unregister_mods(MOD_BIT(KC_RSFT));
register_mods(MOD_BIT(RSPC_MOD));
}
#endif
register_code(RSPC_KEY);
unregister_code(RSPC_KEY);
#ifndef DISABLE_SPACE_CADET_MODIFIER
if ( RSPC_MOD != KC_RSFT ){
unregister_mods(MOD_BIT(RSPC_MOD));
}
#endif
}
unregister_mods(MOD_BIT(KC_RSFT));
}
return false;
}
case KC_SFTENT: {
if (record->event.pressed) {
shift_interrupted[1] = false;
scs_timer[1] = timer_read ();
register_mods(MOD_BIT(KC_RSFT));
}
else if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
unregister_mods(MOD_BIT(KC_RSFT));
register_code(SFTENT_KEY);
unregister_code(SFTENT_KEY);
}
else {
unregister_mods(MOD_BIT(KC_RSFT));
}
return false;
}
case GRAVE_ESC: { case GRAVE_ESC: {
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT) uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
@ -825,12 +714,6 @@ bool process_record_quantum(keyrecord_t *record) {
return false; return false;
} }
#endif #endif
default: {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
break;
}
} }
return process_action_kb(record); return process_action_kb(record);

@ -131,6 +131,10 @@ extern uint32_t default_layer_state;
#include "process_terminal_nop.h" #include "process_terminal_nop.h"
#endif #endif
#ifdef SPACE_CADET_ENABLE
#include "process_space_cadet.h"
#endif
#ifdef HD44780_ENABLE #ifdef HD44780_ENABLE
#include "hd44780.h" #include "hd44780.h"
#endif #endif

@ -475,6 +475,18 @@ enum quantum_keycodes {
HPT_DWLI, HPT_DWLI,
HPT_DWLD, HPT_DWLD,
// Left control, open paren
KC_LCPO,
// Right control, close paren
KC_RCPC,
// Left control, open paren
KC_LAPO,
// Right control, close paren
KC_RAPC,
// always leave at the end // always leave at the end
SAFE_RANGE SAFE_RANGE
}; };

@ -48,6 +48,19 @@
#include "rgb_matrix_animations/solid_splash_anim.h" #include "rgb_matrix_animations/solid_splash_anim.h"
#include "rgb_matrix_animations/breathing_anim.h" #include "rgb_matrix_animations/breathing_anim.h"
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#define RGB_MATRIX_EFFECT(name, ...)
#ifdef RGB_MATRIX_CUSTOM_KB
#include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
#include "rgb_matrix_user.inc"
#endif
#undef RGB_MATRIX_EFFECT
#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif
#ifndef RGB_DISABLE_AFTER_TIMEOUT #ifndef RGB_DISABLE_AFTER_TIMEOUT
#define RGB_DISABLE_AFTER_TIMEOUT 0 #define RGB_DISABLE_AFTER_TIMEOUT 0
#endif #endif
@ -81,6 +94,15 @@
#define RGB_MATRIX_SPD_STEP 16 #define RGB_MATRIX_SPD_STEP 16
#endif #endif
#if !defined(RGB_MATRIX_STARTUP_MODE)
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
#else
// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#endif
#endif
bool g_suspend_state = false; bool g_suspend_state = false;
rgb_config_t rgb_matrix_config; rgb_config_t rgb_matrix_config;
@ -104,12 +126,7 @@ void eeconfig_update_rgb_matrix(uint32_t val) {
void eeconfig_update_rgb_matrix_default(void) { void eeconfig_update_rgb_matrix_default(void) {
dprintf("eeconfig_update_rgb_matrix_default\n"); dprintf("eeconfig_update_rgb_matrix_default\n");
rgb_matrix_config.enable = 1; rgb_matrix_config.enable = 1;
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT;
#else
// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
rgb_matrix_config.mode = RGB_MATRIX_SOLID_COLOR;
#endif
rgb_matrix_config.hue = 0; rgb_matrix_config.hue = 0;
rgb_matrix_config.sat = UINT8_MAX; rgb_matrix_config.sat = UINT8_MAX;
rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
@ -127,9 +144,14 @@ void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
} }
__attribute__ ((weak))
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
return 0;
}
uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
// TODO: This is kinda expensive, fix this soonish // TODO: This is kinda expensive, fix this soonish
uint8_t led_count = 0; uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) { for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) {
matrix_co_t matrix_co = g_rgb_leds[i].matrix_co; matrix_co_t matrix_co = g_rgb_leds[i].matrix_co;
if (row == matrix_co.row && column == matrix_co.col) { if (row == matrix_co.row && column == matrix_co.col) {
@ -145,28 +167,11 @@ void rgb_matrix_update_pwm_buffers(void) {
} }
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) {
#ifdef RGB_MATRIX_EXTRA_TOG
const bool is_key = g_rgb_leds[index].matrix_co.raw != 0xff;
if (
(rgb_matrix_config.enable == RGB_ZONE_KEYS && !is_key) ||
(rgb_matrix_config.enable == RGB_ZONE_UNDER && is_key)
) {
rgb_matrix_driver.set_color(index, 0, 0, 0);
return;
}
#endif
rgb_matrix_driver.set_color(index, red, green, blue); rgb_matrix_driver.set_color(index, red, green, blue);
} }
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) {
#ifdef RGB_MATRIX_EXTRA_TOG
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
rgb_matrix_set_color(i, red, green, blue);
}
#else
rgb_matrix_driver.set_color_all(red, green, blue); rgb_matrix_driver.set_color_all(red, green, blue);
#endif
} }
bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
@ -245,7 +250,7 @@ static bool rgb_matrix_none(effect_params_t* params) {
static uint8_t rgb_last_enable = UINT8_MAX; static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX; static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = { 0, 0 }; static effect_params_t rgb_effect_params = { 0, 0xFF };
static rgb_task_states rgb_task_state = SYNCING; static rgb_task_states rgb_task_state = SYNCING;
static void rgb_task_timers(void) { static void rgb_task_timers(void) {
@ -435,6 +440,20 @@ static void rgb_task_render(uint8_t effect) {
#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
#define RGB_MATRIX_EFFECT(name, ...) \
case RGB_MATRIX_CUSTOM_##name: \
rendering = name(&rgb_effect_params); \
break;
#ifdef RGB_MATRIX_CUSTOM_KB
#include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
#include "rgb_matrix_user.inc"
#endif
#undef RGB_MATRIX_EFFECT
#endif
// Factory default magic value // Factory default magic value
case UINT8_MAX: { case UINT8_MAX: {
rgb_matrix_test(); rgb_matrix_test();
@ -544,29 +563,31 @@ void rgb_matrix_set_suspend_state(bool state) {
} }
void rgb_matrix_toggle(void) { void rgb_matrix_toggle(void) {
rgb_matrix_config.enable++; rgb_matrix_config.enable ^= 1;
if (!rgb_matrix_config.enable) { rgb_task_state = STARTING;
rgb_task_state = STARTING;
}
eeconfig_update_rgb_matrix(rgb_matrix_config.raw); eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
} }
void rgb_matrix_enable(void) { void rgb_matrix_enable(void) {
rgb_matrix_config.enable = 1; rgb_matrix_enable_noeeprom();
eeconfig_update_rgb_matrix(rgb_matrix_config.raw); eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
} }
void rgb_matrix_enable_noeeprom(void) { void rgb_matrix_enable_noeeprom(void) {
rgb_matrix_config.enable = 1; if (!rgb_matrix_config.enable)
rgb_task_state = STARTING;
rgb_matrix_config.enable = 1;
} }
void rgb_matrix_disable(void) { void rgb_matrix_disable(void) {
rgb_matrix_config.enable = 0; rgb_matrix_disable_noeeprom();
eeconfig_update_rgb_matrix(rgb_matrix_config.raw); eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
} }
void rgb_matrix_disable_noeeprom(void) { void rgb_matrix_disable_noeeprom(void) {
rgb_matrix_config.enable = 0; if (rgb_matrix_config.enable)
rgb_task_state = STARTING;
rgb_matrix_config.enable = 0;
} }
void rgb_matrix_step(void) { void rgb_matrix_step(void) {
@ -627,6 +648,14 @@ void rgb_matrix_decrease_speed(void) {
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
} }
led_flags_t rgb_matrix_get_flags(void) {
return rgb_effect_params.flags;
}
void rgb_matrix_set_flags(led_flags_t flags) {
rgb_effect_params.flags = flags;
}
void rgb_matrix_mode(uint8_t mode) { void rgb_matrix_mode(uint8_t mode) {
rgb_matrix_config.mode = mode; rgb_matrix_config.mode = mode;
rgb_task_state = STARTING; rgb_task_state = STARTING;

@ -54,7 +54,9 @@
uint8_t max = DRIVER_LED_TOTAL; uint8_t max = DRIVER_LED_TOTAL;
#endif #endif
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; #define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) continue
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
typedef struct typedef struct
{ {
@ -142,6 +144,18 @@ enum rgb_matrix_effects {
RGB_MATRIX_SOLID_MULTISPLASH, RGB_MATRIX_SOLID_MULTISPLASH,
#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name,
#ifdef RGB_MATRIX_CUSTOM_KB
#include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
#include "rgb_matrix_user.inc"
#endif
#undef RGB_MATRIX_EFFECT
#endif
RGB_MATRIX_EFFECT_MAX RGB_MATRIX_EFFECT_MAX
}; };
@ -197,6 +211,8 @@ void rgb_matrix_increase_val(void);
void rgb_matrix_decrease_val(void); void rgb_matrix_decrease_val(void);
void rgb_matrix_increase_speed(void); void rgb_matrix_increase_speed(void);
void rgb_matrix_decrease_speed(void); void rgb_matrix_decrease_speed(void);
led_flags_t rgb_matrix_get_flags(void);
void rgb_matrix_set_flags(led_flags_t flags);
void rgb_matrix_mode(uint8_t mode); void rgb_matrix_mode(uint8_t mode);
void rgb_matrix_mode_noeeprom(uint8_t mode); void rgb_matrix_mode_noeeprom(uint8_t mode);
uint8_t rgb_matrix_get_mode(void); uint8_t rgb_matrix_get_mode(void);

@ -1,7 +1,7 @@
#pragma once #pragma once
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
// alphas = color1, mods = color2 // alphas = color1, mods = color2
@ -14,7 +14,8 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) {
RGB rgb2 = hsv_to_rgb(hsv); RGB rgb2 = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
if (g_rgb_leds[i].modifier) { RGB_MATRIX_TEST_LED_FLAGS();
if (HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
} else { } else {
rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);

@ -12,6 +12,7 @@ bool rgb_matrix_breathing(effect_params_t* params) {
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val };
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;

@ -2,16 +2,16 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_all(effect_params_t* params) { bool rgb_matrix_cycle_all(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); hsv.h = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
hsv.h = time; RGB_MATRIX_TEST_LED_FLAGS();
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_left_right(effect_params_t* params) { bool rgb_matrix_cycle_left_right(effect_params_t* params) {
@ -11,6 +11,7 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = point.x - time; hsv.h = point.x - time;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_up_down(effect_params_t* params) { bool rgb_matrix_cycle_up_down(effect_params_t* params) {
@ -11,6 +11,7 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = point.y - time; hsv.h = point.y - time;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_dual_beacon(effect_params_t* params) { bool rgb_matrix_dual_beacon(effect_params_t* params) {
@ -13,6 +13,7 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) {
int8_t cos_value = cos8(time) - 128; int8_t cos_value = cos8(time) - 128;
int8_t sin_value = sin8(time) - 128; int8_t sin_value = sin8(time) - 128;
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -1,7 +1,7 @@
#pragma once #pragma once
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_gradient_up_down(effect_params_t* params) { bool rgb_matrix_gradient_up_down(effect_params_t* params) {
@ -10,6 +10,7 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t scale = scale8(64, rgb_matrix_config.speed); uint8_t scale = scale8(64, rgb_matrix_config.speed);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
// The y range will be 0..64, map this to 0..4 // The y range will be 0..64, map this to 0..4
// Relies on hue being 8-bit and wrapping // Relies on hue being 8-bit and wrapping

@ -2,10 +2,11 @@
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
static void jellybean_raindrops_set_color(int i) { static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val };
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
@ -15,14 +16,14 @@ bool rgb_matrix_jellybean_raindrops(effect_params_t* params) {
if (!params->init) { if (!params->init) {
// Change one LED every tick, make sure speed is not 0 // Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL); jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
} }
return false; return false;
} }
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (int i = led_min; i < led_max; i++) { for (int i = led_min; i < led_max; i++) {
jellybean_raindrops_set_color(i); jellybean_raindrops_set_color(i, params);
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_beacon(effect_params_t* params) { bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
int16_t cos_value = 2 * (cos8(time) - 128); int16_t cos_value = 2 * (cos8(time) - 128);
int16_t sin_value = 2 * (sin8(time) - 128); int16_t sin_value = 2 * (sin8(time) - 128);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
@ -11,6 +11,7 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue; hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
int16_t cos_value = 3 * (cos8(time) - 128); int16_t cos_value = 3 * (cos8(time) - 128);
int16_t sin_value = 3 * (sin8(time) - 128); int16_t sin_value = 3 * (sin8(time) - 128);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);

@ -5,7 +5,8 @@
extern rgb_counters_t g_rgb_counters; extern rgb_counters_t g_rgb_counters;
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
static void raindrops_set_color(int i) { static void raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val };
// Take the shortest path between hues // Take the shortest path between hues
@ -25,14 +26,14 @@ bool rgb_matrix_raindrops(effect_params_t* params) {
if (!params->init) { if (!params->init) {
// Change one LED every tick, make sure speed is not 0 // Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
raindrops_set_color(rand() % DRIVER_LED_TOTAL); raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
} }
return false; return false;
} }
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (int i = led_min; i < led_max; i++) { for (int i = led_min; i < led_max; i++) {
raindrops_set_color(i); raindrops_set_color(i, params);
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }

@ -8,6 +8,7 @@ bool rgb_matrix_solid_color(effect_params_t* params) {
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;

@ -13,6 +13,7 @@ bool rgb_matrix_solid_reactive(effect_params_t* params) {
uint16_t max_tick = 65535 / rgb_matrix_config.speed; uint16_t max_tick = 65535 / rgb_matrix_config.speed;
// Relies on hue being 8-bit and wrapping // Relies on hue being 8-bit and wrapping
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t tick = max_tick; uint16_t tick = max_tick;
for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {

@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker; extern last_hit_t g_last_hit_tracker;
@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par
hsv.v = 0; hsv.v = 0;
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) { for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j]; int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j]; int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy); uint8_t dist = sqrt16(dx * dx + dy * dy);

@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker; extern last_hit_t g_last_hit_tracker;
@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par
hsv.v = 0; hsv.v = 0;
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) { for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j]; int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j]; int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy); uint8_t dist = sqrt16(dx * dx + dy * dy);

@ -12,6 +12,7 @@ bool rgb_matrix_solid_reactive_simple(effect_params_t* params) {
// Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255
uint16_t max_tick = 65535 / rgb_matrix_config.speed; uint16_t max_tick = 65535 / rgb_matrix_config.speed;
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t tick = max_tick; uint16_t tick = max_tick;
for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {

@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker; extern last_hit_t g_last_hit_tracker;
@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para
hsv.v = 0; hsv.v = 0;
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) { for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j]; int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j]; int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy); uint8_t dist = sqrt16(dx * dx + dy * dy);

@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) #if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker; extern last_hit_t g_last_hit_tracker;
@ -12,6 +12,7 @@ static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* p
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 };
uint8_t count = g_last_hit_tracker.count; uint8_t count = g_last_hit_tracker.count;
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
hsv.v = 0; hsv.v = 0;
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) { for (uint8_t j = start; j < count; j++) {

@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config; extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker; extern last_hit_t g_last_hit_tracker;
@ -12,6 +12,7 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params)
HSV hsv = { 0, rgb_matrix_config.sat, 0 }; HSV hsv = { 0, rgb_matrix_config.sat, 0 };
uint8_t count = g_last_hit_tracker.count; uint8_t count = g_last_hit_tracker.count;
for (uint8_t i = led_min; i < led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
hsv.h = rgb_matrix_config.hue; hsv.h = rgb_matrix_config.hue;
hsv.v = 0; hsv.v = 0;
point_t point = g_rgb_leds[i].point; point_t point = g_rgb_leds[i].point;

@ -99,12 +99,12 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
#elif defined(WS2812) #elif defined(WS2812)
extern LED_TYPE led[RGBLED_NUM]; extern LED_TYPE led[DRIVER_LED_TOTAL];
static void flush( void ) static void flush( void )
{ {
// Assumes use of RGB_DI_PIN // Assumes use of RGB_DI_PIN
ws2812_setleds(led, RGBLED_NUM); ws2812_setleds(led, DRIVER_LED_TOTAL);
} }
static void init( void ) static void init( void )

@ -67,19 +67,21 @@ typedef union {
}; };
} matrix_co_t; } matrix_co_t;
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
#define LED_FLAG_ALL 0xFF
#define LED_FLAG_NONE 0x00
#define LED_FLAG_MODIFIER 0x01
#define LED_FLAG_UNDERGLOW 0x02
#define LED_FLAG_KEYLIGHT 0x04
typedef struct PACKED { typedef struct PACKED {
matrix_co_t matrix_co; matrix_co_t matrix_co;
point_t point; point_t point;
uint8_t modifier:1; uint8_t flags;
} rgb_led; } rgb_led;
typedef enum {
RGB_ZONE_OFF = 0,
RGB_ZONE_ALL,
RGB_ZONE_KEYS,
RGB_ZONE_UNDER,
} rgb_zone_t;
typedef union { typedef union {
uint32_t raw; uint32_t raw;
struct PACKED { struct PACKED {

@ -7,7 +7,7 @@
[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) [![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) [![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](https://ergodox-ez.com) keyboard, and the [Clueboard product line](https://clueboard.co).
## Documentation ## Documentation
@ -30,6 +30,6 @@ The project also includes community support for [lots of other keyboards](/keybo
QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy). QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy).
## Official website ## Official Website
[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK. [qmk.fm](https://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.

@ -82,7 +82,7 @@ void suspend_wakeup_init_user(void) { }
*/ */
__attribute__ ((weak)) __attribute__ ((weak))
void suspend_wakeup_init_kb(void) { void suspend_wakeup_init_kb(void) {
suspend_power_down_user(); suspend_wakeup_init_user();
} }
/** \brief suspend wakeup condition /** \brief suspend wakeup condition

@ -443,9 +443,9 @@ static void led_matrix_massdrop_config_override(int i)
uint8_t highest_active_layer = biton32(layer_state); uint8_t highest_active_layer = biton32(layer_state);
if (led_lighting_mode == LED_MODE_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw == 0xff) { if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
//Do not act on this LED //Do not act on this LED
} else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw != 0xff) { } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
//Do not act on this LED //Do not act on this LED
} else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) {
//Do not act on this LED (Only show indicators) //Do not act on this LED (Only show indicators)

@ -11,3 +11,17 @@
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS #define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS
#define RCPO_KEYS KC_RCTL, KC_TRNS, KC_EQL #define RCPO_KEYS KC_RCTL, KC_TRNS, KC_EQL
// No need for the single versions when multi performance isn't a problem =D
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
// Don't like or feel to identical to other effects
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS

@ -11,6 +11,10 @@ qk_tap_dance_action_t tap_dance_actions[] = {
}; };
#endif #endif
#if defined(RGB_MATRIX_ENABLE)
extern void eeconfig_update_rgb_matrix_default(void);
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
@ -56,12 +60,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false; return false;
break; break;
case RGBRST: case RGBRST:
#ifdef RGBLIGHT_ENABLE #if defined(RGBLIGHT_ENABLE)
if (record->event.pressed) { if (record->event.pressed) {
eeconfig_update_rgblight_default(); eeconfig_update_rgblight_default();
rgblight_enable(); rgblight_enable();
} }
#endif #elif defined(RGB_MATRIX_ENABLE)
if (record->event.pressed) {
eeconfig_update_rgb_matrix_default();
}
#endif
return false; return false;
break; break;
} }

@ -0,0 +1,159 @@
#!/bin/bash
# This script generates a new keyboard directory under keyboards/,
# and copies the template files from quantum/template/ into it.
# Print an error message with the word "ERROR" in red.
echo_error() {
echo -e "[\033[0;91mERROR\033[m]: $1"
}
# Print a message in bold.
echo_bold() {
echo -e "\033[1m$1\033[m"
}
# Prompt the user for information, showing the default value in brackets.
prompt() {
local message="$1"
local default="$2"
[ -n "$default" ] && message+=" [$default]"
message+=": "
read -rp "$message" prompt_return
[ -z "$prompt_return" ] && prompt_return="$default"
}
# Grab a username from Git config.
set_git_username() {
git_username="$(git config --get user.name)"
}
# Copy the template files to the new keyboard directory.
copy_templates() {
echo -n "Copying base template files..."
cp -r "quantum/template/base" "${keyboard_dir}"
echo " done"
echo -n "Copying $keyboard_type template files..."
cp -r "quantum/template/${keyboard_type}/." "${keyboard_dir}"
echo " done"
echo -n "Renaming keyboard files..."
mv "${keyboard_dir}/template.c" "${keyboard_dir}/${keyboard_name}.c"
mv "${keyboard_dir}/template.h" "${keyboard_dir}/${keyboard_name}.h"
echo " done"
}
# Set the inplace editing parameter for sed.
# macOS/BSD sed expects a file extension immediately following -i.
set_sed_i() {
sed_i=(-i)
case $(uname -a) in
*Darwin*) sed_i=(-i "")
esac
}
# Replace a token with a value in the given list of files.
replace_placeholders() {
local replace_token="$1"
local replace_value="$2"
shift 2
local replace_filenames=("$@")
echo -n "Replacing $replace_token with $replace_value..."
for replace_filename in "${replace_filenames[@]}"; do
sed "${sed_i[@]}" -e "s/${replace_token}/${replace_value}/g" "$replace_filename"
done
echo " done"
}
# Replace %KEYBOARD% with the keyboard name.
replace_keyboard_placeholders() {
local replace_keyboard_filenames=(
"${keyboard_dir}/config.h"
"${keyboard_dir}/readme.md"
"${keyboard_dir}/${keyboard_name}.c"
"${keyboard_dir}/keymaps/default/readme.md"
)
replace_placeholders "%KEYBOARD%" "$keyboard_name" "${replace_keyboard_filenames[@]}"
}
# Replace %YOUR_NAME% with the username.
replace_name_placeholders() {
local replace_name_filenames=(
"${keyboard_dir}/config.h"
"${keyboard_dir}/readme.md"
"${keyboard_dir}/${keyboard_name}.c"
"${keyboard_dir}/${keyboard_name}.h"
"${keyboard_dir}/keymaps/default/config.h"
"${keyboard_dir}/keymaps/default/keymap.c"
)
replace_placeholders "%YOUR_NAME%" "$username" "${replace_name_filenames[@]}"
}
# Check if an array contains an element.
array_contains() {
local e match="$1"
shift
for e; do
[[ "$e" == "$match" ]] && return 0;
done
return 1
}
# If we've been started from util/, we want to be in qmk_firmware/
[[ "$PWD" == *util ]] && cd ..
# The root qmk_firmware/ directory should have a subdirectory called quantum/
if [ ! -d "quantum" ]; then
echo_error "Could not detect the QMK firmware directory!"
echo_error "Are you sure you're in the right place?"
exit 1
fi
echo_bold "Generating a new QMK keyboard directory"
echo
# Keyboard name is required, so keep prompting until we get one
while [ -z "$keyboard_name" ]; do
prompt "Keyboard Name" ""
keyboard_name=$prompt_return
done
keyboard_dir="keyboards/$keyboard_name"
if [ -d "$keyboard_dir" ]; then
echo_error "Keyboard $keyboard_name already exists!"
exit 1
fi
KEYBOARD_TYPES=("avr" "ps2avrgb")
prompt "Keyboard Type" "avr"
keyboard_type=$prompt_return
if ! array_contains "$keyboard_type" "${KEYBOARD_TYPES[@]}"; then
echo_error "Keyboard type must be one of: ${KEYBOARD_TYPES[*]}"
exit 1
fi
set_git_username
prompt "Your Name" "$git_username"
username=$prompt_return
echo
copy_templates
set_sed_i
replace_keyboard_placeholders
[ -n "$username" ] && replace_name_placeholders
echo
echo_bold "Created a new keyboard called $keyboard_name."
echo
echo_bold "To start working on things, cd into keyboards/$keyboard_name,"
echo_bold "or open the directory in your favourite text editor."

@ -1,70 +0,0 @@
#!/bin/sh
# Script to make a new quantum project
# Jack Humbert 2015
KEYBOARD=$1
KEYBOARD_TYPE=$2
if [ -z "$KEYBOARD" ]; then
echo "Usage: $0 <keyboard_name> <keyboard_type>"
echo "Example: $0 gh60 avr"
echo "Example: $0 bfake ps2avrgb"
exit 1
elif [ -z "$KEYBOARD_TYPE" ]; then
KEYBOARD_TYPE=avr
fi
if [ "$KEYBOARD_TYPE" != "avr" ] && [ "$KEYBOARD_TYPE" != "ps2avrgb" ]; then
echo "Invalid keyboard type target"
exit 1
fi
if [ -e "keyboards/$1" ]; then
echo "Error! keyboards/$1 already exists!"
exit 1
fi
cd "$(dirname "$0")/.." || exit
KEYBOARD_NAME=$(basename "$1")
KEYBOARD_NAME_UPPERCASE=$(echo "$KEYBOARD_NAME" | awk '{print toupper($0)}')
NEW_KBD=keyboards/${KEYBOARD}
cp -r quantum/template/base "$NEW_KBD"
cp -r "quantum/template/$KEYBOARD_TYPE/." "$NEW_KBD"
mv "${NEW_KBD}/template.c" "${NEW_KBD}/${KEYBOARD_NAME}.c"
mv "${NEW_KBD}/template.h" "${NEW_KBD}/${KEYBOARD_NAME}.h"
find "${NEW_KBD}" -type f -exec sed -i '' -e "s;%KEYBOARD%;${KEYBOARD_NAME};g" {} \;
find "${NEW_KBD}" -type f -exec sed -i '' -e "s;%KEYBOARD_UPPERCASE%;${KEYBOARD_NAME_UPPERCASE};g" {} \;
GIT=$(whereis git)
if [ "$GIT" != "" ]; then
IS_GIT_REPO=$($GIT log >>/dev/null 2>&1; echo $?)
if [ "$IS_GIT_REPO" -eq 0 ]; then
ID="$($GIT config --get user.name)"
read -rp "What is your name? [$ID] " YOUR_NAME
if [ -n "$YOUR_NAME" ]; then
ID=$YOUR_NAME
fi
echo "Using $ID as user name"
for i in "$NEW_KBD/config.h" \
"$NEW_KBD/$KEYBOARD_NAME.c" \
"$NEW_KBD/$KEYBOARD_NAME.h" \
"$NEW_KBD/keymaps/default/config.h" \
"$NEW_KBD/keymaps/default/keymap.c"
do
awk -v id="$ID" '{sub(/%YOUR_NAME%/,id); print}' < "$i" > "$i.$$"
mv "$i.$$" "$i"
done
fi
fi
cat <<-EOF
######################################################
# $NEW_KBD project created. To start
# working on things, cd into $NEW_KBD
######################################################
EOF
Loading…
Cancel
Save