Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780ff68674 | ||
|
|
004df55d7f | ||
|
|
7a5ce36f23 | ||
|
|
4ec03111cc | ||
|
|
1fbddc6613 | ||
|
|
2d8fda614e | ||
|
|
6d66fe0c0c | ||
|
|
6268656e01 | ||
|
|
ff728a8a01 | ||
|
|
37cc088486 | ||
|
|
500b060e3d | ||
|
|
4ca65bb6c6 | ||
|
|
b6db61b922 | ||
|
|
ce3adcd6e1 | ||
|
|
3acaad6600 | ||
|
|
00b4dce605 | ||
|
|
bb5c98699f | ||
|
|
682c8a260a | ||
|
|
a2e12faa19 | ||
|
|
729e99961c | ||
|
|
04d72590af | ||
|
|
4dc3a01fcb | ||
|
|
a3047f1ab3 | ||
|
|
5d771039ad | ||
|
|
23ac2a02ef | ||
|
|
7230923b05 | ||
|
|
687c7070a1 | ||
|
|
598ab478be | ||
|
|
241421efd4 | ||
|
|
3d1801e63a | ||
|
|
ea070950e7 | ||
|
|
54f1cdfb1e | ||
|
|
a730cf6718 | ||
|
|
f139c3db8d | ||
|
|
48321c3eee | ||
|
|
e424944a57 | ||
|
|
4658786436 | ||
|
|
6c74d734c2 | ||
|
|
ad1a868701 | ||
|
|
9db908f7d1 | ||
|
|
added1f062 | ||
|
|
e8e999dcc0 | ||
|
|
4464d90f4d | ||
|
|
2dacf25f28 | ||
|
|
bfa34d02b0 | ||
|
|
0b82d08e8d | ||
|
|
fdeb7f7665 | ||
|
|
141a52982e | ||
|
|
ac5326595c | ||
|
|
400f410c45 | ||
|
|
8d6eadf261 | ||
|
|
0e6e059ef3 | ||
|
|
0603dcb1be | ||
|
|
3313473004 | ||
|
|
3f1d147529 | ||
|
|
eba4b08a4a | ||
|
|
7d9dc61504 | ||
|
|
566399794a | ||
|
|
2bdf1731c3 | ||
|
|
955b17189a | ||
|
|
3d7e9425c7 | ||
|
|
483e3cd1cb | ||
|
|
821b492667 | ||
|
|
bd1ad405bf | ||
|
|
03df19d3f6 | ||
|
|
42e85d2b92 | ||
|
|
d27d854913 | ||
|
|
bec8d58ad8 | ||
|
|
6c473c5f38 | ||
|
|
aadb386de6 | ||
|
|
b688c2c0b3 | ||
|
|
7b80aea8b2 | ||
|
|
586aa15cef | ||
|
|
48e11240a6 | ||
|
|
75354f12d7 | ||
|
|
6a4e08938e |
No files matched your search
@@ -124,6 +124,12 @@ generate-keyboards-file:
|
|||||||
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
|
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
clean:
|
||||||
|
echo -n 'Deleting .build ... '
|
||||||
|
rm -rf $(BUILD_DIR)
|
||||||
|
echo 'done'
|
||||||
|
exit 0
|
||||||
|
|
||||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||||
# always overrides the detected folders
|
# always overrides the detected folders
|
||||||
ifdef keyboard
|
ifdef keyboard
|
||||||
|
|||||||
@@ -132,6 +132,9 @@ endif
|
|||||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||||
|
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
||||||
|
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||||
|
|||||||
+2
-1
@@ -45,6 +45,7 @@
|
|||||||
* [RGB Lighting](feature_rgblight.md)
|
* [RGB Lighting](feature_rgblight.md)
|
||||||
* [Space Cadet](feature_space_cadet.md)
|
* [Space Cadet](feature_space_cadet.md)
|
||||||
* [Stenography](feature_stenography.md)
|
* [Stenography](feature_stenography.md)
|
||||||
|
* [Swap Hands](feature_swap_hands.md)
|
||||||
* [Tap Dance](feature_tap_dance.md)
|
* [Tap Dance](feature_tap_dance.md)
|
||||||
* [Terminal](feature_terminal.md)
|
* [Terminal](feature_terminal.md)
|
||||||
* [Thermal Printer](feature_thermal_printer.md)
|
* [Thermal Printer](feature_thermal_printer.md)
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
* [Customizing Functionality](custom_quantum_functions.md)
|
* [Customizing Functionality](custom_quantum_functions.md)
|
||||||
* [Documentation Best Practices](documentation_best_practices.md)
|
* [Documentation Best Practices](documentation_best_practices.md)
|
||||||
* [Documentation Templates](documentation_templates.md)
|
* [Documentation Templates](documentation_templates.md)
|
||||||
* [Glossary](glossary.md)
|
* [Glossary](reference_glossary.md)
|
||||||
* [Keymap Overview](keymap.md)
|
* [Keymap Overview](keymap.md)
|
||||||
* [Unit Testing](unit_testing.md)
|
* [Unit Testing](unit_testing.md)
|
||||||
|
|
||||||
|
|||||||
@@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
|
|||||||
* `USB_LED_COMPOSE`
|
* `USB_LED_COMPOSE`
|
||||||
* `USB_LED_KANA`
|
* `USB_LED_KANA`
|
||||||
|
|
||||||
### Example `led_set_kb()` Implementation
|
### Example `led_set_user()` Implementation
|
||||||
|
|
||||||
```
|
```
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||||
PORTB |= (1<<0);
|
PORTB |= (1<<0);
|
||||||
} else {
|
} else {
|
||||||
@@ -139,14 +139,13 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
||||||
|
|
||||||
### Example `matrix_init_kb()` Implementation
|
### Example `matrix_init_user()` Implementation
|
||||||
|
|
||||||
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
|
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
|
||||||
|
|
||||||
```
|
```
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_user(void) {
|
||||||
// Call the keymap level matrix init.
|
// Call the keymap level matrix init.
|
||||||
matrix_init_user();
|
|
||||||
|
|
||||||
// Set our LED pins as output
|
// Set our LED pins as output
|
||||||
DDRB |= (1<<1);
|
DDRB |= (1<<1);
|
||||||
@@ -176,3 +175,41 @@ This example has been deliberately omitted. You should understand enough about Q
|
|||||||
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
|
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
|
||||||
|
|
||||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||||
|
|
||||||
|
|
||||||
|
# Layer Change Code
|
||||||
|
|
||||||
|
Thir runs code every time that the layers get changed. This can be useful for layer indication, or custom layer handling.
|
||||||
|
|
||||||
|
### Example `layer_state_set_*` Implementation
|
||||||
|
|
||||||
|
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
|
||||||
|
|
||||||
|
```
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case _RAISE:
|
||||||
|
rgblight_setrgb (0x00, 0x00, 0xFF);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
rgblight_setrgb (0xFF, 0x00, 0x00);
|
||||||
|
break;
|
||||||
|
case _PLOVER:
|
||||||
|
rgblight_setrgb (0x00, 0xFF, 0x00);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgblight_setrgb (0x7A, 0x00, 0xFF);
|
||||||
|
break;
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
rgblight_setrgb (0x00, 0xFF, 0xFF);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
### `matrix_init_*` Function Documentation
|
||||||
|
|
||||||
|
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
|
||||||
|
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
|
||||||
|
|
||||||
|
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
||||||
@@ -25,7 +25,8 @@ These functions allow you to activate layers in various ways.
|
|||||||
* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
|
* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
|
||||||
* `TG(layer)` - toggles a layer on or off.
|
* `TG(layer)` - toggles a layer on or off.
|
||||||
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
||||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
|
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you repeatedly tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
|
||||||
|
* `LM(layer, mod)` - Momentary switch to *layer* (like MO), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers.
|
||||||
|
|
||||||
# Working with Layers
|
# Working with Layers
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,7 @@ Yes, unfortunately.
|
|||||||
characters, you could press and hold the 'a' key for a second or two. This no
|
characters, you could press and hold the 'a' key for a second or two. This no
|
||||||
longer works with Auto Shift because it is timing your depressed time instead
|
longer works with Auto Shift because it is timing your depressed time instead
|
||||||
of emitting a depressed key state to your operating system.
|
of emitting a depressed key state to your operating system.
|
||||||
2. Auto Shift is disabled for any key press that is accompanied by one or more
|
2. You will have characters that are shifted when you did not intend on shifting, and
|
||||||
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
|
|
||||||
as Ctrl+Shift+A.
|
|
||||||
3. You will have characters that are shifted when you did not intend on shifting, and
|
|
||||||
other characters you wanted shifted, but were not. This simply comes down to
|
other characters you wanted shifted, but were not. This simply comes down to
|
||||||
practice. As we get in a hurry, we think we have hit the key long enough
|
practice. As we get in a hurry, we think we have hit the key long enough
|
||||||
for a shifted version, but we did not. On the other hand, we may think we are
|
for a shifted version, but we did not. On the other hand, we may think we are
|
||||||
@@ -48,6 +45,18 @@ If no `rules.mk` exists, you can create one.
|
|||||||
|
|
||||||
Then compile and install your new firmware with Auto Key enabled! That's it!
|
Then compile and install your new firmware with Auto Key enabled! That's it!
|
||||||
|
|
||||||
|
## Modifiers
|
||||||
|
|
||||||
|
By default, Auto Shift is disabled for any key press that is accompanied by one or more
|
||||||
|
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
|
||||||
|
as Ctrl+Shift+A.
|
||||||
|
|
||||||
|
You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk`
|
||||||
|
|
||||||
|
AUTO_SHIFT_MODIFIERS = yes
|
||||||
|
|
||||||
|
In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A
|
||||||
|
|
||||||
## Configuring Auto Shift
|
## Configuring Auto Shift
|
||||||
|
|
||||||
If desired, there is some configuration that can be done to change the
|
If desired, there is some configuration that can be done to change the
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ There's also a couple of mod shortcuts you can use:
|
|||||||
* `SS_LGUI(string)`
|
* `SS_LGUI(string)`
|
||||||
* `SS_LALT(string)`
|
* `SS_LALT(string)`
|
||||||
* `SS_LSFT(string)`
|
* `SS_LSFT(string)`
|
||||||
|
* `SS_RALT(string)`
|
||||||
|
|
||||||
These press the respective modifier, send the supplied string and then release the modifier.
|
These press the respective modifier, send the supplied string and then release the modifier.
|
||||||
They can be used like this:
|
They can be used like this:
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ You can change the behavior of the RGB Lighting by setting these configuration v
|
|||||||
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
||||||
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
||||||
| `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. |
|
| `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. |
|
||||||
|
| `RGBLIGHT_SLEEP` | | `#define` this will shut off the lights when the host goes to sleep |
|
||||||
|
|
||||||
|
|
||||||
### Animations
|
### Animations
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Swap-Hands Action
|
||||||
|
|
||||||
|
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
||||||
|
|
||||||
|
```C
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing.
|
||||||
|
|
||||||
|
## Swap Keycodes
|
||||||
|
|
||||||
|
|Key |Description |
|
||||||
|
|-----------|-------------------------------------------------------------------------|
|
||||||
|
|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. |
|
||||||
|
|`SW_ON` |Turns on swapping and leaves it on. |
|
||||||
|
|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.|
|
||||||
|
|`SW_MON` |Swaps hands when pressed, returns to normal when released (momentary). |
|
||||||
|
|`SW_MOFF` |Momentarily turns off swap. |
|
||||||
|
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||||
|
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||||
@@ -63,7 +63,9 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
|
|||||||
* `lufa-dfu`
|
* `lufa-dfu`
|
||||||
* `qmk-dfu`
|
* `qmk-dfu`
|
||||||
* `stm32-dfu-util`
|
* `stm32-dfu-util`
|
||||||
* (FIXME: This list is incomplete.)
|
* `caterina`
|
||||||
|
* `halfkay`
|
||||||
|
* `bootloadHID`
|
||||||
* `maintainer`
|
* `maintainer`
|
||||||
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
||||||
* `width`
|
* `width`
|
||||||
|
|||||||
+239
-226
@@ -6,189 +6,189 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|
|
||||||
## [Basic Keycodes](keycodes_basic.md)
|
## [Basic Keycodes](keycodes_basic.md)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-----------------------|----------|-----------------------------------------------|
|
|-----------------------|--------------------|-----------------------------------------------|
|
||||||
|`KC_1` | |`1` and `!` |
|
|`KC_1` | |`1` and `!` |
|
||||||
|`KC_2` | |`2` and `@` |
|
|`KC_2` | |`2` and `@` |
|
||||||
|`KC_3` | |`3` and `#` |
|
|`KC_3` | |`3` and `#` |
|
||||||
|`KC_4` | |`4` and `$` |
|
|`KC_4` | |`4` and `$` |
|
||||||
|`KC_5` | |`5` and `%` |
|
|`KC_5` | |`5` and `%` |
|
||||||
|`KC_6` | |`6` and `^` |
|
|`KC_6` | |`6` and `^` |
|
||||||
|`KC_7` | |`7` and `&` |
|
|`KC_7` | |`7` and `&` |
|
||||||
|`KC_8` | |`8` and `*` |
|
|`KC_8` | |`8` and `*` |
|
||||||
|`KC_9` | |`9` and `(` |
|
|`KC_9` | |`9` and `(` |
|
||||||
|`KC_0` | |`0` and `)` |
|
|`KC_0` | |`0` and `)` |
|
||||||
|`KC_F1` | | |
|
|`KC_F1` | | |
|
||||||
|`KC_F2` | | |
|
|`KC_F2` | | |
|
||||||
|`KC_F3` | | |
|
|`KC_F3` | | |
|
||||||
|`KC_F4` | | |
|
|`KC_F4` | | |
|
||||||
|`KC_F5` | | |
|
|`KC_F5` | | |
|
||||||
|`KC_F6` | | |
|
|`KC_F6` | | |
|
||||||
|`KC_F7` | | |
|
|`KC_F7` | | |
|
||||||
|`KC_F8` | | |
|
|`KC_F8` | | |
|
||||||
|`KC_F9` | | |
|
|`KC_F9` | | |
|
||||||
|`KC_F10` | | |
|
|`KC_F10` | | |
|
||||||
|`KC_F11` | | |
|
|`KC_F11` | | |
|
||||||
|`KC_F12` | | |
|
|`KC_F12` | | |
|
||||||
|`KC_F13` | | |
|
|`KC_F13` | | |
|
||||||
|`KC_F14` | | |
|
|`KC_F14` | | |
|
||||||
|`KC_F15` | | |
|
|`KC_F15` | | |
|
||||||
|`KC_F16` | | |
|
|`KC_F16` | | |
|
||||||
|`KC_F17` | | |
|
|`KC_F17` | | |
|
||||||
|`KC_F18` | | |
|
|`KC_F18` | | |
|
||||||
|`KC_F19` | | |
|
|`KC_F19` | | |
|
||||||
|`KC_F20` | | |
|
|`KC_F20` | | |
|
||||||
|`KC_F21` | | |
|
|`KC_F21` | | |
|
||||||
|`KC_F22` | | |
|
|`KC_F22` | | |
|
||||||
|`KC_F23` | | |
|
|`KC_F23` | | |
|
||||||
|`KC_F24` | | |
|
|`KC_F24` | | |
|
||||||
|`KC_A` | |`a` and `A` |
|
|`KC_A` | |`a` and `A` |
|
||||||
|`KC_B` | |`b` and `B` |
|
|`KC_B` | |`b` and `B` |
|
||||||
|`KC_C` | |`c` and `C` |
|
|`KC_C` | |`c` and `C` |
|
||||||
|`KC_D` | |`d` and `D` |
|
|`KC_D` | |`d` and `D` |
|
||||||
|`KC_E` | |`e` and `E` |
|
|`KC_E` | |`e` and `E` |
|
||||||
|`KC_F` | |`f` and `F` |
|
|`KC_F` | |`f` and `F` |
|
||||||
|`KC_G` | |`g` and `G` |
|
|`KC_G` | |`g` and `G` |
|
||||||
|`KC_H` | |`h` and `H` |
|
|`KC_H` | |`h` and `H` |
|
||||||
|`KC_I` | |`i` and `I` |
|
|`KC_I` | |`i` and `I` |
|
||||||
|`KC_J` | |`j` and `J` |
|
|`KC_J` | |`j` and `J` |
|
||||||
|`KC_K` | |`k` and `K` |
|
|`KC_K` | |`k` and `K` |
|
||||||
|`KC_L` | |`l` and `L` |
|
|`KC_L` | |`l` and `L` |
|
||||||
|`KC_M` | |`m` and `M` |
|
|`KC_M` | |`m` and `M` |
|
||||||
|`KC_N` | |`n` and `N` |
|
|`KC_N` | |`n` and `N` |
|
||||||
|`KC_O` | |`o` and `O` |
|
|`KC_O` | |`o` and `O` |
|
||||||
|`KC_P` | |`p` and `P` |
|
|`KC_P` | |`p` and `P` |
|
||||||
|`KC_Q` | |`q` and `Q` |
|
|`KC_Q` | |`q` and `Q` |
|
||||||
|`KC_R` | |`r` and `R` |
|
|`KC_R` | |`r` and `R` |
|
||||||
|`KC_S` | |`s` and `S` |
|
|`KC_S` | |`s` and `S` |
|
||||||
|`KC_T` | |`t` and `T` |
|
|`KC_T` | |`t` and `T` |
|
||||||
|`KC_U` | |`u` and `U` |
|
|`KC_U` | |`u` and `U` |
|
||||||
|`KC_V` | |`v` and `V` |
|
|`KC_V` | |`v` and `V` |
|
||||||
|`KC_W` | |`w` and `W` |
|
|`KC_W` | |`w` and `W` |
|
||||||
|`KC_X` | |`x` and `X` |
|
|`KC_X` | |`x` and `X` |
|
||||||
|`KC_Y` | |`y` and `Y` |
|
|`KC_Y` | |`y` and `Y` |
|
||||||
|`KC_Z` | |`z` and `Z` |
|
|`KC_Z` | |`z` and `Z` |
|
||||||
|`KC_ENTER` |`KC_ENT` |Return (Enter) |
|
|`KC_ENTER` |`KC_ENT` |Return (Enter) |
|
||||||
|`KC_ESCAPE` |`KC_ESC` |Escape |
|
|`KC_ESCAPE` |`KC_ESC` |Escape |
|
||||||
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |
|
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |
|
||||||
|`KC_TAB` | |Tab |
|
|`KC_TAB` | |Tab |
|
||||||
|`KC_SPACE` |`KC_SPC` |Spacebar |
|
|`KC_SPACE` |`KC_SPC` |Spacebar |
|
||||||
|`KC_MINUS` |`KC_MINS` |`-` and `_` |
|
|`KC_MINUS` |`KC_MINS` |`-` and `_` |
|
||||||
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
||||||
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|
||||||
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|
||||||
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>|</code> |
|
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>|</code> |
|
||||||
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|
||||||
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>|</code> |
|
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>|</code> |
|
||||||
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code> |
|
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code> |
|
||||||
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|
||||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|
||||||
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|
||||||
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|
||||||
|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |
|
|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |
|
||||||
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|
||||||
|`KC_DOT` | |`.` and `>` |
|
|`KC_DOT` | |`.` and `>` |
|
||||||
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|
||||||
|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock |
|
|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock |
|
||||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` | |Left Alt |
|
||||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` | |Right Alt |
|
||||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key) |
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|
||||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||||
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
||||||
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
||||||
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
||||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
||||||
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|
||||||
|`KC_PAUSE` |`KC_PAUS` |Pause |
|
|`KC_PAUSE` |`KC_PAUS` |Pause |
|
||||||
|`KC_INSERT` |`KC_INS` |Insert |
|
|`KC_INSERT` |`KC_INS` |Insert |
|
||||||
|`KC_HOME` | |Home |
|
|`KC_HOME` | |Home |
|
||||||
|`KC_PGUP` | |Page Up |
|
|`KC_PGUP` | |Page Up |
|
||||||
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
||||||
|`KC_END` | |End |
|
|`KC_END` | |End |
|
||||||
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
||||||
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
||||||
|`KC_LEFT` | |Left Arrow |
|
|`KC_LEFT` | |Left Arrow |
|
||||||
|`KC_DOWN` | |Down Arrow |
|
|`KC_DOWN` | |Down Arrow |
|
||||||
|`KC_UP` | |Up Arrow |
|
|`KC_UP` | |Up Arrow |
|
||||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|
||||||
|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_POWER`.|
|
|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_POWER`.|
|
||||||
|`KC_EXECUTE` | |Execute |
|
|`KC_EXECUTE` | |Execute |
|
||||||
|`KC_HELP` | |Help |
|
|`KC_HELP` | |Help |
|
||||||
|`KC_MENU` | |Menu |
|
|`KC_MENU` | |Menu |
|
||||||
|`KC_SELECT` | |Select |
|
|`KC_SELECT` | |Select |
|
||||||
|`KC_AGAIN` | |Again |
|
|`KC_AGAIN` | |Again |
|
||||||
|`KC_UNDO` | |Undo |
|
|`KC_UNDO` | |Undo |
|
||||||
|`KC_CUT` | |Cut |
|
|`KC_CUT` | |Cut |
|
||||||
|`KC_COPY` | |Copy |
|
|`KC_COPY` | |Copy |
|
||||||
|`KC_PASTE` | |Paste |
|
|`KC_PASTE` | |Paste |
|
||||||
|`KC_FIND` | |Find |
|
|`KC_FIND` | |Find |
|
||||||
|`KC_ALT_ERASE` | |Alternate Erase |
|
|`KC_ALT_ERASE` | |Alternate Erase |
|
||||||
|`KC_SYSREQ` | |SysReq/Attention |
|
|`KC_SYSREQ` | |SysReq/Attention |
|
||||||
|`KC_CANCEL` | |Cancel |
|
|`KC_CANCEL` | |Cancel |
|
||||||
|`KC_CLEAR` | |Clear |
|
|`KC_CLEAR` | |Clear |
|
||||||
|`KC_PRIOR` | |Prior |
|
|`KC_PRIOR` | |Prior |
|
||||||
|`KC_RETURN` | |Return |
|
|`KC_RETURN` | |Return |
|
||||||
|`KC_SEPARATOR` | |Separator |
|
|`KC_SEPARATOR` | |Separator |
|
||||||
|`KC_OUT` | |Out |
|
|`KC_OUT` | |Out |
|
||||||
|`KC_OPER` | |Oper |
|
|`KC_OPER` | |Oper |
|
||||||
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
||||||
|`KC_CRSEL` | |CrSel/Props |
|
|`KC_CRSEL` | |CrSel/Props |
|
||||||
|`KC_EXSEL` | |ExSel |
|
|`KC_EXSEL` | |ExSel |
|
||||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down. Recommended over `KC_POWER`.|
|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down. Recommended over `KC_POWER`.|
|
||||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
||||||
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake |
|
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake |
|
||||||
|`KC_MAIL` |`KC_MAIL` | |
|
|`KC_MAIL` |`KC_MAIL` | |
|
||||||
|`KC_CALCULATOR` |`KC_CALC` | |
|
|`KC_CALCULATOR` |`KC_CALC` | |
|
||||||
|`KC_MY_COMPUTER` |`KC_MYCM` | |
|
|`KC_MY_COMPUTER` |`KC_MYCM` | |
|
||||||
|`KC_WWW_SEARCH` |`KC_WSCH` | |
|
|`KC_WWW_SEARCH` |`KC_WSCH` | |
|
||||||
|`KC_WWW_HOME` |`KC_WHOM` | |
|
|`KC_WWW_HOME` |`KC_WHOM` | |
|
||||||
|`KC_WWW_BACK` |`KC_WBAK` | |
|
|`KC_WWW_BACK` |`KC_WBAK` | |
|
||||||
|`KC_WWW_FORWARD` |`KC_WFWD` | |
|
|`KC_WWW_FORWARD` |`KC_WFWD` | |
|
||||||
|`KC_WWW_STOP` |`KC_WSTP` | |
|
|`KC_WWW_STOP` |`KC_WSTP` | |
|
||||||
|`KC_WWW_REFRESH` |`KC_WREF` | |
|
|`KC_WWW_REFRESH` |`KC_WREF` | |
|
||||||
|`KC_WWW_FAVORITES` |`KC_WFAV` | |
|
|`KC_WWW_FAVORITES` |`KC_WFAV` | |
|
||||||
|`KC_STOP` | |Stop |
|
|`KC_STOP` | |Stop |
|
||||||
|`KC__MUTE` | |Mute (macOS) |
|
|`KC__MUTE` | |Mute (macOS) |
|
||||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
|`KC__VOLUP` | |Volume Up (macOS) |
|
||||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
||||||
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) |
|
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) |
|
||||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) |
|
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) |
|
||||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) |
|
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) |
|
||||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|
||||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|
||||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|
||||||
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|
||||||
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|
||||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
||||||
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|
||||||
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
||||||
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|
||||||
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|
||||||
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |
|
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |
|
||||||
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |
|
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |
|
||||||
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |
|
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |
|
||||||
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|
||||||
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|
||||||
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|
||||||
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|
||||||
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|
||||||
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|
||||||
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|
||||||
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|
||||||
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|
||||||
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|
||||||
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|
||||||
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|
||||||
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|
||||||
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
||||||
|`KC_NO` | |Ignore this key (NOOP) |
|
|`KC_NO` | |Ignore this key (NOOP) |
|
||||||
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
||||||
|
|
||||||
## [Mouse Keys](feature_mouse_keys.md)
|
## [Mouse Keys](feature_mouse_keys.md)
|
||||||
|
|
||||||
@@ -301,44 +301,44 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|
|
||||||
## [Modifiers](quantum_keycodes.md#modifiers)
|
## [Modifiers](quantum_keycodes.md#modifiers)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------|----------|----------------------------------------------------|
|
|----------|---------- |----------------------------------------------------|
|
||||||
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
||||||
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
||||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`| |Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`| |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||||
|`SCMD(kc)`|`SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
|
|
||||||
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|------------|------------|-------------------------------------------------------|
|
|------------|---------------------------------------|-------------------------------------------------------|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ALGR_T(kc)`|Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||||
|`SCMD_T(kc)`|`SWIN_T(kc)`|Left Shift and GUI when held, `kc` when tapped |
|
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|
|
||||||
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||||
|
|
||||||
@@ -368,14 +368,15 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|
|
||||||
## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||||
|
|
||||||
|Key |Description |
|
|Key |Description |
|
||||||
|---------------|----------------------------------------------------------------------------------|
|
|----------------|----------------------------------------------------------------------------------|
|
||||||
|`LT(layer, kc)`|Turn on `layer` when held, `kc` when tapped |
|
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
||||||
|`TO(layer)` |Turn on `layer` when pressed |
|
|`TO(layer)` |Turn on `layer` when pressed |
|
||||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||||
|`DF(layer)` |Set the base (default) layer |
|
|`DF(layer)` |Set the base (default) layer |
|
||||||
|`TG(layer)` |Toggle `layer` on or off |
|
|`TG(layer)` |Toggle `layer` on or off |
|
||||||
|`TT(layer)` |Tap toggle? idk FIXME |
|
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
||||||
|
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. |
|
||||||
|
|
||||||
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
|
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
|
||||||
|
|
||||||
@@ -390,3 +391,15 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|------------|-------|-------------------------------------------------|
|
|------------|-------|-------------------------------------------------|
|
||||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||||
|
|
||||||
|
## [Swap Hands](feature_swap_hands.md)
|
||||||
|
|
||||||
|
|Key |Description |
|
||||||
|
|-----------|-------------------------------------------------------------------------|
|
||||||
|
|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. |
|
||||||
|
|`SW_ON` |Turns on swapping and leaves it on. |
|
||||||
|
|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.|
|
||||||
|
|`SH_MON` |Swaps hands when pressed, returns to normal when released (momentary). |
|
||||||
|
|`SH_MOFF` |Momentarily turns off swap. |
|
||||||
|
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||||
|
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||||
+15
-15
@@ -101,21 +101,21 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
|||||||
|
|
||||||
## Modifiers
|
## Modifiers
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-------------------|---------|------------------------------------|
|
|-------------------|--------------------|------------------------------------|
|
||||||
|`KC_LCTRL` |`KC_LCTL`|Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT` |`KC_LSFT`|Left Shift |
|
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` | |Left Alt |
|
||||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL`|Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT`|Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` | |Right Alt |
|
||||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key)|
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
||||||
|`KC_LOCKING_CAPS` |`KC_LCAP`|Locking Caps Lock |
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||||
|`KC_LOCKING_NUM` |`KC_LNUM`|Locking Num Lock |
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||||
|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock |
|
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|
||||||
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
||||||
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ QMK is a powerful Open Source firmware for your mechanical keyboard. You can use
|
|||||||
|
|
||||||
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
|
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
|
||||||
|
|
||||||
We assume you are familiar with the basics of working in a Linux/Unix command line environment. If you are not these resources will teach you enough to work with QMK:
|
|
||||||
|
|
||||||
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
|
|
||||||
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
There are 4 main sections to this guide:
|
There are 4 main sections to this guide:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ If you have closed and reopened your terminal window since following the first p
|
|||||||
Start by navigating to the `keymaps` folder for your keyboard.
|
Start by navigating to the `keymaps` folder for your keyboard.
|
||||||
|
|
||||||
{% hint style='info' %}
|
{% hint style='info' %}
|
||||||
If you are on macOS or Windows there are commands you can use to easily open the `keymaps` folder.
|
If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
|
||||||
|
|
||||||
macOS:
|
macOS:
|
||||||
|
|
||||||
@@ -22,17 +22,17 @@ Windows:
|
|||||||
|
|
||||||
## Create a Copy Of The `default` Keymap
|
## Create a Copy Of The `default` Keymap
|
||||||
|
|
||||||
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your github username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
|
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
|
||||||
|
|
||||||
## Open `keymap.c` In Your Favorite Text Editor
|
## Open `keymap.c` In Your Favorite Text Editor
|
||||||
|
|
||||||
Inside the `keymap.c` file you'll find the structure that controls how your keyboard behaves. At the top there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
|
Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer.
|
This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer.
|
||||||
|
|
||||||
{% hint style='warning' %}
|
{% hint style='danger' %}
|
||||||
When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
|
When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
@@ -47,3 +47,27 @@ How to complete this step is entirely up to you. Make the one change that's been
|
|||||||
{% hint style='info' %}
|
{% hint style='info' %}
|
||||||
While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
|
While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
|
## Build Your Firmware
|
||||||
|
|
||||||
|
When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
|
||||||
|
|
||||||
|
make <my_keyboard>:<my_keymap>
|
||||||
|
|
||||||
|
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
|
||||||
|
|
||||||
|
make planck/rev5:xyverz
|
||||||
|
|
||||||
|
While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this:
|
||||||
|
|
||||||
|
```
|
||||||
|
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||||
|
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||||
|
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||||
|
Checking file size of planck_rev5_xyverz.hex [OK]
|
||||||
|
* File size is fine - 18392/28672
|
||||||
|
```
|
||||||
|
|
||||||
|
## Flash Your Firmware
|
||||||
|
|
||||||
|
Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard.
|
||||||
@@ -6,9 +6,19 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
|
|||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
Before you can build keymaps you need to setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
|
Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
|
||||||
|
|
||||||
## Download QMK Toolbox
|
## Download Software
|
||||||
|
|
||||||
|
### Text Editor
|
||||||
|
|
||||||
|
You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text.
|
||||||
|
|
||||||
|
{% hint style='info' %}
|
||||||
|
Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
### QMK Toolbox
|
||||||
|
|
||||||
QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
|
QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
|
||||||
|
|
||||||
@@ -19,6 +29,13 @@ QMK Toolbox is a Windows and macOS program that allows you to both program and d
|
|||||||
|
|
||||||
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest.
|
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest.
|
||||||
|
|
||||||
|
{% hint style="info" %}
|
||||||
|
If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
|
||||||
|
|
||||||
|
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
|
||||||
|
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
You will need to install msys2 and git.
|
You will need to install msys2 and git.
|
||||||
@@ -43,8 +60,8 @@ You will need to install git. It's extremely likely you already have it, but if
|
|||||||
|
|
||||||
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
|
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
|
||||||
|
|
||||||
* `git clone https://github.com/qmk/qmk_firmware.git`
|
git clone https://github.com/qmk/qmk_firmware.git
|
||||||
* `cd qmk_firmware`
|
cd qmk_firmware
|
||||||
|
|
||||||
{% hint style='info' %}
|
{% hint style='info' %}
|
||||||
If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
|
If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
|
||||||
@@ -52,19 +69,19 @@ If you already know [how to use GitHub](getting_started_github.md) we recommend
|
|||||||
|
|
||||||
## Setup QMK
|
## Setup QMK
|
||||||
|
|
||||||
QMK comes with a script to help you setup the rest of what you'll need. You should run it now:
|
QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command:
|
||||||
|
|
||||||
* `./util/qmk_install.sh`
|
./util/qmk_install.sh
|
||||||
|
|
||||||
## Test Your Build Environment
|
## Test Your Build Environment
|
||||||
|
|
||||||
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
|
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
|
||||||
|
|
||||||
* `make <keyboard>:default`
|
make <keyboard>:default
|
||||||
|
|
||||||
For example, to build a firmware for a Clueboard 66% use:
|
For example, to build a firmware for a Clueboard 66% use:
|
||||||
|
|
||||||
* `make clueboard/66:default`
|
make clueboard/66/rev3:default
|
||||||
|
|
||||||
When it is done you should have a lot of output that ends similar to this:
|
When it is done you should have a lot of output that ends similar to this:
|
||||||
|
|
||||||
@@ -75,3 +92,7 @@ Copying clueboard_66_rev2_default.hex to qmk_firmware folder
|
|||||||
Checking file size of clueboard_66_rev2_default.hex [OK]
|
Checking file size of clueboard_66_rev2_default.hex [OK]
|
||||||
* File size is fine - 25174/28672
|
* File size is fine - 25174/28672
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Creating Your Layout
|
||||||
|
|
||||||
|
Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.
|
||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
"to": "feature_advanced_keycodes.html"
|
"to": "feature_advanced_keycodes.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": "flashing.html",
|
"from": "glossary.html",
|
||||||
"to": "newbs_flashing.html"
|
"to": "reference_glossary.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": "key_lock.html",
|
"from": "key_lock.html",
|
||||||
|
|||||||
File renamed without changes.
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "1up60rgb",
|
||||||
|
"manufacturer": "1UP Keyboards",
|
||||||
|
"identifier": "",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"KEYMAP": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# adjust for cpu
|
||||||
|
# -j 16 gave best result on a hyperthreaded quad core core i7
|
||||||
|
|
||||||
|
LIMIT=10
|
||||||
|
THREADS="-j 16"
|
||||||
|
KMAP=iso_split_rshift
|
||||||
|
|
||||||
|
echo "We need sudo later"
|
||||||
|
sudo ls 2>&1 /dev/null
|
||||||
|
|
||||||
|
function wait_bootloader {
|
||||||
|
echo "Waiting for Bootloader..."
|
||||||
|
local STARTTIME=$(date +"%s")
|
||||||
|
local REMIND=0
|
||||||
|
local EXEC=dfu-programmer
|
||||||
|
local TARGET=atmega32u4
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sudo $EXEC $TARGET get > /dev/null 2>&1
|
||||||
|
[ $? -eq 0 ] && break
|
||||||
|
ENDTIME=$(date +"%s")
|
||||||
|
DURATION=$(($ENDTIME-$STARTTIME))
|
||||||
|
if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ]
|
||||||
|
then
|
||||||
|
echo "Did you forget to press the reset button?"
|
||||||
|
REMIND=1
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
make clean
|
||||||
|
make KEYMAP=${KMAP} ${THREADS}
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
echo "please trigger flashing!"
|
||||||
|
wait_bootloader
|
||||||
|
sudo make KEYMAP=${KMAP} dfu ${THREADS}
|
||||||
|
else
|
||||||
|
echo "make failed"
|
||||||
|
exit 77
|
||||||
|
fi
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define TAPPING_TERM 25
|
||||||
|
#define RETRO_TAPPING
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "amj40.h"
|
||||||
|
|
||||||
|
// Keymap myee
|
||||||
|
// 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 _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _ADJUST 3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
// increase readability
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = KEYMAP( \
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\
|
||||||
|
F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTL, KC_LGUI,KC_LALT, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = KEYMAP( \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \
|
||||||
|
_______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \
|
||||||
|
_______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = KEYMAP( \
|
||||||
|
KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
|
||||||
|
_______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = KEYMAP( \
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum function_id {
|
||||||
|
LAUNCH,
|
||||||
|
RGBLED_TOGGLE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
|
||||||
|
[1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
|
||||||
|
[2] = ACTION_LAYER_TAP_KEY(_ADJUST,KC_TAB),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
AMJ40 Default Layout
|
||||||
|
=====================
|
||||||
|
|
||||||
|
##Quantum MK Firmware
|
||||||
|
For the full Quantum feature list, see the parent readme.md.
|
||||||
|
|
||||||
|
# Features
|
||||||
|
* Based on a combination of the original AMJ40 keymap from the TMK firmware as well as the Planck Ortholinear keyboard's "Lower," "Raise," and "Adjust" layers.
|
||||||
|
* View the keymap.c file to understand they layout of the keymap.
|
||||||
|
* Has keys to toggle both the switch LEDs and underglow LEDs.
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# 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 = 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
#define ws2812_PORTREG PORTD
|
||||||
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
git checkout amj60 # gets you on branch amj60
|
||||||
|
git fetch origin # gets you up to date with origin
|
||||||
|
git merge origin/master
|
||||||
@@ -359,7 +359,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
case MACRO_BREATH_DEFAULT:
|
case MACRO_BREATH_DEFAULT:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_defaults();
|
breathing_period_default();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define KEYSEL 2
|
#define KEYSEL 2
|
||||||
#define MOUSE 3
|
#define MOUSE 3
|
||||||
#define COMBINED 4
|
#define COMBINED 4
|
||||||
|
#define BROWSER_CONTROL 5
|
||||||
|
|
||||||
// macros
|
// macros
|
||||||
#define MOUSE_TOGGLE 1
|
#define MOUSE_TOGGLE 1
|
||||||
@@ -39,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
{KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, },
|
{KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, },
|
||||||
{KC_A, KC_O, KC_E, KC_U, KC_I, KC_TRNS, KC_D, KC_H, KC_T, KC_N, KC_S, },
|
{KC_A, KC_O, KC_E, KC_U, KC_I, KC_TRNS, KC_D, KC_H, KC_T, KC_N, KC_S, },
|
||||||
{KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(KEYNAV), KC_B, KC_M, KC_W, KC_V, KC_Z, },
|
{KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(KEYNAV), KC_B, KC_M, KC_W, KC_V, KC_Z, },
|
||||||
{OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL), MO(COMBINED), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT), }
|
{OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), MO(COMBINED), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT), }
|
||||||
},
|
},
|
||||||
|
|
||||||
[KEYNAV] = {
|
[KEYNAV] = {
|
||||||
@@ -70,6 +71,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
{KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), }
|
{KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[BROWSER_CONTROL] = {
|
||||||
|
{KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_TRNS, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, },
|
||||||
|
{KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), },
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, },
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS, }
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "ca66.h"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef KB_H
|
||||||
|
#define KB_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K414, \
|
||||||
|
K401, K402, K403, K404, K406, K408, K409, K410, K411, K412, K413 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
||||||
|
{ KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Barry
|
||||||
|
#define PRODUCT CA66
|
||||||
|
#define DESCRIPTION CA66
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 }
|
||||||
|
#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#define RGB_DI_PIN B1
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 6
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#include "ca66.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_PSCR,
|
||||||
|
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,
|
||||||
|
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_GRV, 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, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, RGB_TOG,
|
||||||
|
KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD,
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME,
|
||||||
|
KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI),
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
DDRD |= (1 << 1); PORTD &= ~(1 << 1);
|
||||||
|
} else {
|
||||||
|
DDRD &= ~(1 << 1); PORTD &= ~(1 << 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
CA66
|
||||||
|
==
|
||||||
|
|
||||||
|
Custom 65%
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: CA66
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make ca66:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE ?= no
|
||||||
|
RGBLIGHT_ENABLE ?= yes
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "clueboard.h"
|
#include "66.h"
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// 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.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||||
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
||||||
{ k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \
|
{ k50, k51, k52, k53, k54, KC_NO, KC_NO, k57 }, \
|
||||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
/* LAYOUT_66_iso, standard 67 key ISO layout
|
/* LAYOUT_66_iso, standard 67 key ISO layout
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_ISO( \
|
#define LAYOUT_66_iso( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k67, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k67, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \
|
||||||
|
|||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Cartel
|
||||||
|
#define PRODUCT Contra
|
||||||
|
#define DESCRIPTION Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F6, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 0
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
#include "contra.h"
|
||||||
Executable
+46
@@ -0,0 +1,46 @@
|
|||||||
|
#ifndef KB_H
|
||||||
|
#define KB_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_grid( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_mit( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KC_LAYOUT_grid( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
|
||||||
|
) \
|
||||||
|
LAYOUT_grid( \
|
||||||
|
KC_##K000, KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \
|
||||||
|
KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, KC_##K111, \
|
||||||
|
KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208, KC_##K209, KC_##K210, KC_##K211, \
|
||||||
|
KC_##K300, KC_##K301, KC_##K302, KC_##K303, KC_##K304, KC_##K305, KC_##K306, KC_##K307, KC_##K308, KC_##K309, KC_##K310, KC_##K311 \
|
||||||
|
)
|
||||||
|
#define KEYMAP LAYOUT_grid
|
||||||
|
#define LAYOUT_ortho_4x12 LAYOUT_grid
|
||||||
|
#define KC_LAYOUT_ortho_4x12 KC_LAYOUT_grid
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Contra",
|
||||||
|
"manufacturer": "Cartel Keyboards",
|
||||||
|
"identifier": "",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "caterina",
|
||||||
|
"width": 12,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_mit": {
|
||||||
|
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3, "w":2}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_ortho_4x12": {
|
||||||
|
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 190
|
||||||
|
|
||||||
|
#define MUSIC_MASK (keycode != KC_NO)
|
||||||
|
#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "contra.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | Cmd |Lower | Space |Raise | Enter| Cmd | Alt |Ctrl |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = {
|
||||||
|
{ MI_C_4, MI_Cs_4, MI_D_4, MI_Ds_4, MI_E_4, MI_F_4, MI_Fs_4, MI_G_4, MI_Gs_4, MI_A_4, MI_As_4, MI_B_4 },
|
||||||
|
{ MI_C_3, MI_Cs_3, MI_D_3, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, MI_Gs_3, MI_A_3, MI_As_3, MI_B_3 },
|
||||||
|
{ MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2, MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, MI_A_2, MI_As_2, MI_B_2 },
|
||||||
|
{ MI_C_1, MI_Cs_1, MI_D_1, MI_Ds_1, MI_E_1, MI_F_1, MI_Fs_1, MI_G_1, MI_Gs_1, MI_A_1, MI_As_1, MI_B_1 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Dana musical MIDI keyboard layout
|
||||||
|
|
||||||
|
Has the contra mapped as a MIDI keyboard, where each row is an octave.
|
||||||
|
|
||||||
|
The keyboard has only MIDI, nothing else!
|
||||||
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = no # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = yes # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
|
SONG(COLEMAK_SOUND), \
|
||||||
|
SONG(DVORAK_SOUND) \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MUSIC_MASK (keycode != KC_NO)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,264 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "contra.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_PLOVER,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
PLOVER,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT,
|
||||||
|
EXT_PLV
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = {
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Plover layer (http://opensteno.org)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Exit | | | A | O | | E | U | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_PLOVER] = {
|
||||||
|
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||||
|
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||||
|
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = {
|
||||||
|
{_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL },
|
||||||
|
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||||
|
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
print("mode just switched to qwerty and this is a huge string\n");
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
PORTE &= ~(1<<6);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
PORTE |= (1<<6);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_PLV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The Default Contra Layout
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
CONTRA
|
||||||
|
===
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 40% keyboard by
|
||||||
|
|
||||||
|
Keyboard Maintainer: The QMK Community
|
||||||
|
Hardware Supported: CONTRA
|
||||||
|
Hardware Availability: [CARTEL](https://cartel.ltd/projects/contra/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make contra:dana
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
Executable
+61
@@ -0,0 +1,61 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x12 planck_mit planck_grid
|
||||||
|
LAYOUTS_HAS_RGB = no
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// Corresponding changes to the layout names and/or definitions must also be made to info.json
|
||||||
|
|
||||||
// 标准配列
|
// 标准配列
|
||||||
#define KEYMAP( \
|
#define KEYMAP( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "DZ60",
|
||||||
|
"manufacturer": "KBDFans",
|
||||||
|
"identifier": "",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"KEYMAP": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEYMAP_HHKB": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEYMAP_TRUE_HHKB": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEYMAP_2_SHIFTS": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEYMAP_DIRECTIONAL": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
#include "xd60.h"
|
#include "dz60.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
|
|
||||||
#Define _L0 0
|
#define _L0 0
|
||||||
#Define _L1 1
|
#define _L1 1
|
||||||
#Define _L2 2
|
#define _L2 2
|
||||||
#Define _L3 3
|
#define _L3 3
|
||||||
#Define _L4 4
|
#define _L4 4
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TD_SPC_ENT = 0,
|
||||||
|
TD_KC_LSFT_CAPS,
|
||||||
|
TD_KC_RSFT_CAPS
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* template
|
* template
|
||||||
* [_L1] = KEYMAP(
|
* [_L1] = KEYMAP(
|
||||||
@@ -22,7 +30,7 @@
|
|||||||
*\
|
*\
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap _L0: (Layer 0 - Base Layer) This is the default layer
|
* Keymap _L0: (Layer 0 - Base Layer) This is the default layer
|
||||||
* This layer has a key set to MO(_L1) which means when held down Layer 1 will become active, If Layer 1 does not have anything set for tat key is will revert to uing the key set at layer 0.
|
* This layer has a key set to MO(_L1) which means when held down Layer 1 will become active, If Layer 1 does not have anything set for tat key is will revert to uing the key set at layer 0.
|
||||||
* LT(_L1, KC_1) means that when the "1" key is long touched then it will activate the layer _L1 key(F1) but if the key is just tapped it will activate the "1" key.
|
* LT(_L1, KC_1) means that when the "1" key is long touched then it will activate the layer _L1 key(F1) but if the key is just tapped it will activate the "1" key.
|
||||||
* KC_GESC = Escape when tapped, ` when pressed with Shift or GUI
|
* KC_GESC = Escape when tapped, ` when pressed with Shift or GUI
|
||||||
@@ -45,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_L0] = KEYMAP(
|
[_L0] = KEYMAP(
|
||||||
KC_GESC, LT(_L1, KC_1),LT(_L1, KC_2),LT(_L1, KC_3),LT(_L1, KC_4),LT(_L1, KC_5),LT(_L1, KC_6),LT(_L1, KC_7),LT(_L1, KC_8),LT(_L1, KC_9),LT(_L1, KC_0),LT(_L1, KC_MINS),LT(_L1, KC_EQL),KC_BSPC, KC_DEL, \
|
KC_GESC, LT(_L1, KC_1),LT(_L1, KC_2),LT(_L1, KC_3),LT(_L1, KC_4),LT(_L1, KC_5),LT(_L1, KC_6),LT(_L1, KC_7),LT(_L1, KC_8),LT(_L1, KC_9),LT(_L1, KC_0),LT(_L1, KC_MINS),LT(_L1, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
|
KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPO, KC_UP, M0(_L1), \
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TO(_L1), \
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, TD(LT(_L3,KC_SPACE)),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, M0(_L2), KC_LEFT, KC_DOWN, KC_RIGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, LT(_L3,KC_SPACE),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, TO(_L2), KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
|
||||||
/* Keymap _L1: (Layer 1) This is function layer 1
|
/* Keymap _L1: (Layer 1) This is function layer 1
|
||||||
* This layer is activated while the Fn key is being held down.
|
* This layer is activated while the Fn key is being held down.
|
||||||
@@ -66,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_L1] = KEYMAP(
|
[_L1] = KEYMAP(
|
||||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
|
||||||
_______, KC_WH_U, KC_UP, KC_WH_D, _______, _______,_______, _______, _______, _______, KC_PSCR, _______, _______, _______, \
|
_______, KC_WH_U, KC_UP, KC_WH_D, _______, _______,_______, _______, _______, _______, KC_PSCR, _______, _______, _______, \
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_HOME, _______, _______, _______, KC_HOME, _______, _______, _______, \
|
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_HOME, _______, _______, _______, KC_HOME, _______, _______, \
|
||||||
_______, _______, _______, KC_APP, BL_STEP,_______, KC_END, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_PGUP, _______, \
|
_______, _______, KC_APP, BL_STEP,_______, KC_END, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_PGUP, _______, \
|
||||||
_______, _______, _______, _______,_______,_______, _______, _______, KC_HOME, KC_PGDOWN, KC_END),
|
_______, _______, _______, _______,_______,_______, _______, _______, KC_HOME, KC_PGDOWN, KC_END),
|
||||||
|
|
||||||
/* Keymap _L2: (Layer 2) This is function layer 2
|
/* Keymap _L2: (Layer 2) This is function layer 2
|
||||||
@@ -89,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_L2] = KEYMAP(
|
[_L2] = KEYMAP(
|
||||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,LCA(KC_TAB), \
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,LCA(KC_TAB), \
|
||||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MEH(KC_TAB), \
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MEH(KC_TAB), \
|
||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_BTN1,KC_MS_UP,KC_MS_BTN2, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_BTN1,KC_MS_UP,KC_MS_BTN2, \
|
||||||
_______,_______,_______, _______,_______,_______, _______,_______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,
|
_______,_______,_______, _______,_______,_______, _______,_______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -119,13 +127,6 @@ void matrix_scan_user(void) {
|
|||||||
// Empty
|
// Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
//Tap Dance Declarations
|
|
||||||
enum {
|
|
||||||
TD_SPC_ENT = 0,
|
|
||||||
TD_KC_LSFT_CAPS = 0,
|
|
||||||
TD_KC_RSFT_CAPS = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
//Tap Dance Definitions
|
//Tap Dance Definitions
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
|
||||||
|
|||||||
@@ -54,4 +54,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/
|
|||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted
|
AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "ergo42.h"
|
#include "ergo42.h"
|
||||||
|
|
||||||
#ifdef ONEHAND_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
#include "ergo42.h"
|
#include "ergo42.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#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
|
||||||
@@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -30,10 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# make clean = Clean out built project files.
|
# make clean = Clean out built project files.
|
||||||
#
|
#
|
||||||
# That's pretty much all you need. To compile, always go make clean,
|
# That's pretty much all you need. To compile, always go make clean,
|
||||||
# followed by make.
|
# followed by make.
|
||||||
#
|
#
|
||||||
# For advanced users only:
|
# For advanced users only:
|
||||||
@@ -88,7 +88,7 @@ FADING_LED_ENABLE = no # Enable fading backlight
|
|||||||
BREATHING_LED_ENABLE = no # Enable breathing backlight
|
BREATHING_LED_ENABLE = no # Enable breathing backlight
|
||||||
LEDMAP_ENABLE = no # Enable LED mapping
|
LEDMAP_ENABLE = no # Enable LED mapping
|
||||||
LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom
|
LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom
|
||||||
ONEHAND_ENABLE = no # Disable Onehand
|
SWAP_HANDS_ENABLE = no # Disable Onehand
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
MIDI_ENABLE = no
|
MIDI_ENABLE = no
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ void ergodox_blink_all_leds(void)
|
|||||||
mcp23018_status = ergodox_left_leds_update();
|
mcp23018_status = ergodox_left_leds_update();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//ergodox_led_all_on();
|
//ergodox_led_all_on();
|
||||||
//_delay_ms(333);
|
//_delay_ms(333);
|
||||||
ergodox_led_all_off();
|
ergodox_led_all_off();
|
||||||
@@ -185,7 +185,7 @@ uint8_t ergodox_left_leds_update(void) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef ONEHAND_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
// swap-hands action needs a matrix to define the swap
|
// swap-hands action needs a matrix to define the swap
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -188,6 +188,67 @@ inline void ergodox_led_all_set(uint8_t n)
|
|||||||
{ k0D, k1D, k2D, k3D, k4D, KC_NO } \
|
{ k0D, k1D, k2D, k3D, k4D, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define KEYMAP_PRETTY( \
|
||||||
|
/* left hand, spatial positions */ /* right hand, spatial positions */ \
|
||||||
|
L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
|
||||||
|
L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
|
||||||
|
L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
|
||||||
|
L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
|
||||||
|
L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
|
||||||
|
L55,L56, R50,R51, \
|
||||||
|
L54, R52, \
|
||||||
|
L53,L52,L51, R55,R54,R53 ) \
|
||||||
|
\
|
||||||
|
/* matrix positions */ \
|
||||||
|
{ \
|
||||||
|
{ L00, L10, L20, L30, L40, KC_NO }, \
|
||||||
|
{ L01, L11, L21, L31, L41, L51 }, \
|
||||||
|
{ L02, L12, L22, L32, L42, L52 }, \
|
||||||
|
{ L03, L13, L23, L33, L43, L53 }, \
|
||||||
|
{ L04, L14, L24, L34, L44, L54 }, \
|
||||||
|
{ L05, L15, L25, L35, KC_NO, L55 }, \
|
||||||
|
{ L06, L16, KC_NO, L36, KC_NO, L56 }, \
|
||||||
|
\
|
||||||
|
{ R00, R10, KC_NO, R30,KC_NO, R50 }, \
|
||||||
|
{ R01, R11, R21, R31,KC_NO, R51 }, \
|
||||||
|
{ R02, R12, R22, R32, R42, R52 }, \
|
||||||
|
{ R03, R13, R23, R33, R43, R53 }, \
|
||||||
|
{ R04, R14, R24, R34, R44, R54 }, \
|
||||||
|
{ R05, R15, R25, R35, R45, R55 }, \
|
||||||
|
{ R06, R16, R26, R36, R46, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KEYMAP_PRETTY_80( \
|
||||||
|
/* left hand, spatial positions */ /* right hand, spatial positions */ \
|
||||||
|
L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
|
||||||
|
L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
|
||||||
|
L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
|
||||||
|
L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
|
||||||
|
L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
|
||||||
|
L55,L56, R50,R51, \
|
||||||
|
L45,L46,L54, R52,R40,R41, \
|
||||||
|
L53,L52,L51, R55,R54,R53 ) \
|
||||||
|
\
|
||||||
|
/* matrix positions */ \
|
||||||
|
{ \
|
||||||
|
{ L00, L10, L20, L30, L40, KC_NO }, \
|
||||||
|
{ L01, L11, L21, L31, L41, L51 }, \
|
||||||
|
{ L02, L12, L22, L32, L42, L52 }, \
|
||||||
|
{ L03, L13, L23, L33, L43, L53 }, \
|
||||||
|
{ L04, L14, L24, L34, L44, L54 }, \
|
||||||
|
{ L05, L15, L25, L35, L45, L55 }, \
|
||||||
|
{ L06, L16, KC_NO, L36, L46, L56 }, \
|
||||||
|
\
|
||||||
|
{ R00, R10, KC_NO, R30, R40, R50 }, \
|
||||||
|
{ R01, R11, R21, R31, R41, R51 }, \
|
||||||
|
{ R02, R12, R22, R32, R42, R52 }, \
|
||||||
|
{ R03, R13, R23, R33, R43, R53 }, \
|
||||||
|
{ R04, R14, R24, R34, R44, R54 }, \
|
||||||
|
{ R05, R15, R25, R35, R45, R55 }, \
|
||||||
|
{ R06, R16, R26, R36, R46, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
#define LAYOUT_ergodox KEYMAP
|
#define LAYOUT_ergodox KEYMAP
|
||||||
|
#define LAYOUT_ergodox_pretty KEYMAP_PRETTY
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "ErgoDox EZ",
|
||||||
|
"manufacturer": "ErgoDox EZ",
|
||||||
|
"identifier": "FEED:1307:0001",
|
||||||
|
"url": "ergodox-ez.com",
|
||||||
|
"maintainer": "erez",
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"bootloader": "halfkay",
|
||||||
|
"width": 19.5,
|
||||||
|
"height": 9.375,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ergodox": {
|
||||||
|
"layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}]
|
||||||
|
}
|
||||||
|
"LAYOUT_ergodox_pretty": {
|
||||||
|
"layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}]
|
||||||
|
}
|
||||||
|
"KEYMAP_80": {
|
||||||
|
"layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375}, {"x":1, "y":5.375}, {"x":2, "y":5.375}, {"x":0, "y":6.375}, {"x":1, "y":6.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375}, {"x":-1.0, "y":7.375}, {"x":-3.0, "y":8.375}, {"x":-2, "y":8.375}, {"x":-1.0, "y":8.375}]
|
||||||
|
}
|
||||||
|
"KEYMAP_PRETTY_80": {
|
||||||
|
"layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375}, {"x":1, "y":5.375}, {"x":2, "y":5.375}, {"x":0, "y":6.375}, {"x":1, "y":6.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375}, {"x":-1.0, "y":7.375}, {"x":-3.0, "y":8.375}, {"x":-2, "y":8.375}, {"x":-1.0, "y":8.375}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys
|
|||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||||
KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key
|
KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key
|
||||||
TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
|
TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#ifdef TAPPING_TERM
|
#ifdef TAPPING_TERM
|
||||||
|
|||||||
@@ -52,25 +52,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | End | | PgDn | | |
|
* | | | End | | PgDn | | |
|
||||||
* `---------------------' `---------------------'
|
* `---------------------' `---------------------'
|
||||||
*/
|
*/
|
||||||
[_QWERTY] = LAYOUT_ergodox_wrapper(
|
[_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS),
|
// left hand // right hand
|
||||||
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO),
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_BSPC, _________________QWERTY_L2_________________,
|
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD),
|
TG(_MODS), _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, GUI_T(KC_QUOT),
|
||||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF,
|
||||||
|
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||||
ALT_T(KC_APP), KC_LGUI,
|
ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE),
|
||||||
KC_HOME,
|
KC_HOME, KC_PGUP,
|
||||||
KC_SPACE,KC_BSPC, KC_END,
|
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
|
||||||
|
|
||||||
|
|
||||||
OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
|
||||||
TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
|
|
||||||
_________________QWERTY_R2_________________, GUI_T(KC_QUOT),
|
|
||||||
TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF,
|
|
||||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
|
||||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
|
||||||
KC_PGUP,
|
|
||||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
/* Keymap 0: Basic layer
|
/* Keymap 0: Basic layer
|
||||||
*
|
*
|
||||||
@@ -95,25 +88,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
// Otherwise, it needs KC_*
|
// Otherwise, it needs KC_*
|
||||||
[_COLEMAK] = LAYOUT_ergodox_wrapper(
|
[_COLEMAK] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
// left hand
|
// left hand // right hand
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS),
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO),
|
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
|
||||||
KC_BSPC, _________________COLEMAK_L2________________,
|
TG(_MODS), _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, GUI_T(KC_QUOT),
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD),
|
KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF,
|
||||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||||
ALT_T(KC_APP), KC_LGUI,
|
ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE),
|
||||||
KC_HOME,
|
KC_HOME, KC_PGUP,
|
||||||
KC_SPACE,KC_BSPC, KC_END,
|
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
|
||||||
// right hand
|
|
||||||
OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
|
||||||
TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
|
|
||||||
_________________COLEMAK_R2________________, GUI_T(KC_QUOT),
|
|
||||||
TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF,
|
|
||||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
|
||||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
|
||||||
KC_PGUP,
|
|
||||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
/* Keymap 0: Basic layer
|
/* Keymap 0: Basic layer
|
||||||
*
|
*
|
||||||
@@ -138,25 +122,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
// Otherwise, it needs KC_*
|
// Otherwise, it needs KC_*
|
||||||
[_DVORAK] = LAYOUT_ergodox_wrapper(
|
[_DVORAK] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
// left hand
|
// left hand // right hand
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS),
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO),
|
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
|
||||||
KC_BSPC, _________________DVORAK_L2_________________,
|
TG(_MODS), _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, GUI_T(KC_MINS),
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD),
|
KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF,
|
||||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||||
ALT_T(KC_APP), KC_LGUI,
|
ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE),
|
||||||
KC_HOME,
|
KC_HOME, KC_PGUP,
|
||||||
KC_SPACE,KC_BSPC, KC_END,
|
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
|
||||||
// right hand
|
|
||||||
OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
|
||||||
TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
|
|
||||||
_________________DVORAK_R2_________________, GUI_T(KC_MINS),
|
|
||||||
TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF,
|
|
||||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
|
||||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
|
||||||
KC_PGUP,
|
|
||||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
/* Keymap 0: Basic layer
|
/* Keymap 0: Basic layer
|
||||||
*
|
*
|
||||||
@@ -181,45 +156,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
// Otherwise, it needs KC_*
|
// Otherwise, it needs KC_*
|
||||||
[_WORKMAN] = LAYOUT_ergodox_wrapper(
|
[_WORKMAN] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
// left hand
|
// left hand
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS),
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO),
|
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
|
||||||
KC_BSPC, _________________WORKMAN_L2________________,
|
TG(_MODS), _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, GUI_T(KC_QUOT),
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD),
|
KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF,
|
||||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||||
ALT_T(KC_APP), KC_LGUI,
|
ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE),
|
||||||
KC_HOME,
|
KC_HOME, KC_PGUP,
|
||||||
KC_SPACE,KC_BSPC, KC_END,
|
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
|
||||||
// right hand
|
|
||||||
OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
|
||||||
TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
|
|
||||||
_________________WORKMAN_R2________________, GUI_T(KC_QUOT),
|
|
||||||
TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF,
|
|
||||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
|
||||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
|
||||||
KC_PGUP,
|
|
||||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MODS] = LAYOUT_ergodox(
|
[_MODS] = LAYOUT_ergodox_pretty(
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LSFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______,
|
||||||
KC_TRNS,
|
_______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______
|
||||||
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 3: Symbol Layer
|
/* Keymap 3: Symbol Layer
|
||||||
@@ -243,24 +200,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | DARK |BRITE | BLUE | | | | |
|
* | DARK |BRITE | BLUE | | | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[_SYMB] = LAYOUT_ergodox(
|
[_SYMB] = LAYOUT_ergodox_pretty(
|
||||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, TG(_MODS),
|
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_QWERTY, KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
KC_RESET, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN,
|
KC_RESET, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN, KC_DVORAK, KC_PPLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, KC_F12,
|
||||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, KC_PSCREEN,
|
||||||
VRSN, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
VRSN, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_COLEMAK, KC_COLEMAK, KC_NLCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, KC_PAUSE,
|
||||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCLN, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_TRNS,
|
||||||
RGB_SMOD, KC_RGB_T,
|
RGB_SMOD, KC_RGB_T, KC_TRNS, KC_TRNS,
|
||||||
RGB_HUI,
|
RGB_HUI, KC_TRNS,
|
||||||
RGB_M_R, RGB_M_SW, RGB_HUD,
|
RGB_M_R, RGB_M_SW, RGB_HUD, KC_PDOT, KC_KP_0, KC_PENT
|
||||||
|
|
||||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
|
||||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
|
||||||
KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN,
|
|
||||||
KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
|
||||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS,
|
|
||||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 4: Customized Overwatch Layout
|
/* Keymap 4: Customized Overwatch Layout
|
||||||
@@ -284,24 +232,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | H | | | | |
|
* | | | H | | | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[_GAMEPAD] = LAYOUT_ergodox(
|
[_GAMEPAD] = LAYOUT_ergodox_pretty(
|
||||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV),
|
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
KC_G, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
|
||||||
KC_O, KC_P,
|
KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO,
|
||||||
KC_LGUI,
|
KC_LGUI, KC_NO,
|
||||||
KC_V, KC_SPACE, KC_H,
|
KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER
|
||||||
|
|
||||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
||||||
KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
||||||
TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
||||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO,
|
|
||||||
KC_HYPR, MAGIC_TOGGLE_NKRO,
|
|
||||||
KC_NO,
|
|
||||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 3:
|
/* Keymap 3:
|
||||||
@@ -325,26 +264,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | SHIFT| ALT | 0MAC | | | | |
|
* | SHIFT| ALT | 0MAC | | | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[_DIABLO] = LAYOUT_ergodox(
|
[_DIABLO] = LAYOUT_ergodox_pretty(
|
||||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||||
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS,
|
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO,
|
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, 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_L, KC_J,
|
KC_L, KC_J, KC_NO, KC_NO,
|
||||||
KC_F,
|
KC_F, KC_NO,
|
||||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, 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_NO, KC_NO,
|
|
||||||
KC_NO, KC_N, KC_M, 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_PGDOWN, KC_DELETE, KC_ENTER
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 4: Media and mouse keys
|
/* Keymap 4: Media and mouse keys
|
||||||
@@ -368,24 +296,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | MWDn | | Mclk | | |
|
* | | | MWDn | | Mclk | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[_MOUS] = LAYOUT_ergodox(
|
[_MOUS] = LAYOUT_ergodox_pretty(
|
||||||
KC_NO, KC_SECRET_1,KC_SECRET_2,KC_SECRET_3,KC_SECRET_4,KC_SECRET_5,KC_TRNS,
|
KC_NO, KC_SECRET_1,KC_SECRET_2,KC_SECRET_3,KC_SECRET_4,KC_SECRET_5,KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, 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_WH_U,
|
KC_WH_U, KC_NO,
|
||||||
KC_BTN1, KC_BTN2, KC_WH_D,
|
KC_BTN1, KC_BTN2, KC_WH_D, KC_BTN3, KC_BTN4, KC_BTN5
|
||||||
|
|
||||||
KC_TRNS, 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_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
|
||||||
KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
||||||
KC_NO,KC_NO,
|
|
||||||
KC_NO,
|
|
||||||
KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5
|
|
||||||
),
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
// to build this keymap
|
// to build this keymap
|
||||||
// make ergodox_ez:dvorak_42_key:teensy
|
// make ergodox_ez:dvorak_42_key:teensy
|
||||||
|
// flashing from rpi:
|
||||||
|
// sudo teensy_loader_cli -v -w .build/ergodox_ez_dvorak_42_key.hex --mcu atmega32u4
|
||||||
|
|
||||||
// keeping fork up to date:
|
// keeping fork up to date:
|
||||||
// https://help.github.com/articles/configuring-a-remote-for-a-fork/
|
// https://help.github.com/articles/configuring-a-remote-for-a-fork/
|
||||||
@@ -317,7 +319,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// thumb cluster
|
// thumb cluster
|
||||||
KC_TRNS,KC_TRNS,
|
KC_TRNS,KC_TRNS,
|
||||||
KC_TRNS,
|
KC_TRNS,
|
||||||
KC_TRNS,KC_TRNS,KC_TAB),
|
KC_TRNS,KC_TRNS,KC_TRNS),
|
||||||
|
|
||||||
|
|
||||||
[MOUSE] = KEYMAP(
|
[MOUSE] = KEYMAP(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# make clean = Clean out built project files.
|
# make clean = Clean out built project files.
|
||||||
#
|
#
|
||||||
# That's pretty much all you need. To compile, always go make clean,
|
# That's pretty much all you need. To compile, always go make clean,
|
||||||
# followed by make.
|
# followed by make.
|
||||||
#
|
#
|
||||||
# For advanced users only:
|
# For advanced users only:
|
||||||
@@ -56,7 +56,7 @@ F_USB = $(F_CPU)
|
|||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
BOOTLOADER = halfkay
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
@@ -79,9 +79,9 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
|||||||
CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
|
CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
|
||||||
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
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||||
SLEEP_LED_ENABLE = no
|
SLEEP_LED_ENABLE = no
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
LAYOUTS = ergodox
|
LAYOUTS = ergodox
|
||||||
@@ -174,7 +174,7 @@ __attribute__ ((weak))
|
|||||||
void ergodox_right_led_3_set(uint8_t n) {
|
void ergodox_right_led_3_set(uint8_t n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ONEHAND_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}},
|
{{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}},
|
||||||
|
|||||||
@@ -2,14 +2,19 @@
|
|||||||
|
|
||||||
A basic ErgoDox layout with Planck-like tri-layer support.
|
A basic ErgoDox layout with Planck-like tri-layer support.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
- Base Layers
|
||||||
|
- QWERTY
|
||||||
|
- Workman
|
||||||
|
- Dvorak
|
||||||
|
- Colemak
|
||||||
- Planck-like tri-layer
|
- Planck-like tri-layer
|
||||||
- Workman layout
|
|
||||||
- In-progress gaming layer
|
- In-progress gaming layer
|
||||||
- Numpad
|
- Numpad layer
|
||||||
|

|
||||||
- LCD colors are linked together, like the default KLL firmware
|
- LCD colors are linked together, like the default KLL firmware
|
||||||
|
|
||||||
## Building and flashing
|
## Building and flashing
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#undef TAPPING_TOGGLE
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
#include "dudeofawesome.h"
|
||||||
|
|
||||||
|
#include "./visualizer.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -4,40 +4,41 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
enum custom_layers {
|
enum custom_layers {
|
||||||
_QWERTY,
|
_QWERTY,
|
||||||
_DVORAK,
|
_WORKMAN,
|
||||||
_WORKMAN,
|
_DVORAK,
|
||||||
_GAME,
|
_COLEMAK,
|
||||||
_MOUSE,
|
_LOWER,
|
||||||
_NUM,
|
_RAISE,
|
||||||
_LOWER,
|
_ADJUST,
|
||||||
_RAISE,
|
_GAME,
|
||||||
_ADJUST,
|
_MOUSE,
|
||||||
|
_NUM,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
QWERTY = SAFE_RANGE,
|
QWERTY = SAFE_RANGE,
|
||||||
DVORAK,
|
WORKMAN,
|
||||||
WORKMAN,
|
DVORAK,
|
||||||
LOWER,
|
COLEMAK,
|
||||||
RAISE,
|
LOWER,
|
||||||
GAME,
|
RAISE,
|
||||||
MOUSE,
|
GAME,
|
||||||
NUM,
|
MOUSE,
|
||||||
EPRM,
|
EPRM,
|
||||||
VRSN,
|
VRSN,
|
||||||
RGB_SLD
|
RGB_SLD,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap 0: Basic QWERTY layer
|
/* Keymap 0: Basic QWERTY layer
|
||||||
*
|
*
|
||||||
* ,---------------------------------------------. ,---------------------------------------------.
|
* ,---------------------------------------------. ,---------------------------------------------.
|
||||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||||
* | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC |
|
* | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC |
|
||||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||||
* | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | '" |
|
* | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter |
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter |
|
||||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||||
@@ -53,32 +54,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_QWERTY] = LAYOUT_ergodox(
|
[_QWERTY] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET,
|
||||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1,
|
||||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||||
|
|
||||||
KC_MPLY, TG(_MOUSE),
|
KC_MPLY, TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
LOWER, KC_BSPACE, KC_LGUI,
|
KC_BSPACE, LOWER, KC_LGUI,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
|
KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
|
||||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
|
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
|
||||||
KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT),
|
||||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||||
|
|
||||||
TG(_NUM), TG(_MOUSE),
|
TT(_NUM), TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
KC_LGUI, KC_SPACE, RAISE
|
KC_LGUI, RAISE, KC_SPACE
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 0: Basic Workman layer
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------. ,--------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||||
|
* | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC |
|
||||||
|
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||||
|
* | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | ' |
|
||||||
|
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||||
|
* | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter |
|
||||||
|
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||||
|
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||||
|
* `------------------------------' `------------------------------'
|
||||||
|
* ,------------. ,------------.
|
||||||
|
* |Play |Mouse | | Num |Mouse|
|
||||||
|
* ,----|-----|------| |------+-----+-----.
|
||||||
|
* | | | Alt | | Alt | | |
|
||||||
|
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||||
|
* | | | LGUI | | LGUI | | |
|
||||||
|
* `-----------------' `------------------'
|
||||||
|
*/
|
||||||
|
[_WORKMAN] = LAYOUT_ergodox(
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1,
|
||||||
|
TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||||
|
|
||||||
|
KC_MPLY, TG(_MOUSE),
|
||||||
|
KC_LALT,
|
||||||
|
KC_BSPACE, LOWER, KC_LGUI,
|
||||||
|
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE,
|
||||||
|
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||||
|
KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT),
|
||||||
|
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||||
|
|
||||||
|
TT(_NUM), TG(_MOUSE),
|
||||||
|
KC_LALT,
|
||||||
|
KC_LGUI, RAISE, KC_SPACE
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 0: Basic Dvorak layer
|
/* Keymap 0: Basic Dvorak layer
|
||||||
*
|
*
|
||||||
* ,---------------------------------------------. ,--------------------------------------------.
|
* ,---------------------------------------------. ,--------------------------------------------.
|
||||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||||
* | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC |
|
* | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC |
|
||||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||||
@@ -98,38 +144,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_DVORAK] = LAYOUT_ergodox(
|
[_DVORAK] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET,
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET,
|
||||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
KC_LSPO, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1,
|
KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1,
|
||||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||||
|
|
||||||
KC_MPLY, TG(_MOUSE),
|
KC_MPLY, TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
KC_BSPACE, LOWER, KC_LGUI,
|
KC_BSPACE, LOWER, KC_LGUI,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE,
|
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE,
|
||||||
KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH),
|
KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH),
|
||||||
KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENTER,
|
KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT),
|
||||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||||
|
|
||||||
TG(_NUM), TG(_MOUSE),
|
TT(_NUM), TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
KC_LGUI, RAISE, KC_SPACE
|
KC_LGUI, RAISE, KC_SPACE
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap 0: Basic Workman layer
|
/* Keymap 0: Basic Colemak layer
|
||||||
*
|
*
|
||||||
* ,---------------------------------------------. ,--------------------------------------------.
|
* ,---------------------------------------------. ,--------------------------------------------.
|
||||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||||
* | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC |
|
* | Tab | Q | W | F | P | G | [{ | | ]} | J | L | U | Y | ; | BSPC |
|
||||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||||
* | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | '" |
|
* | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
|
||||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||||
* | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter |
|
* | LShift | Z | X | C | V | B | | | | K | M | , | . | / | Enter |
|
||||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||||
* `------------------------------' `------------------------------'
|
* `------------------------------' `------------------------------'
|
||||||
@@ -141,28 +187,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | LGUI | | LGUI | | |
|
* | | | LGUI | | LGUI | | |
|
||||||
* `-----------------' `------------------'
|
* `-----------------' `------------------'
|
||||||
*/
|
*/
|
||||||
[_WORKMAN] = LAYOUT_ergodox(
|
[_COLEMAK] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET,
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRACKET,
|
||||||
KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
KC_LSPO, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1,
|
||||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||||
|
|
||||||
KC_MPLY, TG(_MOUSE),
|
KC_MPLY, TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
KC_BSPACE, LOWER, KC_LGUI,
|
KC_BSPACE, LOWER, KC_LGUI,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE,
|
KC_RBRACKET, KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSPACE,
|
||||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE,
|
||||||
KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
KC_FN1, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT),
|
||||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||||
|
|
||||||
NUM, TG(_MOUSE),
|
TT(_NUM), TG(_MOUSE),
|
||||||
KC_LALT,
|
KC_LALT,
|
||||||
KC_LGUI, RAISE, KC_SPACE
|
KC_LGUI, RAISE, KC_SPACE
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Lower
|
/* Lower
|
||||||
@@ -176,7 +222,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | |
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | |
|
||||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
* | | | | | | | | Play | Vol- | Vol+ | Next |
|
||||||
* `-----------------------------------' `----------------------------------'
|
* `-----------------------------------' `----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* |Animat| | |Toggle|Solid |
|
* |Animat| | |Toggle|Solid |
|
||||||
@@ -189,9 +235,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_LOWER] = LAYOUT_ergodox(
|
[_LOWER] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F6,
|
||||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
@@ -199,11 +245,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
_______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
KC_F5, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
_______, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
_______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
_______,
|
_______,
|
||||||
@@ -221,7 +267,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
* | | | | | | | | Play | Vol- | Vol+ | Next |
|
||||||
* `-----------------------------------' `----------------------------------'
|
* `-----------------------------------' `----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* |Animat| | |Toggle|Solid |
|
* |Animat| | |Toggle|Solid |
|
||||||
@@ -234,9 +280,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_RAISE] = LAYOUT_ergodox(
|
[_RAISE] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F6,
|
||||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
@@ -244,11 +290,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
_______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
_______, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
_______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
_______,
|
_______,
|
||||||
@@ -262,7 +308,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del |
|
* | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del |
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* | | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | |
|
* | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | |
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* | | | | | | | | | | | | Prev | Next | | |
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
@@ -280,7 +326,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// left hand
|
// left hand
|
||||||
VRSN, _______, _______, _______, _______, _______, _______,
|
VRSN, _______, _______, _______, _______, _______, _______,
|
||||||
_______, RESET, DEBUG, _______, _______, _______, _______,
|
_______, RESET, DEBUG, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, AG_NORM,
|
KC_CAPS, _______, _______, _______, _______, AG_NORM,
|
||||||
_______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______,
|
||||||
|
|
||||||
@@ -291,7 +337,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// right hand
|
// right hand
|
||||||
_______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL,
|
_______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL,
|
||||||
AG_SWAP, QWERTY, WORKMAN, DVORAK, _______, _______,
|
AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______,
|
||||||
|
|
||||||
@@ -386,24 +432,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______,
|
||||||
|
|
||||||
TG(_MOUSE), TG(_NUM),
|
TG(_MOUSE), TT(_NUM),
|
||||||
_______,
|
_______,
|
||||||
_______, _______, _______
|
_______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
/* Keymap 2: NUMPAD
|
/* Keymap 2: NUMPAD
|
||||||
*
|
*
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
* | | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | | ✗ | ✗ | ✗ | / | * | - | |
|
||||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
* | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | * | |
|
* | | ✗ | Home | Up | End | PgUp | | | | ✗ | 7 | 8 | 9 | + | |
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* | | # | $ | ( | ) | ` |------| |------| | 4 | 5 | 6 | + | |
|
* | | ✗ | Left | Down | Right| PgDn |------| |------| ✗ | 4 | 5 | 6 | + | ✗ |
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* | | % | ^ | [ | ] | ~ | | | | | 1 | 2 | 3 | \ | |
|
* | | / | * | - | + | Enter| | | | ✗ | 1 | 2 | 3 | Enter| Enter |
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* | | | | | | | . | 0 | 0 | = | |
|
* | | | | | ✗ | | 0 | 0 | . | Enter| = |
|
||||||
* `----------------------------------' `----------------------------------'
|
* `----------------------------------' `----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* | | | | | |
|
* | | | | | |
|
||||||
@@ -415,22 +460,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_NUM] = LAYOUT_ergodox(
|
[_NUM] = LAYOUT_ergodox(
|
||||||
// left hand
|
// left hand
|
||||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
_______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______,
|
_______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO,
|
||||||
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
|
_______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
|
||||||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______,
|
_______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO,
|
||||||
_______, _______, _______, _______, _______,
|
_______, _______, _______, _______, KC_NO,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
_______,
|
_______,
|
||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
|
|
||||||
// right hand
|
// right hand
|
||||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______,
|
||||||
_______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, _______,
|
KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
|
||||||
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, _______,
|
KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO,
|
||||||
_______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_SLASH, _______,
|
KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT,
|
||||||
KC_KP_DOT, KC_KP_0, KC_KP_0, KC_KP_EQUAL, _______,
|
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL,
|
||||||
|
|
||||||
_______, _______,
|
_______, _______,
|
||||||
_______,
|
_______,
|
||||||
@@ -444,15 +489,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 0:
|
case 0:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (record->event.pressed) { // For resetting EEPROM
|
if (record->event.pressed) { // For resetting EEPROM
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
@@ -461,23 +506,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case QWERTY:
|
case QWERTY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
print("mode just switched to qwerty and this is a huge string\n");
|
|
||||||
set_single_persistent_default_layer(_QWERTY);
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case WORKMAN:
|
case WORKMAN:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
set_single_persistent_default_layer(_WORKMAN);
|
set_single_persistent_default_layer(_WORKMAN);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case DVORAK:
|
case DVORAK:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
set_single_persistent_default_layer(_DVORAK);
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
case LOWER:
|
case LOWER:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_LOWER);
|
layer_on(_LOWER);
|
||||||
@@ -494,7 +540,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case RAISE:
|
case RAISE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_RAISE);
|
layer_on(_RAISE);
|
||||||
@@ -511,19 +556,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case EPRM:
|
case EPRM:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case VRSN:
|
case VRSN:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case RGB_SLD:
|
case RGB_SLD:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
@@ -531,7 +573,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -550,19 +591,19 @@ void matrix_scan_user(void) {
|
|||||||
uint8_t layer = biton32(layer_state);
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
ergodox_board_led_off();
|
ergodox_board_led_off();
|
||||||
ergodox_right_led_1_off();
|
ergodox_led_lower_off();
|
||||||
ergodox_right_led_2_off();
|
ergodox_led_raise_off();
|
||||||
ergodox_right_led_3_off();
|
ergodox_led_adjust_off();
|
||||||
|
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
ergodox_right_led_1_on();
|
ergodox_led_lower_on();
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
ergodox_right_led_2_on();
|
ergodox_led_raise_on();
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
ergodox_right_led_3_on();
|
ergodox_led_adjust_on();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#error This visualizer needs that LCD is enabled
|
#error This visualizer needs that LCD is enabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "visualizer.h"
|
#include "./visualizer.h"
|
||||||
#include "visualizer_keyframes.h"
|
#include "visualizer_keyframes.h"
|
||||||
#include "lcd_keyframes.h"
|
#include "lcd_keyframes.h"
|
||||||
#include "lcd_backlight_keyframes.h"
|
#include "lcd_backlight_keyframes.h"
|
||||||
@@ -295,17 +295,17 @@ void ergodox_board_led_on(void){
|
|||||||
// No board led support
|
// No board led support
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_1_on(void){
|
void ergodox_led_lower_on(void){
|
||||||
user_data_keyboard.led_on |= (1u << 0);
|
user_data_keyboard.led_on |= (1u << 0);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_2_on(void){
|
void ergodox_led_raise_on(void){
|
||||||
user_data_keyboard.led_on |= (1u << 1);
|
user_data_keyboard.led_on |= (1u << 1);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_3_on(void){
|
void ergodox_led_adjust_on(void){
|
||||||
user_data_keyboard.led_on |= (1u << 2);
|
user_data_keyboard.led_on |= (1u << 2);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
@@ -314,32 +314,32 @@ void ergodox_board_led_off(void){
|
|||||||
// No board led support
|
// No board led support
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_1_off(void){
|
void ergodox_led_lower_off(void){
|
||||||
user_data_keyboard.led_on &= ~(1u << 0);
|
user_data_keyboard.led_on &= ~(1u << 0);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_2_off(void){
|
void ergodox_led_raise_off(void){
|
||||||
user_data_keyboard.led_on &= ~(1u << 1);
|
user_data_keyboard.led_on &= ~(1u << 1);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_3_off(void){
|
void ergodox_led_adjust_off(void){
|
||||||
user_data_keyboard.led_on &= ~(1u << 2);
|
user_data_keyboard.led_on &= ~(1u << 2);
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_1_set(uint8_t n) {
|
void ergodox_led_lower_set(uint8_t n) {
|
||||||
user_data_keyboard.led1 = n;
|
user_data_keyboard.led1 = n;
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_2_set(uint8_t n) {
|
void ergodox_led_raise_set(uint8_t n) {
|
||||||
user_data_keyboard.led2 = n;
|
user_data_keyboard.led2 = n;
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ergodox_right_led_3_set(uint8_t n) {
|
void ergodox_led_adjust_set(uint8_t n) {
|
||||||
user_data_keyboard.led3 = n;
|
user_data_keyboard.led3 = n;
|
||||||
visualizer_set_user_data(&user_data_keyboard);
|
visualizer_set_user_data(&user_data_keyboard);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/* Copyright 2017 Fred Sundvik
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VISUALIZER_H_
|
||||||
|
#define VISUALIZER_H_
|
||||||
|
|
||||||
|
#include "visualizer.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
void ergodox_led_lower_on (void);
|
||||||
|
void ergodox_led_raise_on (void);
|
||||||
|
void ergodox_led_adjust_on (void);
|
||||||
|
|
||||||
|
void ergodox_led_lower_off (void);
|
||||||
|
void ergodox_led_raise_off (void);
|
||||||
|
void ergodox_led_adjust_off (void);
|
||||||
|
|
||||||
|
void ergodox_led_lower_set (uint8_t n);
|
||||||
|
void ergodox_led_raise_set (uint8_t n);
|
||||||
|
void ergodox_led_adjust_set (uint8_t n);
|
||||||
|
|
||||||
|
#endif /* VISUALIZER_H_ */
|
||||||
@@ -67,7 +67,7 @@ CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
|
|||||||
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 - 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
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard
|
||||||
STENO_ENABLE = yes #enable plover steno mode
|
STENO_ENABLE = yes #enable plover steno mode
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
SERIAL_LINK_ENABLE = yes
|
SERIAL_LINK_ENABLE = yes
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -67,7 +67,7 @@ CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
|
|||||||
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 - 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
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||||
|
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
SERIAL_LINK_ENABLE = yes
|
SERIAL_LINK_ENABLE = yes
|
||||||
@@ -79,11 +79,11 @@ MIDI_ENABLE = no
|
|||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
|
|
||||||
LCD_DRIVER = st7565
|
LCD_DRIVER = st7565
|
||||||
LCD_WIDTH = 128
|
LCD_WIDTH = 128
|
||||||
LCD_HEIGHT = 32
|
LCD_HEIGHT = 32
|
||||||
|
|
||||||
LED_DRIVER = is31fl3731c
|
LED_DRIVER = is31fl3731c
|
||||||
LED_WIDTH = 7
|
LED_WIDTH = 7
|
||||||
LED_HEIGHT = 7
|
LED_HEIGHT = 7
|
||||||
|
|
||||||
LAYOUTS = ergodox
|
LAYOUTS = ergodox
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
@@ -16,7 +16,7 @@ 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. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
@@ -16,7 +16,7 @@ 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. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ out:
|
|||||||
return mcp23018_status;
|
return mcp23018_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ONEHAND_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
// swap-hands action needs a matrix to define the swap
|
// swap-hands action needs a matrix to define the swap
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
|
|||||||
CUSTOM_MATRIX = yes # Custom matrix file for the Dactyl
|
CUSTOM_MATRIX = yes # Custom matrix file for the Dactyl
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard
|
||||||
SLEEP_LED_ENABLE = no
|
SLEEP_LED_ENABLE = no
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x3060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER tshort
|
||||||
|
#define PRODUCT Dactyl-Manuform
|
||||||
|
#define DESCRIPTION A split keyboard for the cheap makers
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
||||||
|
// #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
|
||||||
|
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
#define ws2812_PORTREG PORTD
|
||||||
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#include "dactyl_manuform.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// // green led on
|
||||||
|
// DDRD |= (1<<5);
|
||||||
|
// PORTD &= ~(1<<5);
|
||||||
|
|
||||||
|
// // orange led on
|
||||||
|
// DDRB |= (1<<0);
|
||||||
|
// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
#ifndef REV2_H
|
||||||
|
#define REV2_H
|
||||||
|
|
||||||
|
#include "dactyl_manuform.h"
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
#ifndef FLIP_HALF
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
|
||||||
|
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
|
||||||
|
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
|
||||||
|
L31, L32, R33, R34, \
|
||||||
|
L33, L34, R31, R32, \
|
||||||
|
L44, L42, R43, R41, \
|
||||||
|
L43, L41, R44, R42 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04 }, \
|
||||||
|
{ L10, L11, L12, L13, L14 }, \
|
||||||
|
{ L20, L21, L22, L23, L24 }, \
|
||||||
|
{ KC_NO, L31, L32, L33, L34 }, \
|
||||||
|
{ KC_NO, L41, L42, L43, L44 }, \
|
||||||
|
\
|
||||||
|
{ R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R24, R23, R22, R21, R20 }, \
|
||||||
|
{ KC_NO, R34, R33, R32, R31 }, \
|
||||||
|
{ KC_NO, R44, R43, R42, R41 } \
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
|
||||||
|
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
|
||||||
|
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
|
||||||
|
L31, L32, L33, L34, \
|
||||||
|
R31, R32, R33, R34, \
|
||||||
|
L41, L42, L43, L44, \
|
||||||
|
R41, R42, R43, R44 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04 }, \
|
||||||
|
{ L10, L11, L12, L13, L14 }, \
|
||||||
|
{ L20, L21, L22, L23, L24 }, \
|
||||||
|
{ KC_NO, L31, L32, L33, L34 }, \
|
||||||
|
{ KC_NO, L41, L42, L43, L44 }, \
|
||||||
|
\
|
||||||
|
{ R00, R01, R02, R03, R04 }, \
|
||||||
|
{ R10, R11, R12, R13, R14 }, \
|
||||||
|
{ R20, R21, R22, R23, R24 }, \
|
||||||
|
{ KC_NO, R31, R32, R33, R34 }, \
|
||||||
|
{ KC_NO, R41, R42, R43, R44 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
#include <util/twi.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/twi.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "i2c.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
|
||||||
|
// Limits the amount of we wait for any one i2c transaction.
|
||||||
|
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
||||||
|
// 9 bits, a single transaction will take around 90μs to complete.
|
||||||
|
//
|
||||||
|
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
|
||||||
|
// poll loop takes at least 8 clock cycles to execute
|
||||||
|
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
|
||||||
|
|
||||||
|
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
|
||||||
|
|
||||||
|
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
static volatile uint8_t slave_buffer_pos;
|
||||||
|
static volatile bool slave_has_register_set = false;
|
||||||
|
|
||||||
|
// Wait for an i2c operation to finish
|
||||||
|
inline static
|
||||||
|
void i2c_delay(void) {
|
||||||
|
uint16_t lim = 0;
|
||||||
|
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
|
||||||
|
lim++;
|
||||||
|
|
||||||
|
// easier way, but will wait slightly longer
|
||||||
|
// _delay_us(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup twi to run at 100kHz
|
||||||
|
void i2c_master_init(void) {
|
||||||
|
// no prescaler
|
||||||
|
TWSR = 0;
|
||||||
|
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
|
||||||
|
// Check datasheets for more info.
|
||||||
|
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start a transaction with the given i2c slave address. The direction of the
|
||||||
|
// transfer is set with I2C_READ and I2C_WRITE.
|
||||||
|
// returns: 0 => success
|
||||||
|
// 1 => error
|
||||||
|
uint8_t i2c_master_start(uint8_t address) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
// check that we started successfully
|
||||||
|
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
TWDR = address;
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
|
||||||
|
return 1; // slave did not acknowledge
|
||||||
|
else
|
||||||
|
return 0; // success
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Finish the i2c transaction.
|
||||||
|
void i2c_master_stop(void) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||||
|
|
||||||
|
uint16_t lim = 0;
|
||||||
|
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
|
||||||
|
lim++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write one byte to the i2c slave.
|
||||||
|
// returns 0 => slave ACK
|
||||||
|
// 1 => slave NACK
|
||||||
|
uint8_t i2c_master_write(uint8_t data) {
|
||||||
|
TWDR = data;
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
// check if the slave acknowledged us
|
||||||
|
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
|
||||||
|
// if ack=0 the acknowledge bit is not set.
|
||||||
|
// returns: byte read from i2c device
|
||||||
|
uint8_t i2c_master_read(int ack) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
return TWDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_reset_state(void) {
|
||||||
|
TWCR = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_slave_init(uint8_t address) {
|
||||||
|
TWAR = address << 0; // slave i2c address
|
||||||
|
// TWEN - twi enable
|
||||||
|
// TWEA - enable address acknowledgement
|
||||||
|
// TWINT - twi interrupt flag
|
||||||
|
// TWIE - enable the twi interrupt
|
||||||
|
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(TWI_vect);
|
||||||
|
|
||||||
|
ISR(TWI_vect) {
|
||||||
|
uint8_t ack = 1;
|
||||||
|
switch(TW_STATUS) {
|
||||||
|
case TW_SR_SLA_ACK:
|
||||||
|
// this device has been addressed as a slave receiver
|
||||||
|
slave_has_register_set = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_SR_DATA_ACK:
|
||||||
|
// this device has received data as a slave receiver
|
||||||
|
// The first byte that we receive in this transaction sets the location
|
||||||
|
// of the read/write location of the slaves memory that it exposes over
|
||||||
|
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
|
||||||
|
// slave_buffer_pos after each write.
|
||||||
|
if(!slave_has_register_set) {
|
||||||
|
slave_buffer_pos = TWDR;
|
||||||
|
// don't acknowledge the master if this memory loctaion is out of bounds
|
||||||
|
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
|
||||||
|
ack = 0;
|
||||||
|
slave_buffer_pos = 0;
|
||||||
|
}
|
||||||
|
slave_has_register_set = true;
|
||||||
|
} else {
|
||||||
|
i2c_slave_buffer[slave_buffer_pos] = TWDR;
|
||||||
|
BUFFER_POS_INC();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_ST_SLA_ACK:
|
||||||
|
case TW_ST_DATA_ACK:
|
||||||
|
// master has addressed this device as a slave transmitter and is
|
||||||
|
// requesting data.
|
||||||
|
TWDR = i2c_slave_buffer[slave_buffer_pos];
|
||||||
|
BUFFER_POS_INC();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_BUS_ERROR: // something went wrong, reset twi state
|
||||||
|
TWCR = 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Reset everything, so we are ready for the next TWI interrupt
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#ifndef I2C_H
|
||||||
|
#define I2C_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifndef F_CPU
|
||||||
|
#define F_CPU 16000000UL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define I2C_READ 1
|
||||||
|
#define I2C_WRITE 0
|
||||||
|
|
||||||
|
#define I2C_ACK 1
|
||||||
|
#define I2C_NACK 0
|
||||||
|
|
||||||
|
#define SLAVE_BUFFER_SIZE 0x10
|
||||||
|
|
||||||
|
// i2c SCL clock frequency
|
||||||
|
#define SCL_CLOCK 400000L
|
||||||
|
|
||||||
|
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
void i2c_master_init(void);
|
||||||
|
uint8_t i2c_master_start(uint8_t address);
|
||||||
|
void i2c_master_stop(void);
|
||||||
|
uint8_t i2c_master_write(uint8_t data);
|
||||||
|
uint8_t i2c_master_read(int);
|
||||||
|
void i2c_reset_state(void);
|
||||||
|
void i2c_slave_init(uint8_t address);
|
||||||
|
|
||||||
|
|
||||||
|
static inline unsigned char i2c_start_read(unsigned char addr) {
|
||||||
|
return i2c_master_start((addr << 1) | I2C_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned char i2c_start_write(unsigned char addr) {
|
||||||
|
return i2c_master_start((addr << 1) | I2C_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// from SSD1306 scrips
|
||||||
|
extern unsigned char i2c_rep_start(unsigned char addr);
|
||||||
|
extern void i2c_start_wait(unsigned char addr);
|
||||||
|
extern unsigned char i2c_readAck(void);
|
||||||
|
extern unsigned char i2c_readNak(void);
|
||||||
|
extern unsigned char i2c_read(unsigned char ack);
|
||||||
|
|
||||||
|
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
// #define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
#define EE_HANDS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
#include "dactyl_manuform.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
#define _NAV 1
|
||||||
|
#define _NUM 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
NAV,
|
||||||
|
NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Base (qwerty)
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | Q | W | E | R | T | | Y | U | I | O | P |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | A | S | D | F | G | | H | J | K | L | ; |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | Z | X | C | V | B | | N | M | , | . | ' |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | [ | ] | | - | = |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | esc | bs | | space|enter |
|
||||||
|
* | + | + | | + | + |
|
||||||
|
* | shift| ctrl | | alt |shift |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* |------+------' '------+------|
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_BASE] = KEYMAP( \
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, \
|
||||||
|
KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \
|
||||||
|
SFT_T(KC_ESC), CTL_T(KC_BSPC), ALT_T(KC_SPC), SFT_T(KC_ENT), \
|
||||||
|
KC_TAB, KC_HOME, KC_END, KC_DEL, \
|
||||||
|
LT(_NAV, KC_BSLS), KC_GRV, KC_LGUI, LT(_NUM, KC_SLSH) \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Navigation layer
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | | | mup | | | | | | up | | |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | | mleft| mdown|mright| | | | left | down |right | |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | | | | mbtn |mbtn2 |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_NAV] = KEYMAP( \
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Numbers layer
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | F11 | F12 | | | |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
[_NUM] = KEYMAP( \
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, \
|
||||||
|
KC_F11, KC_F12, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
// #define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
#define EE_HANDS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
#include "dactyl_manuform.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
#define _NAV 1
|
||||||
|
#define _NUM 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
NAV,
|
||||||
|
NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Base (dvorak)
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | ' | , | . | p | y | | f | g | c | r | l |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | a | o | e | u | i | | d | h | t | n | s |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | ; | q | j | k | x | | b | m | w | v | z |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | [ | ] | | - | = |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | esc | bs | | space|enter |
|
||||||
|
* | + | + | | + | + |
|
||||||
|
* | shift| ctrl | | alt |shift |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* |------+------' '------+------|
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_BASE] = KEYMAP( \
|
||||||
|
KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \
|
||||||
|
KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \
|
||||||
|
KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, \
|
||||||
|
KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \
|
||||||
|
SFT_T(KC_ESC), CTL_T(KC_BSPC), ALT_T(KC_SPC), SFT_T(KC_ENT), \
|
||||||
|
KC_TAB, KC_HOME, KC_END, KC_DEL, \
|
||||||
|
LT(_NAV, KC_BSLS), KC_GRV, KC_LGUI, LT(_NUM, KC_SLSH) \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Navigation layer
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | | | mup | | | | | | up | | |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | | mleft| mdown|mright| | | | left | down |right | |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | | | | mbtn |mbtn2 |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_NAV] = KEYMAP( \
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Numbers layer
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | F11 | F12 | | | |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | tab | home | | end | del |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* |\(NAV)| ~ | | gui |/(NUM)|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
[_NUM] = KEYMAP( \
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, \
|
||||||
|
KC_F11, KC_F12, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,466 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scan matrix
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "wait.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "pro_micro.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
# include "i2c.h"
|
||||||
|
#else // USE_SERIAL
|
||||||
|
# include "serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (DEBOUNCING_DELAY > 0)
|
||||||
|
static uint16_t debouncing_time;
|
||||||
|
static bool debouncing = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||||
|
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||||
|
# define ROW_SHIFTER ((uint8_t)1)
|
||||||
|
#else
|
||||||
|
# error "Currently only supports 8 COLS"
|
||||||
|
#endif
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
#define ERROR_DISCONNECT_COUNT 5
|
||||||
|
|
||||||
|
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||||
|
|
||||||
|
static uint8_t error_count = 0;
|
||||||
|
|
||||||
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
static void init_cols(void);
|
||||||
|
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
static void unselect_row(uint8_t row);
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
static void init_rows(void);
|
||||||
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||||
|
static void unselect_cols(void);
|
||||||
|
static void unselect_col(uint8_t col);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void)
|
||||||
|
{
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void)
|
||||||
|
{
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
#ifdef DISABLE_JTAG
|
||||||
|
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
debug_enable = true;
|
||||||
|
debug_matrix = true;
|
||||||
|
debug_mouse = true;
|
||||||
|
// initialize row and col
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
unselect_cols();
|
||||||
|
init_rows();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
TX_RX_LED_INIT;
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t _matrix_scan(void)
|
||||||
|
{
|
||||||
|
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
// Set row, read cols
|
||||||
|
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
|
||||||
|
|
||||||
|
if (matrix_changed) {
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
PORTD ^= (1 << 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
# else
|
||||||
|
read_cols_on_row(matrix+offset, current_row);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
// Set col, read rows
|
||||||
|
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
|
||||||
|
if (matrix_changed) {
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
read_rows_on_col(matrix+offset, current_col);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# if (DEBOUNCING_DELAY > 0)
|
||||||
|
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||||
|
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||||
|
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||||
|
}
|
||||||
|
debouncing = false;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
|
||||||
|
// Get rows from other half over i2c
|
||||||
|
int i2c_transaction(void) {
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
|
||||||
|
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
// start of matrix stored at 0x00
|
||||||
|
err = i2c_master_write(0x00);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
// Start read
|
||||||
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
if (!err) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < ROWS_PER_HAND-1; ++i) {
|
||||||
|
matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
|
||||||
|
}
|
||||||
|
matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
|
||||||
|
i2c_master_stop();
|
||||||
|
} else {
|
||||||
|
i2c_error: // the cable is disconnceted, or something else went wrong
|
||||||
|
i2c_reset_state();
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else // USE_SERIAL
|
||||||
|
|
||||||
|
int serial_transaction(void) {
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
|
||||||
|
if (serial_update_buffers()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
uint8_t ret = _matrix_scan();
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
if( i2c_transaction() ) {
|
||||||
|
#else // USE_SERIAL
|
||||||
|
if( serial_transaction() ) {
|
||||||
|
#endif
|
||||||
|
// turn on the indicator led when halves are disconnected
|
||||||
|
TXLED1;
|
||||||
|
|
||||||
|
error_count++;
|
||||||
|
|
||||||
|
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||||
|
// reset other half if disconnected
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[slaveOffset+i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// turn off the indicator led on no error
|
||||||
|
TXLED0;
|
||||||
|
error_count = 0;
|
||||||
|
}
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_slave_scan(void) {
|
||||||
|
_matrix_scan();
|
||||||
|
|
||||||
|
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
i2c_slave_buffer[i] = matrix[offset+i];
|
||||||
|
}
|
||||||
|
#else // USE_SERIAL
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
serial_slave_buffer[i] = matrix[offset+i];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void)
|
||||||
|
{
|
||||||
|
if (debouncing) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
pbin_reverse16(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop16(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
|
static void init_cols(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
uint8_t pin = col_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
|
{
|
||||||
|
// Store last value of row prior to reading
|
||||||
|
matrix_row_t last_row_value = current_matrix[current_row];
|
||||||
|
|
||||||
|
// Clear data in matrix row
|
||||||
|
current_matrix[current_row] = 0;
|
||||||
|
|
||||||
|
// Select row and wait for row selecton to stabilize
|
||||||
|
select_row(current_row);
|
||||||
|
wait_us(30);
|
||||||
|
|
||||||
|
// For each col...
|
||||||
|
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||||
|
|
||||||
|
// Select the col pin to read (active low)
|
||||||
|
uint8_t pin = col_pins[col_index];
|
||||||
|
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
|
||||||
|
|
||||||
|
// Populate the matrix row with the state of the col pin
|
||||||
|
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect row
|
||||||
|
unselect_row(current_row);
|
||||||
|
|
||||||
|
return (last_row_value != current_matrix[current_row]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row)
|
||||||
|
{
|
||||||
|
uint8_t pin = row_pins[row];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||||
|
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_row(uint8_t row)
|
||||||
|
{
|
||||||
|
uint8_t pin = row_pins[row];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_rows(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
uint8_t pin = row_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
|
static void init_rows(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
uint8_t pin = row_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||||
|
{
|
||||||
|
bool matrix_changed = false;
|
||||||
|
|
||||||
|
// Select col and wait for col selecton to stabilize
|
||||||
|
select_col(current_col);
|
||||||
|
wait_us(30);
|
||||||
|
|
||||||
|
// For each row...
|
||||||
|
for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Store last value of row prior to reading
|
||||||
|
matrix_row_t last_row_value = current_matrix[row_index];
|
||||||
|
|
||||||
|
// Check row pin state
|
||||||
|
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
|
||||||
|
{
|
||||||
|
// Pin LO, set col bit
|
||||||
|
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Pin HI, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine if the matrix changed state
|
||||||
|
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||||
|
{
|
||||||
|
matrix_changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect col
|
||||||
|
unselect_col(current_col);
|
||||||
|
|
||||||
|
return matrix_changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col)
|
||||||
|
{
|
||||||
|
uint8_t pin = col_pins[col];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||||
|
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_col(uint8_t col)
|
||||||
|
{
|
||||||
|
uint8_t pin = col_pins[col];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_cols(void)
|
||||||
|
{
|
||||||
|
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
uint8_t pin = col_pins[x];
|
||||||
|
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
Dactyl manuform
|
||||||
|
======
|
||||||
|
|
||||||
|
the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link.
|
||||||
|
|
||||||
|
## First Time Setup
|
||||||
|
|
||||||
|
Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make dactyl_manuform:dvorak
|
||||||
|
```
|
||||||
|
|
||||||
|
You will see a lot of output and if everything worked correctly you will see the built hex file:
|
||||||
|
|
||||||
|
```
|
||||||
|
dactyl_manuform_dvorak.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make dactyl_manuform:YOUR_KEYMAP_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
If everything worked correctly you will see a file:
|
||||||
|
|
||||||
|
```
|
||||||
|
dactyl_manuform_YOUR_KEYMAP_NAME.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md.
|
||||||
|
|
||||||
|
Required Hardware
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Apart from diodes and key switches for the keyboard matrix in each half, you
|
||||||
|
will need:
|
||||||
|
|
||||||
|
* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each.
|
||||||
|
* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
|
||||||
|
|
||||||
|
Alternatively, you can use any sort of cable and socket that has at least 3
|
||||||
|
wires. If you want to use I2C to communicate between halves, you will need a
|
||||||
|
cable with at least 4 wires and 2x 4.7kΩ pull-up resistors
|
||||||
|
|
||||||
|
Optional Hardware
|
||||||
|
-----------------
|
||||||
|
A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`.
|
||||||
|
|
||||||
|
Wiring
|
||||||
|
------
|
||||||
|
|
||||||
|
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
|
||||||
|
PD0 on the ATmega32u4) between the two Pro Micros.
|
||||||
|
|
||||||
|
Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro
|
||||||
|
and modify the `matrix.c` accordingly.
|
||||||
|
|
||||||
|
The wiring for serial:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The wiring for i2c:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The pull-up resistors may be placed on either half. It is also possible
|
||||||
|
to use 4 resistors and have the pull-ups in both halves, but this is
|
||||||
|
unnecessary in simple use cases.
|
||||||
|
|
||||||
|
You can change your configuration between serial and i2c by modifying your `config.h` file.
|
||||||
|
|
||||||
|
Notes on Software Configuration
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
the keymaps in here are for the 4x5 layout of the keyboard only.
|
||||||
|
|
||||||
|
Flashing
|
||||||
|
-------
|
||||||
|
From the top level `qmk_firmware` directory run `make KEYBOARD:KEYMAP:avrdude` for automatic serial port resolution and flashing.
|
||||||
|
Example: `make lets_split/rev2:default:avrdude`
|
||||||
|
|
||||||
|
|
||||||
|
Choosing which board to plug the USB cable into (choosing Master)
|
||||||
|
--------
|
||||||
|
Because the two boards are identical, the firmware has logic to differentiate the left and right board.
|
||||||
|
|
||||||
|
It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable.
|
||||||
|
|
||||||
|
The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side.
|
||||||
|
|
||||||
|
The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
|
||||||
|
|
||||||
|
### Setting the left hand as master
|
||||||
|
If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
|
||||||
|
|
||||||
|
### Setting the right hand as master
|
||||||
|
If you always plug the usb cable into the right board, add an extra flag to your `config.h`
|
||||||
|
```
|
||||||
|
#define MASTER_RIGHT
|
||||||
|
```
|
||||||
|
|
||||||
|
### Setting EE_hands to use either hands as master
|
||||||
|
If you define `EE_HANDS` in your `config.h`, you will need to set the
|
||||||
|
EEPROM for the left and right halves.
|
||||||
|
|
||||||
|
The EEPROM is used to store whether the
|
||||||
|
half is left handed or right handed. This makes it so that the same firmware
|
||||||
|
file will run on both hands instead of having to flash left and right handed
|
||||||
|
versions of the firmware to each half. To flash the EEPROM file for the left
|
||||||
|
half run:
|
||||||
|
```
|
||||||
|
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
|
||||||
|
// or the equivalent in dfu-programmer
|
||||||
|
|
||||||
|
```
|
||||||
|
and similarly for right half
|
||||||
|
```
|
||||||
|
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
|
||||||
|
// or the equivalent in dfu-programmer
|
||||||
|
```
|
||||||
|
|
||||||
|
NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
|
||||||
|
|
||||||
|
After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
|
||||||
|
|
||||||
|
Note that you need to program both halves, but you have the option of using
|
||||||
|
different keymaps for each half. You could program the left half with a QWERTY
|
||||||
|
layout and the right half with a Colemak layout using bootmagic's default layout option.
|
||||||
|
Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
|
||||||
|
right half is connected.
|
||||||
|
|
||||||
|
|
||||||
|
Notes on Using Pro Micro 3.3V
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
|
||||||
|
the frequency on the 3.3V board.
|
||||||
|
|
||||||
|
Also, if the slave board is producing weird characters in certain columns,
|
||||||
|
update the following line in `matrix.c` to the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
// _delay_us(30); // without this wait read unstable value.
|
||||||
|
_delay_us(300); // without this wait read unstable value.
|
||||||
|
```
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
SRC += matrix.c \
|
||||||
|
i2c.c \
|
||||||
|
split_util.c \
|
||||||
|
serial.c \
|
||||||
|
ssd1306.c
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SUBPROJECT_rev1 = yes
|
||||||
|
USE_I2C = yes
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x12
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
/*
|
||||||
|
* WARNING: be careful changing this code, it is very timing dependent
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef F_CPU
|
||||||
|
#define F_CPU 16000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
|
#ifndef USE_I2C
|
||||||
|
|
||||||
|
// Serial pulse period in microseconds. Its probably a bad idea to lower this
|
||||||
|
// value.
|
||||||
|
#define SERIAL_DELAY 24
|
||||||
|
|
||||||
|
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||||
|
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||||
|
|
||||||
|
#define SLAVE_DATA_CORRUPT (1<<0)
|
||||||
|
volatile uint8_t status = 0;
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_delay(void) {
|
||||||
|
_delay_us(SERIAL_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_output(void) {
|
||||||
|
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make the serial pin an input with pull-up resistor
|
||||||
|
inline static
|
||||||
|
void serial_input(void) {
|
||||||
|
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
uint8_t serial_read_pin(void) {
|
||||||
|
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_low(void) {
|
||||||
|
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_high(void) {
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void serial_master_init(void) {
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
void serial_slave_init(void) {
|
||||||
|
serial_input();
|
||||||
|
|
||||||
|
// Enable INT0
|
||||||
|
EIMSK |= _BV(INT0);
|
||||||
|
// Trigger on falling edge of INT0
|
||||||
|
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the master to synchronize timing with the slave.
|
||||||
|
static
|
||||||
|
void sync_recv(void) {
|
||||||
|
serial_input();
|
||||||
|
// This shouldn't hang if the slave disconnects because the
|
||||||
|
// serial line will float to high if the slave does disconnect.
|
||||||
|
while (!serial_read_pin());
|
||||||
|
serial_delay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the slave to send a synchronization signal to the master.
|
||||||
|
static
|
||||||
|
void sync_send(void) {
|
||||||
|
serial_output();
|
||||||
|
|
||||||
|
serial_low();
|
||||||
|
serial_delay();
|
||||||
|
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads a byte from the serial line
|
||||||
|
static
|
||||||
|
uint8_t serial_read_byte(void) {
|
||||||
|
uint8_t byte = 0;
|
||||||
|
serial_input();
|
||||||
|
for ( uint8_t i = 0; i < 8; ++i) {
|
||||||
|
byte = (byte << 1) | serial_read_pin();
|
||||||
|
serial_delay();
|
||||||
|
_delay_us(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sends a byte with MSB ordering
|
||||||
|
static
|
||||||
|
void serial_write_byte(uint8_t data) {
|
||||||
|
uint8_t b = 8;
|
||||||
|
serial_output();
|
||||||
|
while( b-- ) {
|
||||||
|
if(data & (1 << b)) {
|
||||||
|
serial_high();
|
||||||
|
} else {
|
||||||
|
serial_low();
|
||||||
|
}
|
||||||
|
serial_delay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// interrupt handle to be used by the slave device
|
||||||
|
ISR(SERIAL_PIN_INTERRUPT) {
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
uint8_t checksum = 0;
|
||||||
|
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_write_byte(serial_slave_buffer[i]);
|
||||||
|
sync_send();
|
||||||
|
checksum += serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
serial_write_byte(checksum);
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
// wait for the sync to finish sending
|
||||||
|
serial_delay();
|
||||||
|
|
||||||
|
// read the middle of pulses
|
||||||
|
_delay_us(SERIAL_DELAY/2);
|
||||||
|
|
||||||
|
uint8_t checksum_computed = 0;
|
||||||
|
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_master_buffer[i] = serial_read_byte();
|
||||||
|
sync_send();
|
||||||
|
checksum_computed += serial_master_buffer[i];
|
||||||
|
}
|
||||||
|
uint8_t checksum_received = serial_read_byte();
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
serial_input(); // end transaction
|
||||||
|
|
||||||
|
if ( checksum_computed != checksum_received ) {
|
||||||
|
status |= SLAVE_DATA_CORRUPT;
|
||||||
|
} else {
|
||||||
|
status &= ~SLAVE_DATA_CORRUPT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool serial_slave_DATA_CORRUPT(void) {
|
||||||
|
return status & SLAVE_DATA_CORRUPT;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copies the serial_slave_buffer to the master and sends the
|
||||||
|
// serial_master_buffer to the slave.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// 0 => no error
|
||||||
|
// 1 => slave did not respond
|
||||||
|
int serial_update_buffers(void) {
|
||||||
|
// this code is very time dependent, so we need to disable interrupts
|
||||||
|
cli();
|
||||||
|
|
||||||
|
// signal to the slave that we want to start a transaction
|
||||||
|
serial_output();
|
||||||
|
serial_low();
|
||||||
|
_delay_us(1);
|
||||||
|
|
||||||
|
// wait for the slaves response
|
||||||
|
serial_input();
|
||||||
|
serial_high();
|
||||||
|
_delay_us(SERIAL_DELAY);
|
||||||
|
|
||||||
|
// check if the slave is present
|
||||||
|
if (serial_read_pin()) {
|
||||||
|
// slave failed to pull the line low, assume not present
|
||||||
|
sei();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the slave is present syncronize with it
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
uint8_t checksum_computed = 0;
|
||||||
|
// receive data from the slave
|
||||||
|
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_slave_buffer[i] = serial_read_byte();
|
||||||
|
sync_recv();
|
||||||
|
checksum_computed += serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
uint8_t checksum_received = serial_read_byte();
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
if (checksum_computed != checksum_received) {
|
||||||
|
sei();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t checksum = 0;
|
||||||
|
// send data to the slave
|
||||||
|
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_write_byte(serial_master_buffer[i]);
|
||||||
|
sync_recv();
|
||||||
|
checksum += serial_master_buffer[i];
|
||||||
|
}
|
||||||
|
serial_write_byte(checksum);
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
// always, release the line when not in use
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
|
||||||
|
sei();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef MY_SERIAL_H
|
||||||
|
#define MY_SERIAL_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
/* TODO: some defines for interrupt setup */
|
||||||
|
#define SERIAL_PIN_DDR DDRD
|
||||||
|
#define SERIAL_PIN_PORT PORTD
|
||||||
|
#define SERIAL_PIN_INPUT PIND
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD0)
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||||
|
|
||||||
|
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
|
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||||
|
|
||||||
|
// Buffers for master - slave communication
|
||||||
|
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||||
|
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||||
|
|
||||||
|
void serial_master_init(void);
|
||||||
|
void serial_slave_init(void);
|
||||||
|
int serial_update_buffers(void);
|
||||||
|
bool serial_slave_data_corrupt(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/wdt.h>
|
||||||
|
#include <avr/power.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <avr/eeprom.h>
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
# include "i2c.h"
|
||||||
|
#else
|
||||||
|
# include "serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
volatile bool isLeftHand = true;
|
||||||
|
|
||||||
|
static void setup_handedness(void) {
|
||||||
|
#ifdef EE_HANDS
|
||||||
|
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||||
|
#else
|
||||||
|
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
||||||
|
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||||
|
isLeftHand = !has_usb();
|
||||||
|
#else
|
||||||
|
isLeftHand = has_usb();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_master_setup(void) {
|
||||||
|
#ifdef USE_I2C
|
||||||
|
i2c_master_init();
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
matrix_master_OLED_init ();
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
serial_master_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_slave_setup(void) {
|
||||||
|
timer_init();
|
||||||
|
#ifdef USE_I2C
|
||||||
|
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||||
|
#else
|
||||||
|
serial_slave_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool has_usb(void) {
|
||||||
|
USBCON |= (1 << OTGPADE); //enables VBUS pad
|
||||||
|
_delay_us(5);
|
||||||
|
return (USBSTA & (1<<VBUS)); //checks state of VBUS
|
||||||
|
}
|
||||||
|
|
||||||
|
void split_keyboard_setup(void) {
|
||||||
|
setup_handedness();
|
||||||
|
|
||||||
|
if (has_usb()) {
|
||||||
|
keyboard_master_setup();
|
||||||
|
} else {
|
||||||
|
keyboard_slave_setup();
|
||||||
|
}
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_slave_loop(void) {
|
||||||
|
matrix_init();
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
matrix_slave_scan();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// this code runs before the usb and keyboard is initialized
|
||||||
|
void matrix_setup(void) {
|
||||||
|
split_keyboard_setup();
|
||||||
|
|
||||||
|
if (!has_usb()) {
|
||||||
|
keyboard_slave_loop();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||||
|
#define SPLIT_KEYBOARD_UTIL_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
#define SLAVE_I2C_ADDRESS 0x32
|
||||||
|
|
||||||
|
extern volatile bool isLeftHand;
|
||||||
|
|
||||||
|
// slave version of matix scan, defined in matrix.c
|
||||||
|
void matrix_slave_scan(void);
|
||||||
|
|
||||||
|
void split_keyboard_setup(void);
|
||||||
|
bool has_usb(void);
|
||||||
|
void keyboard_slave_loop(void);
|
||||||
|
|
||||||
|
void matrix_master_OLED_init (void);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#define FORCE_NKRO
|
#define FORCE_NKRO
|
||||||
|
|||||||
Loaded 100 of 297 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user