@ -0,0 +1,61 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "amj60.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _DEF 0
|
||||||
|
#define _SPC 1
|
||||||
|
|
||||||
|
// dual-role shortcuts
|
||||||
|
#define SPACEDUAL LT(_SPC, KC_SPACE)
|
||||||
|
|
||||||
|
|
||||||
|
// increase readability
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _DEF: Default Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DEF] = KEYMAP_MAX(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||||
|
KC_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, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)),
|
||||||
|
|
||||||
|
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Paus| Up| [ | ] | | | | ( | ) | | | | Del |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | < | > | |M0 | | | | | Vol+ | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | |Alt |Prev|Vol-|Next|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_SPC] = KEYMAP_MAX(
|
||||||
|
KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,181 @@
|
|||||||
|
#include "clueboard.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _FL 3
|
||||||
|
#define _CL 4
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK
|
||||||
|
};
|
||||||
|
|
||||||
|
// Helpful defines
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||||
|
|
||||||
|
// Custom macros
|
||||||
|
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||||
|
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
|
||||||
|
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _QWERTY: Base Layer (Default Layer)
|
||||||
|
* ,-----------------------------------------------------------. ,---.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
|
||||||
|
* |-----------------------------------------------------------| |---|
|
||||||
|
* |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| BS| |PgD|
|
||||||
|
* |-----------------------------------------------------------| `---'
|
||||||
|
* |CtlEsc| A| S| D| F| G| H| J| K| L| ;| '| | Ent|
|
||||||
|
* |--------------------------------------------------------------.
|
||||||
|
* |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up|
|
||||||
|
* |------------------------------------------------------------------.
|
||||||
|
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
|
||||||
|
* `------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
|
||||||
|
HPR_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_PGDN, \
|
||||||
|
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \
|
||||||
|
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _COLEMAK: Base Layer
|
||||||
|
* ,-----------------------------------------------------------. ,---.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
|
||||||
|
* |-----------------------------------------------------------| |---|
|
||||||
|
* |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD|
|
||||||
|
* |-----------------------------------------------------------| `---'
|
||||||
|
* |CtlEsc| A| R| S| T| D| H| N| E| I| O| '| | Ent|
|
||||||
|
* |--------------------------------------------------------------.
|
||||||
|
* |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up|
|
||||||
|
* |------------------------------------------------------------------.
|
||||||
|
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
|
||||||
|
* `------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = KEYMAP(
|
||||||
|
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
|
||||||
|
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \
|
||||||
|
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \
|
||||||
|
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _DVORAK: Base Layer
|
||||||
|
* ,-----------------------------------------------------------. ,---.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU|
|
||||||
|
* |-----------------------------------------------------------| |---|
|
||||||
|
* |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD|
|
||||||
|
* |-----------------------------------------------------------| `---'
|
||||||
|
* |CtlEsc| A| O| E| U| I| D| H| T| N| S| -| | Ent|
|
||||||
|
* |--------------------------------------------------------------.
|
||||||
|
* |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up|
|
||||||
|
* |------------------------------------------------------------------.
|
||||||
|
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
|
||||||
|
* `------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = KEYMAP(
|
||||||
|
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \
|
||||||
|
HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \
|
||||||
|
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \
|
||||||
|
KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
*/
|
||||||
|
[_FL] = KEYMAP(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \
|
||||||
|
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \
|
||||||
|
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \
|
||||||
|
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
|
||||||
|
|
||||||
|
/* Keymap _CL: Control layer
|
||||||
|
*/
|
||||||
|
[_CL] = KEYMAP(
|
||||||
|
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
|
||||||
|
_______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \
|
||||||
|
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||||
|
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
|
||||||
|
_______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This is a list of user defined functions. F(N) corresponds to item N
|
||||||
|
of this list.
|
||||||
|
*/
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_FUNCTION(0), // Calls action_function()
|
||||||
|
};
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
static uint8_t mods_pressed;
|
||||||
|
static bool mod_flag;
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
/* Handle the combined Grave/Esc key
|
||||||
|
*/
|
||||||
|
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
|
||||||
|
|
||||||
|
if (record->event.pressed) {
|
||||||
|
/* The key is being pressed.
|
||||||
|
*/
|
||||||
|
if (mods_pressed) {
|
||||||
|
mod_flag = true;
|
||||||
|
add_key(KC_GRV);
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
add_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* The key is being released.
|
||||||
|
*/
|
||||||
|
if (mod_flag) {
|
||||||
|
mod_flag = false;
|
||||||
|
del_key(KC_GRV);
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
del_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistent_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistent_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistent_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
After Width: | Height: | Size: 128 KiB |
@ -0,0 +1,30 @@
|
|||||||
|
```
|
||||||
|
___ _____ _ _ _ __ __ _ __
|
||||||
|
|__ \ / ____| | | | | | / / / /(_) / /
|
||||||
|
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|
||||||
|
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|
||||||
|
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
|
||||||
|
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
|
||||||
|
```
|
||||||
|
|
||||||
|
# smt Clueboard Layout (HHKB variant)
|
||||||
|
|
||||||
|
![Clueboard Layout Image](layout.png)
|
||||||
|
|
||||||
|
This is smt's HHKB variant layout, based on the default layout that comes
|
||||||
|
flashed on every Clueboard. The primary differences from the default are:
|
||||||
|
|
||||||
|
- The Backspace key is moved down into the traditional `\` position
|
||||||
|
- `\` and `` ` `` are assigned to the "split-backspace" positions
|
||||||
|
- The right Shift is split to allow for a Fn key to its right
|
||||||
|
- The modifiers on the right side now mirror the left side (`Alt`/`Super`/`Ctrl`)
|
||||||
|
|
||||||
|
For the most part, it's a straightforward and easy to follow layout. There
|
||||||
|
are a few special keys:
|
||||||
|
|
||||||
|
- The Esc key sends `Esc` when tapped, `` ` `` when `Alt`/`Super`/`Ctrl`/`Fn` is held, or `~` when `Shift` is held
|
||||||
|
- The Tab key sends `Tab` when tapped, or `Super+Ctrl+Alt+Shift` (a.k.a. [Hyper]) when held
|
||||||
|
- The key traditionally in the Caps-Lock position has been re-mapped to send `Esc` when tapped, or `Ctrl` when held
|
||||||
|
- The left Shift key sends `Enter` when tapped, or `Shift` when held
|
||||||
|
|
||||||
|
[Hyper]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
@ -0,0 +1,331 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "keymap_nordic.h"
|
||||||
|
#include "keymap_norwegian.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // mouse keys
|
||||||
|
#define DEVL 3 // dev keys
|
||||||
|
|
||||||
|
#define MACRO_PUBLIC 10
|
||||||
|
#define MACRO_PRIVATE 11
|
||||||
|
#define MACRO_PROT 12
|
||||||
|
|
||||||
|
#define MACRO_SHARED 13
|
||||||
|
#define MACRO_CONST 14
|
||||||
|
#define MACRO_DIM 15
|
||||||
|
#define MACRO_STRING 16
|
||||||
|
#define MACRO_INT 17
|
||||||
|
#define MACRO_DEC 18
|
||||||
|
#define MACRO_BOOL 19
|
||||||
|
|
||||||
|
#define MACRO_RETURN 20
|
||||||
|
#define MACRO_NOTHING 21
|
||||||
|
#define MACRO_TODO 22
|
||||||
|
|
||||||
|
#define MACRO_SAVE 24
|
||||||
|
#define MACRO_BUILD 25
|
||||||
|
#define MACRO_DEBUG 26
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | L3 | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Del | - | , | . | P | Y | LT1 | | LT1 | F | G | C | R | L | Å |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | WIN | A | O | E | U | I |------| |------| D | H | T | N | S | Ä |
|
||||||
|
* |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | CTRL | L1 |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | App | LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB),
|
||||||
|
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA),
|
||||||
|
CTL_T(KC_NO), MO(SYMB), LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||||
|
ALT_T(KC_APP), KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH,
|
||||||
|
TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM,
|
||||||
|
KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE,
|
||||||
|
TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | @ | { | } | [ | ] | | | | < | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | . | 0 | = | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS,
|
||||||
|
KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH,
|
||||||
|
KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, NO_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
|
||||||
|
LSFT(NO_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, NO_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS,
|
||||||
|
KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 3: Developer keys in vb.net
|
||||||
|
* shortened in layout beneth, for example int-> integer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| priv | publ |shared| prot | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | const| dim |return|nothin| | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[DEVL] = KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, M(MACRO_BOOL), M(MACRO_INT), M(MACRO_STRING), M(MACRO_DEC), M(MACRO_TODO), KC_TRNS,
|
||||||
|
M(MACRO_PRIVATE), M(MACRO_PUBLIC), M(MACRO_SHARED), M(MACRO_PROT), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, M(MACRO_CONST), M(MACRO_DIM), M(MACRO_RETURN), M(MACRO_NOTHING), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_PUBLIC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_PRIVATE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_PROT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_SHARED:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_CONST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_DIM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(D), T(I), T(M), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_STRING:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_BOOL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_INT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(I), T(N), T(T), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_DEC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_RETURN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_NOTHING:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END);
|
||||||
|
}
|
||||||
|
case MACRO_TODO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT), T(SPACE),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_SAVE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL) ,T(S), U(LCTL),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_BUILD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MACRO_DEBUG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( KC_F5 ,END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,28 @@
|
|||||||
|
# ErgoDox EZ Dvorak Programmer SWEDISH
|
||||||
|
|
||||||
|
Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:
|
||||||
|
|
||||||
|
* åäö characters added
|
||||||
|
* Layout for common vb.net keywords
|
||||||
|
* Common Visual Studio commands like Save, Build, Debug
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on
|
||||||
|
|
||||||
|
Known issues:
|
||||||
|
|
||||||
|
* Keymap 2 modifier has not gotten its place yet..
|
||||||
|
* Print screen, where?
|
||||||
|
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
* 2017-05-16
|
||||||
|
* Initial release
|
||||||
|
|
||||||
|
# Author
|
||||||
|
Christian Westerlund
|
||||||
|
cwesterlund @ github
|
||||||
|
|
||||||
|
Thanks to the author of keymap csharp_dev for inspiration!
|
@ -0,0 +1,23 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
UNICODEMAP_ENABLE = yes # unicodemap
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define TAPPING_TERM 300
|
||||||
|
#define LEADER_TIMEOUT 400
|
||||||
|
|
||||||
|
#define DISABLE_SPACE_CADET_ROLLOVER
|
||||||
|
|
||||||
|
#define UNICODE_TYPE_DELAY 0
|
||||||
|
|
||||||
|
#define LSPO_KEY KC_9
|
||||||
|
#define RSPC_KEY KC_0
|
||||||
|
|
||||||
|
#define MOUSEKEY_INTERVAL 20
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,224 @@
|
|||||||
|
#include "frosty_flake.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "process_unicode.h"
|
||||||
|
#include "process_unicodemap.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
|
||||||
|
//declarations for tap dancing emojis
|
||||||
|
void register_hex32(uint32_t hex);
|
||||||
|
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void cycleHands(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
|
void tap(uint16_t keycode){
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum taps{
|
||||||
|
TD_CTCPS = 0,
|
||||||
|
EMOJIS,
|
||||||
|
ANIMAL,
|
||||||
|
HAND
|
||||||
|
};
|
||||||
|
|
||||||
|
enum unicode_name { // split every five emojis
|
||||||
|
THINK = 1, // thinking face 🤔
|
||||||
|
GRIN, // grinning face 😊
|
||||||
|
SMRK, // smirk 😏
|
||||||
|
WEARY, // good shit 😩
|
||||||
|
UNAMU, // unamused 😒
|
||||||
|
|
||||||
|
SNEK, // snke 🐍
|
||||||
|
PENGUIN, // 🐧
|
||||||
|
DRAGON, // 🐉
|
||||||
|
MONKEY, // 🐒
|
||||||
|
CHICK, // 🐥
|
||||||
|
|
||||||
|
OKOK, // 👌
|
||||||
|
EFFU, // 🖕
|
||||||
|
INUP, // 👆
|
||||||
|
THUP, // 👍
|
||||||
|
THDN, // 👎
|
||||||
|
|
||||||
|
BBB, // dat B 🅱
|
||||||
|
POO, // poop 💩
|
||||||
|
HUNDR, // 100 💯
|
||||||
|
EGGPL, // EGGPLANT 🍆
|
||||||
|
WATER, // wet 💦
|
||||||
|
|
||||||
|
LIT // fire 🔥
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum my_macros {
|
||||||
|
NEWDESK = 0,
|
||||||
|
LEFTDESK,
|
||||||
|
RIGHTDESK,
|
||||||
|
CLOSEDESK
|
||||||
|
};
|
||||||
|
enum quick {
|
||||||
|
DISFACE = 0,
|
||||||
|
TFLIP,
|
||||||
|
TPUT,
|
||||||
|
SHRUG,
|
||||||
|
FACE,
|
||||||
|
RANDIG
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
// Tap once for CTRL, twice for Caps Lock
|
||||||
|
[TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
|
||||||
|
[EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL),
|
||||||
|
[ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL),
|
||||||
|
[HAND] = ACTION_TAP_DANCE_FN_ADVANCED(cycleHands, NULL, NULL)
|
||||||
|
// Other declarations would go here, separated by commas, if you have them
|
||||||
|
};
|
||||||
|
|
||||||
|
// macros
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
switch(id) {
|
||||||
|
case NEWDESK: // this would trigger when you hit a key mapped as M(0)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( I(1), D(LGUI), D(LCTL), D(D), U(LGUI), U(LCTL), U(D), END ); // NEW DESKTOP
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LEFTDESK: // this would trigger when you hit a key mapped as M(0)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( I(1), D(LGUI), D(LCTL), D(LEFT), U(LGUI), U(LCTL), U(LEFT), END ); // LEFT DESKTOP
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RIGHTDESK: // this would trigger when you hit a key mapped as M(0)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( I(1), D(LGUI), D(LCTL), D(RGHT), U(LGUI), U(LCTL), U(RGHT), END ); // RIGHT DESKTOP
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CLOSEDESK: // this would trigger when you hit a key mapped as M(0)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( I(1), D(LGUI), D(LCTL), D(F4), U(LGUI), U(LCTL), U(F4), END ); // CLOSE DESKTOP
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// emojis in unicode
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[THINK] = 0x1F914,
|
||||||
|
[GRIN] = 0x1F600,
|
||||||
|
[BBB] = 0x1F171,
|
||||||
|
[POO] = 0x1F4A9,
|
||||||
|
[HUNDR] = 0x1F4AF,
|
||||||
|
[SMRK] = 0x1F60F,
|
||||||
|
[WEARY] = 0x1F629,
|
||||||
|
[EGGPL] = 0x1F346,
|
||||||
|
[WATER] = 0x1F4A6,
|
||||||
|
[LIT] = 0x1F525,
|
||||||
|
[UNAMU] = 0x1F612,
|
||||||
|
[SNEK] = 0x1F40D,
|
||||||
|
[PENGUIN] = 0x1F427,
|
||||||
|
[MONKEY] = 0x1F412,
|
||||||
|
[CHICK] = 0x1F425,
|
||||||
|
[DRAGON] = 0x1F409,
|
||||||
|
[OKOK] = 0x1F44C,
|
||||||
|
[EFFU] = 0x1F595,
|
||||||
|
[INUP] = 0x1F446,
|
||||||
|
[THDN] = 0x1F44E,
|
||||||
|
[THUP] = 0x1F44D
|
||||||
|
};
|
||||||
|
// Layouts
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSPO,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
|
||||||
|
[1] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
TD(EMOJIS),TD(ANIMAL),TD(HAND),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2),_______ , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
|
||||||
|
[2] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_LCTL, KC_D, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, _______, _______, KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
|
||||||
|
};
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
tap(KC_A);
|
||||||
|
tap(KC_C);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
_delay_ms(500);
|
||||||
|
set_unicode_input_mode(UC_WINC);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if(state->count == 1) {
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
else if(state->count <= 5) {
|
||||||
|
tap(KC_BSPC);
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if(state->count == 1) {
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
else if(state->count <= 5) {
|
||||||
|
tap(KC_BSPC);
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if(state->count == 1) {
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
else if(state->count <= 5) {
|
||||||
|
tap(KC_BSPC);
|
||||||
|
unicode_input_start();
|
||||||
|
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
|
||||||
|
unicode_input_finish();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
# The Nikchi's keymap for frosty_flake
|
||||||
|
|
||||||
|
### FEATURING
|
||||||
|
-SPACE CADET
|
||||||
|
-Caps Lock is now LCTRL
|
||||||
|
-LCTRL is Tap(LCTRL, Caps Lock)
|
||||||
|
|
||||||
|
### LEADER KEY - RALT
|
||||||
|
COMBOS
|
||||||
|
-a,a => Select All, Copy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### FN REBINDS for Windows
|
||||||
|
```
|
||||||
|
[W] [New Desktop]
|
||||||
|
[A][S][D] [Left Desk][Delete Desk][Right Desk]
|
||||||
|
|
||||||
|
[Ins][Hom][PUp] [RW][PP][FF]
|
||||||
|
[Del][End][PDn] [MU][VD][VU]
|
||||||
|
|
||||||
|
Arrows are Mouskeys, left three mods are clicks
|
||||||
|
|
||||||
|
```
|
@ -0,0 +1,15 @@
|
|||||||
|
#define COLOR_BLANK 0, 0, 0
|
||||||
|
|
||||||
|
#define COLOR_BLACK 0, 0, 0
|
||||||
|
#define COLOR_WHITE 15,15,15
|
||||||
|
#define COLOR_GRAY 7, 7, 7
|
||||||
|
|
||||||
|
#define COLOR_RED 15, 0, 0
|
||||||
|
#define COLOR_GREEN 0,15, 0
|
||||||
|
#define COLOR_BLUE 0, 0,15
|
||||||
|
|
||||||
|
#define COLOR_YELLOW 15,15, 0
|
||||||
|
#define COLOR_MAGENTA 15, 0,15
|
||||||
|
#define COLOR_CYAN 0,15,15
|
||||||
|
|
||||||
|
#define COLOR_ORANGE 15, 5, 0
|
@ -0,0 +1 @@
|
|||||||
|
#include "rgbtheme_default.h"
|
@ -0,0 +1,36 @@
|
|||||||
|
#include "color.h"
|
||||||
|
|
||||||
|
#define THEME_COLOR_LINUX COLOR_WHITE
|
||||||
|
#define THEME_COLOR_APPLE COLOR_WHITE
|
||||||
|
#define THEME_COLOR_WINDOWS COLOR_WHITE
|
||||||
|
|
||||||
|
#define THEME_COLOR_QWERTY COLOR_RED
|
||||||
|
#define THEME_COLOR_ALT COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_AUDIO COLOR_GREEN
|
||||||
|
|
||||||
|
#define THEME_COLOR_BLUETOOTH 7,7,15
|
||||||
|
#define THEME_COLOR_USB COLOR_WHITE
|
||||||
|
|
||||||
|
#define THEME_COLOR_CAPSLOCK COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_GUI COLOR_MAGENTA
|
||||||
|
#define THEME_COLOR_FUN COLOR_RED
|
||||||
|
#define THEME_COLOR_NUM 7,7,15
|
||||||
|
#define THEME_COLOR_PUNC COLOR_GREEN
|
||||||
|
#define THEME_COLOR_GREEK COLOR_CYAN
|
||||||
|
#define THEME_COLOR_EMOJI COLOR_YELLOW
|
||||||
|
#define THEME_COLOR_OTHERLAYER COLOR_GRAY
|
||||||
|
|
||||||
|
#define THEME_COLOR_GLOW1_HOME COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_GLOW1_HOMING COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_GLOW2_ALPHA COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_GLOW2_MODS COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_GLOW2_FN COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_GLOW2_HOME COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_GLOW2_HOMING COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_TP1 COLOR_ORANGE
|
||||||
|
#define THEME_COLOR_TP2 COLOR_RED
|
||||||
|
#define THEME_COLOR_TP3 COLOR_ORANGE
|
@ -0,0 +1,36 @@
|
|||||||
|
#include "color.h"
|
||||||
|
|
||||||
|
#define THEME_COLOR_LINUX COLOR_WHITE
|
||||||
|
#define THEME_COLOR_APPLE COLOR_WHITE
|
||||||
|
#define THEME_COLOR_WINDOWS COLOR_WHITE
|
||||||
|
|
||||||
|
#define THEME_COLOR_QWERTY COLOR_RED
|
||||||
|
#define THEME_COLOR_ALT COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_AUDIO COLOR_GREEN
|
||||||
|
|
||||||
|
#define THEME_COLOR_BLUETOOTH COLOR_BLUE
|
||||||
|
#define THEME_COLOR_USB COLOR_WHITE
|
||||||
|
|
||||||
|
#define THEME_COLOR_CAPSLOCK COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_GUI COLOR_MAGENTA
|
||||||
|
#define THEME_COLOR_FUN COLOR_RED
|
||||||
|
#define THEME_COLOR_NUM COLOR_BLUE
|
||||||
|
#define THEME_COLOR_PUNC COLOR_GREEN
|
||||||
|
#define THEME_COLOR_GREEK COLOR_CYAN
|
||||||
|
#define THEME_COLOR_EMOJI COLOR_YELLOW
|
||||||
|
#define THEME_COLOR_OTHERLAYER COLOR_GRAY
|
||||||
|
|
||||||
|
#define THEME_COLOR_GLOW1_HOME COLOR_GRAY
|
||||||
|
#define THEME_COLOR_GLOW1_HOMING COLOR_RED
|
||||||
|
|
||||||
|
#define THEME_COLOR_GLOW2_ALPHA COLOR_GRAY
|
||||||
|
#define THEME_COLOR_GLOW2_MODS COLOR_GREEN
|
||||||
|
#define THEME_COLOR_GLOW2_FN COLOR_BLUE
|
||||||
|
#define THEME_COLOR_GLOW2_HOME COLOR_RED
|
||||||
|
#define THEME_COLOR_GLOW2_HOMING COLOR_YELLOW
|
||||||
|
|
||||||
|
#define THEME_COLOR_TP1 COLOR_RED
|
||||||
|
#define THEME_COLOR_TP2 COLOR_BLUE
|
||||||
|
#define THEME_COLOR_TP3 COLOR_RED
|
@ -0,0 +1,23 @@
|
|||||||
|
# cinaeco's HHKB firmware
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,23 @@
|
|||||||
|
# QMK Keyboard Firmware for HHKB
|
||||||
|
|
||||||
|
## Modifications
|
||||||
|
|
||||||
|
### HHKB Fn Layer
|
||||||
|
|
||||||
|
Added some Media keys.
|
||||||
|
|
||||||
|
### Utility Layer (SpaceFN)
|
||||||
|
|
||||||
|
Hold `Space` for:
|
||||||
|
|
||||||
|
- Vi-style direction keys.
|
||||||
|
- WASD-style mouse keys.
|
||||||
|
- Dynamic macro playback on `1` and `2`.
|
||||||
|
- Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ `
|
||||||
|
|
||||||
|
### Dynamic Macros
|
||||||
|
|
||||||
|
Hold `q` and press:
|
||||||
|
|
||||||
|
- `1` or `2` to record macro 1 or 2.
|
||||||
|
- `s` to stop recording.
|
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef CONFIG_CINAECO_H
|
||||||
|
#define CONFIG_CINAECO_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#undef MANUFACTURER
|
||||||
|
#undef PRODUCT
|
||||||
|
#undef DESCRIPTION
|
||||||
|
#define MANUFACTURER QMK
|
||||||
|
#define PRODUCT HHKB QMK cinaeco
|
||||||
|
#define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap
|
||||||
|
|
||||||
|
// Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly.
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 230
|
||||||
|
|
||||||
|
// Uncomment to enable NKRO by default. May cause issues with KVM switches.
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,186 @@
|
|||||||
|
/* -*- eval: (turn-on-orgtbl); -*-
|
||||||
|
* cinaeco's HHKB Layout
|
||||||
|
*/
|
||||||
|
#include "hhkb.h"
|
||||||
|
|
||||||
|
// Layers.
|
||||||
|
#define QWER 0
|
||||||
|
#define COLE 1
|
||||||
|
#define DVOR 2
|
||||||
|
#define HHKB 3
|
||||||
|
#define UTIL 4
|
||||||
|
#define MREC 5
|
||||||
|
|
||||||
|
// Easier-to-read Layer Arrays.
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
|
||||||
|
enum hhkb_keycodes {
|
||||||
|
DYNAMIC_MACRO_RANGE = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
/* QWER Layer: Qwerty Default
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------------------.
|
||||||
|
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0|
|
||||||
|
* `--------------------------------------------------------------'
|
||||||
|
* |Alt|Gui | Space/UTIL |Gui |Alt|
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
[QWER] = KEYMAP(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||||
|
KC_TAB, LT(MREC, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, CTL_T(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(HHKB), \
|
||||||
|
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
|
||||||
|
|
||||||
|
|
||||||
|
/* COLE Layer: Colemak
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------------------.
|
||||||
|
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0|
|
||||||
|
* `--------------------------------------------------------------'
|
||||||
|
* |Alt|Gui | Space/UTIL |Gui |Alt|
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
[COLE] = KEYMAP(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||||
|
KC_TAB, LT(MREC, KC_Q), KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||||
|
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), \
|
||||||
|
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
|
||||||
|
|
||||||
|
|
||||||
|
/* DVOR Layer: Dvorak
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------------------.
|
||||||
|
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl|
|
||||||
|
* |--------------------------------------------------------------|
|
||||||
|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0|
|
||||||
|
* `--------------------------------------------------------------'
|
||||||
|
* |Alt|Gui | Space/UTIL |Gui |Alt|
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
[DVOR] = KEYMAP(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, \
|
||||||
|
KC_TAB, LT(MREC, KC_QUOT), KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, \
|
||||||
|
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), \
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), \
|
||||||
|
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
|
||||||
|
|
||||||
|
|
||||||
|
/* HHKB Layer: HHKB mode (HHKB Fn)
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | +| -|End|PgD|Dow| | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
* | | | |STOP | |
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[HHKB] = KEYMAP(
|
||||||
|
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||||
|
KC_CAPS, KC_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, \
|
||||||
|
____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
|
||||||
|
____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, \
|
||||||
|
____, ____, ____, KC_MSTP, ____),
|
||||||
|
|
||||||
|
|
||||||
|
/* UTIL Layer: Extra utilities
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------------------------.
|
||||||
|
* |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG|
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | |
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | |
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | | | | | |SPC| | | | | | | |
|
||||||
|
* `-------------------------------------------------------------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
[UTIL] = KEYMAP(
|
||||||
|
RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, \
|
||||||
|
____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, \
|
||||||
|
____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, \
|
||||||
|
____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
|
____, ____, ____, ____, ____),
|
||||||
|
|
||||||
|
|
||||||
|
/* MREC Layer: Record macros with `q`
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------------------------.
|
||||||
|
* | |REC1|REC2| | | | | | | | | | | | |
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | | |RSTP| | | | | | | | | | |
|
||||||
|
* |-------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* `-------------------------------------------------------------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-------------------------------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
[MREC] = KEYMAP(
|
||||||
|
____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
|
____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
|
____, ____, ____, ____, ____)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// For Dynamic Macros.
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
// this is the style you want to emulate.
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
#include "M10A.h"
|
#include "m10a.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "M10A.h"
|
#include "m10a.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = 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.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,119 @@
|
|||||||
|
#include "miuni32.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Level 0: Default Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)|
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* |LT(3|Z)| X | C | V | NO | SPC | B | N | M | RSFT |LT(2|.)|
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[0] ={
|
||||||
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, LT(1, KC_COMMA)},
|
||||||
|
{LT(3, KC_Z), KC_X, KC_C, KC_V, KC_NO, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, LT(2, KC_DOT)}
|
||||||
|
},
|
||||||
|
/* Level 1: Numbers Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | PGUP | TRNS |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | LATL | 1 | 2 | 3 | 0 | NO | LEFT | DOWN | RGHT | PGDN | RSHFT |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[1] ={
|
||||||
|
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL},
|
||||||
|
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS},
|
||||||
|
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RSFT}
|
||||||
|
},
|
||||||
|
/* Level 2: Symbols Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | ! | @ | # | $ | % | ^ | & | * | - | + | = |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | { | } | [ | ] | TRNS | TRNS | \ | ; | : | ` | ? |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | LSFT | LCTL | L | T | TRNS | TAB | N | TRNS | TRNS | RCTL | TRNS |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[2] ={
|
||||||
|
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL},
|
||||||
|
{KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, KC_QUES},
|
||||||
|
{KC_LSFT, KC_LCTL, KC_L, KC_T, KC_TRNS, KC_TAB, KC_N, KC_TRNS, KC_TRNS, KC_RCTL, KC_TRNS}
|
||||||
|
},
|
||||||
|
/* Level 3: RGB Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | RESET | TRNS | TRNS | TRNS | TRNS | F1 | F2 | F3 | F4 | F5 | F6 |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD| NO |RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| TRNS | TRNS |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | TRNS | TRNS | TRNS | TRNS | NO | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[3] ={
|
||||||
|
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6},
|
||||||
|
{RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_KANA)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
# The default keymap for miuni32
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = 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.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,181 @@
|
|||||||
|
#include "miuni32.h"
|
||||||
|
|
||||||
|
// Keyboard layer definitions
|
||||||
|
#define BASE 0
|
||||||
|
#define NUMBERS 1
|
||||||
|
#define SYMBOLS 2
|
||||||
|
#define MEDIA 3
|
||||||
|
|
||||||
|
// Keyboard macro defintions
|
||||||
|
#define GIT_ST M(0)
|
||||||
|
#define GIT_PU M(1)
|
||||||
|
#define GIT_CM M(2)
|
||||||
|
#define HM_DIR M(3)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Level 0: Default Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | A | S | D | F | G | H | J | K | L | ENT | RSFT |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* |LT(2|Z)|LT(3|X)| C | V | B | SPC | N | M | , |LT(1|.)| RCTL |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[BASE] ={
|
||||||
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_RSFT},
|
||||||
|
{LT(2, KC_Z), LT(3, KC_X), KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMMA, LT(1, KC_DOT), KC_RCTL}
|
||||||
|
},
|
||||||
|
/* Level 1: Numbers Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | INS | PGUP |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | LATL | 1 | 2 | 3 | 0 | ENT | LEFT | DOWN | RGHT | !TRNS!| PGDN |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[NUMBERS] ={
|
||||||
|
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL},
|
||||||
|
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_INSERT, KC_PGUP},
|
||||||
|
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_PGDN}
|
||||||
|
},
|
||||||
|
/* Level 2: Symbols Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* | ! | @ | # | $ | % | ^ | & | * | _ | = | ? |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | RESET | LSFT | ~ | { | } | \ | | | ; | : | ` | " |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | !TRNS!| LCTL | TRNS | [ | ] | TAB | < | > | TRNS | RCTL | TRNS |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[SYMBOLS] ={
|
||||||
|
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_EQL, KC_QUES},
|
||||||
|
{RESET, KC_LSFT, KC_TILD, KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_SCLN, KC_COLN, KC_GRV, KC_DQUO},
|
||||||
|
{KC_TRNS, KC_LCTL, KC_TRNS, KC_LBRC, KC_RBRC, KC_TAB, KC_LABK, KC_RABK, KC_TRNS, KC_RCTL, KC_TRNS}
|
||||||
|
},
|
||||||
|
/* Level 3: Media Layer
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |RGB_TOG|RGB_HUI|RGB_SAI|RGB_VAI| GIT_CM| CALC | WREF | WFAV | MUTE | VOLD | VOLU |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* |RGB_MOD|RGB_HUD|RGB_SAD|RGB_VAD| GIT_ST| WHOM | WBAK | WFWD | TRNS | STOP | PLAY |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
* | TRNS | !TRNS!| TRNS | HM_DIR| GIT_PU| MYCM | WSTP | WSCH | MSEL | MPRV | MNXT |
|
||||||
|
* |---------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[MEDIA] ={
|
||||||
|
{RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, GIT_CM, KC_CALC, KC_WREF, KC_WFAV, KC_MUTE, KC_VOLD, KC_VOLU},
|
||||||
|
{RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, GIT_ST, KC_WHOM, KC_WBAK, KC_WFWD, KC_TRNS, KC_MSTP, KC_MPLY},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, HM_DIR, GIT_PU, KC_MYCM, KC_WSTP, KC_WSCH, KC_MSEL, KC_MPRV, KC_MNXT}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void press_and_release_key(uint8_t code)
|
||||||
|
{
|
||||||
|
register_code(code);
|
||||||
|
unregister_code(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
void press_and_release_mod_key(uint8_t mod, uint8_t code)
|
||||||
|
{
|
||||||
|
register_code(mod);
|
||||||
|
register_code(code);
|
||||||
|
unregister_code(code);
|
||||||
|
unregister_code(mod);
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
return MACRO(T(G), T(I), T(T), T(SPC),
|
||||||
|
T(S), T(T), T(A), T(T), T(U), T(S), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
return MACRO(T(G), T(I), T(T), T(SPC),
|
||||||
|
T(P), T(U), T(L), T(L), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
return MACRO(T(G), T(I), T(T), T(SPC),
|
||||||
|
T(C), T(O), T(M), T(M), T(I), T(T), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
/*press_and_release_key(KC_C);
|
||||||
|
press_and_release_key(KC_D);
|
||||||
|
press_and_release_key(KC_SPC);
|
||||||
|
press_and_release_mod_key(KC_LSFT, KC_GRV);
|
||||||
|
press_and_release_key(KC_SLSH);
|
||||||
|
press_and_release_key(KC_Q);
|
||||||
|
press_and_release_key(KC_M);
|
||||||
|
press_and_release_key(KC_K);
|
||||||
|
press_and_release_mod_key(KC_LSFT, KC_MINS);*/
|
||||||
|
return MACRO(I(0),
|
||||||
|
T(C), T(D), T(SPC),
|
||||||
|
D(LSFT), T(GRV), U(LSFT), T(SLSH),
|
||||||
|
T(Q), T(M), T(K), D(LSFT), T(MINS), U(LSFT),
|
||||||
|
T(F), T(I), T(R), T(M), T(W), T(A), T(R), T(E), T(SLSH),
|
||||||
|
T(K), T(E), T(Y), T(B), T(O), T(A), T(R), T(D), T(S), T(SLSH),
|
||||||
|
T(M), T(I), T(U), T(N), T(I), T(3), T(2), T(SLSH),
|
||||||
|
T(K), T(E), T(Y), T(M), T(A), T(P), T(S), END);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_KANA)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
# ht_156's keymap for miuni32, using 33 keys
|
@ -0,0 +1,12 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
|
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
API_SYSEX_ENABLE = no
|
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
#define ONESHOT_TAP_TOGGLE 2
|
||||||
|
#define ONESHOT_TIMEOUT 500
|
||||||
|
|
||||||
|
#define MOUSEKEY_INTERVAL 20
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
|
|
||||||
|
#define DM_PLAY DYN_MACRO_PLAY1
|
||||||
|
#define DM_STRT DYN_REC_START1
|
||||||
|
#define DM_STOP DYN_REC_STOP
|
||||||
|
|
||||||
|
#define OSL_RSE OSL(RSE)
|
||||||
|
#define OSL_LWR OSL(LWR)
|
||||||
|
#define OSL_FUN OSL(FUN)
|
||||||
|
|
||||||
|
#define OSM_CTL OSM(MOD_LCTL)
|
||||||
|
#define OSM_ALT OSM(MOD_LALT)
|
||||||
|
#define OSM_SFT OSM(MOD_LSFT)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
After Width: | Height: | Size: 49 KiB |
@ -0,0 +1,100 @@
|
|||||||
|
#include "planck.h"
|
||||||
|
#include "backlight.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum planck_layers { DEF, LWR, RSE, FUN };
|
||||||
|
enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
|
||||||
|
enum tap_dance_keys { TD_SCLN };
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Q | W | E | R | T | Esc | Bksp | Y | U | I | O | P |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | A | S | D | F | G | Tab | Enter| H | J | K | L | ; |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Z | X | C | V | B | Shift|DmPlay| N | M | , | . | / |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Super| Alt | Fun | Lower| Space | Raise| Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[DEF] = {
|
||||||
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||||
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)},
|
||||||
|
{KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||||
|
{OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ! | @ | # | $ | % | | | ^ | & | * | ( | ) |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ~ | | | | | | | _ | + | | { | } |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | " | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Home | PgDn | PgUp | End |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[LWR] = {
|
||||||
|
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
|
||||||
|
{S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||||
|
},
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ` | | | | | | | - | = | | [ | ] |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | ' | \ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Home | PgDn | PgUp | End |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[RSE] = {
|
||||||
|
{KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
|
||||||
|
{KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||||
|
},
|
||||||
|
/* Function
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | Reset|Delete| F6 | F7 | F8 | F9 | F10 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | F11 | F12 | F13 | F14 | F15 | | | |MsWhLt|MsWhDn|MsWhUp|MsWhRt|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |BlTggl|BlStep| | | |DmStrt|DmStop| | |MsBtn1|MsBtn2|MsBtn3|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | |MsLeft|MsDown| MsUp |MsRght|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[FUN] = {
|
||||||
|
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||||
|
{KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R},
|
||||||
|
{BL_TOGG, BL_STEP, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R}
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
About
|
||||||
|
------
|
||||||
|
|
||||||
|
A simple split qwerty Planck layout that makes use of one-shot modifiers,
|
||||||
|
one-shot layers, tap-dance keys and dynamic macros.
|
||||||
|
|
||||||
|
Layout
|
||||||
|
-------
|
||||||
|
|
||||||
|
![Layout](keyboard-layout.jpg "Keyboard Layout")
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,221 @@
|
|||||||
|
#include "preonic.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
enum preonic_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum preonic_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | CTRL | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Lower| Z | X | C | V | B | N | M | , | . | / |Raise |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |BKSP |SHIFT |ENTER |SPC | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL},
|
||||||
|
{KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{LOWER , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RAISE },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = {
|
||||||
|
{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, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||||
|
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
|
||||||
|
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = {
|
||||||
|
{NOTE_B5, 20},
|
||||||
|
{NOTE_B6, 8},
|
||||||
|
{NOTE_DS6, 20},
|
||||||
|
{NOTE_B6, 8}
|
||||||
|
};
|
||||||
|
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistent_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1 @@
|
|||||||
|
# The default Preonic layout - largely based on the Planck's
|
@ -1 +0,0 @@
|
|||||||
#include "s60-x.h"
|
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 213 KiB |
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 213 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/* Main layer: Test layout, using all keys.
|
/* Main layer: Test layout, using all keys.
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/* 0: Main layer
|
/* 0: Main layer
|
||||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hasu
|
* Hasu
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HHKB Layout
|
* HHKB Layout
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/* 0: Main layer
|
/* 0: Main layer
|
||||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/* Main layer:
|
/* Main layer:
|
||||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* 0: qwerty
|
/* 0: qwerty
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
// Poker fix with toggle and bit operation
|
// Poker fix with toggle and bit operation
|
||||||
// Fn + Esc = `
|
// Fn + Esc = `
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
// Poker fix with set(state transition)
|
// Poker fix with set(state transition)
|
||||||
// Fn + Esc = `
|
// Fn + Esc = `
|
@ -1,4 +1,4 @@
|
|||||||
#include "s60-x.h"
|
#include "s60_x.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SpaceFN
|
* SpaceFN
|
@ -0,0 +1 @@
|
|||||||
|
#include "s60_x.h"
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,98 @@
|
|||||||
|
#include "satan.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Used for SHIFT_ESC
|
||||||
|
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = KEYMAP_ANSI(
|
||||||
|
F(0), 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, \
|
||||||
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LCTL, MO(_FL), KC_LGUI, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | RESET|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | |BL-|BL+|BL |
|
||||||
|
* |--------------------------------------------ΩΩ---------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = KEYMAP_ANSI(
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \
|
||||||
|
_______,_______,_______, _______, _______,_______,_______, _______),
|
||||||
|
#else
|
||||||
|
KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
|
||||||
|
_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, BL_DEC, BL_INC,BL_TOGG, \
|
||||||
|
KC_DEL, KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,_______,_______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
|
_______,_______,_______, _______, _______,_______,_______,_______),
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
enum function_id {
|
||||||
|
SHIFT_ESC,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||||
|
};
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
static uint8_t shift_esc_shift_mask;
|
||||||
|
switch (id) {
|
||||||
|
case SHIFT_ESC:
|
||||||
|
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (shift_esc_shift_mask) {
|
||||||
|
add_key(KC_GRV);
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
add_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (shift_esc_shift_mask) {
|
||||||
|
del_key(KC_GRV);
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
del_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
# Colemak layout for GH60 Satan
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,147 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Bathroom Epiphanies
|
||||||
|
#define PRODUCT tiger_lily
|
||||||
|
#define DESCRIPTION Tiger Lily controller for the Filco Majestouch 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies
|
||||||
|
* Ported from the Bathroom Epiphanies TMK Firmware:
|
||||||
|
* https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
|
||||||
|
#define MATRIX_COLS 18 // ColA - ColR in the schematic
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*/
|
||||||
|
#define UNUSED_PINS { B0, C4, D3 }
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->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_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "tiger_lily.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
# The default keymap for tiger_lily
|
@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Gabriel Young <gabeplaysdrums@live.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 <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t scan_col(void) {
|
||||||
|
return (
|
||||||
|
(PINC&(1<<2) ? 0 : ((matrix_row_t)1<<0)) | \
|
||||||
|
(PINB&(1<<3) ? 0 : ((matrix_row_t)1<<1)) | \
|
||||||
|
(PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | \
|
||||||
|
(PINB&(1<<2) ? 0 : ((matrix_row_t)1<<3)) | \
|
||||||
|
(PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | \
|
||||||
|
(PINC&(1<<7) ? 0 : ((matrix_row_t)1<<5)) | \
|
||||||
|
(PINB&(1<<6) ? 0 : ((matrix_row_t)1<<6)) | \
|
||||||
|
(PINB&(1<<5) ? 0 : ((matrix_row_t)1<<7))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
switch (col) {
|
||||||
|
case 0: PORTD = (PORTD & ~0b01110111) | 0b01110110; break; \
|
||||||
|
case 1: PORTD = (PORTD & ~0b01110111) | 0b01100001; break; \
|
||||||
|
case 2: PORTD = (PORTD & ~0b01110111) | 0b01100101; break; \
|
||||||
|
case 3: PORTD = (PORTD & ~0b01110111) | 0b00000011; break; \
|
||||||
|
case 4: PORTD = (PORTD & ~0b01110111) | 0b00000111; break; \
|
||||||
|
case 5: PORTD = (PORTD & ~0b01110111) | 0b00010011; break; \
|
||||||
|
case 6: PORTD = (PORTD & ~0b01110111) | 0b00010111; break; \
|
||||||
|
case 7: PORTD = (PORTD & ~0b01110111) | 0b00100011; break; \
|
||||||
|
case 8: PORTD = (PORTD & ~0b01110111) | 0b00100111; break; \
|
||||||
|
case 9: PORTD = (PORTD & ~0b01110111) | 0b00110011; break; \
|
||||||
|
case 10: PORTD = (PORTD & ~0b01110111) | 0b01110010; break; \
|
||||||
|
case 11: PORTD = (PORTD & ~0b01110111) | 0b01100110; break; \
|
||||||
|
case 12: PORTD = (PORTD & ~0b01110111) | 0b01110000; break; \
|
||||||
|
case 13: PORTD = (PORTD & ~0b01110111) | 0b01100100; break; \
|
||||||
|
case 14: PORTD = (PORTD & ~0b01110111) | 0b01100000; break; \
|
||||||
|
case 15: PORTD = (PORTD & ~0b01110111) | 0b01000111; break; \
|
||||||
|
case 16: PORTD = (PORTD & ~0b01110111) | 0b01000011; break; \
|
||||||
|
case 17: PORTD = (PORTD & ~0b01110111) | 0b00110111; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
/* Column output pins */ \
|
||||||
|
DDRD |= 0b01110111; \
|
||||||
|
/* Row input pins */ \
|
||||||
|
DDRC &= ~0b10000100; \
|
||||||
|
DDRB &= ~0b01111110; \
|
||||||
|
PORTC |= 0b10000100; \
|
||||||
|
PORTB |= 0b01111110;
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++)
|
||||||
|
matrix[i] = matrix_debouncing[i] = 0;
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
matrix_row_t col_scan = scan_col();
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = col_scan & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing)
|
||||||
|
_delay_ms(1);
|
||||||
|
else
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++)
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
#ifndef NO_PRINT
|
||||||
|
print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
matrix_row_t matrix_row = matrix_get_row(row);
|
||||||
|
xprintf("%02X: ", row);
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
bool curr_bit = matrix_row & (1<<col);
|
||||||
|
xprintf("%c", curr_bit ? '*' : '.');
|
||||||
|
}
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void) {
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++)
|
||||||
|
count += bitpop32(matrix[row]);
|
||||||
|
return count;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
tiger_lily keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
This is the firmware for Rev. 20161114 of the Tiger Lily controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Filco Majestouch 2 104 key](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1819). Bathroom Epiphanies has advised that the source is also compatible with the Black Petal controller, however I do not own an example to test against.
|
||||||
|
|
||||||
|
The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers).
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme](/).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/tiger_lily folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
|
||||||
|
To build with the default keymap, simply run `make default`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make [default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
@ -0,0 +1,71 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c
|
@ -0,0 +1,63 @@
|
|||||||
|
#include "tiger_lily.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
DDRB |= (1<<7);
|
||||||
|
DDRC |= (1<<5) | (1<<6);
|
||||||
|
|
||||||
|
print_dec(usb_led);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
PORTC &= ~(1<<5);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<5);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
PORTB &= ~(1<<7);
|
||||||
|
else
|
||||||
|
PORTB |= (1<<7);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
PORTC &= ~(1<<6);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<6);
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
#ifndef TIGER_LILY_H
|
||||||
|
#define TIGER_LILY_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The following is an example using the Planck MIT layout
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|
||||||
|
/*
|
||||||
|
Matrix col/row mapping
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
| J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
|
||||||
|
`----' `-------------------' `-------------------' `-------------------' `--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------. ,-------------------.
|
||||||
|
| J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
|
||||||
|
|-------------------------------------------------------------------------| |--------------| |-------------------|
|
||||||
|
| J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
|
||||||
|
|-------------------------------------------------------------------------| '--------------' |-------------- |
|
||||||
|
| O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
|
||||||
|
|-------------------------------------------------------------------------| ,----. |-------------------|
|
||||||
|
| N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------. |-------------- |
|
||||||
|
| A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
|
||||||
|
`-------------------------------------------------------------------------' `--------------' `-------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
|
||||||
|
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
/* Columns and rows need to be swapped in the below definition */ \
|
||||||
|
/* A B C D E F G H I J K L M N O P Q R */ \
|
||||||
|
/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
|
||||||
|
/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
|
||||||
|
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
|
||||||
|
/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
|
||||||
|
/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
|
||||||
|
/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
|
||||||
|
/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
|
||||||
|
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1 +0,0 @@
|
|||||||
<html><head><meta http-equiv="refresh" content="0; url=http://qmk.fm/keyboards/ergodox/" /></head></html>
|
|