Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3a940026e | ||
|
|
74af596d8a | ||
|
|
8aee82e8b4 | ||
|
|
dd290085c9 | ||
|
|
068571b9fe | ||
|
|
7a1086e405 | ||
|
|
9e3b38425f | ||
|
|
a58c66df88 | ||
|
|
162a1d39b6 | ||
|
|
3542f594d9 | ||
|
|
0511b522e0 | ||
|
|
34239edcb0 | ||
|
|
8bdbac14a3 | ||
|
|
01f4b67ef0 | ||
|
|
f05927a2f0 | ||
|
|
4cd3afc7e9 | ||
|
|
86855f4417 | ||
|
|
416eb1dee7 | ||
|
|
0a6beab224 | ||
|
|
93b7fccad6 | ||
|
|
565a7812ab | ||
|
|
838d09b0a9 | ||
|
|
d0fb7005d5 | ||
|
|
ffc82ebdb2 | ||
|
|
4974683040 | ||
|
|
5fcd744ddb | ||
|
|
d7ba190cd9 | ||
|
|
66dbcccb48 | ||
|
|
e7e13ebdd7 | ||
|
|
de161493c7 | ||
|
|
58a04162a8 | ||
|
|
424c359109 | ||
|
|
165b1683c1 | ||
|
|
69f757c3a2 | ||
|
|
8f3063402d | ||
|
|
8af1d3ad86 | ||
|
|
8c87274e83 | ||
|
|
eab6546fda | ||
|
|
2485f73f06 | ||
|
|
814118175b | ||
|
|
de6b568177 | ||
|
|
a20e59ac75 | ||
|
|
7870000d89 | ||
|
|
f19d138206 | ||
|
|
a206f3b739 | ||
|
|
75535cdfa3 | ||
|
|
1529f0b2d7 | ||
|
|
b090fe15d7 |
No files matched your search
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: 'true'
|
AlignConsecutiveAssignments: 'true'
|
||||||
@@ -20,7 +20,7 @@ SortIncludes: 'false'
|
|||||||
SpaceBeforeAssignmentOperators: 'true'
|
SpaceBeforeAssignmentOperators: 'true'
|
||||||
SpaceBeforeParens: ControlStatements
|
SpaceBeforeParens: ControlStatements
|
||||||
SpaceInEmptyParentheses: 'false'
|
SpaceInEmptyParentheses: 'false'
|
||||||
TabWidth: '2'
|
TabWidth: '4'
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
|
||||||
...
|
...
|
||||||
+1
-1
@@ -5,7 +5,7 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 4
|
||||||
|
|
||||||
# We recommend you to keep these unchanged
|
# We recommend you to keep these unchanged
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
|
|||||||
+6
-1
@@ -114,7 +114,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 custom
|
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
|
||||||
|
|
||||||
LED_MATRIX_ENABLE ?= no
|
LED_MATRIX_ENABLE ?= no
|
||||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||||
@@ -172,6 +172,11 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
|||||||
SRC += i2c_master.c
|
SRC += i2c_master.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
||||||
|
OPT_DEFS += -DWS2812
|
||||||
|
SRC += ws2812.c
|
||||||
|
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
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Never made an open source contribution before? Wondering how contributions work
|
|||||||
|
|
||||||
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
||||||
|
|
||||||
* We indent using two spaces (soft tabs)
|
* We indent using four (4) spaces (soft tabs)
|
||||||
* We use a modified One True Brace Style
|
* We use a modified One True Brace Style
|
||||||
* Opening Brace: At the end of the same line as the statement that opens the block
|
* Opening Brace: At the end of the same line as the statement that opens the block
|
||||||
* Closing Brace: Lined up with the first character of the statement that opens the block
|
* Closing Brace: Lined up with the first character of the statement that opens the block
|
||||||
@@ -71,6 +71,14 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
|||||||
* If you not sure if a comment is obvious, go ahead and include it.
|
* If you not sure if a comment is obvious, go ahead and include it.
|
||||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||||
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
||||||
|
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||||
|
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
||||||
|
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
||||||
|
* Do not put whitespace between `#` and `if`.
|
||||||
|
* When deciding how (or if) to indent directives keep these points in mind:
|
||||||
|
* Readability is more important than consistency.
|
||||||
|
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
|
||||||
|
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
|
||||||
|
|
||||||
Here is an example for easy reference:
|
Here is an example for easy reference:
|
||||||
|
|
||||||
|
|||||||
+46
-1
@@ -195,6 +195,49 @@ This will clear all mods currently pressed.
|
|||||||
|
|
||||||
This will clear all keys besides the mods currently pressed.
|
This will clear all keys besides the mods currently pressed.
|
||||||
|
|
||||||
|
## Advanced Example:
|
||||||
|
|
||||||
|
### Super ALT↯TAB
|
||||||
|
|
||||||
|
This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows.
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool is_alt_tab_active = false; # ADD this near the begining of keymap.c
|
||||||
|
uint16_t alt_tab_timer = 0; # we will be using them soon.
|
||||||
|
|
||||||
|
enum custom_keycodes { # Make sure have the awesome keycode ready
|
||||||
|
ALT_TAB = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) { # This will do most of the grunt work with the keycodes.
|
||||||
|
case ALT_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!is_alt_tab_active) {
|
||||||
|
is_alt_tab_active = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
alt_tab_timer = timer_read();
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) { # The very important timer.
|
||||||
|
if (is_alt_tab_active) {
|
||||||
|
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||||
|
unregister_code16(LALT(KC_TAB));
|
||||||
|
is_alt_tab_active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
|
## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
|
||||||
|
|
||||||
@@ -273,7 +316,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Advanced Example: Single-Key Copy/Paste
|
## Advanced Example:
|
||||||
|
|
||||||
|
### Single-Key Copy/Paste
|
||||||
|
|
||||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||||
|
|
||||||
|
|||||||
+84
-77
@@ -1,114 +1,121 @@
|
|||||||
# Mousekeys
|
# Mouse keys
|
||||||
|
|
||||||
|
Mouse keys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer at different speeds, press 5 buttons and scroll in all 8 directions.
|
||||||
|
|
||||||
Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions.
|
## Adding mouse keys to your keyboard
|
||||||
|
|
||||||
There are 2 ways to define how the mousekeys behave, using "[auto-accelerating](#configuring-the-behavior-of-mousekeys-with-auto-accelerated-movement)" or "[3-speed constant](#configuring-the-behavior-of-mousekeys-with-3-speed-constant-movement)" behavior.
|
To use mouse keys, you must at least enable mouse keys support and map mouse actions to keys on your keyboard.
|
||||||
|
|
||||||
In either case, you will need to enable mousekeys in your makefile,
|
### Enabling mouse keys
|
||||||
and add the relevant [keycodes](#mapping-mouse-actions-to-keyboard-keys) to your keymap.
|
|
||||||
|
|
||||||
#### Enable Mousekeys
|
To enable mouse keys, add the following line to your keymap’s `rules.mk`:
|
||||||
|
|
||||||
To enable the mousekey functionality, add the following line to your keymap's `rules.mk`:
|
```c
|
||||||
|
|
||||||
```
|
|
||||||
MOUSEKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Mapping Mouse Actions to Keyboard Keys
|
### Mapping mouse actions
|
||||||
|
|
||||||
You can use these keycodes within your keymap to map button presses to mouse actions:
|
In your keymap you can use the following keycodes to map key presses to mouse actions:
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------------|---------|-----------------------------------|
|
|----------------|---------|-----------------|
|
||||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
|`KC_MS_UP` |`KC_MS_U`|Move cursor up |
|
||||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down |
|
||||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left |
|
||||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right|
|
||||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 |
|
||||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 |
|
||||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
|
||||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
|
||||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
|
||||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
|
||||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
|
||||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
|
||||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right |
|
||||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0(slow) |
|
|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 |
|
||||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1(medium)|
|
|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 |
|
||||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2(fast) |
|
|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 |
|
||||||
|
|
||||||
|
For an example, see [the mouse layer in this keymap](https://github.com/qmk/qmk_firmware/blob/1df10ae3bfc146805c75b06dc0c126cd1ef3a60a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L40).
|
||||||
|
|
||||||
## Configuring the Behavior of Mousekeys with auto-accelerated movement
|
## Configuring mouse keys
|
||||||
|
|
||||||
This behavior is intended to emulate the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
|
Mouse keys supports two different modes to move the cursor:
|
||||||
|
|
||||||
The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
|
* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed.
|
||||||
|
* **Constant:** Holding movement keys moves the cursor at constant speeds.
|
||||||
|
|
||||||
```
|
The same principle applies to scrolling.
|
||||||
#define MOUSEKEY_DELAY 300
|
|
||||||
#define MOUSEKEY_INTERVAL 50
|
|
||||||
#define MOUSEKEY_MAX_SPEED 10
|
|
||||||
#define MOUSEKEY_TIME_TO_MAX 20
|
|
||||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
|
||||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `MOUSEKEY_DELAY`
|
Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application.
|
||||||
|
|
||||||
When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish.
|
### Accelerated mode
|
||||||
|
|
||||||
#### `MOUSEKEY_INTERVAL`
|
This is the default mode. You can adjust the cursor and scrolling acceleration using the following settings in your keymap’s `config.h` file:
|
||||||
|
|
||||||
When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed.
|
|Define |Default|Description |
|
||||||
|
|----------------------------|-------|---------------------------------------------------------|
|
||||||
|
|`MOUSEKEY_DELAY` |300 |Delay between pressing a movement key and cursor movement|
|
||||||
|
|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements |
|
||||||
|
|`MOUSEKEY_MAX_SPEED` |10 |Maximum cursor speed at which acceleration stops |
|
||||||
|
|`MOUSEKEY_TIME_TO_MAX` |20 |Time until maximum cursor speed is reached |
|
||||||
|
|`MOUSEKEY_WHEEL_MAX_SPEED` |8 |Maximum number of scroll steps per scroll action |
|
||||||
|
|`MOUSEKEY_WHEEL_TIME_TO_MAX`|40 |Time until maximum scroll speed is reached |
|
||||||
|
|
||||||
#### `MOUSEKEY_MAX_SPEED`
|
Tips:
|
||||||
|
|
||||||
As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`.
|
* Setting `MOUSEKEY_DELAY` too low makes the cursor unresponsive. Setting it too high makes small movements difficult.
|
||||||
|
* For smoother cursor movements, lower the value of `MOUSEKEY_INTERVAL`. If the refresh rate of your display is 60Hz, you could set it to `16` (1/60). As this raises the cursor speed significantly, you may want to lower `MOUSEKEY_MAX_SPEED`.
|
||||||
|
* Setting `MOUSEKEY_TIME_TO_MAX` or `MOUSEKEY_WHEEL_TIME_TO_MAX` to `0` will disable acceleration for the cursor or scrolling respectively. This way you can make one of them constant while keeping the other accelerated, which is not possible in constant speed mode.
|
||||||
|
|
||||||
#### `MOUSEKEY_TIME_TO_MAX`
|
Cursor acceleration uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
|
||||||
|
|
||||||
How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate.
|
### Constant mode
|
||||||
|
|
||||||
#### `MOUSEKEY_WHEEL_MAX_SPEED`
|
In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
|
||||||
|
|
||||||
The top speed for scrolling movements.
|
You can choose whether speed selection is momentary or tap-to-select:
|
||||||
|
|
||||||
#### `MOUSEKEY_WHEEL_TIME_TO_MAX`
|
* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed.
|
||||||
|
* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed.
|
||||||
|
|
||||||
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
|
The default speeds from slowest to fastest are as follows:
|
||||||
|
|
||||||
|
* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2`
|
||||||
|
* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2`
|
||||||
|
|
||||||
## Configuring the Behavior of Mousekeys with 3-speed constant movement
|
To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file:
|
||||||
|
|
||||||
In your keymap's `config.h`, you must add the line:
|
```c
|
||||||
```
|
|
||||||
#define MK_3_SPEED
|
#define MK_3_SPEED
|
||||||
```
|
```
|
||||||
Then you can precisely define 3 different speeds for both the cursor and the mouse wheel, and also whether speed selection is momentary or tap-to-select.
|
|
||||||
For each speed, you can specify how many milliseconds you want between reports(interval), and how far you want to it to move per report(offset).
|
|
||||||
|
|
||||||
For example:
|
To enable momentary mode, also define `MK_MOMENTARY_ACCEL`:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define MK_3_SPEED
|
#define MK_MOMENTARY_ACCEL
|
||||||
#define MK_MOMENTARY_ACCEL // comment this out for tap-to-select acceleration
|
|
||||||
// cursor speeds:
|
|
||||||
#define MK_C_OFFSET_SLOW 1 // pixels
|
|
||||||
#define MK_C_INTERVAL_SLOW 100 // milliseconds
|
|
||||||
#define MK_C_OFFSET_MED 4
|
|
||||||
#define MK_C_INTERVAL_MED 16
|
|
||||||
#define MK_C_OFFSET_FAST 12
|
|
||||||
#define MK_C_INTERVAL_FAST 16
|
|
||||||
// scroll wheel speeds:
|
|
||||||
#define MK_W_OFFSET_SLOW 1 // wheel clicks
|
|
||||||
#define MK_W_INTERVAL_SLOW 400 // milliseconds
|
|
||||||
#define MK_W_OFFSET_MED 1
|
|
||||||
#define MK_W_INTERVAL_MED 200
|
|
||||||
#define MK_W_OFFSET_FAST 1
|
|
||||||
#define MK_W_INTERVAL_FAST 100
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Medium values will be used as the default or unmodified speed.
|
Use the following settings if you want to adjust cursor movement or scrolling:
|
||||||
The speed at which both the cursor and scrolling move can be selected with KC_ACL0, KC_ACL1, KC_ACL2 for slow, medium, and fast. However, if you leave MK_MOMENTARY_ACCEL defined then there is no need to ever send KC_ACL1, since that will be the unmodified speed.
|
|
||||||
|
|Define |Default |Description |
|
||||||
|
|---------------------|-------------|-------------------------------------------|
|
||||||
|
|`MK_3_SPEED` |*Not defined*|Enable constant cursor speeds |
|
||||||
|
|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection |
|
||||||
|
|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) |
|
||||||
|
|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) |
|
||||||
|
|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) |
|
||||||
|
|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) |
|
||||||
|
|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) |
|
||||||
|
|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) |
|
||||||
|
|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) |
|
||||||
|
|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) |
|
||||||
|
|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)|
|
||||||
|
|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) |
|
||||||
|
|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) |
|
||||||
|
|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) |
|
||||||
|
|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) |
|
||||||
|
|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
|
||||||
|
|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
|
||||||
|
|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
|
||||||
@@ -5,7 +5,7 @@ This feature allows you to use RGB LED matrices driven by external drivers. It h
|
|||||||
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
|
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
|
||||||
|
|
||||||
## Driver configuration
|
## Driver configuration
|
||||||
|
---
|
||||||
### IS31FL3731
|
### IS31FL3731
|
||||||
|
|
||||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
@@ -52,6 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
|
|
||||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
||||||
|
|
||||||
|
---
|
||||||
### IS31FL3733/IS31FL3737
|
### IS31FL3733/IS31FL3737
|
||||||
|
|
||||||
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
||||||
@@ -102,6 +103,27 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
|
|
||||||
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### WS2812 (AVR only)
|
||||||
|
|
||||||
|
There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
|
```C
|
||||||
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the hardware via your `config.h`:
|
||||||
|
|
||||||
|
```C
|
||||||
|
// The pin connected to the data pin of the LEDs
|
||||||
|
#define RGB_DI_PIN D7
|
||||||
|
// The number of LEDs connected
|
||||||
|
#define DRIVER_LED_TOTAL 70
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
From this point forward the configuration is the same for all the drivers.
|
From this point forward the configuration is the same for all the drivers.
|
||||||
|
|
||||||
```C
|
```C
|
||||||
|
|||||||
@@ -27,6 +27,12 @@
|
|||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE)
|
||||||
|
// LED color buffer
|
||||||
|
LED_TYPE led[DRIVER_LED_TOTAL];
|
||||||
|
#define LED_ARRAY led
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGBW_BB_TWI
|
#ifdef RGBW_BB_TWI
|
||||||
|
|
||||||
// Port for the I2C
|
// Port for the I2C
|
||||||
@@ -141,6 +147,25 @@ unsigned char I2C_Write(unsigned char c)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
// Set an led in the buffer to a color
|
||||||
|
void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
|
||||||
|
{
|
||||||
|
led[i].r = r;
|
||||||
|
led[i].g = g;
|
||||||
|
led[i].b = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < RGBLED_NUM; i++) {
|
||||||
|
led[i].r = r;
|
||||||
|
led[i].g = g;
|
||||||
|
led[i].b = b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Setleds for standard RGB
|
// Setleds for standard RGB
|
||||||
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds)
|
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
#include "rgblight_types.h"
|
#include "rgblight_types.h"
|
||||||
|
|
||||||
|
|
||||||
/* User Interface
|
/* User Interface
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
@@ -43,6 +42,10 @@
|
|||||||
* - Send out the LED data
|
* - Send out the LED data
|
||||||
* - Wait 50�s to reset the LEDs
|
* - Wait 50�s to reset the LEDs
|
||||||
*/
|
*/
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
void ws2812_setled (int index, uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
#endif
|
||||||
|
|
||||||
void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
|
void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
|
||||||
void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
|
void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#define OTHER 3
|
#define OTHER 3
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
MACRO1
|
MACRO1 = SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"keyboard_name": "Canoe",
|
"keyboard_name": "Canoe",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"url": "",
|
"url": "",
|
||||||
"height": 8,
|
"height": 6,
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_iso": {
|
"LAYOUT_iso": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "skullydazed",
|
"maintainer": "skullydazed",
|
||||||
"width": 10,
|
"width": 10,
|
||||||
"height": 7,
|
"height": 8,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "command.h"
|
||||||
#include "action_pseudo_lut.h"
|
#include "action_pseudo_lut.h"
|
||||||
|
|
||||||
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
||||||
|
|||||||
@@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 iw0rm3r
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER iw0rm3r
|
||||||
|
#define PRODUCT IBM Model M 101/102
|
||||||
|
#define DESCRIPTION Controlled by AVR chip
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 { F7, F6, F5, F4, F3, F2, F1, F0 }
|
||||||
|
#define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
||||||
|
/* 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_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT 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 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#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 B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#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
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "IBM Model M 101 ANSI/102 ISO",
|
||||||
|
"url": "https://github.com/iw0rm3r/qmk_firmware/tree/modelm101/keyboards/converter/modelm101",
|
||||||
|
"maintainer": "iw0rm3r",
|
||||||
|
"width": 22.5,
|
||||||
|
"height": 6.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"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":"Backspace", "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":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "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":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"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":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "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":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"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}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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,43 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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( /* Base layer */
|
||||||
|
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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||||
|
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_P1, KC_P2, KC_P3, KC_LGUI,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
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 modelm101
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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,43 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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( /* Base layer */
|
||||||
|
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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||||
|
KC_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_P1, KC_P2, KC_P3, KC_CAPS,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_APP, KC_PDOT
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
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,5 @@
|
|||||||
|
# This is my personal keymap for modelm101
|
||||||
|
|
||||||
|
Caps Lock is mapped as LGUI (Windows key).
|
||||||
|
Num Enter is mapped as Caps Lock.
|
||||||
|
Num0 is mapped as App key (context menu).
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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 "modelm101.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
/* Setting status LEDs pins to output and +5V (off) */
|
||||||
|
setPinOutput(B4);
|
||||||
|
setPinOutput(B5);
|
||||||
|
setPinOutput(B6);
|
||||||
|
writePinHigh(B4);
|
||||||
|
writePinHigh(B5);
|
||||||
|
writePinHigh(B6);
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||||
|
writePinLow(B4);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B4);
|
||||||
|
}
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
writePinLow(B6);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B6);
|
||||||
|
}
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
|
||||||
|
writePinLow(B5);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B5);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
* The first section contains "names" for physical keys of the keyboard
|
||||||
|
* and defines their position on the board.
|
||||||
|
* The second section defines position of the keys on the switch matrix
|
||||||
|
* (where COLUMNS and ROWS crosses). */
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \
|
||||||
|
\
|
||||||
|
K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \
|
||||||
|
K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \
|
||||||
|
K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \
|
||||||
|
K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \
|
||||||
|
K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
/* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \
|
||||||
|
/* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \
|
||||||
|
/* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \
|
||||||
|
/* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \
|
||||||
|
/* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \
|
||||||
|
/* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \
|
||||||
|
/* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \
|
||||||
|
/* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \
|
||||||
|
}
|
||||||
|
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# modelm101
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is a configuration for the QMK firmware for reversible conversion of IBM's Model M keyboards (common 101-key ANSI and 102-key ISO models) from stock, power-hungry controller, to a modern one, running the USB bus.
|
||||||
|
Configuration is build for the Atmel AT90USB1286 controller, which you can easily use on the Teensy 2.0++ board (produced by PJRC).
|
||||||
|
Project is heavely based on 2 other projects:
|
||||||
|
1. Teensy 2.0++-based custom Model M controller running TMK firmware ('modelm" by [lmorchard](https://blog.lmorchard.com/2016/02/21/modelm-controller/)); - had a few issues.
|
||||||
|
2. Teensy 2.0++-based custom Model M 122-key controller running QMK firmware ("ibm122m" by [lukexorz](https://github.com/lukexorz)); - had wrong layout for 101/102-key boards and no status LED support.
|
||||||
|
|
||||||
|
For this conversion you will need:
|
||||||
|
1. Teensy 2.0++ dev board itself (can be used a different dev board, but it will require some changes in configuration);
|
||||||
|
2. Ribbon connectors to connect the membrane to a dev board. Depending on your Model M variation, you will need 1 Trio-mate 16pin connector (6-520315-6 or 6-520415-6) and 1 Trio-mate 8pin connector (5-120628-8 or 5-520314-8), or 2 Trio-mate 16pin connectors;
|
||||||
|
3. Full-sized breadboard (without power rails; half-size should do, but full-sized one looks more native) or a PCB to wire everything up;
|
||||||
|
4. A bunch of jumper wires;
|
||||||
|
5. mini-USB male cable with any USB socket you want to use to connect Teensy inside the keyboard to your PC (I use short mini-USB male to mini-USB female cable);
|
||||||
|
6. (optional) Resistors for connecting status LEDs if your LED PCB doesn't have any;
|
||||||
|
7. (optional) Double-sided tape to fix USB socket on or inside the keyboard case.
|
||||||
|
|
||||||
|
Pins of the Teensy board you should use by default:
|
||||||
|
```
|
||||||
|
Columns: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||||
|
Pins: C7 C6 C5 C4 C3 C2 C1 C0 E1 E0 D7 D6 D5 D4 D3 D2
|
||||||
|
--------------------------------------------------------
|
||||||
|
Rows: 1 2 3 4 5 6 7 8
|
||||||
|
Pins: F7 F6 F5 F4 F3 F2 F1 F0
|
||||||
|
--------------------------------------------------------
|
||||||
|
Status LEDs: CapsLock +5V ScrollLock NumLock
|
||||||
|
Pins: B6 5V B5 B4
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note that some versions of Model M have LED connected with a ribbon cable, and not with separate wires.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [iw0rm3r](https://github.com/iw0rm3r)
|
||||||
|
Hardware Supported: Teensy 2.0++ board by PJRC
|
||||||
|
Hardware Availability: https://www.pjrc.com/store/teensypp.html
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make converter/modelm101:default:teensy
|
||||||
|
|
||||||
|
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 = halfkay
|
||||||
|
|
||||||
|
|
||||||
|
# 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=1024
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = no # 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 = 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)
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 4.5,
|
"height": 4.7,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ extern uint8_t is_master;
|
|||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _QWERTY 0
|
#define _QWERTY 0
|
||||||
#define _LOWER 3
|
#define _LOWER 1
|
||||||
#define _RAISE 4
|
#define _RAISE 2
|
||||||
#define _ADJUST 16
|
#define _ADJUST 3
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
QWERTY = SAFE_RANGE,
|
QWERTY = SAFE_RANGE,
|
||||||
@@ -246,4 +246,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,9 +22,9 @@ extern uint8_t is_master;
|
|||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _QWERTY 0
|
#define _QWERTY 0
|
||||||
#define _LOWER 3
|
#define _LOWER 1
|
||||||
#define _RAISE 4
|
#define _RAISE 2
|
||||||
#define _ADJUST 16
|
#define _ADJUST 3
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
QWERTY = SAFE_RANGE,
|
QWERTY = SAFE_RANGE,
|
||||||
@@ -240,4 +240,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,9 +22,9 @@ extern uint8_t is_master;
|
|||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _QWERTY 0
|
#define _QWERTY 0
|
||||||
#define _LOWER 3
|
#define _LOWER 1
|
||||||
#define _RAISE 4
|
#define _RAISE 2
|
||||||
#define _ADJUST 16
|
#define _ADJUST 3
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
QWERTY = SAFE_RANGE,
|
QWERTY = SAFE_RANGE,
|
||||||
@@ -241,4 +241,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3,11 +3,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "crkbd.h"
|
#include "crkbd.h"
|
||||||
|
|
||||||
|
// in the future, should use (1U<<_LAYER_NAME) instead, but needs to be moved to keymap,c
|
||||||
#define L_BASE 0
|
#define L_BASE 0
|
||||||
#define L_LOWER 8
|
#define L_LOWER 2
|
||||||
#define L_RAISE 16
|
#define L_RAISE 4
|
||||||
#define L_ADJUST 65536
|
#define L_ADJUST 8
|
||||||
#define L_ADJUST_TRI 65560
|
#define L_ADJUST_TRI 14
|
||||||
|
|
||||||
char layer_state_str[24];
|
char layer_state_str[24];
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
#define RGBLED_NUM 54 // Number of LEDs
|
||||||
|
#define DRIVER_LED_TOTAL RGBLED_NUM
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -13,6 +13,177 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
|
// Logical Layout
|
||||||
|
// Columns
|
||||||
|
// Left
|
||||||
|
// 0 1 2 3 4 5
|
||||||
|
// ROWS
|
||||||
|
// 25 24 19 18 11 10 0
|
||||||
|
// 03 02 01
|
||||||
|
// 26 23 20 17 12 09 1
|
||||||
|
// 04 05 06
|
||||||
|
// 27 22 21 16 13 08 2
|
||||||
|
//
|
||||||
|
// 15 14 07 3
|
||||||
|
//
|
||||||
|
// Right
|
||||||
|
// 0 1 2 3 4 5
|
||||||
|
// ROWS
|
||||||
|
// 25 24 19 18 11 10 4
|
||||||
|
// 03 02 01
|
||||||
|
// 26 23 20 17 12 09 5
|
||||||
|
// 04 05 06
|
||||||
|
// 27 22 21 16 13 08 6
|
||||||
|
//
|
||||||
|
// 15 14 07 7
|
||||||
|
//
|
||||||
|
// Physical Layout
|
||||||
|
// Columns
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||||
|
// ROWS
|
||||||
|
// 25 24 19 18 11 10 10 11 18 19 24 25 0
|
||||||
|
// 03 02 01 01 02 03
|
||||||
|
// 26 23 20 17 12 09 09 12 17 20 23 26 1
|
||||||
|
// 04 04
|
||||||
|
// 27 22 21 16 13 08 08 13 16 21 22 27 2
|
||||||
|
// 05 06 06 05
|
||||||
|
// 15 14 07 07 14 15 3
|
||||||
|
|
||||||
|
/* {row | col << 4} logical layout rows/cols
|
||||||
|
* | {x=0..224, y=0..64} physical layout
|
||||||
|
* | | | modifier
|
||||||
|
* | | | */
|
||||||
|
const rgb_led g_rgb_leds_left[27] = {
|
||||||
|
//LEFT
|
||||||
|
{ { 0xFF }, { 85, 16 }, 0 }, // 1
|
||||||
|
{ { 0xFF }, { 50, 13 }, 0 }, // 2
|
||||||
|
{ { 0xFF }, { 16, 20 }, 0 }, // 3
|
||||||
|
{ { 0xFF }, { 16, 38 }, 0 }, // 4
|
||||||
|
{ { 0xFF }, { 50, 48 }, 0 }, // 5
|
||||||
|
{ { 0xFF }, { 85, 52 }, 0 }, // 6
|
||||||
|
|
||||||
|
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, // 7
|
||||||
|
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 0 }, // 8
|
||||||
|
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, // 9
|
||||||
|
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, //10
|
||||||
|
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, //11
|
||||||
|
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, //12
|
||||||
|
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, //13
|
||||||
|
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, //14
|
||||||
|
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, //15
|
||||||
|
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 0 }, //16
|
||||||
|
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, //17
|
||||||
|
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, //18
|
||||||
|
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, //19
|
||||||
|
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, //20
|
||||||
|
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, //21
|
||||||
|
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, //22
|
||||||
|
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, //23
|
||||||
|
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, //24
|
||||||
|
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, //25
|
||||||
|
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, //26
|
||||||
|
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, //27
|
||||||
|
};
|
||||||
|
const rgb_led g_rgb_leds_right[27] = {
|
||||||
|
//RIGHT
|
||||||
|
{ { 0xFF }, { 139, 16 }, 0 }, // 1
|
||||||
|
{ { 0xFF }, { 174, 13 }, 0 }, // 2
|
||||||
|
{ { 0xFF }, { 208, 20 }, 0 }, // 3
|
||||||
|
{ { 0xFF }, { 208, 38 }, 0 }, // 4
|
||||||
|
{ { 0xFF }, { 174, 48 }, 0 }, // 5
|
||||||
|
{ { 0xFF }, { 139, 52 }, 0 }, // 6
|
||||||
|
|
||||||
|
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, // 7
|
||||||
|
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 0 }, // 8
|
||||||
|
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, // 9
|
||||||
|
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, //10
|
||||||
|
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, //11
|
||||||
|
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, //12
|
||||||
|
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, //13
|
||||||
|
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, //14
|
||||||
|
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, //15
|
||||||
|
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 0 }, //16
|
||||||
|
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, //17
|
||||||
|
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, //18
|
||||||
|
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, //19
|
||||||
|
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, //20
|
||||||
|
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, //21
|
||||||
|
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, //22
|
||||||
|
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, //23
|
||||||
|
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, //24
|
||||||
|
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, //25
|
||||||
|
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, //26
|
||||||
|
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, //27
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
|
||||||
|
//LEFT
|
||||||
|
{ { 0xFF }, { 85, 16 }, 0 }, // 1
|
||||||
|
{ { 0xFF }, { 50, 13 }, 0 }, // 2
|
||||||
|
{ { 0xFF }, { 16, 20 }, 0 }, // 3
|
||||||
|
{ { 0xFF }, { 16, 38 }, 0 }, // 4
|
||||||
|
{ { 0xFF }, { 50, 48 }, 0 }, // 5
|
||||||
|
{ { 0xFF }, { 85, 52 }, 0 }, // 6
|
||||||
|
|
||||||
|
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, // 7
|
||||||
|
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 0 }, // 8
|
||||||
|
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, // 9
|
||||||
|
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, //10
|
||||||
|
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, //11
|
||||||
|
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, //12
|
||||||
|
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, //13
|
||||||
|
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, //14
|
||||||
|
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, //15
|
||||||
|
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 0 }, //16
|
||||||
|
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, //17
|
||||||
|
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, //18
|
||||||
|
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, //19
|
||||||
|
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, //20
|
||||||
|
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, //21
|
||||||
|
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, //22
|
||||||
|
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, //23
|
||||||
|
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, //24
|
||||||
|
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, //25
|
||||||
|
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, //26
|
||||||
|
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, //27
|
||||||
|
|
||||||
|
//RIGHT
|
||||||
|
{ { 0xFF }, { 139, 16 }, 0 }, // 1
|
||||||
|
{ { 0xFF }, { 174, 13 }, 0 }, // 2
|
||||||
|
{ { 0xFF }, { 208, 20 }, 0 }, // 3
|
||||||
|
{ { 0xFF }, { 208, 38 }, 0 }, // 4
|
||||||
|
{ { 0xFF }, { 174, 48 }, 0 }, // 5
|
||||||
|
{ { 0xFF }, { 139, 52 }, 0 }, // 6
|
||||||
|
|
||||||
|
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, // 7
|
||||||
|
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 0 }, // 8
|
||||||
|
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, // 9
|
||||||
|
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, //10
|
||||||
|
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, //11
|
||||||
|
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, //12
|
||||||
|
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, //13
|
||||||
|
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, //14
|
||||||
|
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, //15
|
||||||
|
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 0 }, //16
|
||||||
|
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, //17
|
||||||
|
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, //18
|
||||||
|
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, //19
|
||||||
|
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, //20
|
||||||
|
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, //21
|
||||||
|
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, //22
|
||||||
|
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, //23
|
||||||
|
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, //24
|
||||||
|
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, //25
|
||||||
|
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, //26
|
||||||
|
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, //27
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Ergodone",
|
"keyboard_name": "Ergodone",
|
||||||
"maintainer": "Yu He",
|
"maintainer": "Yu He",
|
||||||
"width": 19.5,
|
"width": 17,
|
||||||
"height": 9.375,
|
"height": 8,
|
||||||
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_ergodox": {
|
"LAYOUT_ergodox": {
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* 5, which is now closer to 10ms, but still plenty according to
|
* 5, which is now closer to 10ms, but still plenty according to
|
||||||
* manufacturer specs.
|
* manufacturer specs.
|
||||||
*/
|
*/
|
||||||
#define DEBOUNCE 10
|
|
||||||
|
|
||||||
#define USB_MAX_POWER_CONSUMPTION 500
|
#define USB_MAX_POWER_CONSUMPTION 500
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"keyboard_name": "ErgoDox EZ",
|
"keyboard_name": "ErgoDox EZ",
|
||||||
"url": "ergodox-ez.com",
|
"url": "ergodox-ez.com",
|
||||||
"maintainer": "erez",
|
"maintainer": "erez",
|
||||||
"width": 19.5,
|
"width": 17,
|
||||||
"height": 9.375,
|
"height": 8,
|
||||||
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_ergodox": {
|
"LAYOUT_ergodox": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Infinity Ergodox",
|
"keyboard_name": "Infinity Ergodox",
|
||||||
"width": 19.5,
|
"width": 17,
|
||||||
"height": 9.375,
|
"height": 8,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_ergodox": {
|
"LAYOUT_ergodox": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"maintainer": "germ",
|
"maintainer": "germ",
|
||||||
"height": 4.75,
|
"height": 5.75,
|
||||||
"width": 19.5,
|
"width": 19.5,
|
||||||
"keyboard_name": "Gergo",
|
"keyboard_name": "Gergo",
|
||||||
"url": "http://gboards.ca",
|
"url": "http://gboards.ca",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
* @details Frequency of the system timer that drives the system ticks. This
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
* setting also defines the system tick time unit.
|
* setting also defines the system tick time unit.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_ST_FREQUENCY 100000
|
#define CH_CFG_ST_FREQUENCY 1000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Time delta constant for the tick-less mode.
|
* @brief Time delta constant for the tick-less mode.
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
* The value one is not valid, timeouts are rounded up to
|
* The value one is not valid, timeouts are rounded up to
|
||||||
* this value.
|
* this value.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_ST_TIMEDELTA 2
|
#define CH_CFG_ST_TIMEDELTA 0
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,28 @@
|
|||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
#define MATRIX_COLS 15
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#undef MATRIX_ROW_PINS
|
||||||
|
#undef MATRIX_COL_PINS
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 }
|
||||||
|
#define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define NUMBER_OF_ENCODERS 1
|
||||||
|
#define ENCODERS_PAD_A { B13 }
|
||||||
|
#define ENCODERS_PAD_B { B14 }
|
||||||
|
|
||||||
|
|
||||||
//Audio
|
//Audio
|
||||||
#undef AUDIO_VOICES
|
#undef AUDIO_VOICES
|
||||||
#undef C6_AUDIO
|
#undef C6_AUDIO
|
||||||
@@ -55,16 +77,6 @@
|
|||||||
#define micro_oled_rotate_180
|
#define micro_oled_rotate_180
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*
|
|
||||||
* 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)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 6
|
#define DEBOUNCE 6
|
||||||
@@ -185,13 +197,13 @@
|
|||||||
#define ZC_DET_TIME 0
|
#define ZC_DET_TIME 0
|
||||||
#define AUTO_CAL_TIME 3
|
#define AUTO_CAL_TIME 3
|
||||||
|
|
||||||
//#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
//#define RGBLED_NUM 10
|
#define RGBLED_NUM 10
|
||||||
//#define RGB_DI_PIN B5
|
#define RGB_DI_PIN B5
|
||||||
//#define DRIVER_LED_TOTAL RGBLED_NUM
|
#define DRIVER_LED_TOTAL RGBLED_NUM
|
||||||
|
|
||||||
//#define RGB_MATRIX_KEYPRESSES
|
// #define RGB_MATRIX_KEYPRESSES
|
||||||
|
|
||||||
#define SOLENOID_PIN A14
|
#define SOLENOID_PIN A14
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
* @brief Enables the PWM subsystem.
|
* @brief Enables the PWM subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_PWM FALSE
|
#define HAL_USE_PWM TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -175,19 +175,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,------+------+------+------+------+------------------------------------------------.
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
* | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
* | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
|
* | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | | | |
|
* | | | | | | | | | | | |CK RS |CK - |CK + |CK TG |
|
||||||
* `--------------------------------------------------------------------------------------------------------'
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT(
|
[_ADJUST] = LAYOUT(
|
||||||
RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, _______, \
|
RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, EEP_RST, \
|
||||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||||
|
|||||||
@@ -153,19 +153,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,------+------+------+------+------+------------------------------------------------.
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
* | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
* | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
|
* | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | | | |
|
* | | | | | | | | | | | |CK RS |CK - |CK + |CK TG |
|
||||||
* `--------------------------------------------------------------------------------------------------------'
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT_wrapper(
|
[_ADJUST] = LAYOUT_wrapper(
|
||||||
_______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, _______, \
|
_______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, EEP_RST, \
|
||||||
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ When adding your keymap to this list, keep it organised alphabetically (select l
|
|||||||
|
|
||||||
* **folder_name** description
|
* **folder_name** description
|
||||||
|
|
||||||
# List of Planck keymaps
|
# List of Hadron keymaps
|
||||||
|
|
||||||
* **default** default Planck layout
|
* **default** default Hadron layout
|
||||||
* **cbbrowne** cbbrowne's Planck layout
|
* **ishtob** ishtob's Hadron layout
|
||||||
|
* **sebaslayout** sebaslayout's Hadron layout
|
||||||
@@ -1,195 +0,0 @@
|
|||||||
#include <string.h>
|
|
||||||
#include "hal.h"
|
|
||||||
#include "timer.h"
|
|
||||||
#include "wait.h"
|
|
||||||
#include "printf.h"
|
|
||||||
#include "backlight.h"
|
|
||||||
#include "matrix.h"
|
|
||||||
#include "action.h"
|
|
||||||
#include "keycode.h"
|
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
|
||||||
static matrix_row_t matrix[MATRIX_ROWS];
|
|
||||||
static matrix_row_t matrix_debouncing[MATRIX_COLS];
|
|
||||||
static bool debouncing = false;
|
|
||||||
static uint16_t debouncing_time = 0;
|
|
||||||
|
|
||||||
static uint8_t encoder_state = 0;
|
|
||||||
static int8_t encoder_value = 0;
|
|
||||||
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void matrix_init_user(void) {}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void matrix_scan_user(void) {}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void matrix_scan_kb(void) {
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init(void) {
|
|
||||||
printf("matrix init\n");
|
|
||||||
//debug_matrix = true;
|
|
||||||
|
|
||||||
// encoder setup
|
|
||||||
palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP);
|
|
||||||
palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP);
|
|
||||||
|
|
||||||
encoder_state = (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
|
|
||||||
|
|
||||||
// actual matrix setup
|
|
||||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
|
|
||||||
palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
|
|
||||||
|
|
||||||
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
|
||||||
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
|
||||||
|
|
||||||
|
|
||||||
matrix_init_quantum();
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
|
||||||
void encoder_update(bool clockwise) { }
|
|
||||||
|
|
||||||
#ifndef ENCODER_RESOLUTION
|
|
||||||
#define ENCODER_RESOLUTION 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t matrix_scan(void) {
|
|
||||||
// encoder on B13 and B14
|
|
||||||
encoder_state <<= 2;
|
|
||||||
encoder_state |= (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
|
|
||||||
encoder_value += encoder_LUT[encoder_state & 0xF];
|
|
||||||
if (encoder_value >= ENCODER_RESOLUTION) {
|
|
||||||
encoder_update(0);
|
|
||||||
}
|
|
||||||
if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
|
|
||||||
encoder_update(1);
|
|
||||||
}
|
|
||||||
encoder_value %= ENCODER_RESOLUTION;
|
|
||||||
|
|
||||||
// actual matrix
|
|
||||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
|
||||||
matrix_row_t data = 0;
|
|
||||||
|
|
||||||
// strobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
|
|
||||||
switch (col) {
|
|
||||||
case 0: palSetPad(GPIOB, 8); break;
|
|
||||||
case 1: palSetPad(GPIOB, 2); break;
|
|
||||||
case 2: palSetPad(GPIOB, 10); break;
|
|
||||||
case 3: palSetPad(GPIOA, 0); break;
|
|
||||||
case 4: palSetPad(GPIOA, 1); break;
|
|
||||||
case 5: palSetPad(GPIOA, 2); break;
|
|
||||||
case 6: palSetPad(GPIOB, 0); break;
|
|
||||||
case 7: palSetPad(GPIOA, 3); break;
|
|
||||||
case 8: palSetPad(GPIOB, 1); break;
|
|
||||||
case 9: palSetPad(GPIOA, 6); break;
|
|
||||||
case 10: palSetPad(GPIOA, 7); break;
|
|
||||||
case 11: palSetPad(GPIOB, 12); break;
|
|
||||||
case 12: palSetPad(GPIOC, 13); break;
|
|
||||||
case 13: palSetPad(GPIOB, 11); break;
|
|
||||||
case 14: palSetPad(GPIOB, 9); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// need wait to settle pin state
|
|
||||||
wait_us(20);
|
|
||||||
|
|
||||||
// read row data { PC15, PC14, PA10, PA9, PA8 }
|
|
||||||
data = (
|
|
||||||
(palReadPad(GPIOC, 15) << 0 ) |
|
|
||||||
(palReadPad(GPIOC, 14) << 1 ) |
|
|
||||||
(palReadPad(GPIOA, 10) << 2 ) |
|
|
||||||
(palReadPad(GPIOA, 9) << 3 ) |
|
|
||||||
(palReadPad(GPIOA, 8) << 4 )
|
|
||||||
);
|
|
||||||
|
|
||||||
// unstrobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
|
|
||||||
switch (col) {
|
|
||||||
case 0: palClearPad(GPIOB, 8); break;
|
|
||||||
case 1: palClearPad(GPIOB, 2); break;
|
|
||||||
case 2: palClearPad(GPIOB, 10); break;
|
|
||||||
case 3: palClearPad(GPIOA, 0); break;
|
|
||||||
case 4: palClearPad(GPIOA, 1); break;
|
|
||||||
case 5: palClearPad(GPIOA, 2); break;
|
|
||||||
case 6: palClearPad(GPIOB, 0); break;
|
|
||||||
case 7: palClearPad(GPIOA, 3); break;
|
|
||||||
case 8: palClearPad(GPIOB, 1); break;
|
|
||||||
case 9: palClearPad(GPIOA, 6); break;
|
|
||||||
case 10: palClearPad(GPIOA, 7); break;
|
|
||||||
case 11: palClearPad(GPIOB, 12); break;
|
|
||||||
case 12: palClearPad(GPIOC, 13); break;
|
|
||||||
case 13: palClearPad(GPIOB, 11); break;
|
|
||||||
case 14: palClearPad(GPIOB, 9); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (matrix_debouncing[col] != data) {
|
|
||||||
matrix_debouncing[col] = data;
|
|
||||||
debouncing = true;
|
|
||||||
debouncing_time = timer_read();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
|
||||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
matrix[row] = 0;
|
|
||||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
|
||||||
matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
debouncing = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_scan_quantum();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool matrix_is_on(uint8_t row, uint8_t col) {
|
|
||||||
return (matrix[row] & (1<<col));
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_row_t matrix_get_row(uint8_t row) {
|
|
||||||
return matrix[row];
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_print(void) {
|
|
||||||
printf("\nr/c 01234567\n");
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
printf("%X0: ", row);
|
|
||||||
matrix_row_t data = matrix_get_row(row);
|
|
||||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
|
||||||
if (data & (1<<col))
|
|
||||||
printf("1");
|
|
||||||
else
|
|
||||||
printf("0");
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
* ST driver system settings.
|
* ST driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_ST_IRQ_PRIORITY 8
|
#define STM32_ST_IRQ_PRIORITY 8
|
||||||
#define STM32_ST_USE_TIMER 2
|
#define STM32_ST_USE_TIMER 3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UART driver system settings.
|
* UART driver system settings.
|
||||||
|
|||||||
@@ -1,57 +1,25 @@
|
|||||||
# project specific files
|
# projecct specific files
|
||||||
SRC = matrix.c
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
MCU_FAMILY = STM32
|
|
||||||
MCU_SERIES = STM32F3xx
|
|
||||||
|
|
||||||
# Linker script to use
|
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
MCU_LDSCRIPT = STM32F303xC
|
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
|
||||||
MCU_STARTUP = stm32f3xx
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
BOARD = GENERIC_STM32_F303XC
|
|
||||||
|
|
||||||
# Cortex version
|
# Cortex version
|
||||||
MCU = cortex-m4
|
MCU = STM32F303
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
USE_FPU = yes
|
|
||||||
|
|
||||||
# Vector table for application
|
|
||||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
|
||||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
|
||||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
|
||||||
OPT_DEFS =
|
|
||||||
|
|
||||||
# Options to pass to dfu-util when flashing
|
|
||||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = full # 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
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = no # Custom matrix file
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
|
RGB_MATRIX_ENABLE = no #WS2812 once arm_rgb is implemented
|
||||||
HAPTIC_ENABLE += DRV2605L
|
HAPTIC_ENABLE += DRV2605L
|
||||||
QWIIC_ENABLE += MICRO_OLED
|
QWIIC_ENABLE += MICRO_OLED
|
||||||
|
ENCODER_ENABLER = yes
|
||||||
# SERIAL_LINK_ENABLE = yes
|
# SERIAL_LINK_ENABLE = yes
|
||||||
@@ -16,9 +16,36 @@
|
|||||||
#include "ver3.h"
|
#include "ver3.h"
|
||||||
#include "qwiic.h"
|
#include "qwiic.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "matrix.h"
|
|
||||||
#include "haptic.h"
|
#include "haptic.h"
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
#include "rgblight.h"
|
||||||
|
|
||||||
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
/*{row | col << 4}
|
||||||
|
| {x=0..224, y=0..64}
|
||||||
|
| | modifier
|
||||||
|
| | | */
|
||||||
|
{{1|(13<<4)}, {195, 3}, 0},
|
||||||
|
{{4|(13<<4)}, {195, 16}, 0},
|
||||||
|
{{4|(10<<4)}, {150, 16}, 0},
|
||||||
|
{{4|(7<<4)}, {105, 16}, 0},
|
||||||
|
{{4|(4<<4)}, {60, 16}, 0},
|
||||||
|
{{4|(1<<4)}, {15, 16}, 0},
|
||||||
|
{{1|(1<<4)}, {15, 3}, 0},
|
||||||
|
{{1|(4<<4)}, {60, 3}, 0},
|
||||||
|
{{1|(7<<4)}, {105, 3}, 0},
|
||||||
|
{{1|(10<<4)}, {150, 3}, 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t *o_fb;
|
||||||
|
|
||||||
|
uint16_t counterst = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||||
|
|
||||||
/* screen off after this many milliseconds */
|
/* screen off after this many milliseconds */
|
||||||
@@ -41,7 +68,7 @@ void draw_ui(void) {
|
|||||||
send_command(DISPLAYON);
|
send_command(DISPLAYON);
|
||||||
|
|
||||||
/* Layer indicator is 41 x 10 pixels */
|
/* Layer indicator is 41 x 10 pixels */
|
||||||
#define LAYER_INDICATOR_X 0
|
#define LAYER_INDICATOR_X 5
|
||||||
#define LAYER_INDICATOR_Y 0
|
#define LAYER_INDICATOR_Y 0
|
||||||
|
|
||||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||||
@@ -49,7 +76,7 @@ void draw_ui(void) {
|
|||||||
draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0);
|
draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0);
|
||||||
|
|
||||||
/* Matrix display is 19 x 9 pixels */
|
/* Matrix display is 19 x 9 pixels */
|
||||||
#define MATRIX_DISPLAY_X 0
|
#define MATRIX_DISPLAY_X 5
|
||||||
#define MATRIX_DISPLAY_Y 18
|
#define MATRIX_DISPLAY_Y 18
|
||||||
|
|
||||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||||
@@ -184,5 +211,10 @@ if (queue_for_send) {
|
|||||||
send_command(DISPLAYOFF); /* 0xAE */
|
send_command(DISPLAYOFF); /* 0xAE */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (counterst == 0) {
|
||||||
|
//testPatternFB(o_fb);
|
||||||
|
}
|
||||||
|
counterst = (counterst + 1) % 1024;
|
||||||
|
//rgblight_task();
|
||||||
matrix_scan_user();
|
matrix_scan_user();
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2018 Jack Humbert <[email protected]>
|
/* Copyright 2018 ishtob
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -13,9 +13,6 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef VER3_H
|
#pragma once
|
||||||
#define VER3_H
|
|
||||||
|
|
||||||
#include "hadron.h"
|
#include "hadron.h"
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"bootloader": "",
|
"bootloader": "",
|
||||||
"width": 20,
|
"width": 20,
|
||||||
"height": 8,
|
"height": 9.5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"keyboard_name": "Not So MiniDox",
|
"keyboard_name": "Not So MiniDox",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 12,
|
"width": 14,
|
||||||
"height": 5.75,
|
"height": 5.75,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 13,
|
"width": 13,
|
||||||
"height": 6,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"keyboard_name": "Prime_EXL",
|
"keyboard_name": "Prime_EXL",
|
||||||
"url": "https://www.primekb.com",
|
"url": "https://www.primekb.com",
|
||||||
"maintainer": "holtenc",
|
"maintainer": "holtenc",
|
||||||
"width": 18,
|
"width": 20.75,
|
||||||
"height": 5,
|
"height": 6,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":6.5,"y":0,"w":1,"h":1}, {"x":7.5,"y":0,"w":1,"h":1}, {"x":8.5,"y":0,"w":1,"h":1}, {"x":9.5,"y":0,"w":1,"h":1}, {"x":10.5,"y":0,"w":1,"h":1}, {"x":11.5,"y":0,"w":1,"h":1}, {"x":13.75,"y":0,"w":1,"h":1}, {"x":14.75,"y":0,"w":1,"h":1}, {"x":15.75,"y":0,"w":1,"h":1}, {"x":16.75,"y":0,"w":1,"h":1}, {"x":17.75,"y":0,"w":1,"h":1}, {"x":18.75,"y":0,"w":2,"h":1}, {"x":0,"y":1,"w":1,"h":1}, {"x":1,"y":1,"w":1,"h":1}, {"x":2,"y":1,"w":1,"h":1}, {"x":3,"y":1,"w":1,"h":1}, {"x":4,"y":1,"w":1,"h":1}, {"x":5,"y":1,"w":1,"h":1}, {"x":6.5,"y":1,"w":1.26,"h":1}, {"x":7.75,"y":1,"w":1,"h":1}, {"x":8.75,"y":1,"w":1,"h":1}, {"x":9.75,"y":1,"w":1,"h":1}, {"x":10.75,"y":1,"w":1,"h":1}, {"x":11.75,"y":1,"w":1,"h":1}, {"x":14,"y":1,"w":1,"h":1}, {"x":15,"y":1,"w":1,"h":1}, {"x":16,"y":1,"w":1,"h":1}, {"x":17,"y":1,"w":1,"h":1}, {"x":18,"y":1,"w":1,"h":1}, {"x":19,"y":1,"w":1.75,"h":1}, {"x":0,"y":2,"w":1,"h":1}, {"x":1,"y":2,"w":1,"h":1}, {"x":2,"y":2,"w":1,"h":1}, {"x":3,"y":2,"w":1,"h":1}, {"x":4,"y":2,"w":1,"h":1}, {"x":5,"y":2,"w":1,"h":1}, {"x":6.5,"y":2,"w":1.75,"h":1}, {"x":8.25,"y":2,"w":1,"h":1}, {"x":9.25,"y":2,"w":1,"h":1}, {"x":10.25,"y":2,"w":1,"h":1}, {"x":11.25,"y":2,"w":1,"h":1}, {"x":12.25,"y":2,"w":1,"h":1}, {"x":13.5,"y":2,"w":1,"h":1}, {"x":14.5,"y":2,"w":1,"h":1}, {"x":15.5,"y":2,"w":1,"h":1}, {"x":16.5,"y":2,"w":1,"h":1}, {"x":17.5,"y":2,"w":1,"h":1}, {"x":18.5,"y":2,"w":1,"h":1}, {"x":19.5,"y":2,"w":1.25,"h":1}, {"x":0,"y":3,"w":1,"h":1}, {"x":1,"y":3,"w":1,"h":1}, {"x":2,"y":3,"w":1,"h":1}, {"x":3,"y":3,"w":1,"h":1}, {"x":4,"y":3,"w":1,"h":1}, {"x":5,"y":3,"w":1,"h":1}, {"x":6.5,"y":3,"w":1.25,"h":1}, {"x":7.75,"y":3,"w":1.25,"h":1}, {"x":9,"y":3,"w":1,"h":1}, {"x":10,"y":3,"w":1,"h":1}, {"x":11,"y":3,"w":2,"h":1}, {"x":13.5,"y":3,"w":2,"h":1}, {"x":15.5,"y":3,"w":1,"h":1}, {"x":16.5,"y":3,"w":1,"h":1}, {"x":17.5,"y":3,"w":1.5,"h":1}, {"x":19,"y":3,"w":1.5,"h":1}, {"x":0,"y":4,"w":1,"h":1}, {"x":1,"y":4,"w":1,"h":1}, {"x":2,"y":4,"w":1,"h":1}, {"x":3,"y":4,"w":1,"h":1}, {"x":4,"y":4,"w":1,"h":1}, {"x":5,"y":4,"w":1,"h":1}]
|
"layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":6.5,"y":0,"w":1,"h":1}, {"x":7.5,"y":0,"w":1,"h":1}, {"x":8.5,"y":0,"w":1,"h":1}, {"x":9.5,"y":0,"w":1,"h":1}, {"x":10.5,"y":0,"w":1,"h":1}, {"x":11.5,"y":0,"w":1,"h":1}, {"x":13.75,"y":0,"w":1,"h":1}, {"x":14.75,"y":0,"w":1,"h":1}, {"x":15.75,"y":0,"w":1,"h":1}, {"x":16.75,"y":0,"w":1,"h":1}, {"x":17.75,"y":0,"w":1,"h":1}, {"x":18.75,"y":0,"w":2,"h":1}, {"x":0,"y":1,"w":1,"h":1}, {"x":1,"y":1,"w":1,"h":1}, {"x":2,"y":1,"w":1,"h":1}, {"x":3,"y":1,"w":1,"h":1}, {"x":4,"y":1,"w":1,"h":1}, {"x":5,"y":1,"w":1,"h":1}, {"x":6.5,"y":1,"w":1.26,"h":1}, {"x":7.75,"y":1,"w":1,"h":1}, {"x":8.75,"y":1,"w":1,"h":1}, {"x":9.75,"y":1,"w":1,"h":1}, {"x":10.75,"y":1,"w":1,"h":1}, {"x":11.75,"y":1,"w":1,"h":1}, {"x":14,"y":1,"w":1,"h":1}, {"x":15,"y":1,"w":1,"h":1}, {"x":16,"y":1,"w":1,"h":1}, {"x":17,"y":1,"w":1,"h":1}, {"x":18,"y":1,"w":1,"h":1}, {"x":19,"y":1,"w":1.75,"h":1}, {"x":0,"y":2,"w":1,"h":1}, {"x":1,"y":2,"w":1,"h":1}, {"x":2,"y":2,"w":1,"h":1}, {"x":3,"y":2,"w":1,"h":1}, {"x":4,"y":2,"w":1,"h":1}, {"x":5,"y":2,"w":1,"h":1}, {"x":6.5,"y":2,"w":1.75,"h":1}, {"x":8.25,"y":2,"w":1,"h":1}, {"x":9.25,"y":2,"w":1,"h":1}, {"x":10.25,"y":2,"w":1,"h":1}, {"x":11.25,"y":2,"w":1,"h":1}, {"x":12.25,"y":2,"w":1,"h":1}, {"x":13.5,"y":2,"w":1,"h":1}, {"x":14.5,"y":2,"w":1,"h":1}, {"x":15.5,"y":2,"w":1,"h":1}, {"x":16.5,"y":2,"w":1,"h":1}, {"x":17.5,"y":2,"w":1,"h":1}, {"x":18.5,"y":2,"w":1,"h":1}, {"x":19.5,"y":2,"w":1.25,"h":1}, {"x":0,"y":3,"w":1,"h":1}, {"x":1,"y":3,"w":1,"h":1}, {"x":2,"y":3,"w":1,"h":1}, {"x":3,"y":3,"w":1,"h":1}, {"x":4,"y":3,"w":1,"h":1}, {"x":5,"y":3,"w":1,"h":1}, {"x":6.5,"y":3,"w":1.25,"h":1}, {"x":7.75,"y":3,"w":1.25,"h":1}, {"x":9,"y":3,"w":1,"h":1}, {"x":10,"y":3,"w":1,"h":1}, {"x":11,"y":3,"w":2,"h":1}, {"x":13.5,"y":3,"w":2,"h":1}, {"x":15.5,"y":3,"w":1,"h":1}, {"x":16.5,"y":3,"w":1,"h":1}, {"x":17.5,"y":3,"w":1.5,"h":1}, {"x":19,"y":3,"w":1.5,"h":1}, {"x":0,"y":4,"w":1,"h":1}, {"x":1,"y":4,"w":1,"h":1}, {"x":2,"y":4,"w":1,"h":1}, {"x":3,"y":4,"w":1,"h":1}, {"x":4,"y":4,"w":1,"h":1}, {"x":5,"y":4,"w":1,"h":1}]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 16,
|
"width": 16,
|
||||||
"height": 5,
|
"height": 4.5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "Flehrad",
|
"maintainer": "Flehrad",
|
||||||
"width": 4.375,
|
"width": 4.375,
|
||||||
"height": 4.375,
|
"height": 4.5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_tradestation": {
|
"LAYOUT_tradestation": {
|
||||||
"layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25, "w":2},{"x":2.25, "y":2.25, "w":2},{"x":0, "y":3.5, "w":2},{"x":2.25, "y":3.5, "w":2}]
|
"layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25, "w":2},{"x":2.25, "y":2.25, "w":2},{"x":0, "y":3.5, "w":2},{"x":2.25, "y":3.5, "w":2}]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "command.h"
|
||||||
#include "action_pseudo_lut.h"
|
#include "action_pseudo_lut.h"
|
||||||
|
|
||||||
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
||||||
|
|||||||
@@ -4,5 +4,6 @@
|
|||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
|
|
||||||
#define AUTO_SHIFT_TIMEOUT 150
|
#define AUTO_SHIFT_TIMEOUT 150
|
||||||
|
#define NO_AUTO_SHIFT_ALPHA
|
||||||
#define TAPPING_TERM 150
|
#define TAPPING_TERM 150
|
||||||
//#define BOOTMAGIC_KEY_SALT KC_LCTL
|
//#define BOOTMAGIC_KEY_SALT KC_LCTL
|
||||||
@@ -32,71 +32,131 @@ enum {
|
|||||||
TD_BSPC_DEL = 0,
|
TD_BSPC_DEL = 0,
|
||||||
TD_LCTL_LBRC = 1,
|
TD_LCTL_LBRC = 1,
|
||||||
TD_LALT_RBRC = 2,
|
TD_LALT_RBRC = 2,
|
||||||
|
TD_ESC_LAYER = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
|
void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) {
|
if (!state->pressed) {
|
||||||
register_mods(MOD_LSFT);
|
register_code16(KC_LPRN);
|
||||||
register_code(KC_9);
|
|
||||||
} else {
|
} else {
|
||||||
register_mods(MOD_LCTL);
|
register_code(KC_LCTL);
|
||||||
}
|
}
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
register_code(KC_LBRC);
|
register_code16(KC_LBRC);
|
||||||
} else if (state->count == 3) {
|
} else if (state->count == 3) {
|
||||||
register_mods(MOD_LSFT);
|
register_code16(KC_LCBR);
|
||||||
register_code(KC_LBRC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) {
|
unregister_code16(KC_LPRN);
|
||||||
unregister_mods(MOD_LSFT);
|
|
||||||
unregister_code(KC_9);
|
|
||||||
} else {
|
|
||||||
unregister_mods(MOD_LCTL);
|
|
||||||
}
|
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
unregister_code(KC_LBRC);
|
unregister_code16(KC_LBRC);
|
||||||
} else if (state->count == 3) {
|
} else if (state->count == 3) {
|
||||||
unregister_mods(MOD_LSFT);
|
unregister_code16(KC_LCBR);
|
||||||
unregister_code(KC_LBRC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
|
void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) {
|
if (!state->pressed) {
|
||||||
register_mods(MOD_LSFT);
|
register_code16(KC_RPRN);
|
||||||
register_code(KC_0);
|
|
||||||
} else {
|
} else {
|
||||||
register_mods(MOD_LALT);
|
register_code(KC_LALT);
|
||||||
}
|
}
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
register_code(KC_RBRC);
|
register_code16(KC_RBRC);
|
||||||
} else if (state->count == 3) {
|
} else if (state->count == 3) {
|
||||||
register_mods(MOD_LSFT);
|
register_code16(KC_RCBR);
|
||||||
register_code(KC_RBRC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) {
|
unregister_code16(KC_RPRN);
|
||||||
unregister_mods(MOD_LSFT);
|
|
||||||
unregister_code(KC_0);
|
|
||||||
} else {
|
|
||||||
unregister_mods(MOD_LALT);
|
|
||||||
}
|
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
unregister_code(KC_RBRC);
|
unregister_code16(KC_RBRC);
|
||||||
} else if (state->count == 3) {
|
} else if (state->count == 3) {
|
||||||
unregister_mods(MOD_LSFT);
|
unregister_code16(KC_RCBR);
|
||||||
unregister_code(KC_RBRC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool is_press_action;
|
||||||
|
int state;
|
||||||
|
} tap;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SINGLE_TAP = 1,
|
||||||
|
SINGLE_HOLD = 2,
|
||||||
|
DOUBLE_TAP = 3,
|
||||||
|
DOUBLE_HOLD = 4,
|
||||||
|
DOUBLE_SINGLE_TAP = 5, //send two single taps
|
||||||
|
TRIPLE_TAP = 6,
|
||||||
|
TRIPLE_HOLD = 7,
|
||||||
|
TRIPLE_SINGLE_TAP = 8, //send three single taps
|
||||||
|
};
|
||||||
|
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||||
|
else return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return DOUBLE_HOLD;
|
||||||
|
else return DOUBLE_TAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state->count == 3) {
|
||||||
|
if (state->interrupted) return TRIPLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return TRIPLE_HOLD;
|
||||||
|
else return TRIPLE_TAP;
|
||||||
|
}
|
||||||
|
else return 9; //magic number. At some point this method will expand to work for more presses
|
||||||
|
}
|
||||||
|
|
||||||
|
static tap tap_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
void layer_switcher (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
tap_state.state = cur_dance(state);
|
||||||
|
switch (tap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code(KC_ESC); break;
|
||||||
|
case SINGLE_HOLD: register_code(KC_ESC); break;
|
||||||
|
case DOUBLE_TAP: register_code(KC_ESC); break;
|
||||||
|
case DOUBLE_HOLD: layer_on(_COLEMAK); break;
|
||||||
|
case DOUBLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
|
||||||
|
case TRIPLE_TAP: register_code(KC_ESC); break;
|
||||||
|
case TRIPLE_HOLD: layer_on(_FX); break;
|
||||||
|
case TRIPLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
|
||||||
|
//Last case is for fast typing. Assuming your key is `f`:
|
||||||
|
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||||
|
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void layer_switcher_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (tap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code(KC_ESC); break;
|
||||||
|
case SINGLE_HOLD: unregister_code(KC_ESC); break;
|
||||||
|
case DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||||
|
case DOUBLE_HOLD: break;
|
||||||
|
case DOUBLE_SINGLE_TAP: unregister_code(KC_ESC); break;
|
||||||
|
case TRIPLE_TAP: unregister_code(KC_ESC); break;
|
||||||
|
case TRIPLE_HOLD: break;
|
||||||
|
case TRIPLE_SINGLE_TAP: unregister_code(KC_ESC); break;
|
||||||
|
}
|
||||||
|
tap_state.state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
@@ -106,6 +166,8 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
[TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
|
[TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
|
||||||
// Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT
|
// Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT
|
||||||
[TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset),
|
[TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset),
|
||||||
|
// Layer Switcher ESC
|
||||||
|
[TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -115,7 +177,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
TD(TD_ESC_LAYER), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
@@ -131,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), LT(_FN, KC_SPC), _______, KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
|
TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), _______, LT(_FX, KC_SPC), KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
|
||||||
),
|
),
|
||||||
@@ -194,19 +256,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
_______, BL_ON, BL_INC, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
_______, BL_OFF, BL_DEC, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______, \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
_______, RGB_TOG, BL_STEP, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_TOG, \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUD, RGB_SAD \
|
||||||
//| | | | | | | | | | | | |
|
//| | | | | | | | | | | | |
|
||||||
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
|
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"keyboard_name": "kbd4x",
|
"keyboard_name": "kbd4x",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 14,
|
"width": 12,
|
||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_planck_mit": {
|
"LAYOUT_planck_mit": {
|
||||||
|
|||||||
@@ -0,0 +1,145 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_QW,
|
||||||
|
_FO,
|
||||||
|
_FL,
|
||||||
|
_CL,
|
||||||
|
_DL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Custom macros
|
||||||
|
#define SPC_FUN LT(_FL, KC_SPC)
|
||||||
|
#define BSC_CON LT(_CL, KC_BSPC)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* 0: Qwerty layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│ INS │HOME │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │ END │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
|
||||||
|
* │TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │PGUP │
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
|
||||||
|
* │CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ENTER │PGDN │
|
||||||
|
* ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
|
||||||
|
* │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ UP │MO_CL│
|
||||||
|
* ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
|
||||||
|
* │LCTRL │L_GUI │L_ALT │SPC │MO(_FL│BSPC │R_ALT│R_GUI│R_CTR│LEFT │DOWN │RIGHT│
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 0: QWERTY */
|
||||||
|
[_QW] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME,
|
||||||
|
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_BSLS, KC_DEL, KC_END,
|
||||||
|
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_CLCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||||
|
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_CL),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_BSPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* 1: forty: this layer emulates a forty percent keyboard so I can transition to a forty percent :)
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
|
||||||
|
* │ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENT │ │ │ │
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
|
||||||
|
* │TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ │
|
||||||
|
* ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
|
||||||
|
* │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ │MO_CL│
|
||||||
|
* ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
|
||||||
|
* │LCTRL │L_ALT │MO(DL)│SPCFUN │BSPC │MO(_CL) │R_ALT│R_GUI│R_CTR│ │ │ │
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 1: FORTY */
|
||||||
|
[_FO] = LAYOUT(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX,
|
||||||
|
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, MO(_CL),
|
||||||
|
KC_LCTL, KC_LALT, MO(_DL), SPC_FUN, KC_BSPC, MO(_CL), KC_RALT, KC_RGUI, KC_RCTL, XXXXXXX, XXXXXXX, XXXXXXX),
|
||||||
|
|
||||||
|
|
||||||
|
/* 2: Function layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
|
||||||
|
* │ │ │HOME │ UP │END │ │ │ │ │ │ │ │ │ │VOLUP│
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
|
||||||
|
* │ │ │LEFT │DOWN │RIGHT│ │ │ │ │ │ │ │ │VOLDN│
|
||||||
|
* ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
|
||||||
|
* │ │ │ │ │PGDN │PGUP │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │VOLDN│VOLUP│ │ │ │ │
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 2: ANSI Fn layer */
|
||||||
|
[_FL] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
|
||||||
|
_______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______),
|
||||||
|
|
||||||
|
/* 3: Control layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │RESET│QWERT│FORTY│ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
|
||||||
|
* │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ DEL │ │ │ │
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
|
||||||
|
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ \ │ │ │
|
||||||
|
* ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 3: Control layer */
|
||||||
|
[_CL] = LAYOUT(
|
||||||
|
RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD,
|
||||||
|
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, _______, KC_VOLU,
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, _______, KC_VOLD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||||
|
|
||||||
|
/* 4: Another layer for ease
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ _ │ + │ { │ } │ | │ │ │ │
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ - │ = │ [ │ ] │ \ │ │ │
|
||||||
|
* ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 3: D control layer */
|
||||||
|
[_DL] = LAYOUT(
|
||||||
|
RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_VOLU,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_VOLD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI)
|
||||||
|
};
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
"keyboard_name": "Iris",
|
"keyboard_name": "Iris",
|
||||||
"url": "https://keeb.io",
|
"url": "https://keeb.io",
|
||||||
"maintainer": "Keebio",
|
"maintainer": "Keebio",
|
||||||
"width": 14.5,
|
"width": 15,
|
||||||
"height": 5,
|
"height": 5.75,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
Copyright 2018 Danny Nguyen <danny@keeb.io>
|
||||||
|
|
||||||
|
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
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 50
|
||||||
|
|
||||||
|
|
||||||
|
// #define USB_MAX_POWER_CONSUMPTION 100
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_FN1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │
|
||||||
|
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┘ ┌──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┤
|
||||||
|
* │TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │
|
||||||
|
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┤
|
||||||
|
* │CAPS │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ENTER │
|
||||||
|
* ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┐ └──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┤
|
||||||
|
* │LSHFT │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │RSHFT │ UP │
|
||||||
|
* ├──────┬─────┴─┬───┴──┬──┴─────┴────┬┴─────┤ ├─────┴┬────┴────┬┴────┬┴────┬┴────┬─────┼─────┤
|
||||||
|
* │LCTRL │L_GUI │L_ALT │SPC │FN1 │ │SPC │BSPC │R_ALT│R_CTR│LEFT │DOWN │RIGHT│
|
||||||
|
* └──────┴───────┴──────┴─────────────┴──────┘ └──────┴─────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
[_BASE] = 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_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
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_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_BSPC, KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_RGHT, KC_DOWN
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = 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_DEL, KC_BSPC,
|
||||||
|
_______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "xulkal.h"
|
||||||
|
|
||||||
|
enum ctrl_keycodes {
|
||||||
|
U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
|
||||||
|
U_T_AGCR, //USB Toggle Automatic GCR control
|
||||||
|
DBG_TOG, //DEBUG Toggle On / Off
|
||||||
|
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
||||||
|
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
||||||
|
DBG_MOU, //DEBUG Toggle Mouse Prints
|
||||||
|
MD_BOOT, //Restart into bootloader after hold timeout
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
||||||
|
|
||||||
|
keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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, TD_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \
|
||||||
|
KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
|
||||||
|
_______, RGB_RMOD, RGB_MOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
|
||||||
|
RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, _______, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
|
||||||
|
RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, RGB_TOG, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
[X] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
// 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) {
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
|
||||||
|
#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
|
||||||
|
#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
|
||||||
|
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint32_t key_timer;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case U_T_AUTO:
|
||||||
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case U_T_AGCR:
|
||||||
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_TOG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_MTRX:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_KBD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_MOU:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case MD_BOOT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
key_timer = timer_read32();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed32(key_timer) >= 500) {
|
||||||
|
reset_keyboard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true; //Process all other keycodes normally
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DISABLE_LTO = yes
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -58,7 +58,7 @@ 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
|
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
|
BACKLIGHT_ENABLE = yes # 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 = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL
|
||||||
),
|
),
|
||||||
|
|
||||||
[1] = LAYOUT_60_ansi(
|
[1] = LAYOUT_60_ansi(
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Monkeebs Orthodox Rev.1",
|
"keyboard_name": "Monkeebs Orthodox Rev.1",
|
||||||
"maintainer": "drashna",
|
"maintainer": "drashna",
|
||||||
"width": 17,
|
"width": 19,
|
||||||
"height": 17.24,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Monkeebs Orthodox Rev.3",
|
"keyboard_name": "Monkeebs Orthodox Rev.3",
|
||||||
"maintainer": "drashna",
|
"maintainer": "drashna",
|
||||||
"width": 17,
|
"width": 19,
|
||||||
"height": 17.24,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)",
|
"keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)",
|
||||||
"maintainer": "drashna",
|
"maintainer": "drashna",
|
||||||
"width": 17,
|
"width": 19,
|
||||||
"height": 17.24,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
secret.h
|
secrets.h
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||||
@@ -32,7 +29,9 @@
|
|||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
// Most tactile encoders have detents every 4 stages
|
// Leader Key
|
||||||
#define ENCODER_RESOLUTION 4
|
#define LEADER_TIMEOUT 250
|
||||||
|
#define LEADER_PER_KEY_TIMING
|
||||||
|
|
||||||
#endif
|
// Tap dance
|
||||||
|
#define TAPPING_TERM 200
|
||||||
@@ -1,112 +1,139 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "secret.h"
|
#include "no_keycodes.h"
|
||||||
|
|
||||||
|
#if __has_include("secrets.h")
|
||||||
|
# include "secrets.h"
|
||||||
|
#else
|
||||||
|
# define mail_str ""
|
||||||
|
# define pwd_str ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// layer definitions
|
||||||
enum planck_layers {
|
enum planck_layers {
|
||||||
_DEFAULT,
|
_DEFAULT,
|
||||||
_LOWER,
|
_LOWER,
|
||||||
_RAISE,
|
_RAISE,
|
||||||
_FUNCTION,
|
|
||||||
_GAME,
|
_GAME,
|
||||||
_GAMERAISE
|
_GLOW
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LOWER MO(_LOWER)
|
// sounds
|
||||||
#define RAISE MO(_RAISE)
|
#ifdef AUDIO_ENABLE
|
||||||
#define FUNCTION MO(_FUNCTION)
|
float gamesong[][2] = SONG(MARIO_MUSHROOM);
|
||||||
#define GAMER MO(_GAMERAISE)
|
float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
float failed[][2] = SONG(TERMINAL_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NO_OE KC_SCLN
|
// leader key
|
||||||
#define NO_AE KC_QUOT
|
bool leader_succeed;
|
||||||
#define NO_AA KC_LBRC
|
bool leader_layer_game;
|
||||||
#define NO_EXCL LSFT(KC_1)
|
bool leader_layer_def;
|
||||||
#define NO_QEST LSFT(KC_MINS)
|
LEADER_EXTERNS();
|
||||||
#define NO_APOS KC_BSLS
|
|
||||||
#define NO_QUOT LSFT(KC_2)
|
|
||||||
#define NO_UMLA KC_RBRC
|
|
||||||
#define NO_HASH LSFT(KC_3)
|
|
||||||
#define NO_FSLS LSFT(KC_7)
|
|
||||||
#define NO_LPAR LSFT(KC_8)
|
|
||||||
#define NO_RPAR LSFT(KC_9)
|
|
||||||
#define NO_ALFA ALGR(KC_2)
|
|
||||||
#define NO_AMPE LSFT(KC_6)
|
|
||||||
#define NO_USDO ALGR(KC_4)
|
|
||||||
#define NO_PERC LSFT(KC_5)
|
|
||||||
#define NO_BSLS KC_EQL
|
|
||||||
#define NO_ASTE LSFT(KC_BSLS)
|
|
||||||
#define NO_LBRA ALGR(KC_7)
|
|
||||||
#define NO_RBRA ALGR(KC_0)
|
|
||||||
#define NO_LBRC ALGR(KC_8)
|
|
||||||
#define NO_RBRC ALGR(KC_9)
|
|
||||||
#define NO_ANBR KC_NUBS
|
|
||||||
#define NO_DASH KC_SLSH
|
|
||||||
#define NO_PLUS KC_MINS
|
|
||||||
#define NO_EQUA LSFT(KC_0)
|
|
||||||
|
|
||||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
void matrix_scan_user(void) {
|
||||||
#define STEAM LSFT(KC_F7)
|
LEADER_DICTIONARY() {
|
||||||
#define WKILL LALT(KC_F4)
|
leader_succeed = leading = false;
|
||||||
#define BWORD LCTL(KC_LEFT)
|
leader_layer_game = false;
|
||||||
#define FWORD LCTL(KC_RIGHT)
|
leader_layer_def = false;
|
||||||
|
|
||||||
float onsong[][2] = SONG(MARIO_MUSHROOM);
|
SEQ_TWO_KEYS(KC_P, KC_P) {
|
||||||
float offsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
SEND_STRING(pwd_str);
|
||||||
|
leader_succeed = true;
|
||||||
enum custom_keycodes {
|
}
|
||||||
PWD = SAFE_RANGE,
|
SEQ_TWO_KEYS(KC_P, KC_M) {
|
||||||
MAIL,
|
SEND_STRING(mail_str);
|
||||||
GAMEON,
|
leader_succeed = true;
|
||||||
GAMEOFF
|
}
|
||||||
};
|
SEQ_TWO_KEYS(KC_B, KC_B) {
|
||||||
|
SEND_STRING("build"SS_TAP(X_ENTER));
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
leader_succeed = true;
|
||||||
switch (keycode) {
|
}
|
||||||
case PWD:
|
SEQ_TWO_KEYS(KC_B, KC_F) {
|
||||||
if (record->event.pressed) {
|
SEND_STRING("flash"SS_TAP(X_ENTER));
|
||||||
SEND_STRING(pwd_str);
|
reset_keyboard();
|
||||||
}
|
leader_succeed = true;
|
||||||
break;
|
}
|
||||||
case MAIL:
|
SEQ_TWO_KEYS(KC_L, KC_G) {
|
||||||
if (record->event.pressed) {
|
layer_on(_GAME);
|
||||||
SEND_STRING(mail_str);
|
leader_layer_game = true;
|
||||||
}
|
}
|
||||||
break;
|
SEQ_TWO_KEYS(KC_L, KC_D) {
|
||||||
case GAMEON:
|
layer_off(_GAME);
|
||||||
if (record->event.pressed) {
|
leader_layer_def = true;
|
||||||
#ifdef AUDIO_ENABLE
|
}
|
||||||
PLAY_SONG(onsong);
|
leader_end();
|
||||||
#endif
|
|
||||||
layer_on(_GAME);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GAMEOFF:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(offsong);
|
|
||||||
#endif
|
|
||||||
layer_off(_GAME);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return true;
|
}
|
||||||
|
|
||||||
|
void leader_end(void) {
|
||||||
|
if (leader_succeed) {
|
||||||
|
// do nothing
|
||||||
|
} else if (leader_layer_game) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(gamesong);
|
||||||
|
#endif
|
||||||
|
} else if (leader_layer_def) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(defsong);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(failed);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// tap dance definitions
|
||||||
|
typedef struct {
|
||||||
|
bool is_press_action;
|
||||||
|
int state;
|
||||||
|
} tap;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SINGLE_TAP = 1,
|
||||||
|
SINGLE_HOLD = 2,
|
||||||
|
DOUBLE_TAP = 3,
|
||||||
|
DOUBLE_HOLD = 4,
|
||||||
|
DOUBLE_SINGLE_TAP = 5,
|
||||||
|
TRIPLE_TAP = 6,
|
||||||
|
TRIPLE_HOLD = 7
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TD_LSFT = 0,
|
||||||
|
TD_LCTL,
|
||||||
|
TD_RSFT,
|
||||||
|
TD_RCTL
|
||||||
|
};
|
||||||
|
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state);
|
||||||
|
void lsft_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void lsft_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void rsft_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void rsft_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void lctl_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void lctl_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void rctl_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void rctl_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
|
// layer declarations
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Default
|
/* Default
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
|
* | Tab | Q | W | E | R | T | Y | U | I | O | Å | BkSp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ |
|
* | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | N | M | , | . | Å | Shift|
|
* | Shift| Z | X | C | V | B | N | M | P | , | . | Shift|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Win | Alt | Lower| Space | Enter | Raise| AltGr| Game | Fn |
|
* | Ctrl | Lead | Win | Alt | Lower| Space| Enter| Raise| AltGr| App | Lead | Ctrl |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_DEFAULT] = LAYOUT_planck_grid(
|
[_DEFAULT] = LAYOUT_planck_grid(
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, NO_AA, KC_BSPC,
|
||||||
KC_GESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_AA, KC_RSFT,
|
TD(TD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, TD(TD_RSFT),
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_NO, KC_SPC, KC_NO, KC_ENT, RAISE, KC_RALT, GAMEON, FUNCTION
|
TD(TD_LCTL), KC_LEAD, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_ALGR, KC_APP, KC_LEAD, TD(TD_RCTL)
|
||||||
),
|
),
|
||||||
/* Lower
|
/* Lower
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -116,81 +143,250 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift|
|
* | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Win | Alt | Lower| Space | Enter | | | | |
|
* | Ctrl | | Win | Alt | Lower| M_PP |M_Next| | | Mute | VolD | VolUp|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_LOWER] = LAYOUT_planck_grid(
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
KC_TRNS, BWORD, KC_UP, FWORD, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
|
KC_TRNS, LCTL(KC_LEFT), KC_UP, LCTL(KC_RIGHT), KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
|
||||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
|
KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
|
||||||
KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
|
KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
|
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU
|
||||||
),
|
),
|
||||||
/* Raise
|
/* Raise
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | ! | ? | ' | " | ¨ | | / | 7 | 8 | 9 | Ins |
|
* | Tab | ! | ? | # | * | | | = | / | 7 | 8 | 9 | Ins |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | BkSp | @ | & | # | $ | % | <> | \ | 4 | 5 | 6 | * |
|
* | BkSp | @ | & | $ | % | ~ | + | \ | 4 | 5 | 6 | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Shift| ( | ) | { | } | [ | ] | 0 | 1 | 2 | 3 | Shift|
|
* | Shift| ' | " | ¨ | | | - | 0 | 1 | 2 | 3 | Shift|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Win | Alt | | Space | Enter | Raise| - | + | = |
|
* | Ctrl | | Win | Alt | | Space| Enter| Raise| AltGr| | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RAISE] = LAYOUT_planck_grid(
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
KC_TRNS, NO_EXCL, NO_QEST, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
|
KC_TRNS, NO_EXCL, NO_QEST, NO_HASH, NO_ASTE, NO_PIPE, NO_EQUA, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
|
||||||
KC_BSPC, NO_ALFA, NO_AMPE, NO_HASH, NO_USDO, NO_PERC, NO_ANBR, NO_BSLS, KC_4, KC_5, KC_6, NO_ASTE,
|
KC_BSPC, NO_ALFA, NO_AMPE, NO_USDO, NO_PERC, NO_TILD, NO_PLUS, NO_BSLS, KC_4, KC_5, KC_6, KC_NO,
|
||||||
KC_TRNS, NO_LPAR, NO_RPAR, NO_LBRA, NO_RBRA, NO_LBRC, NO_RBRC, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
|
KC_TRNS, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, KC_NO, NO_DASH, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, NO_DASH, NO_PLUS, NO_EQUA
|
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO
|
||||||
),
|
|
||||||
/* Function
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | | | |TskMgr| | | | | Pwd | Vol+ |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | Reset| | | | | | | | Wkill| | | Vol- |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | Mail | | | | VolM |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | Play/Pause | Next | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_FUNCTION] = LAYOUT_planck_grid(
|
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TSKMGR, KC_NO, KC_NO, KC_NO, KC_NO, PWD, KC_VOLU,
|
|
||||||
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, WKILL, KC_NO, KC_NO, KC_VOLD,
|
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MAIL, KC_NO, KC_NO, KC_NO, KC_MUTE,
|
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO
|
|
||||||
),
|
),
|
||||||
/* Game
|
/* Game
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
|
* | Tab | Q | W | E | R | T | Y | U | I | O | | BkSp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | A | S | D | F | G | H | J | K | L | | |
|
* | Esc | A | S | D | F | G | H | J | K | L | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | N | M | | | | |
|
* | Shift| Z | X | C | V | B | N | M | P | , | . | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | | Alt | Raise| Space | Enter | | | | |
|
* | Ctrl | Lead | | Alt | Lower| Space| Enter| Lower| | | Lead | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_GAME] = LAYOUT_planck_grid(
|
[_GAME] = LAYOUT_planck_grid(
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_NO, KC_BSPC,
|
||||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, KC_NO,
|
||||||
KC_LCTL, KC_NO, KC_LALT, GAMER, KC_NO, KC_SPC, KC_NO, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO
|
KC_LCTL, KC_LEAD, KC_NO, KC_LALT, MO(_GLOW), KC_SPC, KC_ENT, MO(_GLOW), KC_NO, KC_NO, KC_LEAD, KC_NO
|
||||||
),
|
),
|
||||||
/* Game raise
|
/* Game lower
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | 1 | 2 | 3 | 4 | 5 | | | | | | Vol+ |
|
* | Tab | 1 | 2 | 3 | | | | | | | | Steam|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | F1 | F2 | F3 | F4 | F5 | | | | | | Vol- |
|
* | Esc | 4 | 5 | 6 | | | | | | | | F12 |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Shift| | | | | | | | | | | VolM |
|
* | Shift| 7 | 8 | 9 | 0 | | | | | | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | | Alt | | Space | Enter | | | Def | Steam|
|
* | Ctrl | | | Alt | | PlyPa| Next | | | Mute | VolD | VolUp|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_GAMERAISE] = LAYOUT_planck_grid(
|
[_GLOW] = LAYOUT_planck_grid(
|
||||||
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU,
|
KC_TRNS, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_F7),
|
||||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD,
|
KC_TRNS, KC_4, KC_5, KC_6, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12,
|
||||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
|
KC_TRNS, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
|
||||||
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, GAMEOFF, STEAM
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// tap dance declarations
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||||
|
else return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return DOUBLE_HOLD;
|
||||||
|
else return DOUBLE_TAP;
|
||||||
|
}
|
||||||
|
if (state->count == 3) {
|
||||||
|
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
|
||||||
|
else return TRIPLE_HOLD;
|
||||||
|
}
|
||||||
|
else return 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
static tap xtap_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
void lsft_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_code16(LSFT(KC_8));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
register_code(KC_NUBS);
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
register_code(KC_NUBS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lsft_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code16(LSFT(KC_8));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
unregister_code(KC_NUBS);
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code(KC_NUBS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rsft_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_code16(LSFT(KC_9));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
register_code16(LSFT(KC_NUBS));
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
register_code16(LSFT(KC_NUBS));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rsft_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code16(LSFT(KC_9));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
unregister_code16(LSFT(KC_NUBS));
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code16(LSFT(KC_NUBS));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void lctl_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_7);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_8);
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lctl_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code(KC_7);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
unregister_code(KC_8);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code(KC_8);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rctl_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_0);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_code(KC_RCTL);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_9);
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
register_mods(MOD_BIT(KC_ALGR));
|
||||||
|
register_code(KC_9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rctl_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code(KC_0);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_code(KC_RCTL);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
unregister_code(KC_9);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code(KC_9);
|
||||||
|
unregister_mods(MOD_BIT(KC_ALGR));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_LSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lsft_finished, lsft_reset),
|
||||||
|
[TD_RSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rsft_finished, rsft_reset),
|
||||||
|
[TD_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset),
|
||||||
|
[TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset),
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// øæå
|
||||||
|
#define NO_OE KC_SCLN
|
||||||
|
#define NO_AE KC_QUOT
|
||||||
|
#define NO_AA KC_LBRC
|
||||||
|
// rename
|
||||||
|
#define NO_ANBR KC_NUBS
|
||||||
|
#define NO_APOS KC_BSLS
|
||||||
|
#define NO_BSLS KC_EQL
|
||||||
|
#define NO_DASH KC_SLSH
|
||||||
|
#define NO_PLUS KC_MINS
|
||||||
|
#define NO_UMLA KC_RBRC
|
||||||
|
#define NO_PIPE KC_GRV
|
||||||
|
// shifted
|
||||||
|
#define NO_EXCL LSFT(KC_1)
|
||||||
|
#define NO_QUOT LSFT(KC_2)
|
||||||
|
#define NO_HASH LSFT(KC_3)
|
||||||
|
#define NO_PERC LSFT(KC_5)
|
||||||
|
#define NO_AMPE LSFT(KC_6)
|
||||||
|
#define NO_FSLS LSFT(KC_7)
|
||||||
|
#define NO_LPAR LSFT(KC_8)
|
||||||
|
#define NO_RPAR LSFT(KC_9)
|
||||||
|
#define NO_EQUA LSFT(KC_0)
|
||||||
|
#define NO_QEST LSFT(KC_MINS)
|
||||||
|
#define NO_ASTE LSFT(KC_BSLS)
|
||||||
|
// altgr
|
||||||
|
#define NO_ALFA ALGR(KC_2)
|
||||||
|
#define NO_USDO ALGR(KC_4)
|
||||||
|
#define NO_TILD ALGR(KC_RBRC)
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
About
|
About
|
||||||
------
|
------
|
||||||
|
|
||||||
A simple Norwegian Layout.
|
A simple Norwegian grid layout using Leader Key, Tap Dance and audio.
|
||||||
|
|
||||||
Layout
|
|
||||||
-------
|
|
||||||
|
|
||||||

|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
SRC += muse.c
|
SRC += muse.c
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
AUDIO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
CONSOLE_ENABLE = no
|
EXTRAKEY_ENABLE = yes
|
||||||
EXTRAKEY_ENABLE = yes
|
LEADER_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
DEFAULT_FOLDER = planck/rev6
|
COMMAND_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(RICK_ROLL)
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float mushroom[][2] = SONG(MARIO_MUSHROOM);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Complex Tapdance hoopla
|
||||||
|
typedef struct {
|
||||||
|
bool is_press_action;
|
||||||
|
int state;
|
||||||
|
} tap;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SINGLE_TAP = 1,
|
||||||
|
SINGLE_HOLD = 2,
|
||||||
|
DOUBLE_TAP = 3,
|
||||||
|
DOUBLE_HOLD = 4,
|
||||||
|
TRIPLE_TAP = 5,
|
||||||
|
TRIPLE_HOLD = 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tap dance enums
|
||||||
|
enum {
|
||||||
|
X_AT_FUN = 0,
|
||||||
|
RSHIFT,
|
||||||
|
LSHIFT,
|
||||||
|
TD_S
|
||||||
|
};
|
||||||
|
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
|
void x_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void x_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void lshift_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void lshift_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
|
|
||||||
|
bool is_alt_tab_active = false;
|
||||||
|
uint16_t alt_tab_timer = 0;
|
||||||
|
|
||||||
|
// Modified Programmer Dvorak enums
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_PDVORAK,
|
||||||
|
_UPPER,
|
||||||
|
_LOWER,
|
||||||
|
_FUNCTION,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PDVK = SAFE_RANGE,
|
||||||
|
KC_LAST,
|
||||||
|
ALT_TAB
|
||||||
|
};
|
||||||
|
|
||||||
|
// For getting the last arg in shell line (SUPER THANKS to Drashna over on Discord)
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint16_t macro_timer;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case ALT_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!is_alt_tab_active) {
|
||||||
|
is_alt_tab_active = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
alt_tab_timer = timer_read();
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (keycode){
|
||||||
|
case KC_LAST:
|
||||||
|
if(record->event.pressed){
|
||||||
|
macro_timer = timer_read();
|
||||||
|
register_mods(MOD_BIT(KC_LCTRL));
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LCTRL));
|
||||||
|
if (timer_elapsed(macro_timer) < 150) {
|
||||||
|
SEND_STRING("!$");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
if (is_alt_tab_active) {
|
||||||
|
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||||
|
unregister_code16(KC_LALT);
|
||||||
|
is_alt_tab_active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PDVORAK MO(_PDVORAK)
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define UPPER MO(_UPPER)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
/* Programmer Dvorak */
|
||||||
|
[_PDVORAK] = LAYOUT_planck_grid(
|
||||||
|
KC_GESC, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||||
|
KC_LAST, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, TD(TD_S), KC_SLASH,
|
||||||
|
TD(LSHIFT), KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(RSHIFT),
|
||||||
|
TD(X_AT_FUN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ALT_TAB, KC_SPACE, KC_ENTER, MT(MOD_LCTL | MOD_LSFT, KC_LGUI), KC_PGUP, KC_PGDN, LT(_LOWER, KC_PLUS)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_UPPER] = LAYOUT_planck_grid(
|
||||||
|
KC_GRAVE, KC_AMPR, KC_PERC, KC_NO, KC_NO, KC_EQL, KC_ASTR, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_TRNS,
|
||||||
|
KC_PLUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
|
KC_DLR, KC_7, KC_5, KC_3, KC_1, KC_9, KC_0, KC_2, KC_4, KC_6, KC_8, KC_TRNS,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, CK_DOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FUNCTION] = LAYOUT_planck_grid(
|
||||||
|
KC_F11, KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F12, KC_F2, KC_F4, KC_F6, KC_F8, RESET,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Super crazy tap dancing stuff - see quad dance in feature_tap_dance.md
|
||||||
|
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||||
|
// key not interrupted, but still held sends 'HOLD'
|
||||||
|
else return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted || !state->pressed) return DOUBLE_TAP;
|
||||||
|
else return DOUBLE_HOLD;
|
||||||
|
}
|
||||||
|
else if (state->count == 3) {
|
||||||
|
if (state->interrupted || !state->pressed)return TRIPLE_TAP;
|
||||||
|
else return TRIPLE_HOLD;
|
||||||
|
}
|
||||||
|
else return 8; // magic number that i dont believe works.
|
||||||
|
}
|
||||||
|
|
||||||
|
// instance of tap for the 'X' dance.
|
||||||
|
static tap xtap_state = {
|
||||||
|
.is_press_action = true,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// registering keypresses
|
||||||
|
void x_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code16(KC_AT); break;
|
||||||
|
case SINGLE_HOLD: set_oneshot_layer(_UPPER, ONESHOT_START); break;
|
||||||
|
case DOUBLE_TAP: set_oneshot_layer(_FUNCTION, ONESHOT_START); break;
|
||||||
|
case DOUBLE_HOLD: reset_keyboard(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lshift_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_9); break;
|
||||||
|
case SINGLE_HOLD: register_code16(KC_LSFT); break;
|
||||||
|
case DOUBLE_TAP: register_code16(KC_LBRC); break;
|
||||||
|
case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_LBRC); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void s_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code16(KC_S); break;
|
||||||
|
case DOUBLE_TAP: register_code16(KC_MINUS); break;
|
||||||
|
case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_MINUS); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rshift_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
xtap_state.state = cur_dance(state);
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_0); break;
|
||||||
|
case SINGLE_HOLD: register_code16(KC_RSFT); break;
|
||||||
|
case DOUBLE_TAP: register_code16(KC_RBRC); break;
|
||||||
|
case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_RBRC); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// forgetting keypresses
|
||||||
|
|
||||||
|
void x_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code16(KC_AT); break;
|
||||||
|
case SINGLE_HOLD: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
|
||||||
|
case DOUBLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
|
||||||
|
case DOUBLE_HOLD: reset_keyboard(); break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
void lshift_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code16(KC_9); unregister_code16(KC_LSFT); break;
|
||||||
|
case SINGLE_HOLD: unregister_code16(KC_LSFT); break;
|
||||||
|
case DOUBLE_TAP: unregister_code16(KC_LBRC); break;
|
||||||
|
case TRIPLE_TAP: unregister_code16(KC_LBRC); unregister_code16(KC_LSFT); break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rshift_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code16(KC_0); unregister_code16(KC_LSFT); break;
|
||||||
|
case SINGLE_HOLD: unregister_code16(KC_RSFT); break;
|
||||||
|
case DOUBLE_TAP: unregister_code16(KC_RBRC); break;
|
||||||
|
case TRIPLE_TAP: unregister_code16(KC_RBRC); unregister_code16(KC_LSFT); break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
void s_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (xtap_state.state) {
|
||||||
|
case SINGLE_TAP: unregister_code16(KC_S); break;
|
||||||
|
case DOUBLE_TAP: unregister_code16(KC_MINUS); break;
|
||||||
|
case TRIPLE_TAP: unregister_code16(KC_MINUS); unregister_code16(KC_LSFT); break;
|
||||||
|
}
|
||||||
|
xtap_state.state = 0;
|
||||||
|
}
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[X_AT_FUN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset),
|
||||||
|
[LSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lshift_finished, lshift_reset),
|
||||||
|
[RSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rshift_finished, rshift_reset),
|
||||||
|
[TD_S] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, s_finished, s_reset),
|
||||||
|
};
|
||||||
|
|
||||||
|
void shutdown_user(void) { clear_keyboard(); }
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Programmer Dvorak for the Planck (Light)
|
||||||
|
|
||||||
|
|
||||||
|
| Magic | | UPPER |
|
||||||
|
|----------|---------|-------|
|
||||||
|
| | DEFAULT | |
|
||||||
|
| FUNCTION | | LOWER |
|
||||||
|
|
||||||
|
# Layout notes
|
||||||
|
- ALT_TAB = cycle through windows as long as you keep tapping it keeps alt tabbing
|
||||||
|
- LAST = "!$" = is useful for using the last parm in bash/zsh
|
||||||
|
- More to come
|
||||||
|
|
||||||
|
|
||||||
|
# Dvorak base Layer
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
AUDIO_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
TERMINAL_ENABLE = no
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "xulkal.h"
|
||||||
|
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
#define EXPAND_LAYOUT(...) LAYOUT_preonic_grid(__VA_ARGS__)
|
||||||
|
|
||||||
|
// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty Layout
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* |FN(CAPS)| A | S | D | F | G | ` | | ' | H | J | K | L | ; | Enter|
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | Space| DEL | | Enter| Space|
|
||||||
|
* `-------------' `-------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = EXPAND_LAYOUT( \
|
||||||
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \
|
||||||
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \
|
||||||
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \
|
||||||
|
_________________QWERTY_L4_________________, _________________QWERTY_R4_________________, \
|
||||||
|
_________________QWERTY_L5_________________, _________________QWERTY_R5_________________ \
|
||||||
|
),
|
||||||
|
|
||||||
|
#ifndef GAMELAYER_DISABLE
|
||||||
|
[_GAME] = EXPAND_LAYOUT( \
|
||||||
|
___________________GAME_L1_________________, ___________________GAME_R1_________________, \
|
||||||
|
___________________GAME_L2_________________, ___________________GAME_R2_________________, \
|
||||||
|
___________________GAME_L3_________________, ___________________GAME_R3_________________, \
|
||||||
|
___________________GAME_L4_________________, ___________________GAME_R4_________________, \
|
||||||
|
___________________GAME_L5_________________, ___________________GAME_R5_________________ \
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[_LOWER] = EXPAND_LAYOUT( \
|
||||||
|
__________________LOWER_L1_________________, __________________LOWER_R1_________________, \
|
||||||
|
__________________LOWER_L2_________________, __________________LOWER_R2_________________, \
|
||||||
|
__________________LOWER_L3_________________, __________________LOWER_R3_________________, \
|
||||||
|
__________________LOWER_L4_________________, __________________LOWER_R4_________________, \
|
||||||
|
__________________LOWER_L5_________________, __________________LOWER_R5_________________ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = EXPAND_LAYOUT( \
|
||||||
|
__________________RAISE_L1_________________, __________________RAISE_R1_________________, \
|
||||||
|
__________________RAISE_L2_________________, __________________RAISE_R2_________________, \
|
||||||
|
__________________RAISE_L3_________________, __________________RAISE_R3_________________, \
|
||||||
|
__________________RAISE_L4_________________, __________________RAISE_R4_________________, \
|
||||||
|
__________________RAISE_L5_________________, __________________RAISE_R5_________________ \
|
||||||
|
),
|
||||||
|
|
||||||
|
#ifdef TRILAYER_ENABLED
|
||||||
|
[_ADJUST] = EXPAND_LAYOUT( \
|
||||||
|
_________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \
|
||||||
|
_________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \
|
||||||
|
_________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \
|
||||||
|
_________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \
|
||||||
|
_________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
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 (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) {
|
||||||
|
register_code(KC_PGDN);
|
||||||
|
unregister_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
register_code(KC_PGUP);
|
||||||
|
unregister_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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,6 @@
|
|||||||
|
SRC += muse.c
|
||||||
|
|
||||||
|
ENCODER_ENABLE = no
|
||||||
|
|
||||||
|
OPT_DEFS += -DTRILAYER_ENABLED
|
||||||
|
OPT_DEFS += -DAUDIO_CLICKY
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"processor": "atmega32u4",
|
"processor": "atmega32u4",
|
||||||
"width": 14,
|
"width": 16,
|
||||||
"height": 4,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"key_count": 53,
|
"key_count": 53,
|
||||||
|
|||||||
@@ -4,14 +4,15 @@
|
|||||||
#
|
#
|
||||||
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 = yes # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix
|
RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix
|
||||||
LED_ANIMATIONS = yes # LED animations
|
RGBLIGHT_ANIMATIONS = no # LED animations
|
||||||
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
||||||
RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
||||||
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
|
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
|
||||||
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "xulkal.h"
|
||||||
|
|
||||||
|
#ifdef PROTOCOL_LUFA
|
||||||
|
#include "lufa.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
#include "oled_driver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__)
|
||||||
|
|
||||||
|
// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty Layout
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||||
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||||
|
* |FN(CAPS)| A | S | D | F | G | ` | | ' | H | J | K | L | ; | Enter|
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||||
|
* | Space| DEL | | Enter| Space|
|
||||||
|
* `-------------' `-------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = EXPAND_LAYOUT( \
|
||||||
|
_________________QWERTY_L1_________________, KC_MINS, KC_EQL, _________________QWERTY_R1_________________, \
|
||||||
|
_________________QWERTY_L2_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R2_________________, \
|
||||||
|
_________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \
|
||||||
|
_________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \
|
||||||
|
_________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \
|
||||||
|
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \
|
||||||
|
),
|
||||||
|
|
||||||
|
#ifndef GAMELAYER_DISABLE
|
||||||
|
[_GAME] = EXPAND_LAYOUT( \
|
||||||
|
___________________GAME_L1_________________, KC_MINS, KC_EQL, ___________________GAME_R1_________________, \
|
||||||
|
___________________GAME_L2_________________, KC_LBRC, KC_RBRC, ___________________GAME_R2_________________, \
|
||||||
|
___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \
|
||||||
|
___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \
|
||||||
|
___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \
|
||||||
|
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[_LOWER] = EXPAND_LAYOUT( \
|
||||||
|
__________________LOWER_L1_________________, KC_PMNS, KC_PPLS, __________________LOWER_R1_________________, \
|
||||||
|
__________________LOWER_L2_________________, _______, _______, __________________LOWER_R2_________________, \
|
||||||
|
__________________LOWER_L3_________________, _______, _______, __________________LOWER_R3_________________, \
|
||||||
|
__________________LOWER_L4_________________, _______, _______, __________________LOWER_R4_________________, \
|
||||||
|
__________________LOWER_L5_________________, _______, _______, __________________LOWER_R5_________________, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = EXPAND_LAYOUT( \
|
||||||
|
__________________RAISE_L1_________________, _______, _______, __________________RAISE_R1_________________, \
|
||||||
|
__________________RAISE_L2_________________, _______, _______, __________________RAISE_R2_________________, \
|
||||||
|
__________________RAISE_L3_________________, _______, _______, __________________RAISE_R3_________________, \
|
||||||
|
__________________RAISE_L4_________________, _______, _______, __________________RAISE_R4_________________, \
|
||||||
|
__________________RAISE_L5_________________, _______, _______, __________________RAISE_R5_________________, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
#ifdef TRILAYER_ENABLED
|
||||||
|
[_RAISE] = EXPAND_LAYOUT( \
|
||||||
|
_________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \
|
||||||
|
_________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \
|
||||||
|
_________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \
|
||||||
|
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
|
||||||
|
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM sol_logo[] = {
|
||||||
|
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||||
|
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||||
|
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
|
||||||
|
|
||||||
|
oled_write_P(sol_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_status(void) {
|
||||||
|
// Render to mode icon
|
||||||
|
static const char PROGMEM mode_logo[2][4] = {
|
||||||
|
{0x97,0x98,0x0a,0},
|
||||||
|
{0xb7,0xb8,0x0a,0} };
|
||||||
|
|
||||||
|
oled_write_P(mode_logo[0], false);
|
||||||
|
oled_write_P(mode_logo[1], false);
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
switch (biton32(layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
#ifndef GAMELAYER_DISABLE
|
||||||
|
switch (biton32(default_layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_P(PSTR("Default\n"), false);
|
||||||
|
break;
|
||||||
|
case _GAME:
|
||||||
|
oled_write_P(PSTR("Game\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_P(PSTR("Undefined\n"), false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
oled_write_P(PSTR("Default\n"), false);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
oled_write_P(PSTR("Lower\n"), false);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
oled_write_P(PSTR("Raise\n"), false);
|
||||||
|
break;
|
||||||
|
#ifdef TRILAYER_ENABLED
|
||||||
|
case _ADJUST:
|
||||||
|
oled_write_P(PSTR("Adjust\n"), false);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
oled_write_P(PSTR("Undefined\n"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
uint8_t led_usb_state = host_keyboard_leds();
|
||||||
|
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (has_usb()) {
|
||||||
|
render_status();
|
||||||
|
} else {
|
||||||
|
render_logo();
|
||||||
|
oled_scroll_left();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# 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 = no # 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
|
||||||
|
RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix
|
||||||
|
RGBLIGHT_ANIMATIONS = no # LED animations
|
||||||
|
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
|
||||||
|
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
|
||||||
|
RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very laggy (+1500)
|
||||||
|
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder (+90)
|
||||||
|
OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000)
|
||||||
|
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
|
||||||
|
|
||||||
|
# Do not edit past here
|
||||||
|
|
||||||
|
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
|
||||||
|
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
|
||||||
|
SRC += common/knob_v2.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DIOS_DEVICE_ENABLE
|
||||||
|
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
|
||||||
|
OPT_DEFS += -DRGBLIGHT_FULL_POWER
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes)
|
||||||
|
OPT_DEFS += -DRGB_MATRIX_KEYPRESSES
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_MIRRORED)), yes)
|
||||||
|
OPT_DEFS += -DLED_MIRRORED
|
||||||
|
endif
|
||||||
@@ -81,8 +81,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define ws2812_PORTREG PORTD
|
#define ws2812_PORTREG PORTD
|
||||||
#define ws2812_DDRREG DDRD
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 1
|
||||||
#define DRIVER_LED_TOTAL 70
|
|
||||||
// #define RGB_MATRIX_KEYPRESSES
|
// #define RGB_MATRIX_KEYPRESSES
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
#define BACKLIGHT_LEVELS 5
|
#define BACKLIGHT_LEVELS 5
|
||||||
@@ -92,6 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#else
|
#else
|
||||||
#define RGBLED_NUM 70
|
#define RGBLED_NUM 70
|
||||||
#endif
|
#endif
|
||||||
|
#define DRIVER_LED_TOTAL RGBLED_NUM
|
||||||
|
|
||||||
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950
|
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950
|
||||||
|
|
||||||
@@ -112,6 +112,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
|
#define LED_HITS_TO_REMEMBER 5
|
||||||
|
|
||||||
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||||
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
|
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
|
||||||
// 120 RGBoff, OLEDoff
|
// 120 RGBoff, OLEDoff
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "sol.h"
|
#include "sol.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
@@ -8,8 +7,88 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
// Left Hand Mapped Left to Right
|
||||||
|
{ { 0 | (0 << 4) }, { 0, 0 }, 1},
|
||||||
|
{ { 0 | (1 << 4) }, { 22, 0 }, 0},
|
||||||
|
{ { 0 | (2 << 4) }, { 37, 0 }, 0},
|
||||||
|
{ { 0 | (3 << 4) }, { 37, 0 }, 0},
|
||||||
|
{ { 0 | (4 << 4) }, { 67, 0 }, 0},
|
||||||
|
{ { 0 | (5 << 4) }, { 82, 0 }, 0},
|
||||||
|
{ { 0 | (6 << 4) }, { 104, 0 }, 1},
|
||||||
|
{ { 1 | (0 << 4) }, { 0, 16 }, 1},
|
||||||
|
{ { 1 | (1 << 4) }, { 22, 16 }, 0},
|
||||||
|
{ { 1 | (2 << 4) }, { 37, 16 }, 0},
|
||||||
|
{ { 1 | (3 << 4) }, { 37, 16 }, 0},
|
||||||
|
{ { 1 | (4 << 4) }, { 67, 16 }, 0},
|
||||||
|
{ { 1 | (5 << 4) }, { 82, 16 }, 0},
|
||||||
|
{ { 1 | (6 << 4) }, { 104, 16 }, 1},
|
||||||
|
{ { 2 | (0 << 4) }, { 0, 32 }, 1},
|
||||||
|
{ { 2 | (1 << 4) }, { 22, 32 }, 0},
|
||||||
|
{ { 2 | (2 << 4) }, { 37, 32 }, 0},
|
||||||
|
{ { 2 | (3 << 4) }, { 37, 32 }, 0},
|
||||||
|
{ { 2 | (4 << 4) }, { 67, 32 }, 0},
|
||||||
|
{ { 2 | (5 << 4) }, { 82, 32 }, 0},
|
||||||
|
{ { 2 | (6 << 4) }, { 104, 32 }, 1},
|
||||||
|
{ { 3 | (0 << 4) }, { 0, 48 }, 1},
|
||||||
|
{ { 3 | (1 << 4) }, { 22, 48 }, 0},
|
||||||
|
{ { 3 | (2 << 4) }, { 37, 48 }, 0},
|
||||||
|
{ { 3 | (3 << 4) }, { 37, 48 }, 0},
|
||||||
|
{ { 3 | (4 << 4) }, { 67, 48 }, 0},
|
||||||
|
{ { 3 | (5 << 4) }, { 82, 48 }, 0},
|
||||||
|
{ { 3 | (6 << 4) }, { 104, 48 }, 1},
|
||||||
|
{ { 4 | (0 << 4) }, { 0, 64 }, 1},
|
||||||
|
{ { 4 | (1 << 4) }, { 22, 64 }, 1},
|
||||||
|
{ { 4 | (2 << 4) }, { 37, 64 }, 1},
|
||||||
|
{ { 4 | (3 << 4) }, { 37, 64 }, 1},
|
||||||
|
{ { 4 | (4 << 4) }, { 67, 64 }, 1},
|
||||||
|
// These two control the 4 LEDs in the thumb cluster
|
||||||
|
// Top keys are { 4 | (5 << 4) & { 4 | (6 << 4)
|
||||||
|
{ { 5 | (5 << 4) }, { 89, 45 }, 1},
|
||||||
|
{ { 5 | (6 << 4) }, { 97, 55 }, 1},
|
||||||
|
// Left Hand Mapped Right to Left
|
||||||
|
{ { 6 | (0 << 4) }, { 224, 0 }, 1},
|
||||||
|
{ { 6 | (1 << 4) }, { 202, 0 }, 0},
|
||||||
|
{ { 6 | (2 << 4) }, { 187, 0 }, 0},
|
||||||
|
{ { 6 | (3 << 4) }, { 172, 0 }, 0},
|
||||||
|
{ { 6 | (4 << 4) }, { 157, 0 }, 0},
|
||||||
|
{ { 6 | (5 << 4) }, { 142, 0 }, 0},
|
||||||
|
{ { 6 | (6 << 4) }, { 120, 0 }, 1},
|
||||||
|
{ { 7 | (0 << 4) }, { 224, 16 }, 1},
|
||||||
|
{ { 7 | (1 << 4) }, { 202, 16 }, 0},
|
||||||
|
{ { 7 | (2 << 4) }, { 187, 16 }, 0},
|
||||||
|
{ { 7 | (3 << 4) }, { 172, 16 }, 0},
|
||||||
|
{ { 7 | (4 << 4) }, { 157, 16 }, 0},
|
||||||
|
{ { 7 | (5 << 4) }, { 142, 16 }, 0},
|
||||||
|
{ { 7 | (6 << 4) }, { 120, 16 }, 1},
|
||||||
|
{ { 8 | (0 << 4) }, { 224, 32 }, 1},
|
||||||
|
{ { 8 | (1 << 4) }, { 202, 32 }, 0},
|
||||||
|
{ { 8 | (2 << 4) }, { 187, 32 }, 0},
|
||||||
|
{ { 8 | (3 << 4) }, { 172, 32 }, 0},
|
||||||
|
{ { 8 | (4 << 4) }, { 157, 32 }, 0},
|
||||||
|
{ { 8 | (5 << 4) }, { 142, 32 }, 0},
|
||||||
|
{ { 8 | (6 << 4) }, { 120, 32 }, 1},
|
||||||
|
{ { 9 | (0 << 4) }, { 224, 48 }, 1},
|
||||||
|
{ { 9 | (1 << 4) }, { 202, 48 }, 0},
|
||||||
|
{ { 9 | (2 << 4) }, { 187, 48 }, 0},
|
||||||
|
{ { 9 | (3 << 4) }, { 172, 48 }, 0},
|
||||||
|
{ { 9 | (4 << 4) }, { 157, 48 }, 0},
|
||||||
|
{ { 9 | (5 << 4) }, { 142, 48 }, 0},
|
||||||
|
{ { 9 | (6 << 4) }, { 120, 48 }, 1},
|
||||||
|
{ { 10 | (0 << 4) }, { 224, 64 }, 1},
|
||||||
|
{ { 10 | (1 << 4) }, { 202, 64 }, 1},
|
||||||
|
{ { 10 | (2 << 4) }, { 187, 64 }, 1},
|
||||||
|
{ { 10 | (3 << 4) }, { 172, 64 }, 1},
|
||||||
|
{ { 10 | (4 << 4) }, { 157, 64 }, 1},
|
||||||
|
// These two control the 4 LEDs in the thumb cluster
|
||||||
|
// Top keys are { 10 | (5 << 4) & { 10 | (6 << 4)
|
||||||
|
{ { 11 | (5 << 4) }, { 135, 45 }, 1},
|
||||||
|
{ { 11 | (6 << 4) }, { 127, 55 }, 1}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"bootloader": "",
|
"bootloader": "",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 6,
|
"height": 6.5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [{"label":"k00", "x":0, "y":0.375}, {"label":"k01", "x":1, "y":0.375}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.25}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":9, "y":0.5}, {"label":"k07", "x":10, "y":0.25}, {"label":"k08", "x":11, "y":0}, {"label":"k09", "x":12, "y":0.25}, {"label":"k10", "x":13, "y":0.375}, {"label":"k11", "x":14, "y":0.375}, {"label":"k12", "x":0, "y":1.375}, {"label":"k13", "x":1, "y":1.375}, {"label":"k14", "x":2, "y":1.25}, {"label":"k15", "x":3, "y":1}, {"label":"k16", "x":4, "y":1.25}, {"label":"k17", "x":5, "y":1.5}, {"label":"k18", "x":7, "y":2}, {"label":"k19", "x":9, "y":1.5}, {"label":"k20", "x":10, "y":1.25}, {"label":"k21", "x":11, "y":1}, {"label":"k22", "x":12, "y":1.25}, {"label":"k23", "x":13, "y":1.375}, {"label":"k24", "x":14, "y":1.375}, {"label":"k25", "x":0, "y":2.375}, {"label":"k26", "x":1, "y":2.375}, {"label":"k27", "x":2, "y":2.25}, {"label":"k28", "x":3, "y":2}, {"label":"k29", "x":4, "y":2.25}, {"label":"k30", "x":5, "y":2.5}, {"label":"k31", "x":7, "y":3}, {"label":"k32", "x":9, "y":2.5}, {"label":"k33", "x":10, "y":2.25}, {"label":"k34", "x":11, "y":2}, {"label":"k35", "x":12, "y":2.25}, {"label":"k36", "x":13, "y":2.375}, {"label":"k37", "x":14, "y":2.375}, {"label":"k38", "x":0, "y":3.375}, {"label":"k39", "x":1, "y":3.375}, {"label":"k40", "x":2, "y":3.25}, {"label":"k41", "x":3, "y":3}, {"label":"k42", "x":4, "y":3.25}, {"label":"k43", "x":5, "y":3.5}, {"label":"k44", "x":6.5, "y":4}, {"label":"k45", "x":7.5, "y":4}, {"label":"k46", "x":9, "y":3.5}, {"label":"k47", "x":10, "y":3.25}, {"label":"k48", "x":11, "y":3}, {"label":"k49", "x":12, "y":3.25}, {"label":"k50", "x":13, "y":3.375}, {"label":"k51", "x":14, "y":3.375}, {"label":"k52", "x":0, "y":4.375}, {"label":"k53", "x":1, "y":4.375}, {"label":"k54", "x":2, "y":4.25}, {"label":"k55", "x":3, "y":4}, {"label":"k56", "x":4, "y":4.25}, {"label":"k57", "x":5.5, "y":5}, {"label":"k58", "x":6.5, "y":5.5}, {"label":"k59", "x":7.5, "y":5.5}, {"label":"k60", "x":8.5, "y":5}, {"label":"k61", "x":10, "y":4.25}, {"label":"k62", "x":11, "y":4}, {"label":"k63", "x":12, "y":4.25}, {"label":"k64", "x":13, "y":4.375}, {"label":"k65", "x":14, "y":4.375}]
|
"layout": [{"label":"k00", "x":0, "y":0.375}, {"label":"k01", "x":1, "y":0.375}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.25}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":9, "y":0.5}, {"label":"k07", "x":10, "y":0.25}, {"label":"k08", "x":11, "y":0}, {"label":"k09", "x":12, "y":0.25}, {"label":"k10", "x":13, "y":0.375}, {"label":"k11", "x":14, "y":0.375}, {"label":"k12", "x":0, "y":1.375}, {"label":"k13", "x":1, "y":1.375}, {"label":"k14", "x":2, "y":1.25}, {"label":"k15", "x":3, "y":1}, {"label":"k16", "x":4, "y":1.25}, {"label":"k17", "x":5, "y":1.5}, {"label":"k18", "x":7, "y":2}, {"label":"k19", "x":9, "y":1.5}, {"label":"k20", "x":10, "y":1.25}, {"label":"k21", "x":11, "y":1}, {"label":"k22", "x":12, "y":1.25}, {"label":"k23", "x":13, "y":1.375}, {"label":"k24", "x":14, "y":1.375}, {"label":"k25", "x":0, "y":2.375}, {"label":"k26", "x":1, "y":2.375}, {"label":"k27", "x":2, "y":2.25}, {"label":"k28", "x":3, "y":2}, {"label":"k29", "x":4, "y":2.25}, {"label":"k30", "x":5, "y":2.5}, {"label":"k31", "x":7, "y":3}, {"label":"k32", "x":9, "y":2.5}, {"label":"k33", "x":10, "y":2.25}, {"label":"k34", "x":11, "y":2}, {"label":"k35", "x":12, "y":2.25}, {"label":"k36", "x":13, "y":2.375}, {"label":"k37", "x":14, "y":2.375}, {"label":"k38", "x":0, "y":3.375}, {"label":"k39", "x":1, "y":3.375}, {"label":"k40", "x":2, "y":3.25}, {"label":"k41", "x":3, "y":3}, {"label":"k42", "x":4, "y":3.25}, {"label":"k43", "x":5, "y":3.5}, {"label":"k44", "x":6.5, "y":4}, {"label":"k45", "x":7.5, "y":4}, {"label":"k46", "x":9, "y":3.5}, {"label":"k47", "x":10, "y":3.25}, {"label":"k48", "x":11, "y":3}, {"label":"k49", "x":12, "y":3.25}, {"label":"k50", "x":13, "y":3.375}, {"label":"k51", "x":14, "y":3.375}, {"label":"k52", "x":0, "y":4.375}, {"label":"k53", "x":1, "y":4.375}, {"label":"k54", "x":2, "y":4.25}, {"label":"k55", "x":3, "y":4}, {"label":"k56", "x":4, "y":4.25}, {"label":"k57", "x":5.5, "y":5}, {"label":"k58", "x":6.5, "y":5.5}, {"label":"k59", "x":7.5, "y":5.5}, {"label":"k60", "x":8.5, "y":5}, {"label":"k61", "x":10, "y":4.25}, {"label":"k62", "x":11, "y":4}, {"label":"k63", "x":12, "y":4.25}, {"label":"k64", "x":13, "y":4.375}, {"label":"k65", "x":14, "y":4.375}]
|
||||||
|
|||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
|
||||||
|
// Tilde is shift-grave
|
||||||
|
#define KC_TLDE S(KC_GRV)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Del |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Home|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_ansi(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_HOME,\
|
||||||
|
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
|
||||||
|
KC_LSFT, KC_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, MO(_FL), KC_ALGR, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* | ` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | |Up | |Prt|Bks|PgU|Hom|End|Pau| Up| | | |end |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |Lef|Dow|Rig|Scl|Del|PgD| ~ |Ins|Lef|Dow|Rig| |Prt |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | |MsL|MsD|MsR |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_ansi(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, \
|
||||||
|
KC_CAPS, _______, KC_UP, _______, KC_BSPC, KC_PSCR, KC_PGUP, KC_HOME, KC_END, KC_PAUS, KC_UP, _______, _______, _______, KC_END, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_SLCK, KC_PGDN, KC_TLDE, KC_INS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_PSCR,\
|
||||||
|
_______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_BTN1, KC_MS_U, KC_BTN2,\
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
|
||||||
|
};
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
# KBP V60 like TADA68 layout
|
||||||
|
|
||||||
|
This layout resembles the KBParadise V60 FN layer and moves around some keys.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # 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.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
Regular → Executable
+10
-12
@@ -10,17 +10,12 @@
|
|||||||
#define PRODUCT Tetris
|
#define PRODUCT Tetris
|
||||||
#define DESCRIPTION Planck mit
|
#define DESCRIPTION Planck mit
|
||||||
|
|
||||||
#define QMK_ESC_OUTPUT B0
|
|
||||||
#define QMK_ESC_INPUT D7
|
|
||||||
#define QMK_LED B7
|
|
||||||
#define QMK_SPEAKER B5
|
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 4
|
#define MATRIX_ROWS 5
|
||||||
#define MATRIX_COLS 12
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
/* key matrix pins */
|
/* key matrix pins */
|
||||||
#define MATRIX_ROW_PINS { B3, B2, B1, B0 }
|
#define MATRIX_ROW_PINS { B3, B2, B1, B0, E6 }
|
||||||
#define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 }
|
#define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
@@ -39,19 +34,22 @@
|
|||||||
#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
#define NO_ACTION_FUNCTION
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
#define TAPPING_TERM 200
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define B5_AUDIO
|
#define B5_AUDIO
|
||||||
#define STARTUP_SONG SONG(ONE_UP_SOUND)
|
#define STARTUP_SONG SONG(ONE_UP_SOUND)
|
||||||
#define NO_MUSIC_MODE
|
#define NO_MUSIC_MODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if RGBLIGHT_ENABLE
|
#define NUMBER_OF_ENCODERS 2
|
||||||
|
#define ENCODERS_PAD_A { D1,F1 }
|
||||||
|
#define ENCODERS_PAD_B { D0,F0 }
|
||||||
|
|
||||||
#define RGB_DI_PIN F5
|
#define RGB_DI_PIN F5
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLIGHT_SLEEP
|
#define RGBLIGHT_SLEEP
|
||||||
#define RGBLED_NUM 47
|
#define RGBLED_NUM 47
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12
|
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12
|
||||||
//#define RGBLIGHT_LIMIT_VAL 128
|
|
||||||
#endif
|
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 12,
|
"width": 12,
|
||||||
"height": 4,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_planck_mit": {
|
"LAYOUT_planck_mit": {
|
||||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Regular → Executable
+156
-798
@@ -1,828 +1,186 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND );
|
|
||||||
float tone_taps[][2] = SONG( E__NOTE( _A6 ) );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _BASE 0
|
|
||||||
#define _CODE 1
|
|
||||||
#define _NAVI 2
|
|
||||||
#define _FUNC 3
|
|
||||||
#define _SYMB 4
|
|
||||||
#define _NUMB 5
|
|
||||||
#define _MARO 6
|
|
||||||
#define _RGB 7
|
|
||||||
#define _ADJUST 8
|
|
||||||
#define _GAME 9
|
|
||||||
|
|
||||||
/* RGB colors */
|
|
||||||
#define RGB_Layer_1_Base_Color 0, 128, 0
|
|
||||||
#define RGB_Layer_2_Base_Color 0,0,0
|
|
||||||
#define RGB_Layer_3_Base_Color 0,0,0
|
|
||||||
#define RGB_Layer_4_Base_Color 0,0,0
|
|
||||||
#define RGB_Layer_5_Base_Color 0,0,0
|
|
||||||
#define RGB_Layer_6_Base_Color 64, 0, 64
|
|
||||||
#define RGB_Layer_7_Base_Color 0, 0,0
|
|
||||||
#define RGB_Layer_8_Base_Color 0,0,0
|
|
||||||
#define RGB_Layer_9_Base_Color 0,0,0
|
|
||||||
#define RGB_Caps_Color 6,50,50
|
|
||||||
#define RGB_TAP_On_Color 0,128,0
|
|
||||||
#define RGB_TAP_Off_Color 128,0,0
|
|
||||||
#define RGB_TAP_Base_Color 0,0,0
|
|
||||||
|
|
||||||
extern rgblight_config_t rgblight_config;
|
|
||||||
bool NUMLAY_STATUS = false;
|
|
||||||
int RGB_LAYER0_mode = 6;
|
|
||||||
bool RGB_TAP_STATE = false;
|
|
||||||
static uint8_t current_layer = 0;
|
|
||||||
static bool has_layer_changed = true;
|
|
||||||
static bool save_rgbmode = true;
|
|
||||||
static bool caps = false;
|
|
||||||
|
|
||||||
/* Tap Dance function */
|
|
||||||
void dance_cln_finished( qk_tap_dance_state_t* state, void* user_data )
|
|
||||||
{
|
|
||||||
if ( state->count == 1 )
|
|
||||||
{
|
|
||||||
register_code( KC_LSFT );
|
|
||||||
} else {
|
|
||||||
layer_on( _SYMB );
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG( tone_taps );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void dance_cln_reset( qk_tap_dance_state_t* state, void* user_data )
|
|
||||||
{
|
|
||||||
if ( state->count == 1 )
|
|
||||||
{
|
|
||||||
unregister_code( KC_LSFT );
|
|
||||||
}else {
|
|
||||||
uint8_t layer = biton32( layer_state );
|
|
||||||
if ( layer == _SYMB )
|
|
||||||
{
|
|
||||||
layer_off( _SYMB );
|
|
||||||
rgblight_mode( RGB_LAYER0_mode );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum my_keycodes {
|
|
||||||
RGB_TAP = SAFE_RANGE,
|
|
||||||
KC_00
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Tap Dance Declarations */
|
|
||||||
enum {
|
|
||||||
TD_Mute_Next = 0,
|
|
||||||
TD_SFT,
|
|
||||||
TD_LBRC,
|
|
||||||
TD_RBRC
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Tap Dance Definitions */
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
[TD_Mute_Next] = ACTION_TAP_DANCE_DOUBLE( KC_MUTE, KC_MNXT )
|
|
||||||
,[TD_SFT] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, dance_cln_finished, dance_cln_reset )
|
|
||||||
,[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE( KC_LBRC, KC_LCBR )
|
|
||||||
,[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE( KC_RBRC, KC_RCBR )
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* BASE - QWERTY
|
[0] = LAYOUT_planck_mit(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BS |
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, 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_UP,
|
||||||
* shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = "
|
KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, KC_MINS, LT(1, KC_SPC), KC_EQL, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
KC_VOLD, KC_VOLU, KC_PGDN, KC_PGUP),
|
||||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Mute |
|
[1] = LAYOUT_planck_mit(
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||||
* | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del |
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
* `-----------------------------------------------------------------------------------'
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
*/
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
[_BASE] = LAYOUT_planck_mit(
|
|
||||||
LT( _ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
|
||||||
LT( _NUMB,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT( _RGB, KC_L ), KC_SCLN, KC_ENT,
|
|
||||||
TD( TD_SFT ), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, TD( TD_Mute_Next ),
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, TD( TD_LBRC ), LT( _NAVI, KC_MINS ), LT( _CODE, KC_SPC ), LT( _FUNC, KC_EQL ), TD( TD_RBRC ), KC_LEFT, KC_DOWN, KC_RGHT ),
|
|
||||||
|
|
||||||
/* Code
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | ` | < | [ | { | ( | & | Left | Down | Up | Down | ; | ' |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | > | ] | } | ) | | | | | , | . | / | Play |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | [ | BkSp | ======= | Del | ] | | \ | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_CODE] = LAYOUT_planck_mit( /* 1 - Code */
|
|
||||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
|
||||||
KC_GRV, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_AMPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_QUOT,
|
|
||||||
_______, KC_RABK, KC_RBRC, KC_RCBR, KC_RPRN, KC_PIPE, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, KC_MPLY,
|
|
||||||
_______, _______, _______, KC_LBRC, KC_BSPC, _______, KC_DEL, KC_RBRC, _______, KC_BSLS, _______ ),
|
|
||||||
|
|
||||||
/* Navi
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | | PgUp | | | | |Insert| |Prtsc | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | ~ | | Home | PgDn | End | | | | |SrcLck| | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | Break| | | | | PgUp | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | Home | PgDn | End |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_NAVI] = LAYOUT_planck_mit(
|
|
||||||
_______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, _______,
|
|
||||||
KC_TILD, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, _______, _______,
|
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ),
|
|
||||||
|
|
||||||
/* Func
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | F11 | F12 | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_FUNC] = LAYOUT_planck_mit(
|
|
||||||
_______ , KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6 , KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
|
||||||
_______ , KC_F12, KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
|
||||||
_______ , XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
|
||||||
_______ , _______, _______ , _______, _______, _______, _______ , _______, _______, _______, _______ ),
|
|
||||||
|
|
||||||
|
|
||||||
/* Symb - double tap shift
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | : | " |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | < | > | ? | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | { | _ | | + | } | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_SYMB] = LAYOUT_planck_mit(
|
|
||||||
KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
|
||||||
KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COLN, KC_DQUO,
|
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, _______,
|
|
||||||
_______, _______, _______, KC_LCBR, KC_UNDS, _______, KC_PLUS, KC_RCBR, _______, KC_PIPE, _______ ),
|
|
||||||
|
|
||||||
/* Number
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | + | - | | | | | 7 | 8 | 9 | | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | * | / | = | | | | 4 | 5 | 6 | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | 1 | 2 | 3 | |Layer0|
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | 0 | 00 | . | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */
|
|
||||||
_______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______,
|
|
||||||
_______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______,
|
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
|
|
||||||
_______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ),
|
|
||||||
|
|
||||||
/* MARO Empty
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_MARO] = LAYOUT_planck_mit(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ),
|
|
||||||
|
|
||||||
/* RGB
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | | | | _TAP | | | | | | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | MOD | M_R | M_SW | M_K | M_X | M_G | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | HUI | SAI | VAI | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | HUD | SAD | VAD | | | RGB_TOG | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_RGB] = LAYOUT_planck_mit(
|
|
||||||
_______, _______, _______, _______, _______, RGB_TAP, _______, _______, _______, _______, _______, _______,
|
|
||||||
RGB_MOD, RGB_M_R, RGB_M_SW, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______,
|
|
||||||
RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ ),
|
|
||||||
|
|
||||||
/* Func
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | | | | | | | | | |Layer0| Rest |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | Caps | | | | | Game | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | | | | | | Numb | Music| | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT_planck_mit(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO( 0 ), RESET ,
|
|
||||||
KC_CAPS, _______, _______, _______, _______, TO(_GAME), _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, TO(_NUMB), MU_TOG, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ),
|
|
||||||
|
|
||||||
[_GAME] = LAYOUT_planck_mit(
|
|
||||||
XXXXXXX,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
|
|
||||||
XXXXXXX,KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX,KC_LCTL, KC_A, KC_S, KC_D, KC_B, KC_N, KC_M, XXXXXXX, XXXXXXX, KC_UP, TO( 0 ),
|
|
||||||
XXXXXXX,KC_LSFT, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Encoder */
|
extern rgblight_config_t rgblight_config;
|
||||||
static uint8_t encoder_state = 0;
|
int RGB_LAYER0_mode = 6;
|
||||||
static int8_t encoder_value = 0;
|
static uint8_t current_layer = 0;
|
||||||
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
|
static bool has_layer_changed = true;
|
||||||
|
uint16_t i = 0;
|
||||||
/* Timer */
|
uint16_t j = 0;
|
||||||
static uint16_t TAP_RGB_timer;
|
|
||||||
static uint16_t RGB_encoder_timer;
|
static uint16_t RGB_encoder_timer;
|
||||||
|
static uint16_t RGB_encoder_timer2;
|
||||||
|
static uint8_t RGB_encoder_dir = 0;
|
||||||
|
|
||||||
/* Encoder state RGB_display */
|
const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {
|
||||||
static uint8_t RGB_encoder_count=6;
|
30,
|
||||||
static bool RGB_encoder_bool = false;
|
5,
|
||||||
|
-5
|
||||||
|
};
|
||||||
|
|
||||||
/* RGB tap HUE */
|
void matrix_init_user(void) {
|
||||||
static uint16_t Type_Hue=270;
|
RGB_encoder_timer = timer_read();
|
||||||
|
RGB_encoder_timer2 = timer_read();
|
||||||
void matrix_init_user( void )
|
|
||||||
{
|
|
||||||
wait_ms( 200 );
|
|
||||||
|
|
||||||
/* Encoder init */
|
|
||||||
encoder_state = PIND & 0x3;
|
|
||||||
|
|
||||||
/* Timer init */
|
|
||||||
RGB_encoder_timer= timer_read();
|
|
||||||
TAP_RGB_timer= timer_read();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
void matrix_scan_user( void )
|
if (RGB_encoder_dir != 0) {
|
||||||
{
|
if (timer_elapsed(RGB_encoder_timer) > 1400) {
|
||||||
/* Layer */
|
RGB_encoder_dir = 0;
|
||||||
uint8_t layer = biton32( layer_state );
|
rgblight_mode(RGB_LAYER0_mode);
|
||||||
|
} else {
|
||||||
/* Encoder */
|
if (timer_elapsed(RGB_encoder_timer2) > 700) {
|
||||||
encoder_state <<= 2;
|
|
||||||
encoder_state |= (PIND & 0x3);
|
|
||||||
encoder_value += encoder_LUT[encoder_state & 0xF];
|
|
||||||
|
|
||||||
/* Encoder state RGB display */
|
|
||||||
if (RGB_encoder_bool){
|
|
||||||
if (timer_elapsed(RGB_encoder_timer) > 2500) {
|
|
||||||
RGB_encoder_bool=false;
|
|
||||||
if (RGB_TAP_STATE) {
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb( RGB_TAP_Base_Color );
|
|
||||||
}else{
|
|
||||||
rgblight_mode( RGB_LAYER0_mode );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Display the Caps state */
|
|
||||||
if (caps==true){
|
|
||||||
rgblight_setrgb_at(RGB_Caps_Color,12);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Start of Encoder clockwise */
|
|
||||||
if ( encoder_value >= 4 ) {
|
|
||||||
|
|
||||||
/* Start of Encoder state RGB_display */
|
|
||||||
if (!RGB_encoder_bool){
|
|
||||||
RGB_encoder_timer=timer_read();
|
|
||||||
RGB_encoder_bool=true;
|
|
||||||
RGB_encoder_count=5;
|
|
||||||
rgblight_mode(1);
|
|
||||||
rgblight_setrgb( 0,0,0 );
|
|
||||||
}else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) {
|
|
||||||
RGB_encoder_timer=timer_read();
|
|
||||||
RGB_encoder_count-=1;
|
|
||||||
if (RGB_encoder_count>5 || RGB_encoder_count<1){
|
|
||||||
RGB_encoder_count=5;
|
|
||||||
rgblight_setrgb(0, 0, 0);
|
rgblight_setrgb(0, 0, 0);
|
||||||
|
RGB_encoder_timer2 = timer_read();
|
||||||
|
}
|
||||||
|
if (timer_elapsed(RGB_encoder_timer2) > 80) {
|
||||||
|
if (RGB_encoder_dir == 1) {
|
||||||
|
rgblight_setrgb_at(128, 128, 0, 19);
|
||||||
|
} else {
|
||||||
|
rgblight_setrgb_at(128, 128, 0, 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (timer_elapsed(RGB_encoder_timer2) > 180) {
|
||||||
|
if (RGB_encoder_dir == 1) {
|
||||||
|
rgblight_setrgb_at(160, 160, 0, 8);
|
||||||
|
} else {
|
||||||
|
rgblight_setrgb_at(160, 160, 0, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (timer_elapsed(RGB_encoder_timer2) > 280) {
|
||||||
|
if (RGB_encoder_dir == 1) {
|
||||||
|
rgblight_setrgb_at(192, 192, 0, 9);
|
||||||
|
} else {
|
||||||
|
rgblight_setrgb_at(192, 192, 0, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (timer_elapsed(RGB_encoder_timer2) > 400) {
|
||||||
|
if (RGB_encoder_dir == 1) {
|
||||||
|
rgblight_setrgb_at(224, 224, 0, 10);
|
||||||
|
} else {
|
||||||
|
rgblight_setrgb_at(224, 224, 0, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rgblight_setrgb_at(0,255,0,5);
|
|
||||||
if (RGB_encoder_count<1) {RGB_encoder_count=1;}
|
|
||||||
switch (RGB_encoder_count) {
|
|
||||||
case 5:
|
|
||||||
rgblight_setrgb_at(0, 255, 0,4);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
rgblight_setrgb_at(0, 255, 0,3);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
rgblight_setrgb_at(0, 255, 0,2);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
rgblight_setrgb_at(0, 255, 0,1);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
rgblight_setrgb_at(0, 255, 0,0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* End of Encoder state RGB_display */
|
|
||||||
|
|
||||||
/* Start of Set Encoder Keycode */
|
|
||||||
switch ( layer )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
tap_code( KC_VOLD );
|
|
||||||
break;
|
|
||||||
case _CODE:
|
|
||||||
tap_code( KC_LEFT );
|
|
||||||
break;
|
|
||||||
case _RGB:
|
|
||||||
rgblight_decrease_val();
|
|
||||||
break;
|
|
||||||
case _NUMB:
|
|
||||||
tap_code( KC_LEFT );
|
|
||||||
break;
|
|
||||||
case _MARO:
|
|
||||||
tap_code( KC_UP );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tap_code( KC_VOLD );
|
|
||||||
}
|
|
||||||
/* End of Set Encoder Keycode */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of Encoder clockwise */
|
/* layer rgb */
|
||||||
|
if (layer != current_layer) {
|
||||||
/* Start of Encoder anti-clockwise */
|
has_layer_changed = true;
|
||||||
if ( encoder_value <= -4 )
|
current_layer = layer;
|
||||||
{
|
}
|
||||||
/* Start of Encoder state RGB_display */
|
if (has_layer_changed) {
|
||||||
if (!RGB_encoder_bool){
|
if (layer == 0) {
|
||||||
RGB_encoder_timer=timer_read();
|
rgblight_mode(RGB_LAYER0_mode);
|
||||||
RGB_encoder_bool=true;
|
} else {
|
||||||
RGB_encoder_count=6;
|
|
||||||
rgblight_mode(1);
|
rgblight_mode(1);
|
||||||
rgblight_setrgb( 0,0,0 );
|
for (i = 0; i < 48; i++) {
|
||||||
}else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) {
|
(i > 41) ? (j = i - 1) : (j = i);
|
||||||
RGB_encoder_timer=timer_read();
|
uint16_t kc = keymap_key_to_keycode(layer, (keypos_t) {.row = 0, .col = i
|
||||||
RGB_encoder_count+=1;
|
});
|
||||||
if (RGB_encoder_count<6 || RGB_encoder_count> 10){
|
if (kc == KC_TRNS) {
|
||||||
RGB_encoder_count=6;
|
setrgb(5, 5, 5, (LED_TYPE * ) & led[j]); /* TRNS color 0-255*/
|
||||||
rgblight_setrgb(0, 0, 0);
|
} else if (kc == KC_NO) {
|
||||||
|
setrgb(0, 0, 0, (LED_TYPE * ) & led[j]); /* NO color 0-255*/
|
||||||
|
} else {
|
||||||
|
if (layer == 1) {
|
||||||
|
setrgb(128, 64, 0, (LED_TYPE * ) & led[j]); /* 1 layer 0-255*/
|
||||||
|
} else if (layer == 2) {
|
||||||
|
setrgb(0, 64, 128, (LED_TYPE * ) & led[j]); /* 2*/
|
||||||
|
} else if (layer == 3) {
|
||||||
|
setrgb(64, 128, 0, (LED_TYPE * ) & led[j]); /* 3*/
|
||||||
|
} else if (layer == 4) {
|
||||||
|
setrgb(0, 128, 64, (LED_TYPE * ) & led[j]); /* 4*/
|
||||||
|
} else if (layer == 5) {
|
||||||
|
setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 5*/
|
||||||
|
} else if (layer == 6) {
|
||||||
|
setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 6*/
|
||||||
|
} else if (layer == 7) {
|
||||||
|
setrgb(128, 128, 0, (LED_TYPE * ) & led[j]); /* 7*/
|
||||||
|
} else if (layer == 8) {
|
||||||
|
setrgb(0, 128, 128, (LED_TYPE * ) & led[j]); /* 8*/
|
||||||
|
} else if (layer == 9) {
|
||||||
|
setrgb(128, 192, 64, (LED_TYPE * ) & led[j]); /* 9*/
|
||||||
|
} else if (layer == 10) {
|
||||||
|
setrgb(64, 192, 128, (LED_TYPE * ) & led[j]); /* 10*/
|
||||||
|
} else if (layer == 11) {
|
||||||
|
setrgb(128, 64, 192, (LED_TYPE * ) & led[j]); /* 11*/
|
||||||
|
} else if (layer == 12) {
|
||||||
|
setrgb(64, 128, 192, (LED_TYPE * ) & led[j]); /* 12*/
|
||||||
|
} else if (layer == 13) {
|
||||||
|
setrgb(128, 192, 0, (LED_TYPE * ) & led[j]); /* 13*/
|
||||||
|
} else if (layer == 14) {
|
||||||
|
setrgb(192, 0, 128, (LED_TYPE * ) & led[j]); /* 14*/
|
||||||
|
} else if (layer == 15) {
|
||||||
|
setrgb(0, 192, 128, (LED_TYPE * ) & led[j]); /* 15*/
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
rgblight_set();
|
||||||
rgblight_setrgb_at(0, 0,255,6);
|
|
||||||
if (RGB_encoder_count>11) {
|
|
||||||
RGB_encoder_count=11;
|
|
||||||
}
|
|
||||||
switch (RGB_encoder_count) {
|
|
||||||
case 6:
|
|
||||||
rgblight_setrgb_at(0, 0,255,7);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
rgblight_setrgb_at(0, 0,255,8);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
rgblight_setrgb_at(0, 0,255,9);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
rgblight_setrgb_at(0, 0,255,10);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
rgblight_setrgb_at(0, 0,128,11);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* End of Encoder state RGB_display */
|
|
||||||
|
|
||||||
/* Start of Set Encoder Keycode */
|
|
||||||
switch ( layer )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
tap_code( KC_VOLU );
|
|
||||||
break;
|
|
||||||
case _CODE:
|
|
||||||
tap_code( KC_RGHT );
|
|
||||||
break;
|
|
||||||
case _RGB:
|
|
||||||
rgblight_increase_val();
|
|
||||||
break;
|
|
||||||
case _NUMB:
|
|
||||||
tap_code( KC_RGHT );
|
|
||||||
break;
|
|
||||||
case _MARO:
|
|
||||||
tap_code( KC_DOWN );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tap_code( KC_VOLU );
|
|
||||||
}
|
|
||||||
/* End of Set Encoder Keycode */
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of Encoder anti-clockwise */
|
|
||||||
|
|
||||||
encoder_value %= 4;
|
|
||||||
|
|
||||||
/* Start of RGB with Layer change */
|
|
||||||
|
|
||||||
/* Save the Layer0 RGB state */
|
|
||||||
if ( save_rgbmode == true ) {
|
|
||||||
if (RGB_TAP_STATE==false)
|
|
||||||
{
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
save_rgbmode = false;
|
|
||||||
|
|
||||||
/* When the layer is changed */
|
|
||||||
if ( layer != current_layer && caps == false) {
|
|
||||||
has_layer_changed = true;
|
|
||||||
current_layer = layer; /* update layer information */
|
|
||||||
}
|
|
||||||
/* Check for layer change, and apply color if its changed since last check */
|
|
||||||
if ( has_layer_changed )
|
|
||||||
{
|
|
||||||
/* change backlight based on layer. These should be numbers or whatever you defined the layers as */
|
|
||||||
switch ( layer )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
|
|
||||||
/* if the key tap RGB effect is enable */
|
|
||||||
if (RGB_TAP_STATE==true){
|
|
||||||
rgblight_mode(1);
|
|
||||||
rgblight_setrgb( RGB_TAP_Base_Color );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
rgblight_mode( RGB_LAYER0_mode );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _CODE: //1
|
|
||||||
/* Save Layer0 RGB state */
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
/* set all the RGB color under the switch */
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_1_Base_Color);
|
|
||||||
|
|
||||||
/* set each of the RGB led color under the switch */
|
|
||||||
rgblight_setrgb_at(64, 64, 64,1); // Q
|
|
||||||
rgblight_setrgb_at(64, 64, 64,2); // W
|
|
||||||
rgblight_setrgb_at(64, 64, 64,3); // E
|
|
||||||
rgblight_setrgb_at(64, 64, 64,4); // R
|
|
||||||
rgblight_setrgb_at(64, 64, 64,5); // T
|
|
||||||
rgblight_setrgb_at(64, 64, 64,6); // Y
|
|
||||||
rgblight_setrgb_at(64, 64, 64,7); // U
|
|
||||||
rgblight_setrgb_at(64, 64, 64,8); // I
|
|
||||||
rgblight_setrgb_at(64, 64, 64,9); // O
|
|
||||||
rgblight_setrgb_at(64, 64, 64,10); // P
|
|
||||||
rgblight_setrgb_at(64, 0, 0,40); // -
|
|
||||||
rgblight_setrgb_at(64, 0, 0,42); // =
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _NAVI: //2
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_2_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(64, 0, 64,3);
|
|
||||||
rgblight_setrgb_at(64, 0, 64,14);
|
|
||||||
rgblight_setrgb_at(64, 0, 64,15);
|
|
||||||
rgblight_setrgb_at(64, 0, 64,16);
|
|
||||||
rgblight_setrgb_at(64, 64, 0,8);
|
|
||||||
rgblight_setrgb_at(64, 64, 0,10);
|
|
||||||
rgblight_setrgb_at(64, 64, 0,21);
|
|
||||||
rgblight_setrgb_at(64, 64, 0,29);
|
|
||||||
rgblight_setrgb_at(64, 0, 0,11);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,34);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,44);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,45);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,46);
|
|
||||||
break;
|
|
||||||
case _FUNC: //3
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_3_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(0, 0, 64,1);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,2);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,3);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,4);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,5);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,6);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,7);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,8);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,9);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,10);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,13);
|
|
||||||
rgblight_setrgb_at(0, 0, 64,14);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _SYMB: //4
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_4_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(0, 64, 64,1);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,2);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,3);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,4);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,5);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,6);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,7);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,8);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,9);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,10);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,12);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,22);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,23);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,32);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,33);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,34);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,39);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,40);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,42);
|
|
||||||
rgblight_setrgb_at(0, 64, 64,43);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _NUMB: //5
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_5_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(0,64,0,1);
|
|
||||||
rgblight_setrgb_at(0,64,0,2);
|
|
||||||
rgblight_setrgb_at(0,64,0,13);
|
|
||||||
rgblight_setrgb_at(0,64,0,14);
|
|
||||||
rgblight_setrgb_at(0,64,64,15);
|
|
||||||
rgblight_setrgb_at(64,64,64,7);
|
|
||||||
rgblight_setrgb_at(64,64,64,8);
|
|
||||||
rgblight_setrgb_at(64,64,64,9);
|
|
||||||
rgblight_setrgb_at(64,64,64,19);
|
|
||||||
rgblight_setrgb_at(64,64,64,20);
|
|
||||||
rgblight_setrgb_at(64,64,64,21);
|
|
||||||
rgblight_setrgb_at(64,64,64,31);
|
|
||||||
rgblight_setrgb_at(64,64,64,32);
|
|
||||||
rgblight_setrgb_at(64,64,64,33);
|
|
||||||
rgblight_setrgb_at(64,64,64,42);
|
|
||||||
rgblight_setrgb_at(64,64,64,43);
|
|
||||||
rgblight_setrgb_at(0,128,0,44);
|
|
||||||
break;
|
|
||||||
case _MARO: //6
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_6_Base_Color);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _RGB: //7
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_7_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(1,143,225,0);
|
|
||||||
rgblight_setrgb_at(39,21,107,1);
|
|
||||||
rgblight_setrgb_at(208,0,0,2);
|
|
||||||
rgblight_setrgb_at(64,64,64,21);
|
|
||||||
break;
|
|
||||||
case _ADJUST: //8
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_8_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(0,64,0,10);
|
|
||||||
rgblight_setrgb_at(64,0,0,11);
|
|
||||||
rgblight_setrgb_at(0,64,0,17);
|
|
||||||
rgblight_setrgb_at(0,64,0,30);
|
|
||||||
rgblight_setrgb_at(6,50,50,12);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _GAME: //9
|
|
||||||
RGB_LAYER0_mode = rgblight_config.mode;
|
|
||||||
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb(RGB_Layer_9_Base_Color);
|
|
||||||
|
|
||||||
rgblight_setrgb_at(0,0,64,15);
|
|
||||||
rgblight_setrgb_at(0,0,64,26);
|
|
||||||
rgblight_setrgb_at(0,0,64,27);
|
|
||||||
rgblight_setrgb_at(0,0,64,28);
|
|
||||||
rgblight_setrgb_at(64,0,0,35);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rgblight_mode( RGB_LAYER0_mode );
|
|
||||||
}
|
}
|
||||||
has_layer_changed = false;
|
has_layer_changed = false;
|
||||||
}
|
}
|
||||||
/* End of RGB with Layer change */
|
/* end of layer rgb */
|
||||||
|
}
|
||||||
|
|
||||||
} // End of matrix_scan_user
|
bool process_record_user(uint16_t keycode, keyrecord_t * record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RGB_MOD:
|
||||||
|
RGB_LAYER0_mode = rgblight_config.mode;
|
||||||
/* shift + enter = " from:https://github.com/qmk/qmk_firmware/blob/e899cb8940da04fa2610604f0aab417db7fac119/keyboards/mitosis/keymaps/datagrok/keymap.c */
|
|
||||||
|
|
||||||
bool comm_shifted = false;
|
|
||||||
bool ques_shifted = false;
|
|
||||||
static uint8_t key_index = 0;
|
|
||||||
uint8_t shifted;
|
|
||||||
uint16_t s_keycode;
|
|
||||||
bool *k_shifted;
|
|
||||||
|
|
||||||
bool process_record_user( uint16_t keycode, keyrecord_t *record ){
|
|
||||||
|
|
||||||
/* Start of key tap RGB effect */
|
|
||||||
if ( RGB_TAP_STATE ==true ) {
|
|
||||||
key_index=(record->event.key.col)+(record->event.key.row)*12;
|
|
||||||
|
|
||||||
/* Change the Hue of the RGB color with the type speed */
|
|
||||||
if (timer_elapsed(TAP_RGB_timer) >10000){
|
|
||||||
TAP_RGB_timer=timer_read();
|
|
||||||
Type_Hue=270;
|
|
||||||
}else if (timer_elapsed(TAP_RGB_timer) >1000){
|
|
||||||
Type_Hue+=30;
|
|
||||||
if (Type_Hue>270) {
|
|
||||||
Type_Hue=270;}
|
|
||||||
}else{
|
|
||||||
TAP_RGB_timer=timer_read();
|
|
||||||
Type_Hue-=10;
|
|
||||||
if (Type_Hue<10) {
|
|
||||||
Type_Hue=10;}
|
|
||||||
}
|
|
||||||
if (key_index>42){ //fix the RGB index of the MIT layout position
|
|
||||||
key_index=key_index-1;
|
|
||||||
}
|
|
||||||
if ( record->event.pressed ) {
|
|
||||||
rgblight_sethsv_at(Type_Hue,255,255,key_index);
|
|
||||||
} else {
|
|
||||||
rgblight_setrgb_at(RGB_TAP_Base_Color,key_index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* End of key tap RGB effect */
|
|
||||||
|
|
||||||
switch ( keycode )
|
|
||||||
{
|
|
||||||
/* save the RGB state when set the new */
|
|
||||||
case RGB_M_R:
|
|
||||||
save_rgbmode = true;
|
|
||||||
break;
|
|
||||||
case RGB_M_SW:
|
|
||||||
save_rgbmode = true;
|
|
||||||
break;
|
|
||||||
case RGB_M_X:
|
|
||||||
save_rgbmode = true;
|
|
||||||
break;
|
|
||||||
case RGB_M_G:
|
|
||||||
save_rgbmode = true;
|
|
||||||
break;
|
|
||||||
case RGB_MODE_KNIGHT:
|
|
||||||
save_rgbmode = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Define a New Keycode: double zero */
|
|
||||||
case KC_00:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
// Do something when pressed
|
|
||||||
} else {
|
|
||||||
tap_code( KC_0 ); // send 0
|
|
||||||
tap_code( KC_0 ); // send 0 twice without macro
|
|
||||||
}
|
|
||||||
return false; // Skip all further processing of this key
|
|
||||||
|
|
||||||
/* when the REST key is pressed the 'R' key will RED,the "Bottom Left"(esc of qmk-dfu) will be GREEN */
|
|
||||||
case RESET:
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb( 0, 0, 0 );
|
|
||||||
rgblight_setrgb_at(128, 0, 0,4); // R
|
|
||||||
rgblight_setrgb_at(6, 128, 24,36); // Bottom Left key
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Define a New Keycode: key tap RGB effect toggle */
|
|
||||||
case RGB_TAP:
|
|
||||||
if ( !(record->event.pressed)) {
|
|
||||||
/* If enable,the 'On' key will be green */
|
|
||||||
if (RGB_TAP_STATE) {
|
|
||||||
RGB_TAP_STATE=false;
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb( RGB_TAP_Base_Color );
|
|
||||||
rgblight_setrgb_at(RGB_TAP_Off_Color,16); // O - on
|
|
||||||
}else{
|
|
||||||
/* If disenable,the 'oFf' key will be red */
|
|
||||||
RGB_TAP_STATE=true;
|
|
||||||
rgblight_mode( 1 );
|
|
||||||
rgblight_setrgb( RGB_TAP_Base_Color );
|
|
||||||
rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* special shift keys */
|
|
||||||
case KC_ENT:
|
|
||||||
s_keycode = KC_QUOT;
|
|
||||||
k_shifted = &ques_shifted;
|
|
||||||
break;
|
|
||||||
case KC_UP:
|
|
||||||
s_keycode = KC_SLSH;
|
|
||||||
k_shifted = &ques_shifted;
|
|
||||||
break;
|
|
||||||
case KC_DOWN:
|
|
||||||
s_keycode = KC_BSLS;
|
|
||||||
k_shifted = &ques_shifted;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return(true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
return (true);
|
||||||
|
}
|
||||||
|
|
||||||
shifted = get_mods() & (MOD_BIT( KC_LSHIFT ) | MOD_BIT( KC_RSHIFT ) );
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
RGB_encoder_timer = timer_read();
|
||||||
/* Keydown. If shift is currently pressed, register its alternate keycode. */
|
RGB_encoder_timer2 = timer_read();
|
||||||
if ( record->event.pressed && shifted )
|
uint8_t layer = biton32(layer_state);
|
||||||
{
|
if (clockwise) {
|
||||||
*k_shifted = true;
|
RGB_encoder_dir = 1;
|
||||||
register_code( s_keycode );
|
|
||||||
return(false);
|
|
||||||
/*
|
|
||||||
* Keyup. If shift was pressed back when the key was pressed, unregister
|
|
||||||
* its alternate keycode.
|
|
||||||
*/
|
|
||||||
} else if ( !(record->event.pressed) && *k_shifted ) {
|
|
||||||
*k_shifted = false;
|
|
||||||
unregister_code( s_keycode );
|
|
||||||
return(false);
|
|
||||||
/* Otherwise, behave as normal. */
|
|
||||||
} else {
|
} else {
|
||||||
return(true);
|
RGB_encoder_dir = -1;
|
||||||
}
|
}
|
||||||
|
if (index == 0) /* Right encoder */ {
|
||||||
} // End ofprocess_record_user
|
if (clockwise) {
|
||||||
|
register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11
|
||||||
|
}));
|
||||||
void led_set_user( uint8_t usb_led )
|
unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11
|
||||||
{
|
}));
|
||||||
static uint8_t old_usb_led = 0;
|
} else {
|
||||||
wait_ms( 10 ); /* gets rid of tick */
|
register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10
|
||||||
|
}));
|
||||||
if ( (usb_led & (1 << USB_LED_CAPS_LOCK) ) && !(old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) {
|
unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10
|
||||||
/* CAPS on */
|
}));
|
||||||
caps= true;
|
}
|
||||||
rgblight_setrgb( 0,0,0 );
|
} else if (index == 1) /* Left encoder */ {
|
||||||
rgblight_setrgb_at(RGB_Caps_Color,12); // caps key
|
if (clockwise) {
|
||||||
#ifdef AUDIO_ENABLE
|
register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1
|
||||||
PLAY_SONG( tone_caps );
|
}));
|
||||||
#endif
|
unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1
|
||||||
}else if ( !(usb_led & (1 << USB_LED_CAPS_LOCK) ) && (old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) {
|
}));
|
||||||
|
} else {
|
||||||
/* CAPS off */
|
register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0
|
||||||
caps= false;
|
}));
|
||||||
if (RGB_TAP_STATE==false){
|
unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0
|
||||||
rgblight_mode( RGB_LAYER0_mode );
|
}));
|
||||||
}else{
|
|
||||||
rgblight_mode(1);
|
|
||||||
rgblight_setrgb( 0,0,0 );
|
|
||||||
}
|
}
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG( tone_caps );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
old_usb_led = usb_led;
|
}
|
||||||
} // End of led_set_user
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
TAP_DANCE_ENABLE = yes
|
|
||||||
@@ -2,6 +2,8 @@ Tetris
|
|||||||
===
|
===
|
||||||
A compact 40% (12x4) ortholinear keyboard (Planck Mit layout) with per switch RGB and encoder made by Fengz.
|
A compact 40% (12x4) ortholinear keyboard (Planck Mit layout) with per switch RGB and encoder made by Fengz.
|
||||||
|
|
||||||
|
Fake keys on the 5th row are for configuring the encoder's keycode.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
More: [Imgur](https://imgur.com/gallery/Azq2zUm).
|
More: [Imgur](https://imgur.com/gallery/Azq2zUm).
|
||||||
@@ -12,4 +14,4 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make tetris:default
|
make tetris: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.
|
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.
|
||||||
Regular → Executable
+6
-7
@@ -36,26 +36,25 @@ F_USB = $(F_CPU)
|
|||||||
# Interrupt driven control endpoint task(+60)
|
# Interrupt driven control endpoint task(+60)
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
# Boot Section Size in *bytes*
|
||||||
#OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
#OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
BOOTLOADER =qmk-dfu
|
BOOTLOADER =qmk-dfu
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = 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
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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
|
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
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
TAP_DANCE_ENABLE = no
|
EXTRAFLAGS = -flto
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
EXTRAFLAGS += -flto # Make the hex smaller
|
|
||||||
|
|
||||||
LAYOUTS = planck_mit
|
|
||||||
Regular → Executable
+1
-1
@@ -1 +1 @@
|
|||||||
#include "tetris.h"
|
#include QMK_KEYBOARD_H
|
||||||
Regular → Executable
+5
-3
@@ -7,12 +7,14 @@
|
|||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||||
K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \
|
K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, \
|
||||||
|
K400, K401, K410, K411 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
|
||||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
||||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
||||||
{ K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \
|
{ K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 }, \
|
||||||
|
{ K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user