Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b768be784 | ||
|
|
3d446c6050 | ||
|
|
fc87d9b0d5 | ||
|
|
98b68bec53 | ||
|
|
4a597e031f | ||
|
|
81fae5c306 | ||
|
|
234c117613 | ||
|
|
6d4f6f3f49 | ||
|
|
ba11a1c807 | ||
|
|
33e9f1c75a | ||
|
|
be8257f0a7 | ||
|
|
da2eedc0c2 | ||
|
|
3aa4d55bee | ||
|
|
edef1f9396 | ||
|
|
2e8e465423 | ||
|
|
73d8593352 | ||
|
|
dbfbe0d7f0 | ||
|
|
8c2a23dee1 | ||
|
|
69d6298f6b | ||
|
|
4c62c7bd6e | ||
|
|
a8a9a2066e | ||
|
|
a903893883 | ||
|
|
3e8ee96b2c | ||
|
|
be1d5c6609 | ||
|
|
51182a4f03 | ||
|
|
f9c070e1a4 | ||
|
|
9baee84b36 | ||
|
|
6a088f7ff6 | ||
|
|
14908f86fb | ||
|
|
b05a4b1a4b | ||
|
|
1b3b9414b7 | ||
|
|
45dddfa6c2 | ||
|
|
fbe2eba472 | ||
|
|
de2e03650b | ||
|
|
8e0dfdfb53 | ||
|
|
f09a237a07 | ||
|
|
784e2af062 | ||
|
|
be65a0cc79 | ||
|
|
bd43df53bd | ||
|
|
5a41c06cd7 | ||
|
|
7b11d740ea | ||
|
|
ddb0f39ebf | ||
|
|
2f07627a5d | ||
|
|
d163b22dfb | ||
|
|
ea23035c53 | ||
|
|
ef189da243 | ||
|
|
db1ace5426 | ||
|
|
012c5ef9bd | ||
|
|
f2543c3b9b | ||
|
|
6695c874fb | ||
|
|
6f386ca6ae |
No files matched your search
@@ -536,9 +536,9 @@ endef
|
|||||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||||
# Check if the submodules are dirty, and display a warning if they are
|
# Check if the submodules are dirty, and display a warning if they are
|
||||||
ifndef SKIP_GIT
|
ifndef SKIP_GIT
|
||||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi
|
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
||||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi
|
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
|
||||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi
|
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
|
||||||
git submodule status --recursive 2>/dev/null | \
|
git submodule status --recursive 2>/dev/null | \
|
||||||
while IFS= read -r x; do \
|
while IFS= read -r x; do \
|
||||||
case "$$x" in \
|
case "$$x" in \
|
||||||
|
|||||||
@@ -129,6 +129,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin
|
|||||||
|
|
||||||
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
||||||
|
|
||||||
|
When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum my_layers {
|
||||||
|
_FIRST_LAYER,
|
||||||
|
_SECOND_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
enum my_keycodes {
|
||||||
|
FIRST_LAYER = SAFE_RANGE,
|
||||||
|
SECOND_LAYER
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## Keymaps
|
## Keymaps
|
||||||
|
|
||||||
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
|
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ uint32_t layer_state_set_user(uint32_t state) {
|
|||||||
```
|
```
|
||||||
### `layer_state_set_*` Function Documentation
|
### `layer_state_set_*` Function Documentation
|
||||||
|
|
||||||
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
|
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
|
||||||
* Keymap: `uint32_t layer_state_set_user(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)
|
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it mo
|
|||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored.
|
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||||
|
|
||||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
||||||
|
|
||||||
|
|||||||
@@ -314,3 +314,86 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
And then simply use `TD(X_CTL)` anywhere in your keymap.
|
And then simply use `TD(X_CTL)` anywhere in your keymap.
|
||||||
|
|
||||||
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
|
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
|
||||||
|
|
||||||
|
### Example 5: Using tap dance for advanced mod-tap and layer-tap keys
|
||||||
|
|
||||||
|
Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`.
|
||||||
|
|
||||||
|
Below your layers and custom keycodes, add the following:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// tapdance keycodes
|
||||||
|
enum td_keycodes {
|
||||||
|
ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
|
||||||
|
};
|
||||||
|
|
||||||
|
// define a type containing as many tapdance states as you need
|
||||||
|
typedef enum {
|
||||||
|
SINGLE_TAP,
|
||||||
|
SINGLE_HOLD,
|
||||||
|
DOUBLE_SINGLE_TAP
|
||||||
|
} td_state_t;
|
||||||
|
|
||||||
|
// create a global instance of the tapdance state type
|
||||||
|
static td_state_t td_state;
|
||||||
|
|
||||||
|
// declare your tapdance functions:
|
||||||
|
|
||||||
|
// function to determine the current tapdance state
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
|
// `finished` and `reset` functions for each tapdance keycode
|
||||||
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
```
|
||||||
|
|
||||||
|
Below your `LAYOUT`, define each of the tapdance functions:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// determine the tapdance state to return
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted || !state->pressed) { return SINGLE_TAP; }
|
||||||
|
else { return SINGLE_HOLD; }
|
||||||
|
}
|
||||||
|
if (state->count == 2) { return DOUBLE_SINGLE_TAP; }
|
||||||
|
else { return 3; } // any number higher than the maximum state value you return above
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle the possible states for each tapdance keycode you define:
|
||||||
|
|
||||||
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
td_state = cur_dance(state);
|
||||||
|
switch (td_state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_code16(KC_LPRN);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term
|
||||||
|
tap_code16(KC_LPRN);
|
||||||
|
register_code16(KC_LPRN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (td_state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code16(KC_LPRN);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code16(KC_LPRN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
|
||||||
+39
-15
@@ -201,27 +201,51 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KC_MAKE:
|
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
uint8_t temp_mod = get_mods();
|
||||||
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
|
uint8_t temp_osm = get_oneshot_mods();
|
||||||
":dfu "
|
clear_mods(); clear_oneshot_mods();
|
||||||
#elif defined(BOOTLOADER_HALFKAY)
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||||
":teensy "
|
#ifndef FLASH_BOOTLOADER
|
||||||
#elif defined(BOOTLOADER_CATERINA)
|
if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT )
|
||||||
":avrdude "
|
#endif
|
||||||
#endif
|
{ //
|
||||||
SS_TAP(X_ENTER));
|
#if defined(__arm__) // only run for ARM boards
|
||||||
}
|
SEND_STRING(":dfu-util");
|
||||||
return false;
|
#elif defined(BOOTLOADER_DFU) // only run for DFU boards
|
||||||
break;
|
SEND_STRING(":dfu");
|
||||||
|
#elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards
|
||||||
|
SEND_STRING(":teensy");
|
||||||
|
#elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros
|
||||||
|
SEND_STRING(":avrdude");
|
||||||
|
#endif // bootloader options
|
||||||
|
}
|
||||||
|
if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) {
|
||||||
|
SEND_STRING(" -j8 --output-sync");
|
||||||
|
}
|
||||||
|
SEND_STRING(SS_TAP(X_ENTER));
|
||||||
|
set_mods(temp_mod);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return process_record_keymap(keycode, record);
|
return process_record_keymap(keycode, record);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder:
|
||||||
|
|
||||||
|
```make
|
||||||
|
ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
|
||||||
|
OPT_DEFS += -DFLASH_BOOTLOADER
|
||||||
|
endif
|
||||||
|
```
|
||||||
|
|
||||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
||||||
|
|
||||||
Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
|
Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once.
|
||||||
|
|
||||||
|
And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap.
|
||||||
|
|
||||||
|
?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader.
|
||||||
+1
-1
@@ -196,7 +196,7 @@ If you're more of a visual learner, or want some additional tips and something m
|
|||||||
|
|
||||||
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
||||||
|
|
||||||
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
|
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
|
||||||
|
|
||||||
The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
|
The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
"keyboard_name": "foobar",
|
"keyboard_name": "foobar",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 6,
|
"width": 10,
|
||||||
"height": 2,
|
"height": 3,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_macro": {
|
"LAYOUT_macro": {
|
||||||
|
"width": 5,
|
||||||
|
"height": 3,
|
||||||
"key_count": 15,
|
"key_count": 15,
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Edulpn Tsangan Keymap for the DZ60 PCB
|
||||||
|
|
||||||
|
## Additional Notes
|
||||||
|
Tsangan 60% Keymap for DZ60 + Fn layer.
|
||||||
|
|
||||||
|
### Layout
|
||||||
|

|
||||||
|
|
||||||
|
## Build
|
||||||
|
To build the default keymap, simply run `make dz60:edulpn`.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_60_tsangan_hhkb(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_60_tsangan_hhkb(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_DEL,
|
||||||
|
KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, 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_DOWN, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
#define DRIVER_1_LED_TOTAL 63
|
||||||
|
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
extern bool g_suspend_state;
|
||||||
|
#define _LAYER0 0
|
||||||
|
#define _LAYER1 1
|
||||||
|
#define _LAYER2 2
|
||||||
|
#define _LAYER3 3
|
||||||
|
#define _LAYER4 4
|
||||||
|
#define _LAYER5 5
|
||||||
|
#define _LAYER6 6
|
||||||
|
#define _LAYER7 7
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_LAYER0] = LAYOUT( /* Base */
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \
|
||||||
|
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
[_LAYER1] = LAYOUT( /* FN */
|
||||||
|
TO(3), 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_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||||
|
[_LAYER2] = LAYOUT( /* LIGHT */
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , \
|
||||||
|
KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
[_LAYER3] = LAYOUT( /* NUMPAD */
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0), \
|
||||||
|
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT, \
|
||||||
|
KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
[_LAYER4] = LAYOUT( /* MAC */
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \
|
||||||
|
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
[_LAYER5] = LAYOUT( /* FN */
|
||||||
|
TO(3), 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_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer)
|
||||||
|
{
|
||||||
|
rgb_led led;
|
||||||
|
|
||||||
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
|
led = g_rgb_leds[i];
|
||||||
|
|
||||||
|
if (led.matrix_co.raw < 0xFF) {
|
||||||
|
if (led.modifier) {
|
||||||
|
rgb_matrix_set_color(i, red, green, blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_user(void)
|
||||||
|
{
|
||||||
|
uint8_t this_led = host_keyboard_leds();
|
||||||
|
|
||||||
|
if (!g_suspend_state) {
|
||||||
|
switch (biton32(layer_state)) {
|
||||||
|
case _LAYER1:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
||||||
|
|
||||||
|
case _LAYER2:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
||||||
|
|
||||||
|
case _LAYER4:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (biton32(layer_state)) {
|
||||||
|
case _LAYER3:
|
||||||
|
if (this_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
|
rgb_matrix_set_color(13, 0xFF, 0x00, 0x00);
|
||||||
|
} else {
|
||||||
|
rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
|
||||||
|
}
|
||||||
|
|
||||||
|
rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(2, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(3, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(4, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(5, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(6, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(7, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(8, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(14, 0x00, 0x00, 0xFF);
|
||||||
|
rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(17, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(18, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(19, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(20, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(21, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(22, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(23, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(27, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(28, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(29, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(30, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(31, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(33, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(34, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(35, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(36, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(40, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(41, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(42, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(43, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(44, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(45, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(46, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(47, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(48, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(49, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(53, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(54, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(55, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(56, 0x00, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(57, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(58, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(59, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void)
|
||||||
|
{
|
||||||
|
//user initialization
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void)
|
||||||
|
{
|
||||||
|
//user matrix
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t* record)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# mekanist keymap instructions
|
||||||
|
|
||||||
|
## Dev Environment setup (macOS)
|
||||||
|
|
||||||
|
1. Install Homebrew by copy pasting the following into a terminal:
|
||||||
|
```
|
||||||
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Refer to the [QMK macOS Instructions](https://github.com/qmk/qmk_firmware/blob/master/docs/getting_started_build_tools.md#macos) and install the list of tools using the `brew` command in terminal.
|
||||||
|
|
||||||
|
3. While in terminal, issue the following command within the directory you wish to clone qmk_firmware in.
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/qmk/qmk_firmware.git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Creating the mekanist dz60rgb firmware file
|
||||||
|
|
||||||
|
1. While in the `qmk_firmware` directory, issue the following command
|
||||||
|
|
||||||
|
```
|
||||||
|
make git-submodule
|
||||||
|
```
|
||||||
|
|
||||||
|
This will download the chibi-os submoduled needed to create firmware for ARM based boards such as the dz60rgb.
|
||||||
|
|
||||||
|
2. While in the `qmk_firmware` directory, issue the followng command
|
||||||
|
|
||||||
|
```
|
||||||
|
make dztech/dz60rgb:mekanist
|
||||||
|
```
|
||||||
|
|
||||||
|
This will result in a file called `dztech_dz60rgb_mekanist.bin` that you can flash onto your board using QMK Toolbox.
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define VENDOR_ID 0x20A0
|
||||||
|
#define PRODUCT_ID 0x422F
|
||||||
|
// TODO: share these strings with usbconfig.h
|
||||||
|
// Edit usbconfig.h to change these.
|
||||||
|
#define MANUFACTURER Gray Studio
|
||||||
|
#define PRODUCT HB85
|
||||||
|
|
||||||
|
/* matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
||||||
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define RGBLED_NUM 5
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
|
#define NO_UART 1
|
||||||
|
#define BOOTLOADHID_BOOTLOADER 1
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "rgblight.h"
|
||||||
|
|
||||||
|
#include "i2c.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
|
||||||
|
void rgblight_set(void) {
|
||||||
|
if (!rgblight_config.enable) {
|
||||||
|
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||||
|
led[i].r = 0;
|
||||||
|
led[i].g = 0;
|
||||||
|
led[i].b = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i2c_init();
|
||||||
|
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_init_ports(void) {
|
||||||
|
// initialize pins D0, D1, D4 and D6 as output
|
||||||
|
setPinOutput(D0);
|
||||||
|
setPinOutput(D1);
|
||||||
|
setPinOutput(D4);
|
||||||
|
setPinOutput(D6);
|
||||||
|
|
||||||
|
// turn RGB LEDs on
|
||||||
|
writePinHigh(D0);
|
||||||
|
writePinHigh(D1);
|
||||||
|
writePinHigh(D4);
|
||||||
|
writePinHigh(D6);
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_set(uint8_t level) {
|
||||||
|
if (level == 0) {
|
||||||
|
// turn RGB LEDs off
|
||||||
|
writePinLow(D0);
|
||||||
|
writePinLow(D1);
|
||||||
|
writePinLow(D4);
|
||||||
|
writePinLow(D6);
|
||||||
|
} else {
|
||||||
|
// turn RGB LEDs on
|
||||||
|
writePinHigh(D0);
|
||||||
|
writePinHigh(D1);
|
||||||
|
writePinHigh(D4);
|
||||||
|
writePinHigh(D6);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K12, K11, K10, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K13, \
|
||||||
|
K28, K27, K26, K25, K24, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K77, K76, K75, \
|
||||||
|
K43, K42, K41, K40, K39, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K74, K73, \
|
||||||
|
K57, K56, K55, K54, K53, K44, K45, K46, K47, K48, K49, K50, K51, K52, K88, K87, \
|
||||||
|
K72, K71, K70, K69, K68, K58, K59, K60, K61, K62, K63, K66, K64, K65, K67, K90, K89, \
|
||||||
|
K86, K85, K78, K79, K80, K81, K82, K83, K84, K91 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , KC_NO, K13 }, \
|
||||||
|
{ K14 , K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 }, \
|
||||||
|
{ K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , K42 , K43 }, \
|
||||||
|
{ K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , KC_NO, K52 , K53 , K54 , K55 , K56 , K57 }, \
|
||||||
|
{ K58 , K59 , K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 , K68 , K69 , K70 , K71 , K72 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K73 , K74 , K75 , K76 , K77 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, K78 , KC_NO, KC_NO, K79 , K80 , K81 , K82 , K83 , K84 , KC_NO, KC_NO, K85 , K86 , KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 , K88 , K89 , K90 , K91 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
// F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F2 F1 ESC FN
|
||||||
|
// 5 6 7 8 9 0 - = BS BS 4 3 2 1 ~
|
||||||
|
// T Y U I O P [ ] | PAD7 R E W Q Tab
|
||||||
|
// G H J K L ; ' ENTR PAD4 F D S A CAPS
|
||||||
|
// V B N M , . RSFT UP / PAD1 C X Z EUR2 LSFT
|
||||||
|
// PAD9 PAD8 PAD- PAD* PAD/
|
||||||
|
// SPC RALT RCTL LEFT DOWN RGHT PAD0 LALT LGUI
|
||||||
|
// PAD6 PAD5 PAD3 PAD2 PAD.
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Please do not modify this file
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/twi.h>
|
||||||
|
|
||||||
|
#include "i2c.h"
|
||||||
|
|
||||||
|
void i2c_set_bitrate(uint16_t bitrate_khz) {
|
||||||
|
uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
|
||||||
|
if (bitrate_div >= 16) {
|
||||||
|
bitrate_div = (bitrate_div - 16) / 2;
|
||||||
|
}
|
||||||
|
TWBR = bitrate_div;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_init(void) {
|
||||||
|
// set pull-up resistors on I2C bus pins
|
||||||
|
PORTC |= 0b11;
|
||||||
|
|
||||||
|
i2c_set_bitrate(400);
|
||||||
|
|
||||||
|
// enable TWI (two-wire interface)
|
||||||
|
TWCR |= (1 << TWEN);
|
||||||
|
|
||||||
|
// enable TWI interrupt and slave address ACK
|
||||||
|
TWCR |= (1 << TWIE);
|
||||||
|
TWCR |= (1 << TWEA);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t i2c_start(uint8_t address) {
|
||||||
|
// reset TWI control register
|
||||||
|
TWCR = 0;
|
||||||
|
|
||||||
|
// begin transmission and wait for it to end
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||||
|
while (!(TWCR & (1<<TWINT)));
|
||||||
|
|
||||||
|
// check if the start condition was successfully transmitted
|
||||||
|
if ((TWSR & 0xF8) != TW_START) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// transmit address and wait
|
||||||
|
TWDR = address;
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
while (!(TWCR & (1<<TWINT)));
|
||||||
|
|
||||||
|
// check if the device has acknowledged the READ / WRITE mode
|
||||||
|
uint8_t twst = TW_STATUS & 0xF8;
|
||||||
|
if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_stop(void) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t i2c_write(uint8_t data) {
|
||||||
|
TWDR = data;
|
||||||
|
|
||||||
|
// transmit data and wait
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
while (!(TWCR & (1<<TWINT)));
|
||||||
|
|
||||||
|
if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
|
||||||
|
if (i2c_start(address)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
|
if (i2c_write(data[i])) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i2c_stop();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Please do not modify this file
|
||||||
|
|
||||||
|
#ifndef __I2C_H__
|
||||||
|
#define __I2C_H__
|
||||||
|
|
||||||
|
void i2c_init(void);
|
||||||
|
void i2c_set_bitrate(uint16_t bitrate_khz);
|
||||||
|
uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
enum layers {
|
||||||
|
_BASE = 0, // Base
|
||||||
|
_CTRL // Multimedia and RGB
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_TGCT MO(_CTRL) // Toggles CTRL layer
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TGCT, \
|
||||||
|
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_P7 , KC_P8 , KC_P9 , \
|
||||||
|
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_P4 , KC_P5 , KC_P6 , \
|
||||||
|
KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , \
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_CTRL] = LAYOUT(
|
||||||
|
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
# Gray Studio HB85
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A HitBit MSX Computer inspired Keyboard.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
|
||||||
|
Hardware Supported: Gray Studio HB85
|
||||||
|
Hardware Availability: Group buy finished
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make hb85:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||||
|
|
||||||
|
|
||||||
|
ps2avrGB keyboard firmware
|
||||||
|
==========================
|
||||||
|
|
||||||
|
This keyboard uses the port of the QMK firmware for boards that are based on the
|
||||||
|
ps2avrGB firmware.
|
||||||
|
|
||||||
|
Note that this is a complete replacement for the firmware, so you won't be
|
||||||
|
using Bootmapper Client to change any keyboard settings, since not all the
|
||||||
|
USB report options are supported.
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
First, install the requirements. These commands are for OSX, but all you
|
||||||
|
need is the AVR toolchain and `bootloadHID` for flashing:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ brew cask install crosspack-avr
|
||||||
|
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
||||||
|
$ pip install pyusb
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, with the keyboard plugged in, simply run this command from the
|
||||||
|
`qmk_firmware` directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make hb85
|
||||||
|
$ bootloadHID -r hb85_default.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setting the board to bootloader mode
|
||||||
|
|
||||||
|
Hold the F3 key while plugging the USB cable.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
From my experience, it's really hard to brick these boards. But these
|
||||||
|
tricks have been useful when it got stuck in a weird scenario.
|
||||||
|
|
||||||
|
1. Try plugging the board in while holding the bootloader key. This will force
|
||||||
|
it to boot only the bootloader without loading the firmware. Once this is
|
||||||
|
done, just reflash the board with the original firmware.
|
||||||
|
2. Sometimes USB hubs can act weird, so try connecting the board directly
|
||||||
|
to your computer or plugging/unplugging the USB hub.
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Copyright 2017 Luiz Ribeiro <[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/>.
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
MCU = atmega32a
|
||||||
|
PROTOCOL = VUSB
|
||||||
|
|
||||||
|
# unsupported features for now
|
||||||
|
NO_UART = yes
|
||||||
|
NO_SUSPEND_POWER_DOWN = yes
|
||||||
|
|
||||||
|
# processor frequency
|
||||||
|
F_CPU = 12000000
|
||||||
|
|
||||||
|
# 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 = bootloadHID
|
||||||
|
|
||||||
|
# build options
|
||||||
|
BOOTMAGIC_ENABLE = full
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||||
|
|
||||||
|
OPT_DEFS = -DDEBUG_LEVEL=0
|
||||||
|
|
||||||
|
SRC += i2c.c
|
||||||
|
|
||||||
|
# programming options
|
||||||
|
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
|
||||||
@@ -0,0 +1,396 @@
|
|||||||
|
/* Name: usbconfig.h
|
||||||
|
* Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
|
||||||
|
* Author: Christian Starkjohann
|
||||||
|
* Creation Date: 2005-04-01
|
||||||
|
* Tabsize: 4
|
||||||
|
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
|
||||||
|
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
|
||||||
|
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __usbconfig_h_included__
|
||||||
|
#define __usbconfig_h_included__
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
General Description:
|
||||||
|
This file is an example configuration (with inline documentation) for the USB
|
||||||
|
driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
|
||||||
|
also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
|
||||||
|
wire the lines to any other port, as long as D+ is also wired to INT0 (or any
|
||||||
|
other hardware interrupt, as long as it is the highest level interrupt, see
|
||||||
|
section at the end of this file).
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ---------------------------- Hardware Config ---------------------------- */
|
||||||
|
|
||||||
|
#define USB_CFG_IOPORTNAME D
|
||||||
|
/* This is the port where the USB bus is connected. When you configure it to
|
||||||
|
* "B", the registers PORTB, PINB and DDRB will be used.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DMINUS_BIT 3
|
||||||
|
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
|
||||||
|
* This may be any bit in the port.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DPLUS_BIT 2
|
||||||
|
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
|
||||||
|
* This may be any bit in the port. Please note that D+ must also be connected
|
||||||
|
* to interrupt pin INT0! [You can also use other interrupts, see section
|
||||||
|
* "Optional MCU Description" below, or you can connect D- to the interrupt, as
|
||||||
|
* it is required if you use the USB_COUNT_SOF feature. If you use D- for the
|
||||||
|
* interrupt, the USB interrupt will also be triggered at Start-Of-Frame
|
||||||
|
* markers every millisecond.]
|
||||||
|
*/
|
||||||
|
#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
|
||||||
|
/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
|
||||||
|
* 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
|
||||||
|
* require no crystal, they tolerate +/- 1% deviation from the nominal
|
||||||
|
* frequency. All other rates require a precision of 2000 ppm and thus a
|
||||||
|
* crystal!
|
||||||
|
* Since F_CPU should be defined to your actual clock rate anyway, you should
|
||||||
|
* not need to modify this setting.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_CHECK_CRC 0
|
||||||
|
/* Define this to 1 if you want that the driver checks integrity of incoming
|
||||||
|
* data packets (CRC checks). CRC checks cost quite a bit of code size and are
|
||||||
|
* currently only available for 18 MHz crystal clock. You must choose
|
||||||
|
* USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ----------------------- Optional Hardware Config ------------------------ */
|
||||||
|
|
||||||
|
/* #define USB_CFG_PULLUP_IOPORTNAME D */
|
||||||
|
/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
|
||||||
|
* V+, you can connect and disconnect the device from firmware by calling
|
||||||
|
* the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
|
||||||
|
* This constant defines the port on which the pullup resistor is connected.
|
||||||
|
*/
|
||||||
|
/* #define USB_CFG_PULLUP_BIT 4 */
|
||||||
|
/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
|
||||||
|
* above) where the 1.5k pullup resistor is connected. See description
|
||||||
|
* above for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* --------------------------- Functional Range ---------------------------- */
|
||||||
|
|
||||||
|
#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
|
||||||
|
/* Define this to 1 if you want to compile a version with two endpoints: The
|
||||||
|
* default control endpoint 0 and an interrupt-in endpoint (any other endpoint
|
||||||
|
* number).
|
||||||
|
*/
|
||||||
|
#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
|
||||||
|
/* Define this to 1 if you want to compile a version with three endpoints: The
|
||||||
|
* default control endpoint 0, an interrupt-in endpoint 3 (or the number
|
||||||
|
* configured below) and a catch-all default interrupt-in endpoint as above.
|
||||||
|
* You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_EP3_NUMBER 3
|
||||||
|
/* If the so-called endpoint 3 is used, it can now be configured to any other
|
||||||
|
* endpoint number (except 0) with this macro. Default if undefined is 3.
|
||||||
|
*/
|
||||||
|
/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
|
||||||
|
/* The above macro defines the startup condition for data toggling on the
|
||||||
|
* interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
|
||||||
|
* Since the token is toggled BEFORE sending any data, the first packet is
|
||||||
|
* sent with the oposite value of this configuration!
|
||||||
|
*/
|
||||||
|
#define USB_CFG_IMPLEMENT_HALT 0
|
||||||
|
/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
|
||||||
|
* for endpoint 1 (interrupt endpoint). Although you may not need this feature,
|
||||||
|
* it is required by the standard. We have made it a config option because it
|
||||||
|
* bloats the code considerably.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_SUPPRESS_INTR_CODE 0
|
||||||
|
/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
|
||||||
|
* want to send any data over them. If this macro is defined to 1, functions
|
||||||
|
* usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
|
||||||
|
* you need the interrupt-in endpoints in order to comply to an interface
|
||||||
|
* (e.g. HID), but never want to send any data. This option saves a couple
|
||||||
|
* of bytes in flash memory and the transmit buffers in RAM.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_INTR_POLL_INTERVAL 1
|
||||||
|
/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
|
||||||
|
* interval. The value is in milliseconds and must not be less than 10 ms for
|
||||||
|
* low speed devices.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_IS_SELF_POWERED 0
|
||||||
|
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
|
||||||
|
* device is powered from the USB bus.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_MAX_BUS_POWER 500
|
||||||
|
/* Set this variable to the maximum USB bus power consumption of your device.
|
||||||
|
* The value is in milliamperes. [It will be divided by two since USB
|
||||||
|
* communicates power requirements in units of 2 mA.]
|
||||||
|
*/
|
||||||
|
#define USB_CFG_IMPLEMENT_FN_WRITE 1
|
||||||
|
/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
|
||||||
|
* transfers. Set it to 0 if you don't need it and want to save a couple of
|
||||||
|
* bytes.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_IMPLEMENT_FN_READ 0
|
||||||
|
/* Set this to 1 if you need to send control replies which are generated
|
||||||
|
* "on the fly" when usbFunctionRead() is called. If you only want to send
|
||||||
|
* data from a static buffer, set it to 0 and return the data from
|
||||||
|
* usbFunctionSetup(). This saves a couple of bytes.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
|
||||||
|
/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
|
||||||
|
* You must implement the function usbFunctionWriteOut() which receives all
|
||||||
|
* interrupt/bulk data sent to any endpoint other than 0. The endpoint number
|
||||||
|
* can be found in 'usbRxToken'.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_HAVE_FLOWCONTROL 0
|
||||||
|
/* Define this to 1 if you want flowcontrol over USB data. See the definition
|
||||||
|
* of the macros usbDisableAllRequests() and usbEnableAllRequests() in
|
||||||
|
* usbdrv.h.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DRIVER_FLASH_PAGE 0
|
||||||
|
/* If the device has more than 64 kBytes of flash, define this to the 64 k page
|
||||||
|
* where the driver's constants (descriptors) are located. Or in other words:
|
||||||
|
* Define this to 1 for boot loaders on the ATMega128.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_LONG_TRANSFERS 0
|
||||||
|
/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
|
||||||
|
* in a single control-in or control-out transfer. Note that the capability
|
||||||
|
* for long transfers increases the driver size.
|
||||||
|
*/
|
||||||
|
/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
|
||||||
|
/* This macro is a hook if you want to do unconventional things. If it is
|
||||||
|
* defined, it's inserted at the beginning of received message processing.
|
||||||
|
* If you eat the received message and don't want default processing to
|
||||||
|
* proceed, do a return after doing your things. One possible application
|
||||||
|
* (besides debugging) is to flash a status LED on each packet.
|
||||||
|
*/
|
||||||
|
/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
|
||||||
|
/* This macro is a hook if you need to know when an USB RESET occurs. It has
|
||||||
|
* one parameter which distinguishes between the start of RESET state and its
|
||||||
|
* end.
|
||||||
|
*/
|
||||||
|
/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
|
||||||
|
/* This macro (if defined) is executed when a USB SET_ADDRESS request was
|
||||||
|
* received.
|
||||||
|
*/
|
||||||
|
#define USB_COUNT_SOF 1
|
||||||
|
/* define this macro to 1 if you need the global variable "usbSofCount" which
|
||||||
|
* counts SOF packets. This feature requires that the hardware interrupt is
|
||||||
|
* connected to D- instead of D+.
|
||||||
|
*/
|
||||||
|
/* #ifdef __ASSEMBLER__
|
||||||
|
* macro myAssemblerMacro
|
||||||
|
* in YL, TCNT0
|
||||||
|
* sts timer0Snapshot, YL
|
||||||
|
* endm
|
||||||
|
* #endif
|
||||||
|
* #define USB_SOF_HOOK myAssemblerMacro
|
||||||
|
* This macro (if defined) is executed in the assembler module when a
|
||||||
|
* Start Of Frame condition is detected. It is recommended to define it to
|
||||||
|
* the name of an assembler macro which is defined here as well so that more
|
||||||
|
* than one assembler instruction can be used. The macro may use the register
|
||||||
|
* YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
|
||||||
|
* immediately after an SOF pulse may be lost and must be retried by the host.
|
||||||
|
* What can you do with this hook? Since the SOF signal occurs exactly every
|
||||||
|
* 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
|
||||||
|
* designs running on the internal RC oscillator.
|
||||||
|
* Please note that Start Of Frame detection works only if D- is wired to the
|
||||||
|
* interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
|
||||||
|
*/
|
||||||
|
#define USB_CFG_CHECK_DATA_TOGGLING 0
|
||||||
|
/* define this macro to 1 if you want to filter out duplicate data packets
|
||||||
|
* sent by the host. Duplicates occur only as a consequence of communication
|
||||||
|
* errors, when the host does not receive an ACK. Please note that you need to
|
||||||
|
* implement the filtering yourself in usbFunctionWriteOut() and
|
||||||
|
* usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
|
||||||
|
* for each control- and out-endpoint to check for duplicate packets.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
|
||||||
|
/* define this macro to 1 if you want the function usbMeasureFrameLength()
|
||||||
|
* compiled in. This function can be used to calibrate the AVR's RC oscillator.
|
||||||
|
*/
|
||||||
|
#define USB_USE_FAST_CRC 0
|
||||||
|
/* The assembler module has two implementations for the CRC algorithm. One is
|
||||||
|
* faster, the other is smaller. This CRC routine is only used for transmitted
|
||||||
|
* messages where timing is not critical. The faster routine needs 31 cycles
|
||||||
|
* per byte while the smaller one needs 61 to 69 cycles. The faster routine
|
||||||
|
* may be worth the 32 bytes bigger code size if you transmit lots of data and
|
||||||
|
* run the AVR close to its limit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* -------------------------- Device Description --------------------------- */
|
||||||
|
|
||||||
|
#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
|
||||||
|
/* USB vendor ID for the device, low byte first. If you have registered your
|
||||||
|
* own Vendor ID, define it here. Otherwise you may use one of obdev's free
|
||||||
|
* shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
|
||||||
|
* *** IMPORTANT NOTE ***
|
||||||
|
* This template uses obdev's shared VID/PID pair for Vendor Class devices
|
||||||
|
* with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
|
||||||
|
* the implications!
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
|
||||||
|
/* This is the ID of the product, low byte first. It is interpreted in the
|
||||||
|
* scope of the vendor ID. If you have registered your own VID with usb.org
|
||||||
|
* or if you have licensed a PID from somebody else, define it here. Otherwise
|
||||||
|
* you may use one of obdev's free shared VID/PID pairs. See the file
|
||||||
|
* USB-IDs-for-free.txt for details!
|
||||||
|
* *** IMPORTANT NOTE ***
|
||||||
|
* This template uses obdev's shared VID/PID pair for Vendor Class devices
|
||||||
|
* with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
|
||||||
|
* the implications!
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DEVICE_VERSION 0x00, 0x02
|
||||||
|
/* Version number of the device: Minor number first, then major number.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_VENDOR_NAME 'G', 'r', 'a', 'y', ' ', 'S', 't', 'u', 'd', 'i', 'o'
|
||||||
|
#define USB_CFG_VENDOR_NAME_LEN 11
|
||||||
|
/* These two values define the vendor name returned by the USB device. The name
|
||||||
|
* must be given as a list of characters under single quotes. The characters
|
||||||
|
* are interpreted as Unicode (UTF-16) entities.
|
||||||
|
* If you don't want a vendor name string, undefine these macros.
|
||||||
|
* ALWAYS define a vendor name containing your Internet domain name if you use
|
||||||
|
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
|
||||||
|
* details.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DEVICE_NAME 'H', 'B', '8', '5'
|
||||||
|
#define USB_CFG_DEVICE_NAME_LEN 4
|
||||||
|
/* Same as above for the device name. If you don't want a device name, undefine
|
||||||
|
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
|
||||||
|
* you use a shared VID/PID.
|
||||||
|
*/
|
||||||
|
/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
|
||||||
|
/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
|
||||||
|
/* Same as above for the serial number. If you don't want a serial number,
|
||||||
|
* undefine the macros.
|
||||||
|
* It may be useful to provide the serial number through other means than at
|
||||||
|
* compile time. See the section about descriptor properties below for how
|
||||||
|
* to fine tune control over USB descriptors such as the string descriptor
|
||||||
|
* for the serial number.
|
||||||
|
*/
|
||||||
|
#define USB_CFG_DEVICE_CLASS 0
|
||||||
|
#define USB_CFG_DEVICE_SUBCLASS 0
|
||||||
|
/* See USB specification if you want to conform to an existing device class.
|
||||||
|
* Class 0xff is "vendor specific".
|
||||||
|
*/
|
||||||
|
#define USB_CFG_INTERFACE_CLASS 3 /* HID */
|
||||||
|
#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
|
||||||
|
#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
|
||||||
|
/* See USB specification if you want to conform to an existing device class or
|
||||||
|
* protocol. The following classes must be set at interface level:
|
||||||
|
* HID class is 3, no subclass and protocol required (but may be useful!)
|
||||||
|
* CDC class is 2, use subclass 2 and protocol 1 for ACM
|
||||||
|
*/
|
||||||
|
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
|
||||||
|
/* Define this to the length of the HID report descriptor, if you implement
|
||||||
|
* an HID device. Otherwise don't define it or define it to 0.
|
||||||
|
* If you use this define, you must add a PROGMEM character array named
|
||||||
|
* "usbHidReportDescriptor" to your code which contains the report descriptor.
|
||||||
|
* Don't forget to keep the array and this define in sync!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define USB_PUBLIC static */
|
||||||
|
/* Use the define above if you #include usbdrv.c instead of linking against it.
|
||||||
|
* This technique saves a couple of bytes in flash memory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ------------------- Fine Control over USB Descriptors ------------------- */
|
||||||
|
/* If you don't want to use the driver's default USB descriptors, you can
|
||||||
|
* provide our own. These can be provided as (1) fixed length static data in
|
||||||
|
* flash memory, (2) fixed length static data in RAM or (3) dynamically at
|
||||||
|
* runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
|
||||||
|
* information about this function.
|
||||||
|
* Descriptor handling is configured through the descriptor's properties. If
|
||||||
|
* no properties are defined or if they are 0, the default descriptor is used.
|
||||||
|
* Possible properties are:
|
||||||
|
* + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
|
||||||
|
* at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
|
||||||
|
* used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
|
||||||
|
* you want RAM pointers.
|
||||||
|
* + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
|
||||||
|
* in static memory is in RAM, not in flash memory.
|
||||||
|
* + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
|
||||||
|
* the driver must know the descriptor's length. The descriptor itself is
|
||||||
|
* found at the address of a well known identifier (see below).
|
||||||
|
* List of static descriptor names (must be declared PROGMEM if in flash):
|
||||||
|
* char usbDescriptorDevice[];
|
||||||
|
* char usbDescriptorConfiguration[];
|
||||||
|
* char usbDescriptorHidReport[];
|
||||||
|
* char usbDescriptorString0[];
|
||||||
|
* int usbDescriptorStringVendor[];
|
||||||
|
* int usbDescriptorStringDevice[];
|
||||||
|
* int usbDescriptorStringSerialNumber[];
|
||||||
|
* Other descriptors can't be provided statically, they must be provided
|
||||||
|
* dynamically at runtime.
|
||||||
|
*
|
||||||
|
* Descriptor properties are or-ed or added together, e.g.:
|
||||||
|
* #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
|
||||||
|
*
|
||||||
|
* The following descriptors are defined:
|
||||||
|
* USB_CFG_DESCR_PROPS_DEVICE
|
||||||
|
* USB_CFG_DESCR_PROPS_CONFIGURATION
|
||||||
|
* USB_CFG_DESCR_PROPS_STRINGS
|
||||||
|
* USB_CFG_DESCR_PROPS_STRING_0
|
||||||
|
* USB_CFG_DESCR_PROPS_STRING_VENDOR
|
||||||
|
* USB_CFG_DESCR_PROPS_STRING_PRODUCT
|
||||||
|
* USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
|
||||||
|
* USB_CFG_DESCR_PROPS_HID
|
||||||
|
* USB_CFG_DESCR_PROPS_HID_REPORT
|
||||||
|
* USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
|
||||||
|
*
|
||||||
|
* Note about string descriptors: String descriptors are not just strings, they
|
||||||
|
* are Unicode strings prefixed with a 2 byte header. Example:
|
||||||
|
* int serialNumberDescriptor[] = {
|
||||||
|
* USB_STRING_DESCRIPTOR_HEADER(6),
|
||||||
|
* 'S', 'e', 'r', 'i', 'a', 'l'
|
||||||
|
* };
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define USB_CFG_DESCR_PROPS_DEVICE 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
|
||||||
|
//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_STRINGS 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_STRING_0 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
|
||||||
|
//#define USB_CFG_DESCR_PROPS_HID 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
|
||||||
|
//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
|
||||||
|
#define USB_CFG_DESCR_PROPS_UNKNOWN 0
|
||||||
|
|
||||||
|
#define usbMsgPtr_t unsigned short
|
||||||
|
/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
|
||||||
|
* a scalar type here because gcc generates slightly shorter code for scalar
|
||||||
|
* arithmetics than for pointer arithmetics. Remove this define for backward
|
||||||
|
* type compatibility or define it to an 8 bit type if you use data in RAM only
|
||||||
|
* and all RAM is below 256 bytes (tiny memory model in IAR CC).
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ----------------------- Optional MCU Description ------------------------ */
|
||||||
|
|
||||||
|
/* The following configurations have working defaults in usbdrv.h. You
|
||||||
|
* usually don't need to set them explicitly. Only if you want to run
|
||||||
|
* the driver on a device which is not yet supported or with a compiler
|
||||||
|
* which is not fully supported (such as IAR C) or if you use a differnt
|
||||||
|
* interrupt than INT0, you may have to define some of these.
|
||||||
|
*/
|
||||||
|
/* #define USB_INTR_CFG MCUCR */
|
||||||
|
/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
|
||||||
|
/* #define USB_INTR_CFG_CLR 0 */
|
||||||
|
/* #define USB_INTR_ENABLE GIMSK */
|
||||||
|
/* #define USB_INTR_ENABLE_BIT INT0 */
|
||||||
|
/* #define USB_INTR_PENDING GIFR */
|
||||||
|
/* #define USB_INTR_PENDING_BIT INTF0 */
|
||||||
|
/* #define USB_INTR_VECTOR INT0_vect */
|
||||||
|
|
||||||
|
/* Set INT1 for D- falling edge to count SOF */
|
||||||
|
/* #define USB_INTR_CFG EICRA */
|
||||||
|
#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
|
||||||
|
/* #define USB_INTR_CFG_CLR 0 */
|
||||||
|
/* #define USB_INTR_ENABLE EIMSK */
|
||||||
|
#define USB_INTR_ENABLE_BIT INT1
|
||||||
|
/* #define USB_INTR_PENDING EIFR */
|
||||||
|
#define USB_INTR_PENDING_BIT INTF1
|
||||||
|
#define USB_INTR_VECTOR INT1_vect
|
||||||
|
|
||||||
|
#endif /* __usbconfig_h_included__ */
|
||||||
@@ -20,4 +20,3 @@ When adding your keymap to this list, keep it organised alphabetically (select l
|
|||||||
# List of Planck keymaps
|
# List of Planck keymaps
|
||||||
|
|
||||||
* **default** default Planck layout
|
* **default** default Planck layout
|
||||||
* **cbbrowne** cbbrowne's Planck layout
|
|
||||||
@@ -6,35 +6,33 @@
|
|||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LAYOUT_5x6(\
|
#define LAYOUT_5x6(\
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
||||||
L42, L43, R42, R43, \
|
L42, L43, R42, R43, \
|
||||||
L44, L45, R40, R41, \
|
L44, L45, R40, R41, \
|
||||||
L54, L55, R50, R51, \
|
L54, L55, R50, R51, \
|
||||||
L52, L53, R52, R53 \
|
L52, L53, R52, R53 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ L00, L01, L02, L03, L04, L05 }, \
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
{ L10, L11, L12, L13, L14, L15 }, \
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
{ L20, L21, L22, L23, L24, L25 }, \
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
{ L30, L31, L32, L33, L34, L35 }, \
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
{ KC_NO, KC_NO, L42, L43, L44, L45 }, \
|
{ KC_NO, KC_NO, L42, L43, L44, L45 }, \
|
||||||
{ KC_NO, KC_NO, L52, L53, L54, L55 }, \
|
{ KC_NO, KC_NO, L52, L53, L54, L55 }, \
|
||||||
\
|
\
|
||||||
{ R00, R01, R02, R03, R04, R05 }, \
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
{ R10, R11, R12, R13, R14, R15 }, \
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
{ R20, R21, R22, R23, R24, R25 }, \
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
{ R30, R31, R32, R33, R34, R35 }, \
|
{ R30, R31, R32, R33, R34, R35 }, \
|
||||||
{ R40, R41, R42, R43, KC_NO, KC_NO },\
|
{ R40, R41, R42, R43, KC_NO, KC_NO }, \
|
||||||
{ R50, R51, R52, R53, KC_NO, KC_NO }, \
|
{ R50, R51, R52, R53, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"width": 17,
|
"width": 17,
|
||||||
"height": 8,
|
"height": 8,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_5x6": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"L00", "x":0, "y":0},
|
{"label":"L00", "x":0, "y":0},
|
||||||
{"label":"L01", "x":1, "y":0},
|
{"label":"L01", "x":1, "y":0},
|
||||||
|
|||||||
@@ -6,40 +6,40 @@
|
|||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
#include <avR/io.h>
|
#include <avR/io.h>
|
||||||
#include <avR/inteRRupt.h>
|
#include <avR/inteRRupt.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LAYOUT_5x7( \
|
#define LAYOUT_5x7( \
|
||||||
L11, L12, L13, L14, L15, L16, L17, \
|
L11, L12, L13, L14, L15, L16, L17, \
|
||||||
L21, L22, L23, L24, L25, L26, L27, \
|
L21, L22, L23, L24, L25, L26, L27, \
|
||||||
L31, L32, L33, L34, L35, L36, L37, \
|
L31, L32, L33, L34, L35, L36, L37, \
|
||||||
L41, L42, L43, L44, L45, L46, \
|
L41, L42, L43, L44, L45, L46, \
|
||||||
L51, L52, L53, L54, \
|
L51, L52, L53, L54, \
|
||||||
L55, L56, \
|
L55, L56, \
|
||||||
L65, L66, \
|
L65, L66, \
|
||||||
L63, L64, \
|
L63, L64, \
|
||||||
R11, R12, R13, R14, R15, R16, R17, \
|
R11, R12, R13, R14, R15, R16, R17, \
|
||||||
R21, R22, R23, R24, R25, R26, R27, \
|
R21, R22, R23, R24, R25, R26, R27, \
|
||||||
R31, R32, R33, R34, R35, R36, R37, \
|
R31, R32, R33, R34, R35, R36, R37, \
|
||||||
R42, R43, R44, R45, R46, R47, \
|
R42, R43, R44, R45, R46, R47, \
|
||||||
R54, R55, R56, R57, \
|
R54, R55, R56, R57, \
|
||||||
R52, R53, \
|
R52, R53, \
|
||||||
R62, R63, \
|
R62, R63, \
|
||||||
R64, R65 \
|
R64, R65 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ L11, L12, L13, L14, L15, L16, L17 }, \
|
{ L11, L12, L13, L14, L15, L16, L17 }, \
|
||||||
{ L21, L22, L23, L24, L25, L26, L27 }, \
|
{ L21, L22, L23, L24, L25, L26, L27 }, \
|
||||||
{ L31, L32, L33, L34, L35, L36, L37 }, \
|
{ L31, L32, L33, L34, L35, L36, L37 }, \
|
||||||
{ L41, L42, L43, L44, L45, L46, KC_NO }, \
|
{ L41, L42, L43, L44, L45, L46, KC_NO }, \
|
||||||
{ L51, L52, L53, L54, L55, L56, KC_NO }, \
|
{ L51, L52, L53, L54, L55, L56, KC_NO }, \
|
||||||
{ KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \
|
{ KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \
|
||||||
{ R11, R12, R13, R14, R15, R16, R17 }, \
|
{ R11, R12, R13, R14, R15, R16, R17 }, \
|
||||||
{ R21, R22, R23, R24, R25, R26, R27 }, \
|
{ R21, R22, R23, R24, R25, R26, R27 }, \
|
||||||
{ R31, R32, R33, R34, R35, R36, R37 }, \
|
{ R31, R32, R33, R34, R35, R36, R37 }, \
|
||||||
{ KC_NO, R42, R43, R44, R45, R46, R47 }, \
|
{ KC_NO, R42, R43, R44, R45, R46, R47 }, \
|
||||||
{ KC_NO, R52, R53, R54, R55, R56, R57 }, \
|
{ KC_NO, R52, R53, R54, R55, R56, R57 }, \
|
||||||
{ KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \
|
{ KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 17,
|
"width": 17,
|
||||||
"height": 16,
|
"height": 8,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_5x7": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"L11", "x":0, "y":0},
|
{"label":"L11", "x":0, "y":0},
|
||||||
{"label":"L12", "x":1, "y":0},
|
{"label":"L12", "x":1, "y":0},
|
||||||
|
|||||||
@@ -7,38 +7,36 @@
|
|||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LAYOUT_6x6(\
|
#define LAYOUT_6x6(\
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
||||||
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \
|
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \
|
||||||
L52, L53, R52, R53, \
|
L52, L53, R52, R53, \
|
||||||
L54, L55, R50, R51, \
|
L54, L55, R50, R51, \
|
||||||
L64, L65, R60, R61, \
|
L64, L65, R60, R61, \
|
||||||
L62, L63, R62, R63 \
|
L62, L63, R62, R63 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ L00, L01, L02, L03, L04, L05 }, \
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
{ L10, L11, L12, L13, L14, L15 }, \
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
{ L20, L21, L22, L23, L24, L25 }, \
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
{ L30, L31, L32, L33, L34, L35 }, \
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
{ L40, L41, L42, L43, L44, L45 }, \
|
{ L40, L41, L42, L43, L44, L45 }, \
|
||||||
{ KC_NO, KC_NO, L52, L53, L54, L55 }, \
|
{ KC_NO, KC_NO, L52, L53, L54, L55 }, \
|
||||||
{ KC_NO, KC_NO, L62, L63, L64, L65 }, \
|
{ KC_NO, KC_NO, L62, L63, L64, L65 }, \
|
||||||
\
|
\
|
||||||
{ R00, R01, R02, R03, R04, R05 }, \
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
{ R10, R11, R12, R13, R14, R15 }, \
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
{ R20, R21, R22, R23, R24, R25 }, \
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
{ R30, R31, R32, R33, R34, R35 }, \
|
{ R30, R31, R32, R33, R34, R35 }, \
|
||||||
{ R40, R41, R42, R43, R44, R45 }, \
|
{ R40, R41, R42, R43, R44, R45 }, \
|
||||||
{ R50, R51, R52, R53, KC_NO, KC_NO },\
|
{ R50, R51, R52, R53, KC_NO, KC_NO }, \
|
||||||
{ R60, R61, R62, R63, KC_NO, KC_NO }, \
|
{ R60, R61, R62, R63, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"width": 17,
|
"width": 17,
|
||||||
"height": 9,
|
"height": 9,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_6x6": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"L00", "x":0, "y":0},
|
{"label":"L00", "x":0, "y":0},
|
||||||
{"label":"L01", "x":1, "y":0},
|
{"label":"L01", "x":1, "y":0},
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
#define MATRIX_COLS 12
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
/* pro_micro pin-out */
|
/* pro_micro pin-out */
|
||||||
#define MATRIX_ROW_PINS { B4, B5, B6, B2 }
|
#define MATRIX_ROW_PINS { D7, E6, B6, B2 }
|
||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* leds */
|
/* leds */
|
||||||
#define QMK_LED E6
|
#define QMK_LED B4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B5
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW or ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-
|
|||||||
|
|
||||||
| Rows | 0 | 1 | 2 | 3 |
|
| Rows | 0 | 1 | 2 | 3 |
|
||||||
|-------------|----|----|----|----|
|
|-------------|----|----|----|----|
|
||||||
| Arduino pin | 8 | 9 | 10 | 16 |
|
| Arduino pin | 6 | 7 | 10 | 16 |
|
||||||
| QMK pin | B4 | B5 | B6 | B2 |
|
| QMK pin | D7 | E6 | B6 | B2 |
|
||||||
|
|
||||||
| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|
| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|
||||||
|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----|
|
|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----|
|
||||||
@@ -22,8 +22,8 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-
|
|||||||
|
|
||||||
| | QMK led | Backlight |
|
| | QMK led | Backlight |
|
||||||
|-------------|-----------|-----------|
|
|-------------|-----------|-----------|
|
||||||
| Arduino pin | 7 | 6 |
|
| Arduino pin | 8 | 9 |
|
||||||
| QMK pin | E6 | D7 |
|
| QMK pin | B4 | B5 |
|
||||||
|
|
||||||
### Compiling the Firmware
|
### Compiling the Firmware
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# IBM Trackpoint demonstration
|
|
||||||
|
|
||||||
This is just a simple demo to show how to integrate IBM Trackpoint in QMK.
|
|
||||||
|
|
||||||
Wiring used in the demonstration:
|
|
||||||

|
|
||||||
|
|
||||||
Some documentation:
|
|
||||||
* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint)
|
|
||||||
* [QMK documentation](https://docs.qmk.fm/)
|
|
||||||
@@ -1,70 +1,67 @@
|
|||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
#define VENDOR_ID 0x1234
|
#define VENDOR_ID 0x1234
|
||||||
#define PRODUCT_ID 0x5678
|
#define PRODUCT_ID 0x5678
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER QMK
|
#define MANUFACTURER QMK
|
||||||
#define PRODUCT TRACKPOINT-DEMO
|
#define PRODUCT TRACKPOINT-DEMO
|
||||||
#define DESCRIPTION Simple demonstration for IBM Trackpoint integration
|
#define DESCRIPTION Simple demonstration for IBM Trackpoint integration
|
||||||
|
|
||||||
#define MATRIX_ROWS 1
|
#define MATRIX_ROWS 1
|
||||||
#define MATRIX_COLS 3
|
#define MATRIX_COLS 3
|
||||||
|
|
||||||
#ifdef PS2_USE_USART
|
#ifdef PS2_USE_USART
|
||||||
#define PS2_CLOCK_PORT PORTD
|
#define PS2_CLOCK_PORT PORTD
|
||||||
#define PS2_CLOCK_PIN PIND
|
#define PS2_CLOCK_PIN PIND
|
||||||
#define PS2_CLOCK_DDR DDRD
|
#define PS2_CLOCK_DDR DDRD
|
||||||
#define PS2_CLOCK_BIT 5
|
#define PS2_CLOCK_BIT 5
|
||||||
#define PS2_DATA_PORT PORTD
|
#define PS2_DATA_PORT PORTD
|
||||||
#define PS2_DATA_PIN PIND
|
#define PS2_DATA_PIN PIND
|
||||||
#define PS2_DATA_DDR DDRD
|
#define PS2_DATA_DDR DDRD
|
||||||
#define PS2_DATA_BIT 2
|
#define PS2_DATA_BIT 2
|
||||||
|
|
||||||
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
|
|
||||||
/* set DDR of CLOCK as input to be slave */
|
|
||||||
#define PS2_USART_INIT() do { \
|
|
||||||
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
|
|
||||||
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
|
|
||||||
UCSR1C = ((1 << UMSEL10) | \
|
|
||||||
(3 << UPM10) | \
|
|
||||||
(0 << USBS1) | \
|
|
||||||
(3 << UCSZ10) | \
|
|
||||||
(0 << UCPOL1)); \
|
|
||||||
UCSR1A = 0; \
|
|
||||||
UBRR1H = 0; \
|
|
||||||
UBRR1L = 0; \
|
|
||||||
} while (0)
|
|
||||||
#define PS2_USART_RX_INT_ON() do { \
|
|
||||||
UCSR1B = ((1 << RXCIE1) | \
|
|
||||||
(1 << RXEN1)); \
|
|
||||||
} while (0)
|
|
||||||
#define PS2_USART_RX_POLL_ON() do { \
|
|
||||||
UCSR1B = (1 << RXEN1); \
|
|
||||||
} while (0)
|
|
||||||
#define PS2_USART_OFF() do { \
|
|
||||||
UCSR1C = 0; \
|
|
||||||
UCSR1B &= ~((1 << RXEN1) | \
|
|
||||||
(1 << TXEN1)); \
|
|
||||||
} while (0)
|
|
||||||
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
|
|
||||||
#define PS2_USART_RX_DATA UDR1
|
|
||||||
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
|
||||||
#define PS2_USART_RX_VECT USART1_RX_vect
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MATRIX_COL_PINS { F1, F4, F5 }
|
|
||||||
#define MATRIX_ROW_PINS { F0 }
|
|
||||||
#define UNUSED_PINS
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
#define DEBOUNCING_DELAY 5
|
|
||||||
|
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
|
||||||
#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
|
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
|
||||||
|
/* set DDR of CLOCK as input to be slave */
|
||||||
|
#define PS2_USART_INIT() do { \
|
||||||
|
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
|
||||||
|
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
|
||||||
|
UCSR1C = ((1 << UMSEL10) | \
|
||||||
|
(3 << UPM10) | \
|
||||||
|
(0 << USBS1) | \
|
||||||
|
(3 << UCSZ10) | \
|
||||||
|
(0 << UCPOL1)); \
|
||||||
|
UCSR1A = 0; \
|
||||||
|
UBRR1H = 0; \
|
||||||
|
UBRR1L = 0; \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_INT_ON() do { \
|
||||||
|
UCSR1B = ((1 << RXCIE1) | \
|
||||||
|
(1 << RXEN1)); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_POLL_ON() do { \
|
||||||
|
UCSR1B = (1 << RXEN1); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_OFF() do { \
|
||||||
|
UCSR1C = 0; \
|
||||||
|
UCSR1B &= ~((1 << RXEN1) | \
|
||||||
|
(1 << TXEN1)); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
|
||||||
|
#define PS2_USART_RX_DATA UDR1
|
||||||
|
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
||||||
|
#define PS2_USART_RX_VECT USART1_RX_vect
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { F1, F4, F5 }
|
||||||
|
#define MATRIX_ROW_PINS { F0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "trackpoint.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = KEYMAP(
|
[0] = LAYOUT(
|
||||||
KC_BTN1, KC_BTN3, KC_BTN2 \
|
KC_BTN1, KC_BTN3, KC_BTN2 \
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# IBM Trackpoint demonstration
|
||||||
|
|
||||||
|
This is just a simple demo to show how to integrate IBM Trackpoint in QMK.
|
||||||
|
|
||||||
|
Wiring used in the demonstration:
|
||||||
|

|
||||||
|
|
||||||
|
Some documentation:
|
||||||
|
|
||||||
|
- [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint)
|
||||||
|
|
||||||
|
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||||
|
Hardware Supported: Teensy
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/trackpoint:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
#ifndef TRACKPOINT_H
|
#pragma once
|
||||||
#define TRACKPOINT_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
k00, k01, k02 \
|
k00, k01, k02 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ k00, k01, k02} \
|
{ k00, k01, k02} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[3] = LAYOUT_60_ansi(
|
[3] = LAYOUT_60_ansi(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||||
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
||||||
TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, _______,
|
TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______)
|
_______, _______, _______, _______, _______, _______, _______, _______)
|
||||||
};
|
};
|
||||||
@@ -65,6 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// S2_INC, S2_DEC, // Color 2 saturation increase/decrease
|
// S2_INC, S2_DEC, // Color 2 saturation increase/decrease
|
||||||
// BR_INC, BR_DEC, // backlight brightness increase/decrease
|
// BR_INC, BR_DEC, // backlight brightness increase/decrease
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -61,6 +61,6 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
|
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
|
||||||
#SERIAL_LINK_ENABLE = yes
|
#SERIAL_LINK_ENABLE = yes
|
||||||
|
|
||||||
RAW_ENABLE = yes
|
RAW_ENABLE = no
|
||||||
DYNAMIC_KEYMAP_ENABLE = yes
|
DYNAMIC_KEYMAP_ENABLE = no
|
||||||
CIE1931_CURVE = yes
|
CIE1931_CURVE = yes
|
||||||
@@ -56,9 +56,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
* │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │
|
* │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │
|
||||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||||
* │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │
|
* │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │
|
||||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||||
* │ │ │ MW↓ │MAcl2│ │
|
* │DPR│DstNA│ MW↓ │MAcl2│ │
|
||||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||||
*/
|
*/
|
||||||
[L_FN] = LAYOUT(
|
[L_FN] = LAYOUT(
|
||||||
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL,
|
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
|
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
|
||||||
XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
XXXXXXX, DST_P_R, DST_N_A, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* RCtrl layer
|
/* RCtrl layer
|
||||||
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||||
* │Dst│Dstp←│ │Dstp→│ │
|
* │DtR│DstA │ │ │ │
|
||||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||||
*/
|
*/
|
||||||
[L_RCTRL] = LAYOUT(
|
[L_RCTRL] = LAYOUT(
|
||||||
@@ -87,6 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR,
|
_______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR,
|
||||||
_______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
XXXXXXX, DESKTOP, DSKTP_L, _______, DSKTP_R, _______, XXXXXXX
|
XXXXXXX, DST_REM, DST_ADD, _______, _______, _______, XXXXXXX
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@@ -1,2 +1,11 @@
|
|||||||
|
BOOTMAGIC_ENABLE = no
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
UNICODEMAP_ENABLE = yes
|
||||||
|
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 MechMerlin
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Mechkeys
|
||||||
|
#define PRODUCT mechkeys mk60
|
||||||
|
#define DESCRIPTION A custom 60% keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||||
|
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E6
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
/*== all animations enable ==*/
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
/*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "MK60",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 68,
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00", "x":0, "y":0},
|
||||||
|
{"label":"K01", "x":1, "y":0},
|
||||||
|
{"label":"K02", "x":2, "y":0},
|
||||||
|
{"label":"K03", "x":3, "y":0},
|
||||||
|
{"label":"K04", "x":4, "y":0},
|
||||||
|
{"label":"K05", "x":5, "y":0},
|
||||||
|
{"label":"K06", "x":6, "y":0},
|
||||||
|
{"label":"K07", "x":7, "y":0},
|
||||||
|
{"label":"K08", "x":8, "y":0},
|
||||||
|
{"label":"K09", "x":9, "y":0},
|
||||||
|
{"label":"K0A", "x":10, "y":0},
|
||||||
|
{"label":"K0B", "x":11, "y":0},
|
||||||
|
{"label":"K0C", "x":12, "y":0},
|
||||||
|
{"label":"K0D", "x":13, "y":0},
|
||||||
|
{"label":"K0E", "x":14, "y":0},
|
||||||
|
{"label":"K10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"K12", "x":1.5, "y":1},
|
||||||
|
{"label":"K13", "x":2.5, "y":1},
|
||||||
|
{"label":"K14", "x":3.5, "y":1},
|
||||||
|
{"label":"K15", "x":4.5, "y":1},
|
||||||
|
{"label":"K16", "x":5.5, "y":1},
|
||||||
|
{"label":"K17", "x":6.5, "y":1},
|
||||||
|
{"label":"K18", "x":7.5, "y":1},
|
||||||
|
{"label":"K19", "x":8.5, "y":1},
|
||||||
|
{"label":"K1A", "x":9.5, "y":1},
|
||||||
|
{"label":"K1B", "x":10.5, "y":1},
|
||||||
|
{"label":"K1C", "x":11.5, "y":1},
|
||||||
|
{"label":"K1D", "x":12.5, "y":1},
|
||||||
|
{"label":"K1E", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"K20", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"K22", "x":1.75, "y":2},
|
||||||
|
{"label":"K23", "x":2.75, "y":2},
|
||||||
|
{"label":"K24", "x":3.75, "y":2},
|
||||||
|
{"label":"K25", "x":4.75, "y":2},
|
||||||
|
{"label":"K26", "x":5.75, "y":2},
|
||||||
|
{"label":"K27", "x":6.75, "y":2},
|
||||||
|
{"label":"K28", "x":7.75, "y":2},
|
||||||
|
{"label":"K29", "x":8.75, "y":2},
|
||||||
|
{"label":"K2A", "x":9.75, "y":2},
|
||||||
|
{"label":"K2B", "x":10.75, "y":2},
|
||||||
|
{"label":"K2C", "x":11.75, "y":2},
|
||||||
|
{"label":"K2D", "x":12.75, "y":2, "w":2.25},
|
||||||
|
{"label":"K30", "x":0, "y":3},
|
||||||
|
{"label":"K31", "x":1, "y":3},
|
||||||
|
{"label":"K32", "x":2, "y":3},
|
||||||
|
{"label":"K33", "x":3, "y":3},
|
||||||
|
{"label":"K34", "x":4, "y":3},
|
||||||
|
{"label":"K35", "x":5, "y":3},
|
||||||
|
{"label":"K36", "x":6, "y":3},
|
||||||
|
{"label":"K37", "x":7, "y":3},
|
||||||
|
{"label":"K38", "x":8, "y":3},
|
||||||
|
{"label":"K39", "x":9, "y":3},
|
||||||
|
{"label":"K3A", "x":10, "y":3},
|
||||||
|
{"label":"K3B", "x":11, "y":3},
|
||||||
|
{"label":"K3C", "x":12, "y":3},
|
||||||
|
{"label":"K3D", "x":13, "y":3},
|
||||||
|
{"label":"K3E", "x":14, "y":3},
|
||||||
|
{"label":"K40", "x":0, "y":4, "w":1.75},
|
||||||
|
{"label":"K42", "x":1.75, "y":4, "w":1.25},
|
||||||
|
{"label":"K43", "x":3, "y":4, "w":1.25},
|
||||||
|
{"label":"K44", "x":4.25, "y":4, "w":1.25},
|
||||||
|
{"label":"K47", "x":5.5, "y":4, "w":3},
|
||||||
|
{"label":"K49", "x":8.5, "y":4, "w":1.5},
|
||||||
|
{"label":"K4A", "x":10, "y":4},
|
||||||
|
{"label":"K4B", "x":11, "y":4},
|
||||||
|
{"label":"K4C", "x":12, "y":4},
|
||||||
|
{"label":"K4D", "x":13, "y":4},
|
||||||
|
{"label":"K4E", "x":14, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
QMKBEST = SAFE_RANGE,
|
||||||
|
QMKURL
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT( \
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, \
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, \
|
||||||
|
KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, \
|
||||||
|
MO(1), KC_SPC, KC_RALT, KC_PGUP, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
[1] = LAYOUT( \
|
||||||
|
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_DEL, KC_TRNS, \
|
||||||
|
BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, \
|
||||||
|
RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QMKBEST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode QMKBEST is pressed
|
||||||
|
SEND_STRING("QMK is the best thing ever!");
|
||||||
|
} else {
|
||||||
|
// when keycode QMKBEST is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case QMKURL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode QMKURL is pressed
|
||||||
|
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||||
|
} else {
|
||||||
|
// when keycode QMKURL is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for mk60
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "mk60.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
setPinOutput(B7);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){
|
||||||
|
writePinLow(B7);
|
||||||
|
}else {
|
||||||
|
writePinHigh(B7);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \
|
||||||
|
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
|
||||||
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
|
||||||
|
k40, k42, k43, k44, k47, k49, k4A, k4B, k4C, k4D, k4E \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E}, \
|
||||||
|
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E}, \
|
||||||
|
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO}, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E}, \
|
||||||
|
{ k40, KC_NO, k42, k43, k44, KC_NO, KC_NO, k47, KC_NO, k49, k4A, k4B, k4C, k4D, k4E}, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# mechkeys mk60
|
||||||
|
|
||||||
|
60% keyboard with RGB underglow and backlights
|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
Hardware Supported: MK60
|
||||||
|
Hardware Availability: The MK60 was discontinued by [mechkeys.ca](https://mechkeys.ca/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make mk60:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define LAYER_FN
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "konstantin.h"
|
||||||
|
|
||||||
|
static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW };
|
||||||
|
static size_t cnum = sizeof colors / sizeof *colors;
|
||||||
|
static size_t cidx = 0;
|
||||||
|
|
||||||
|
void eeconfig_init_keymap(void) {
|
||||||
|
rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum keycodes_keymap {
|
||||||
|
RGB_SET = RANGE_KEYMAP,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RGB_SET:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
cidx = (cidx + 1) % cnum;
|
||||||
|
rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│Hom│End│PgU│PgD│
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Del│NLk│P/ │P* │P- │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │P7 │P8 │P9 │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │
|
||||||
|
* │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
||||||
|
* │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│
|
||||||
|
* │LCtl│LGui│LAlt│ Space │RAlGu│RCtrl│ ← │ ↓ │ → │P0 │P. │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[L_BASE] = LAYOUT( \
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX,
|
||||||
|
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤
|
||||||
|
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│
|
||||||
|
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
||||||
|
* │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤RMP│
|
||||||
|
* │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│RM-│RM+│ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[L_FN] = LAYOUT( \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS,
|
||||||
|
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX,
|
||||||
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET,
|
||||||
|
_______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX,
|
||||||
|
_______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
BOOTMAGIC_ENABLE = no
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
UNICODEMAP_ENABLE = yes
|
||||||
|
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
enum custom_layers {
|
enum my_layers {
|
||||||
_CMK_DHM,
|
_CMK_DHM,
|
||||||
_QWERTY,
|
_QWERTY,
|
||||||
_SYS,
|
_SYS,
|
||||||
@@ -15,7 +15,7 @@ enum custom_layers {
|
|||||||
_SYM
|
_SYM
|
||||||
};
|
};
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum my_keycodes {
|
||||||
CMK_DHM = SAFE_RANGE,
|
CMK_DHM = SAFE_RANGE,
|
||||||
QWERTY,
|
QWERTY,
|
||||||
SYS,
|
SYS,
|
||||||
@@ -25,34 +25,30 @@ enum custom_keycodes {
|
|||||||
SYM
|
SYM
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
enum td_keycodes {
|
||||||
bool is_press_action;
|
ALT_LP,
|
||||||
int state;
|
CTL_RCB,
|
||||||
} tap;
|
GUI_RP,
|
||||||
|
SFT_LCB,
|
||||||
enum {
|
|
||||||
SINGLE_TAP = 1,
|
|
||||||
SINGLE_HOLD = 2,
|
|
||||||
DOUBLE_SINGLE_TAP = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ALT_OP = 0,
|
|
||||||
CTL_CCB,
|
|
||||||
GUI_CP,
|
|
||||||
SFT_OCB,
|
|
||||||
SFT_PLS
|
SFT_PLS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SINGLE_TAP,
|
||||||
|
SINGLE_HOLD,
|
||||||
|
DOUBLE_SINGLE_TAP
|
||||||
|
} td_state_t;
|
||||||
|
|
||||||
|
static td_state_t td_state;
|
||||||
int cur_dance (qk_tap_dance_state_t *state);
|
int cur_dance (qk_tap_dance_state_t *state);
|
||||||
void altop_finished (qk_tap_dance_state_t *state, void *user_data);
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void altop_reset (qk_tap_dance_state_t *state, void *user_data);
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data);
|
void ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data);
|
void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void guicp_finished (qk_tap_dance_state_t *state, void *user_data);
|
void guirp_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void guicp_reset (qk_tap_dance_state_t *state, void *user_data);
|
void guirp_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void sftocb_finished (qk_tap_dance_state_t *state, void *user_data);
|
void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void sftocb_reset (qk_tap_dance_state_t *state, void *user_data);
|
void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void sftpls_finished (qk_tap_dance_state_t *state, void *user_data);
|
void sftpls_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void sftpls_reset (qk_tap_dance_state_t *state, void *user_data);
|
void sftpls_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
@@ -62,7 +58,7 @@ void sftpls_reset (qk_tap_dance_state_t *state, void *user_data);
|
|||||||
#define ALT_D LALT_T(KC_D)
|
#define ALT_D LALT_T(KC_D)
|
||||||
#define ALT_E LALT_T(KC_E)
|
#define ALT_E LALT_T(KC_E)
|
||||||
#define ALT_K LALT_T(KC_K)
|
#define ALT_K LALT_T(KC_K)
|
||||||
#define ALT_OB LALT_T(KC_LBRC)
|
#define ALT_LB LALT_T(KC_LBRC)
|
||||||
#define ALT_S LALT_T(KC_S)
|
#define ALT_S LALT_T(KC_S)
|
||||||
#define CTRL_2 LCTL_T(KC_2)
|
#define CTRL_2 LCTL_T(KC_2)
|
||||||
#define CTRL_4 LCTL_T(KC_4)
|
#define CTRL_4 LCTL_T(KC_4)
|
||||||
@@ -77,7 +73,7 @@ void sftpls_reset (qk_tap_dance_state_t *state, void *user_data);
|
|||||||
#define GUI_1 LGUI_T(KC_1)
|
#define GUI_1 LGUI_T(KC_1)
|
||||||
#define GUI_4 LGUI_T(KC_4)
|
#define GUI_4 LGUI_T(KC_4)
|
||||||
#define GUI_7 LGUI_T(KC_7)
|
#define GUI_7 LGUI_T(KC_7)
|
||||||
#define GUI_CB LGUI_T(KC_RBRC)
|
#define GUI_RB LGUI_T(KC_RBRC)
|
||||||
#define GUI_F LGUI_T(KC_F)
|
#define GUI_F LGUI_T(KC_F)
|
||||||
#define GUI_J LGUI_T(KC_J)
|
#define GUI_J LGUI_T(KC_J)
|
||||||
#define GUI_N LGUI_T(KC_N)
|
#define GUI_N LGUI_T(KC_N)
|
||||||
@@ -153,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here.
|
* If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here.
|
||||||
*
|
*
|
||||||
* ,----------------------------------. ,----------------------------------.
|
* ,----------------------------------. ,----------------------------------.
|
||||||
* | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++| | |
|
* | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++|BRITE-|BRITE+|
|
||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
* | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY |
|
* | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY |
|
||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
@@ -201,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
* | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6|
|
* | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6|
|
||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
* | | | F11 | F12 | BSPC | | DEL |NUM LK| | | |
|
* | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / |
|
||||||
* `----------------------------------' `----------------------------------'
|
* `----------------------------------' `----------------------------------'
|
||||||
* ,--------------------. ,--------------------.
|
* ,--------------------. ,--------------------.
|
||||||
* | | TAB | | | | | |
|
* | | TAB | | | | | |
|
||||||
@@ -212,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_NUM_E] = LAYOUT( \
|
[_NUM_E] = LAYOUT( \
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||||
SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \
|
SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \
|
||||||
KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \
|
KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, KC_SLSH, \
|
||||||
_______, KC_TAB, KC_ESC, _______, _______, _______ \
|
_______, KC_TAB, KC_ESC, _______, _______, _______ \
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -223,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
* | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0|
|
* | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0|
|
||||||
* |------+------+------+------+------| |------+------+------+------+------|
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
* | | | F11 | F12 | BSPC | | DEL |NUM LK| | | |
|
* | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / |
|
||||||
* `----------------------------------' `----------------------------------'
|
* `----------------------------------' `----------------------------------'
|
||||||
* ,--------------------. ,--------------------.
|
* ,--------------------. ,--------------------.
|
||||||
* | | TAB | | | | | |
|
* | | TAB | | | | | |
|
||||||
@@ -232,10 +228,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `------' `------'
|
* `------' `------'
|
||||||
*/
|
*/
|
||||||
[_NUM_N] = LAYOUT( \
|
[_NUM_N] = LAYOUT( \
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||||
SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \
|
SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \
|
||||||
KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \
|
KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, KC_SLSH, \
|
||||||
_______, KC_TAB, KC_ESC, _______, _______, _______ \
|
_______, KC_TAB, KC_ESC, _______, _______, _______ \
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
@@ -256,7 +252,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_SYM] = LAYOUT( \
|
[_SYM] = LAYOUT( \
|
||||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \
|
||||||
TD(SFT_PLS), CTRL_EQ, TD(ALT_OP), TD(GUI_CP), KC_DQT, KC_COLN, GUI_CB, ALT_OB, TD(CTL_CCB), TD(SFT_OCB), \
|
TD(SFT_PLS), CTRL_EQ, TD(ALT_LP), TD(GUI_RP), KC_DQT, KC_COLN, GUI_RB, ALT_LB, TD(CTL_RCB), TD(SFT_LCB), \
|
||||||
KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \
|
KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \
|
||||||
_______, MAC_EN, _______, _______, MAC_EM, _______ \
|
_______, MAC_EN, _______, _______, MAC_EM, _______ \
|
||||||
)
|
)
|
||||||
@@ -286,203 +282,153 @@ int cur_dance (qk_tap_dance_state_t *state) {
|
|||||||
else return SINGLE_HOLD;
|
else return SINGLE_HOLD;
|
||||||
}
|
}
|
||||||
if (state->count == 2) return DOUBLE_SINGLE_TAP;
|
if (state->count == 2) return DOUBLE_SINGLE_TAP;
|
||||||
else return 8;
|
else return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static tap altop_tap_state = {
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
.is_press_action = true,
|
td_state = cur_dance(state);
|
||||||
.state = 0
|
switch (td_state) {
|
||||||
};
|
|
||||||
|
|
||||||
void altop_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
altop_tap_state.state = cur_dance(state);
|
|
||||||
switch (altop_tap_state.state) {
|
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_code16(KC_LPRN);
|
||||||
register_code(KC_9);
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LALT));
|
register_mods(MOD_BIT(KC_LALT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
tap_code16(KC_LPRN);
|
||||||
tap_code(KC_9);
|
register_code16(KC_LPRN);
|
||||||
register_code(KC_9);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void altop_reset (qk_tap_dance_state_t *state, void *user_data) {
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (altop_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
unregister_code(KC_9);
|
unregister_code16(KC_LPRN);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LALT));
|
unregister_mods(MOD_BIT(KC_LALT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
unregister_code(KC_9);
|
unregister_code16(KC_LPRN);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
}
|
}
|
||||||
altop_tap_state.state = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tap ctlccb_tap_state = {
|
void ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
.is_press_action = true,
|
td_state = cur_dance(state);
|
||||||
.state = 0
|
switch (td_state) {
|
||||||
};
|
|
||||||
|
|
||||||
void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
ctlccb_tap_state.state = cur_dance(state);
|
|
||||||
switch (ctlccb_tap_state.state) {
|
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_code16(KC_RCBR);
|
||||||
register_code(KC_RBRC);
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LCTL));
|
register_mods(MOD_BIT(KC_LCTL));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
tap_code16(KC_RCBR);
|
||||||
tap_code(KC_RBRC);
|
register_code16(KC_RCBR);
|
||||||
register_code(KC_RBRC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) {
|
void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (ctlccb_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
unregister_code(KC_RBRC);
|
unregister_code16(KC_RCBR);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LCTL));
|
unregister_mods(MOD_BIT(KC_LCTL));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
unregister_code(KC_RBRC);
|
unregister_code16(KC_RCBR);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
}
|
}
|
||||||
ctlccb_tap_state.state = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tap guicp_tap_state = {
|
void guirp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
.is_press_action = true,
|
td_state = cur_dance(state);
|
||||||
.state = 0
|
switch (td_state) {
|
||||||
};
|
|
||||||
|
|
||||||
void guicp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
guicp_tap_state.state = cur_dance(state);
|
|
||||||
switch (guicp_tap_state.state) {
|
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_code16(KC_RPRN);
|
||||||
register_code(KC_0);
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LGUI));
|
register_mods(MOD_BIT(KC_LGUI));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
tap_code16(KC_RPRN);
|
||||||
tap_code(KC_0);
|
register_code16(KC_RPRN);
|
||||||
register_code(KC_0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void guicp_reset (qk_tap_dance_state_t *state, void *user_data) {
|
void guirp_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (guicp_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
unregister_code(KC_0);
|
unregister_code16(KC_RPRN);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LGUI));
|
unregister_mods(MOD_BIT(KC_LGUI));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
unregister_code(KC_0);
|
unregister_code16(KC_RPRN);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
}
|
}
|
||||||
guicp_tap_state.state = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tap sftocb_tap_state = {
|
void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
.is_press_action = true,
|
td_state = cur_dance(state);
|
||||||
.state = 0
|
switch (td_state) {
|
||||||
};
|
|
||||||
|
|
||||||
void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
sftocb_tap_state.state = cur_dance(state);
|
|
||||||
switch (sftocb_tap_state.state) {
|
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_code16(KC_LCBR);
|
||||||
register_code(KC_LBRC);
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_mods(MOD_BIT(KC_LSFT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
tap_code16(KC_LCBR);
|
||||||
tap_code(KC_LBRC);
|
register_code16(KC_LCBR);
|
||||||
register_code(KC_LBRC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) {
|
void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (sftocb_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
unregister_code(KC_LBRC);
|
unregister_code16(KC_LCBR);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
unregister_mods(MOD_BIT(KC_LSFT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
unregister_code(KC_LBRC);
|
unregister_code16(KC_LCBR);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
}
|
}
|
||||||
sftocb_tap_state.state = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tap sftpls_tap_state = {
|
|
||||||
.is_press_action = true,
|
|
||||||
.state = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) {
|
void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
sftpls_tap_state.state = cur_dance(state);
|
td_state = cur_dance(state);
|
||||||
switch (sftpls_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_code16(KC_PLUS);
|
||||||
register_code(KC_EQL);
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_mods(MOD_BIT(KC_LSFT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
tap_code16(KC_PLUS);
|
||||||
tap_code(KC_EQL);
|
register_code16(KC_PLUS);
|
||||||
register_code(KC_EQL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) {
|
void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (sftpls_tap_state.state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case SINGLE_TAP:
|
||||||
unregister_code(KC_EQL);
|
unregister_code16(KC_PLUS);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
unregister_mods(MOD_BIT(KC_LSFT));
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case DOUBLE_SINGLE_TAP:
|
||||||
unregister_code(KC_EQL);
|
unregister_code16(KC_PLUS);
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
}
|
}
|
||||||
sftpls_tap_state.state = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[ALT_OP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altop_finished, altop_reset),
|
[ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset),
|
||||||
[CTL_CCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlccb_finished, ctlccb_reset),
|
[CTL_RCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlrcb_finished, ctlrcb_reset),
|
||||||
[GUI_CP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guicp_finished, guicp_reset),
|
[GUI_RP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guirp_finished, guirp_reset),
|
||||||
[SFT_OCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftocb_finished, sftocb_reset),
|
[SFT_LCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftlcb_finished, sftlcb_reset),
|
||||||
[SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset)
|
[SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset)
|
||||||
};
|
};
|
||||||
+29
-34
@@ -1,20 +1,18 @@
|
|||||||
cbbrowne custom keyboard
|
* cbbrowne custom keyboard
|
||||||
==============================
|
|
||||||
|
|
||||||
Due to [email protected]
|
Due to [email protected]
|
||||||
Christopher Browne
|
Christopher Browne
|
||||||
|
|
||||||
This was originally based on the default keyboard map, but I have been
|
This was originally based on the default keyboard map, but I have
|
||||||
doing sundry experimentation:
|
been doing sundry experimentation:
|
||||||
|
|
||||||
1. Useful Experiments
|
** Useful Experiments
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
* It made sense to mess around some with keyboard maps.
|
- It made sense to mess around some with keyboard maps.
|
||||||
- I added a keypad, originally based on keymaps/numpad.c, but
|
- I added a keypad, originally based on keymaps/numpad.c, but
|
||||||
mighty substantially revised, as that one seems to be rotated 90
|
mighty substantially revised, as that one seems to be rotated 90
|
||||||
degrees from usual conventions for number pads
|
degrees from usual conventions for number pads
|
||||||
* The keypad layer also includes some sample "hacks" of cool things,
|
- The keypad layer also includes some sample "hacks" of cool things,
|
||||||
all using actions attached in using the function action_get_macro()
|
all using actions attached in using the function action_get_macro()
|
||||||
- Key [1][2] aka "q" types out my name, cbbrowne, as a fun example
|
- Key [1][2] aka "q" types out my name, cbbrowne, as a fun example
|
||||||
of a key generating a bunch of keystrokes. The keystroke is
|
of a key generating a bunch of keystrokes. The keystroke is
|
||||||
@@ -24,7 +22,7 @@ doing sundry experimentation:
|
|||||||
- Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random
|
- Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random
|
||||||
- Key [3][2] aka "z" uses a random number generator to select a letter a-z at random
|
- Key [3][2] aka "z" uses a random number generator to select a letter a-z at random
|
||||||
- Key [1][3] aka "e" spits out the keymap version number
|
- Key [1][3] aka "e" spits out the keymap version number
|
||||||
* Trying out sgoodwin's "hold Enter down to get Shift"
|
- Trying out sgoodwin's "hold Enter down to get Shift"
|
||||||
- Liking this Quite Well Enough...
|
- Liking this Quite Well Enough...
|
||||||
- Applied this to both Shift and Quote
|
- Applied this to both Shift and Quote
|
||||||
- It seems likely that Alt should get a right-hand-side, akin to this...
|
- It seems likely that Alt should get a right-hand-side, akin to this...
|
||||||
@@ -33,11 +31,11 @@ doing sundry experimentation:
|
|||||||
- Emacs likes this!!! :-)
|
- Emacs likes this!!! :-)
|
||||||
- I'm suspicious that I'll want to shift ROT_LED another location over,
|
- I'm suspicious that I'll want to shift ROT_LED another location over,
|
||||||
so some modifier can replace the OS/KC_LGUI key
|
so some modifier can replace the OS/KC_LGUI key
|
||||||
* I have added an alternate ADJUST layer that is activated via update_tri_layer()
|
- I have added an alternate ADJUST layer that is activated via update_tri_layer()
|
||||||
- e.g. - LOWER+RAISE simultaneously
|
- e.g. - LOWER+RAISE simultaneously
|
||||||
- This seems entirely more useful for handling my "special keys"
|
- This seems entirely more useful for handling my "special keys"
|
||||||
like the random numbers, user name, and such, than the keypad layer
|
like the random numbers, user name, and such, than the keypad layer
|
||||||
* The _ADJUST layer provides a good place to have RESET
|
- The _ADJUST layer provides a good place to have RESET
|
||||||
- But this isn't strictly enough; I want RESET somewhat accessible from
|
- But this isn't strictly enough; I want RESET somewhat accessible from
|
||||||
main layer lest an error hide that layer
|
main layer lest an error hide that layer
|
||||||
- I never use the OS/KC_LGUI key (that's Command on MacOS, Windows
|
- I never use the OS/KC_LGUI key (that's Command on MacOS, Windows
|
||||||
@@ -45,8 +43,7 @@ doing sundry experimentation:
|
|||||||
some sort
|
some sort
|
||||||
|
|
||||||
|
|
||||||
2. Some code structure ideas
|
** Some code structure ideas
|
||||||
---------------------------------------------------
|
|
||||||
|
|
||||||
Each layer is given a name to aid in readability, which is then
|
Each layer is given a name to aid in readability, which is then
|
||||||
used in the keymap matrix below. The underscores do not denote
|
used in the keymap matrix below. The underscores do not denote
|
||||||
@@ -65,57 +62,55 @@ doing sundry experimentation:
|
|||||||
to care (beyond "start at 0", and arguably even that's not needed)
|
to care (beyond "start at 0", and arguably even that's not needed)
|
||||||
about their values.
|
about their values.
|
||||||
|
|
||||||
3. Things I did not like about the default mapping
|
** Things I did not like about the default mapping
|
||||||
---------------------------------------------------------
|
|
||||||
|
|
||||||
* I found control too hard to get to. I use it more than Tab, so
|
|
||||||
|
- I found control too hard to get to. I use it more than Tab, so
|
||||||
switched it there.
|
switched it there.
|
||||||
* Having dash on [lower-j] is a bit nonintuitive, but may be OK
|
- Having dash on [lower-j] is a bit nonintuitive, but may be OK
|
||||||
* I switched ESC/TAB/M(0) around
|
- I switched ESC/TAB/M(0) around
|
||||||
* I'm suspicious that I want to shift M(0) from [4][1] to [4][2],
|
- I'm suspicious that I want to shift M(0) from [4][1] to [4][2],
|
||||||
and shift ESC off the first column so KC_LCTL and KC_LALT can
|
and shift ESC off the first column so KC_LCTL and KC_LALT can
|
||||||
be on the first column.
|
be on the first column.
|
||||||
* I needed to swap ' and ENTER
|
- I needed to swap ' and ENTER
|
||||||
|
|
||||||
4. Unuseful experiments
|
** Unuseful experiments
|
||||||
---------------------------------------------------------
|
|
||||||
|
|
||||||
I have tried some things out that didn't turn out particularly well.
|
I have tried some things out that didn't turn out particularly well.
|
||||||
I'll note some of these for posterity, hopefully helpful in not doing
|
I'll note some of these for posterity, hopefully helpful in not doing
|
||||||
unwise things again...
|
unwise things again...
|
||||||
|
|
||||||
* I tried added Workman alongside Dvorak and Colemak
|
- I tried added Workman alongside Dvorak and Colemak
|
||||||
- Boy, oh boy, these don't help!!!
|
- Boy, oh boy, these don't help!!!
|
||||||
- I have done 30 years of learning of Emacs key mappings, and
|
- I have done 30 years of learning of Emacs key mappings, and
|
||||||
these alternative keyboards massively mess me up
|
these alternative keyboards massively mess me up
|
||||||
|
|
||||||
* Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I
|
- Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I
|
||||||
just hit SHIFT, I get a left parens. In principle, this is great
|
just hit SHIFT, I get a left parens. In principle, this is great
|
||||||
for Lisping.
|
for Lisping.
|
||||||
- Unfortunately, there are times when mouse interfaces use SHIFT
|
- Unfortunately, there are times when mouse interfaces use SHIFT
|
||||||
to allow selecting multiple items, and this really interferes
|
to allow selecting multiple items, and this really interferes
|
||||||
with that
|
with that
|
||||||
|
|
||||||
5. TODO
|
** TODO
|
||||||
---------------------------------------------------------
|
|
||||||
|
|
||||||
* I use tmux quite a lot; the mollat keymap seems to have some
|
- I use tmux quite a lot; the mollat keymap seems to have some
|
||||||
interesting helpers. It might be interesting to add a "tmux
|
interesting helpers. It might be interesting to add a "tmux
|
||||||
layer," or to have a few keys in a layer oriented towards that
|
layer," or to have a few keys in a layer oriented towards that
|
||||||
- Keys for...
|
- Keys for...
|
||||||
- Picking windows 0 thru 8
|
- Picking windows 0 thru 8
|
||||||
- next/prev/new window
|
- next/prev/new window
|
||||||
* The mollat tmux layer also suggests some thoughts about Emacs
|
- The mollat tmux layer also suggests some thoughts about Emacs
|
||||||
helpers.
|
helpers.
|
||||||
* I do not presently have anything that handles X11 screen
|
- I do not presently have anything that handles X11 screen
|
||||||
switching, as with Control-Alt-various
|
switching, as with Control-Alt-various
|
||||||
* I ought to probably look into KC_LEAD, to have some key combos
|
- I ought to probably look into KC_LEAD, to have some key combos
|
||||||
that do not need to be concurrent
|
that do not need to be concurrent
|
||||||
* The jeebak keymap seems to have some neat ideas:
|
- The jeebak keymap seems to have some neat ideas:
|
||||||
- Number layer which is aggressive about having numbers in several places
|
- Number layer which is aggressive about having numbers in several places
|
||||||
- TouchCursor layer seems interesting
|
- TouchCursor layer seems interesting
|
||||||
- It sets up a layer with cursor keys on the home keys
|
- It sets up a layer with cursor keys on the home keys
|
||||||
* The jeremy-dev keymap has some very interesting concepts
|
- The jeremy-dev keymap has some very interesting concepts
|
||||||
- Shift hands outwards; the special keys go in the center
|
- Shift hands outwards; the special keys go in the center
|
||||||
- Symbol layer has some compound keys for C operators like /=, *=, -=, +=, ...
|
- Symbol layer has some compound keys for C operators like /=, *=, -=, +=, ...
|
||||||
- This is likely what I'll use for my XD75re, and maybe I'll fork a
|
- This is likely what I'll use for my XD75re, and maybe I'll fork a
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#pragma once
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_planck_grid(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_MINS, KC_SPC, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||||
|
_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||||
|
_______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT_planck_grid(
|
||||||
|
RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# vxid planck layout
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
This planck layout aims at proviging most symbols on the base layer while remaining usable.
|
||||||
|
The minus and space keys become alt and gui modifiers when pressed.
|
||||||
|
Arrow keys are located on hjkl on the lower layer.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```
|
||||||
|
make planck/rev6:vxid:dfu-util
|
||||||
|
```
|
||||||
@@ -41,8 +41,6 @@
|
|||||||
{"label":"D", "x":3.5, "y":2},
|
{"label":"D", "x":3.5, "y":2},
|
||||||
{"label":"F", "x":4.5, "y":2},
|
{"label":"F", "x":4.5, "y":2},
|
||||||
{"label":"G", "x":5.5, "y":2},
|
{"label":"G", "x":5.5, "y":2},
|
||||||
{"label":"PgDn", "x":6.5, "y":2.5, "h":1.5},
|
|
||||||
{"label":"]", "x":9.5, "y":2.5, "h":1.5},
|
|
||||||
{"label":"H", "x":10.5, "y":2},
|
{"label":"H", "x":10.5, "y":2},
|
||||||
{"label":"J", "x":11.5, "y":2},
|
{"label":"J", "x":11.5, "y":2},
|
||||||
{"label":"K", "x":12.5, "y":2},
|
{"label":"K", "x":12.5, "y":2},
|
||||||
@@ -55,6 +53,8 @@
|
|||||||
{"label":"C", "x":3.5, "y":3},
|
{"label":"C", "x":3.5, "y":3},
|
||||||
{"label":"V", "x":4.5, "y":3},
|
{"label":"V", "x":4.5, "y":3},
|
||||||
{"label":"B", "x":5.5, "y":3},
|
{"label":"B", "x":5.5, "y":3},
|
||||||
|
{"label":"PgDn", "x":6.5, "y":2.5, "h":1.5},
|
||||||
|
{"label":"]", "x":9.5, "y":2.5, "h":1.5},
|
||||||
{"label":"N", "x":10.5, "y":3},
|
{"label":"N", "x":10.5, "y":3},
|
||||||
{"label":"M", "x":11.5, "y":3},
|
{"label":"M", "x":11.5, "y":3},
|
||||||
{"label":",", "x":12.5, "y":3},
|
{"label":",", "x":12.5, "y":3},
|
||||||
@@ -68,12 +68,12 @@
|
|||||||
{"label":"Down", "x":14.5, "y":4},
|
{"label":"Down", "x":14.5, "y":4},
|
||||||
{"label":"Right", "x":15.5, "y":4},
|
{"label":"Right", "x":15.5, "y":4},
|
||||||
{"label":"Space", "x":5.5, "y":5},
|
{"label":"Space", "x":5.5, "y":5},
|
||||||
{"label":"Space", "x":5.5, "y":6},
|
|
||||||
{"label":"Ins", "x":6.5, "y":5},
|
{"label":"Ins", "x":6.5, "y":5},
|
||||||
{"label":"Del", "x":6.5, "y":6},
|
|
||||||
{"label":"Home", "x":9.5, "y":5},
|
{"label":"Home", "x":9.5, "y":5},
|
||||||
{"label":"End", "x":9.5, "y":6},
|
|
||||||
{"label":"Space", "x":10.5, "y":5},
|
{"label":"Space", "x":10.5, "y":5},
|
||||||
|
{"label":"Space", "x":5.5, "y":6},
|
||||||
|
{"label":"Del", "x":6.5, "y":6},
|
||||||
|
{"label":"End", "x":9.5, "y":6},
|
||||||
{"label":"Space", "x":10.5, "y":6}
|
{"label":"Space", "x":10.5, "y":6}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -113,8 +113,6 @@
|
|||||||
{"label":"D", "x":3.5, "y":2},
|
{"label":"D", "x":3.5, "y":2},
|
||||||
{"label":"F", "x":4.5, "y":2},
|
{"label":"F", "x":4.5, "y":2},
|
||||||
{"label":"G", "x":5.5, "y":2},
|
{"label":"G", "x":5.5, "y":2},
|
||||||
{"label":"PgDn", "x":6.5, "y":2.5, "h":1.5},
|
|
||||||
{"label":"]", "x":9.5, "y":2.5, "h":1.5},
|
|
||||||
{"label":"H", "x":10.5, "y":2},
|
{"label":"H", "x":10.5, "y":2},
|
||||||
{"label":"J", "x":11.5, "y":2},
|
{"label":"J", "x":11.5, "y":2},
|
||||||
{"label":"K", "x":12.5, "y":2},
|
{"label":"K", "x":12.5, "y":2},
|
||||||
@@ -127,6 +125,8 @@
|
|||||||
{"label":"C", "x":3.5, "y":3},
|
{"label":"C", "x":3.5, "y":3},
|
||||||
{"label":"V", "x":4.5, "y":3},
|
{"label":"V", "x":4.5, "y":3},
|
||||||
{"label":"B", "x":5.5, "y":3},
|
{"label":"B", "x":5.5, "y":3},
|
||||||
|
{"label":"PgDn", "x":6.5, "y":2.5, "h":1.5},
|
||||||
|
{"label":"]", "x":9.5, "y":2.5, "h":1.5},
|
||||||
{"label":"N", "x":10.5, "y":3},
|
{"label":"N", "x":10.5, "y":3},
|
||||||
{"label":"M", "x":11.5, "y":3},
|
{"label":"M", "x":11.5, "y":3},
|
||||||
{"label":",", "x":12.5, "y":3},
|
{"label":",", "x":12.5, "y":3},
|
||||||
@@ -141,10 +141,10 @@
|
|||||||
{"label":"Right", "x":15.5, "y":4},
|
{"label":"Right", "x":15.5, "y":4},
|
||||||
{"label":"Space", "x":5.5, "y":5, "h":2},
|
{"label":"Space", "x":5.5, "y":5, "h":2},
|
||||||
{"label":"Ins", "x":6.5, "y":5},
|
{"label":"Ins", "x":6.5, "y":5},
|
||||||
{"label":"Del", "x":6.5, "y":6},
|
|
||||||
{"label":"Home", "x":9.5, "y":5},
|
{"label":"Home", "x":9.5, "y":5},
|
||||||
{"label":"End", "x":9.5, "y":6},
|
{"label":"Space", "x":10.5, "y":5, "h":2},
|
||||||
{"label":"Space", "x":10.5, "y":5, "h":2}
|
{"label":"Del", "x":6.5, "y":6},
|
||||||
|
{"label":"End", "x":9.5, "y":6}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Function layer
|
/* Function layer
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│
|
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│SLk│Pau│
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
|
||||||
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│
|
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│
|
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│
|
||||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
* │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│
|
* │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ App │PgU│Btm│
|
||||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
* │ │Dstp│Dst←│ MW↓ │Dst→│ │ │Hom│PgD│End│
|
* │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_FN] = LAYOUT_truefox( \
|
[L_FN] = LAYOUT_truefox( \
|
||||||
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
|
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
|
||||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \
|
||||||
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \
|
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \
|
||||||
_______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \
|
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Numpad layer
|
/* Numpad layer
|
||||||
|
|||||||
@@ -1,2 +1,11 @@
|
|||||||
|
BOOTMAGIC_ENABLE = no
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
UNICODEMAP_ENABLE = yes
|
||||||
|
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
VISUALIZER_ENABLE = no
|
VISUALIZER_ENABLE = no
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
/* Copyright 2017 Christopher B Browne
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -62,12 +62,7 @@ enum macro_id {
|
|||||||
#define FUNCTION MO(_FUNCTION)
|
#define FUNCTION MO(_FUNCTION)
|
||||||
#define MRAISE MO(_RAISE)
|
#define MRAISE MO(_RAISE)
|
||||||
#define MLOWER MO(_LOWER)
|
#define MLOWER MO(_LOWER)
|
||||||
#define ALTBSP ALT_T(KC_BSPC)
|
#define ALTPLUS ALT_T(KC_PLUS)
|
||||||
|
|
||||||
/* More modifiers for QCENT2... */
|
|
||||||
#define PALT MT(KC_RALT, KC_P)
|
|
||||||
#define SCTL MT(KC_RCTL, KC_SCLN)
|
|
||||||
#define SSHF MT(KC_RSFT, KC_SLSH)
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
@@ -94,39 +89,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|ALT|LED| | | | | | | | | | | | | |
|
|ALT|LED| | | | | | | | | | | | | |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keys needing to be assigned:
|
keys needing to be assigned:
|
||||||
11 - KC_TAB - tab
|
51 - KC_TAB - tab
|
||||||
52 - ROT_LED - rotate LED
|
- ROT_LED - rotate LED
|
||||||
15 - KC_LALT - Left ALT
|
15 - KC_LALT - Left ALT
|
||||||
- KC_LGUI - this is the windows/command key, which I think I do not use...
|
53,55 - M_RAISE - switch to RAISE layer
|
||||||
- M_LOWER - switch to LOWER layer
|
5b - M_LOWER - switch to LOWER layer
|
||||||
- KC_SPC - space
|
56,59,5a - KC_SPC - space
|
||||||
- M_UPPER - switch to UPPER layer, maybe unneeded for 15x5
|
5c - KC_LEFT - famous arrows
|
||||||
- KC_LEFT - famous arrows
|
5d - KC_DOWN - famous arrows
|
||||||
- KC_DOWN - famous arrows
|
5e - KC_UP - famous arrows
|
||||||
- KC_UP - famous arrows
|
5f - KC_RIGHT - famous arrows
|
||||||
- KC_RIGHT - famous arrows
|
3f - KC_ENT - enter
|
||||||
- KC_ENT - enter
|
|
||||||
- KC_GRV - leftwards quote
|
- KC_GRV - leftwards quote
|
||||||
- KC_QUOT - rightwards quote
|
4f - KC_QUOT - rightwards quote
|
||||||
- KC_BSPC - backspace
|
1f - KC_BSPC - backspace
|
||||||
- KC_ESC
|
11 - KC_ESC
|
||||||
|
19 - KC_GRV - ` - raised
|
||||||
Missing still...
|
19 - KC_TILD - ~ - lowered
|
||||||
KC_LBRC and KC_LCBR
|
|
||||||
KC_RBRC and KC_RCBR
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_QWERTY] = { /* QWERTY, with keypad in the centre */
|
[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY, with keypad in the centre */
|
||||||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC ,
|
||||||
{ KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PLUS },
|
KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, ALTPLUS ,
|
||||||
{ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER },
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC,KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER ,
|
||||||
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE },
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_EQL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE ,
|
||||||
{ KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC, KC_0, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
|
KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC,KC_PGDN, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
},
|
),
|
||||||
|
|
||||||
/* LOWER
|
/* LOWER
|
||||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||||
@@ -142,13 +132,13 @@ Missing still...
|
|||||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_LOWER] = { /* LOWERED */
|
[_LOWER] = LAYOUT_ortho_5x15( /* LOWERED */
|
||||||
{ ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
|
___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 ,
|
||||||
{ ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS },
|
___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS ,
|
||||||
{ ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______ },
|
___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ },
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______ ,
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* RAISED
|
/* RAISED
|
||||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||||
@@ -164,13 +154,13 @@ Missing still...
|
|||||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_RAISE] = { /* RAISED */
|
[_RAISE] = LAYOUT_ortho_5x15 ( /* RAISED */
|
||||||
{ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ },
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MVERSION, _______, KC_GRV, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ ,
|
||||||
{ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_INS },
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, USERNAME, _______, KC_7, KC_8, KC_LCBR, KC_RCBR, _______, _______, KC_INS ,
|
||||||
{ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ },
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RANDDIG, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ ,
|
||||||
{ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RANDALP, _______, _______, _______, _______, ___T___, ___T___, _______, _______ ,
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* FUNCTION
|
/* FUNCTION
|
||||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||||
@@ -178,21 +168,21 @@ Missing still...
|
|||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR |
|
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR |
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
|
||||||
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ |
|
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX | | WHEEL+ |
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
|
||||||
* | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS Un | WHEEL- |
|
* | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX | | MOUS U | WHEEL- |
|
||||||
* |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------|
|
* |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||||
* | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R |
|
* | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R |
|
||||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_FUNCTION] = { /* FUNCTION */
|
[_FUNCTION] = LAYOUT_ortho_5x15( /* FUNCTION */
|
||||||
{ KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
|
KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, RESET,
|
||||||
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR },
|
KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR ,
|
||||||
{ KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U },
|
KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U ,
|
||||||
{ RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D },
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D ,
|
||||||
{ RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
|
RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
||||||
},
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This bit of logic seeds a wee linear congruential random number generator */
|
/* This bit of logic seeds a wee linear congruential random number generator */
|
||||||
@@ -223,8 +213,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
break;
|
break;
|
||||||
case M_VERSION:
|
case M_VERSION:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@");
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP);
|
||||||
// SEND_STRING(QMK_VERSION "@" QMK_BUILDDATE);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case M_RANDDIGIT:
|
case M_RANDDIGIT:
|
||||||
@@ -289,3 +278,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
rgblight_enable();
|
||||||
|
rgblight_mode(1);
|
||||||
|
rgblight_sethsv(325,255,255);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
switch(biton32(state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
rgblight_sethsv_white();
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
rgblight_sethsv_blue();
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
rgblight_sethsv_green();
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgblight_sethsv_orange();
|
||||||
|
break;
|
||||||
|
case _FUNCTION:
|
||||||
|
rgblight_sethsv_red();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rgblight_sethsv(325,255,255);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# 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 = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = 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.
|
||||||
|
API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
|
||||||
|
|
||||||
|
# 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
|
||||||
@@ -52,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[3] = LAYOUT_60_ansi(
|
[3] = LAYOUT_60_ansi(
|
||||||
_______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______,
|
_______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______)
|
_______, _______, _______, _______, _______, _______, _______, _______)
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ uint16_t notes_count;
|
|||||||
bool notes_repeat;
|
bool notes_repeat;
|
||||||
bool note_resting = false;
|
bool note_resting = false;
|
||||||
|
|
||||||
uint8_t current_note = 0;
|
uint16_t current_note = 0;
|
||||||
uint8_t rest_counter = 0;
|
uint8_t rest_counter = 0;
|
||||||
|
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ uint16_t notes_count;
|
|||||||
bool notes_repeat;
|
bool notes_repeat;
|
||||||
bool note_resting = false;
|
bool note_resting = false;
|
||||||
|
|
||||||
uint8_t current_note = 0;
|
uint16_t current_note = 0;
|
||||||
uint8_t rest_counter = 0;
|
uint8_t rest_counter = 0;
|
||||||
|
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ bool notes_repeat;
|
|||||||
float notes_rest;
|
float notes_rest;
|
||||||
bool note_resting = false;
|
bool note_resting = false;
|
||||||
|
|
||||||
uint8_t current_note = 0;
|
uint16_t current_note = 0;
|
||||||
uint8_t rest_counter = 0;
|
uint8_t rest_counter = 0;
|
||||||
|
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
|
|||||||
Whitespace-only changes.
@@ -0,0 +1,39 @@
|
|||||||
|
#ifndef USERSPACE
|
||||||
|
#define USERSPACE
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
#include "backlight.h"
|
||||||
|
#endif
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#ifndef NO_DEBUG
|
||||||
|
#define NO_DEBUG
|
||||||
|
#endif
|
||||||
|
#ifndef NO_PRINT
|
||||||
|
#define NO_PRINT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* cbbrowne user configuration */
|
||||||
|
|
||||||
|
#define randadd 53
|
||||||
|
#define randmul 181
|
||||||
|
#define randmod 167
|
||||||
|
|
||||||
|
/* Filler to make layering a bit clearer *
|
||||||
|
* borrowed from basic keymap */
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define _____ KC_NO
|
||||||
|
|
||||||
|
#define LEADER_TIMEOUT 300
|
||||||
|
#ifndef LIGHT_CONFIG_H
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SRC += cbbrowne.c
|
||||||
@@ -1,15 +1,25 @@
|
|||||||
#include "konstantin.h"
|
#include "konstantin.h"
|
||||||
|
|
||||||
#ifdef LAYER_NUMPAD
|
__attribute__((weak))
|
||||||
static void toggle_numpad(void) {
|
void keyboard_pre_init_keymap(void) {}
|
||||||
layer_invert(L_NUMPAD);
|
|
||||||
bool numpad_on = IS_LAYER_ON(L_NUMPAD);
|
void keyboard_pre_init_user(void) {
|
||||||
bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
keyboard_pre_init_keymap();
|
||||||
if (num_lock_on != numpad_on) {
|
}
|
||||||
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
|
|
||||||
}
|
__attribute__((weak))
|
||||||
|
void eeconfig_init_keymap(void) {}
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) {
|
||||||
|
eeconfig_init_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
void keyboard_post_init_keymap(void) {}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
keyboard_post_init_keymap();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
@@ -21,6 +31,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LAYER_NUMPAD
|
||||||
|
void toggle_numpad(void) {
|
||||||
|
layer_invert(L_NUMPAD);
|
||||||
|
bool numpad = IS_LAYER_ON(L_NUMPAD), num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
||||||
|
if (num_lock != numpad) {
|
||||||
|
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case CLEAR:
|
case CLEAR:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
@@ -28,12 +48,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
case DST_P_R:
|
||||||
|
(record->event.pressed ? register_code16 : unregister_code16)(
|
||||||
|
(get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case DST_N_A:
|
||||||
|
(record->event.pressed ? register_code16 : unregister_code16)(
|
||||||
|
(get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
|
||||||
#ifdef LAYER_FN
|
#ifdef LAYER_FN
|
||||||
static bool fn_lock;
|
static bool fn_lock;
|
||||||
|
|
||||||
case FN_FNLK:
|
case FN_FNLK:
|
||||||
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
||||||
fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this
|
fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#if defined(RGBLIGHT_ENABLE) || defined(RGBMATRIX_ENABLE)
|
||||||
|
#include "rgb.h"
|
||||||
|
#endif
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
#include "tap_dance.h"
|
#include "tap_dance.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef UNICODE_ENABLE
|
#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE)
|
||||||
#include "unicode.h"
|
#include "unicode.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -14,6 +17,10 @@
|
|||||||
#define FN_FNLK TT(L_FN)
|
#define FN_FNLK TT(L_FN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define KC_SYSR LALT(KC_PSCR)
|
||||||
|
#undef KC_BRK
|
||||||
|
#define KC_BRK LCTL(KC_PAUS)
|
||||||
|
|
||||||
#define MV_UP LCTL(KC_UP)
|
#define MV_UP LCTL(KC_UP)
|
||||||
#define MV_DOWN LCTL(KC_DOWN)
|
#define MV_DOWN LCTL(KC_DOWN)
|
||||||
#define MV_LEFT LCTL(KC_LEFT)
|
#define MV_LEFT LCTL(KC_LEFT)
|
||||||
@@ -23,20 +30,30 @@
|
|||||||
#define PRV_TAB LCTL(KC_PGUP)
|
#define PRV_TAB LCTL(KC_PGUP)
|
||||||
#define NXT_TAB LCTL(KC_PGDN)
|
#define NXT_TAB LCTL(KC_PGDN)
|
||||||
|
|
||||||
|
#define DST_ADD LCTL(LGUI(KC_D))
|
||||||
|
#define DST_REM LCTL(LGUI(KC_F4))
|
||||||
|
#define DST_PRV LCTL(LGUI(KC_LEFT))
|
||||||
|
#define DST_NXT LCTL(LGUI(KC_RGHT))
|
||||||
|
#ifndef DST_MOD_MASK
|
||||||
|
#define DST_MOD_MASK MOD_MASK_CTRL
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LCT_CPS LCTL_T(KC_CAPS)
|
#define LCT_CPS LCTL_T(KC_CAPS)
|
||||||
|
|
||||||
#ifdef SEND_STRING_CLEAN
|
#ifdef SEND_STRING_CLEAN
|
||||||
#undef SEND_STRING
|
#undef SEND_STRING
|
||||||
#define SEND_STRING(...) { \
|
#define SEND_STRING(string) { \
|
||||||
uint8_t ss_mods = get_mods(); \
|
uint8_t ss_mods = get_mods(); \
|
||||||
clear_mods(); \
|
clear_mods(); \
|
||||||
send_string_P(PSTR(__VA_ARGS__)); \
|
send_string_P(PSTR(string)); \
|
||||||
set_mods(ss_mods); \
|
set_mods(ss_mods); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum keycodes_user {
|
enum keycodes_user {
|
||||||
CLEAR = SAFE_RANGE,
|
CLEAR = SAFE_RANGE,
|
||||||
|
DST_P_R,
|
||||||
|
DST_N_A,
|
||||||
#ifdef LAYER_NUMPAD
|
#ifdef LAYER_NUMPAD
|
||||||
NUMPAD,
|
NUMPAD,
|
||||||
#endif
|
#endif
|
||||||
@@ -56,5 +73,9 @@ enum layers_user {
|
|||||||
L_RANGE_KEYMAP,
|
L_RANGE_KEYMAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void keyboard_pre_init_keymap(void);
|
||||||
|
void eeconfig_init_keymap(void);
|
||||||
|
void keyboard_post_init_keymap(void);
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
||||||
uint32_t layer_state_set_keymap(uint32_t state);
|
uint32_t layer_state_set_keymap(uint32_t state);
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#include "rgb.h"
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_EFFECT_BREATHING
|
||||||
|
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {20, 30, 5, 10};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {20, 50, 100};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 50, 100};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_EFFECT_SNAKE
|
||||||
|
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {20, 50, 100};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {20, 50, 100};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const hsv_t GODSPEED_BLUE = { .h = 280, .s = 68, .v = RGBLIGHT_LIMIT_VAL };
|
||||||
|
const hsv_t GODSPEED_YELLOW = { .h = 38, .s = 153, .v = RGBLIGHT_LIMIT_VAL };
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint16_t h; // 0–360
|
||||||
|
uint8_t s; // 0–255
|
||||||
|
uint8_t v; // 0–255
|
||||||
|
} hsv_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t r; // 0–255
|
||||||
|
uint8_t g; // 0–255
|
||||||
|
uint8_t b; // 0–255
|
||||||
|
} rgb_t;
|
||||||
|
|
||||||
|
extern const hsv_t GODSPEED_BLUE;
|
||||||
|
extern const hsv_t GODSPEED_YELLOW;
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
BOOTMAGIC_ENABLE = no
|
|
||||||
COMMAND_ENABLE = yes
|
|
||||||
CONSOLE_ENABLE = yes
|
|
||||||
EXTRAKEY_ENABLE = yes
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
NKRO_ENABLE = yes
|
|
||||||
TAP_DANCE_ENABLE = yes
|
|
||||||
UNICODE_ENABLE = yes
|
|
||||||
|
|
||||||
SRC += konstantin.c
|
SRC += konstantin.c
|
||||||
|
ifneq (,$(filter yes,$(RGBLIGHT_ENABLE) $(RGB_MATRIX_ENABLE))) # if either is yes
|
||||||
|
SRC += rgb.c
|
||||||
|
endif
|
||||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
SRC += tap_dance.c
|
SRC += tap_dance.c
|
||||||
endif
|
endif
|
||||||
|
ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE))) # if either is yes
|
||||||
|
SRC += unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRAFLAGS += -flto
|
EXTRAFLAGS += -flto
|
||||||
@@ -1,93 +1,117 @@
|
|||||||
#include "tap_dance.h"
|
#include "tap_dance.h"
|
||||||
#include "konstantin.h"
|
#include "konstantin.h"
|
||||||
|
|
||||||
#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \
|
#define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \
|
||||||
.fn = { td_double_mods_each, NULL, td_double_mods_reset }, \
|
.fn = { td_double_mod_each, NULL, td_double_mod_reset }, \
|
||||||
.user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \
|
.user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) {
|
void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
|
qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data;
|
||||||
|
|
||||||
// Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2
|
// Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2
|
||||||
if (state->count == 1 || state->count == 3) {
|
if (state->count == 1 || state->count == 3) {
|
||||||
register_code(mods->kc1);
|
register_code(data->kc1);
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
unregister_code(mods->kc1);
|
unregister_code(data->kc1);
|
||||||
register_code(mods->kc2);
|
register_code(data->kc2);
|
||||||
}
|
}
|
||||||
// Prevent tap dance from sending kc1 and kc2 as weak mods
|
// Prevent tap dance from sending the mods as weak mods
|
||||||
state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2));
|
state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
|
qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data;
|
||||||
|
|
||||||
if (state->count == 1 || state->count >= 3) {
|
if (state->count == 1 || state->count >= 3) {
|
||||||
unregister_code(mods->kc1);
|
unregister_code(data->kc1);
|
||||||
}
|
}
|
||||||
if (state->count >= 2) {
|
if (state->count >= 2) {
|
||||||
unregister_code(mods->kc2);
|
unregister_code(data->kc2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct {
|
#define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \
|
||||||
bool fn_on; // Layer state when tap dance started
|
.fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \
|
||||||
bool started;
|
.user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \
|
||||||
} td_fn_rctrl_data;
|
|
||||||
|
|
||||||
void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (!td_fn_rctrl_data.started) {
|
|
||||||
td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN);
|
|
||||||
td_fn_rctrl_data.started = true;
|
|
||||||
}
|
}
|
||||||
// Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl
|
|
||||||
|
void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data;
|
||||||
|
|
||||||
|
// Single tap → mod, double tap → layer, triple tap etc. → mod+layer
|
||||||
if (state->count == 1 || state->count == 3) {
|
if (state->count == 1 || state->count == 3) {
|
||||||
layer_on(L_FN);
|
register_code(data->kc);
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
if (!td_fn_rctrl_data.fn_on) {
|
unregister_code(data->kc);
|
||||||
layer_off(L_FN);
|
// Prevent tap dance from sending the mod as a weak mod
|
||||||
|
state->weak_mods &= ~MOD_BIT(data->kc);
|
||||||
|
layer_on(data->layer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data;
|
||||||
|
|
||||||
|
if (state->count == 1 || state->count >= 3) {
|
||||||
|
unregister_code(data->kc);
|
||||||
|
}
|
||||||
|
if (state->count >= 2) {
|
||||||
|
layer_off(data->layer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \
|
||||||
|
.fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \
|
||||||
|
.user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t layer;
|
||||||
|
uint16_t kc;
|
||||||
|
bool layer_on; // Layer state when tap dance started
|
||||||
|
bool started;
|
||||||
|
} qk_tap_dance_layer_mod_t;
|
||||||
|
|
||||||
|
void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data;
|
||||||
|
if (!data->started) {
|
||||||
|
data->layer_on = IS_LAYER_ON(data->layer);
|
||||||
|
data->started = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Single tap → layer, double tap → mod, triple tap etc. → layer+mod
|
||||||
|
if (state->count == 1 || state->count == 3) {
|
||||||
|
layer_on(data->layer);
|
||||||
|
} else if (state->count == 2) {
|
||||||
|
if (!data->layer_on) {
|
||||||
|
layer_off(data->layer);
|
||||||
}
|
}
|
||||||
register_code(KC_RCTL);
|
register_code(data->kc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if ((state->count == 1 || state->count >= 3) && !td_fn_rctrl_data.fn_on) {
|
qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data;
|
||||||
layer_off(L_FN);
|
|
||||||
|
if ((state->count == 1 || state->count >= 3) && !data->layer_on) {
|
||||||
|
layer_off(data->layer);
|
||||||
}
|
}
|
||||||
if (state->count >= 2) {
|
if (state->count >= 2) {
|
||||||
unregister_code(KC_RCTL);
|
unregister_code(data->kc);
|
||||||
}
|
}
|
||||||
td_fn_rctrl_data.started = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void td_lsft_fn_each(qk_tap_dance_state_t *state, void *user_data) {
|
data->started = false;
|
||||||
// Single tap → LShift, double tap → Fn, triple tap etc. → Fn+LShift
|
|
||||||
if (state->count == 1 || state->count == 3) {
|
|
||||||
register_code(KC_LSFT);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
// Prevent tap dance from sending LShift as a weak mod
|
|
||||||
state->weak_mods &= ~MOD_BIT(KC_LSFT);
|
|
||||||
layer_on(L_FN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1 || state->count >= 3) {
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
}
|
|
||||||
if (state->count >= 2) {
|
|
||||||
layer_off(L_FN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop
|
[TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM),
|
||||||
|
|
||||||
[TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT),
|
[TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_LALT),
|
||||||
[TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI),
|
[TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI),
|
||||||
[TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT),
|
[TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT),
|
||||||
|
|
||||||
[TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset),
|
[TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN),
|
||||||
[TD_LSFT_FN] = ACTION_TAP_DANCE_FN_ADVANCED(td_lsft_fn_each, NULL, td_lsft_fn_reset),
|
[TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN),
|
||||||
|
[TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL),
|
||||||
};
|
};
|
||||||
@@ -2,24 +2,24 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define DESKTOP TD(TD_DESKTOP)
|
#define DST_A_R TD(TD_DST_A_R)
|
||||||
#define DSKTP_L LCTL(LGUI(KC_LEFT))
|
|
||||||
#define DSKTP_R LCTL(LGUI(KC_RGHT))
|
|
||||||
|
|
||||||
#define RAL_LAL TD(TD_RAL_LAL)
|
#define RAL_LAL TD(TD_RAL_LAL)
|
||||||
#define RAL_RGU TD(TD_RAL_RGU)
|
#define RAL_RGU TD(TD_RAL_RGU)
|
||||||
#define RCT_RSF TD(TD_RCT_RSF)
|
#define RCT_RSF TD(TD_RCT_RSF)
|
||||||
|
|
||||||
#define FN_RCTL TD(TD_FN_RCTL)
|
|
||||||
#define LSFT_FN TD(TD_LSFT_FN)
|
#define LSFT_FN TD(TD_LSFT_FN)
|
||||||
|
#define RCTL_FN TD(TD_RCTL_FN)
|
||||||
|
#define FN_RCTL TD(TD_FN_RCTL)
|
||||||
|
|
||||||
enum tap_dance {
|
enum tap_dance {
|
||||||
TD_DESKTOP,
|
TD_DST_A_R,
|
||||||
|
|
||||||
TD_RAL_LAL,
|
TD_RAL_LAL,
|
||||||
TD_RAL_RGU,
|
TD_RAL_RGU,
|
||||||
TD_RCT_RSF,
|
TD_RCT_RSF,
|
||||||
|
|
||||||
TD_FN_RCTL,
|
|
||||||
TD_LSFT_FN,
|
TD_LSFT_FN,
|
||||||
|
TD_RCTL_FN,
|
||||||
|
TD_FN_RCTL,
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "unicode.h"
|
||||||
|
|
||||||
|
#ifdef UNICODEMAP_ENABLE
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
FOREACH_UNICODE(UCM_ENTRY)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
@@ -2,10 +2,33 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define COMMA UC(0x002C)
|
#define FOREACH_UNICODE(M) \
|
||||||
#define L_PAREN UC(0x0028)
|
M(COMMA, 0x002C) \
|
||||||
#define R_PAREN UC(0x0029)
|
M(L_PAREN, 0x0028) \
|
||||||
#define EQUALS UC(0x003D)
|
M(R_PAREN, 0x0029) \
|
||||||
#define TIMES UC(0x00D7)
|
M(EQUALS, 0x003D) \
|
||||||
#define DIVIDE UC(0x00F7)
|
M(TIMES, 0x00D7) \
|
||||||
#define MINUS UC(0x2212)
|
M(DIVIDE, 0x00F7) \
|
||||||
|
M(MINUS, 0x2212)
|
||||||
|
|
||||||
|
#define UC_KEYCODE(name, code) name = UC(code),
|
||||||
|
|
||||||
|
#define UCM_NAME(name, code) UCM_ ## name,
|
||||||
|
#define UCM_ENTRY(name, code) [UCM_ ## name] = code,
|
||||||
|
#define UCM_KEYCODE(name, code) name = X(UCM_ ## name),
|
||||||
|
|
||||||
|
#if defined(UNICODE_ENABLE)
|
||||||
|
enum unicode_keycodes {
|
||||||
|
FOREACH_UNICODE(UC_KEYCODE)
|
||||||
|
};
|
||||||
|
#elif defined(UNICODEMAP_ENABLE)
|
||||||
|
enum unicode_names {
|
||||||
|
FOREACH_UNICODE(UCM_NAME)
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const uint32_t PROGMEM unicode_map[];
|
||||||
|
|
||||||
|
enum unicode_keycodes {
|
||||||
|
FOREACH_UNICODE(UCM_KEYCODE)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
@@ -8,6 +8,8 @@ AUDIO_ENABLE = no
|
|||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
NKRO_ENABLE = no
|
NKRO_ENABLE = no
|
||||||
|
|
||||||
|
SRC += stanrc85.c
|
||||||
|
|
||||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
# Include my fancy rgb functions source here
|
# Include my fancy rgb functions source here
|
||||||
SRC += layer_rgb.c
|
SRC += layer_rgb.c
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#include "stanrc85.h"
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_MAKE:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
uint8_t mods = get_mods();
|
||||||
|
clear_mods();
|
||||||
|
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10);
|
||||||
|
if (mods & MOD_MASK_SHIFT) {
|
||||||
|
//RESET board for flashing if SHIFT held or tapped with KC_MAKE
|
||||||
|
#if defined(__arm__)
|
||||||
|
send_string_with_delay_P(PSTR(":dfu-util"), 10);
|
||||||
|
#elif defined(BOOTLOADER_DFU)
|
||||||
|
send_string_with_delay_P(PSTR(":dfu"), 10);
|
||||||
|
#elif defined(BOOTLOADER_HALFKAY)
|
||||||
|
send_string_with_delay_P(PSTR(":teensy"), 10);
|
||||||
|
#elif defined(BOOTLOADER_CATERINA)
|
||||||
|
send_string_with_delay_P(PSTR(":avrdude"), 10);
|
||||||
|
#endif // bootloader options
|
||||||
|
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
|
||||||
|
reset_keyboard();
|
||||||
|
}
|
||||||
|
if (mods & MOD_MASK_CTRL) {
|
||||||
|
send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10);
|
||||||
|
}
|
||||||
|
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
|
||||||
|
set_mods(mods);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return process_record_keymap(keycode, record);
|
||||||
|
}
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define DEFAULT 0 //Custom ANSI
|
#define DEFAULT 0 //Custom ANSI
|
||||||
#define LAYER1 1 //Default ANSI (enable with Fn2+CAPS)
|
#define LAYER1 1 //Default ANSI (enable with Fn2+CAPS)
|
||||||
#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control
|
#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control
|
||||||
#define LAYER3 3 //RGB Underglow controls and RESET
|
#define LAYER3 3 //RGB Underglow controls and RESET
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_MAKE = SAFE_RANGE,
|
||||||
|
NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
|
||||||
|
};
|
||||||
|
|
||||||
//Aliases for longer keycodes
|
//Aliases for longer keycodes
|
||||||
#define KC_CAD LALT(LCTL(KC_DEL))
|
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||||
#define KC_LOCK LGUI(KC_L)
|
#define KC_LOCK LGUI(KC_L)
|
||||||
|
|||||||
Reference in new issue
Block a user