Merge remote-tracking branch 'upstream/master'
commit
ce0b8ea676
|
@ -0,0 +1,12 @@
|
||||||
|
# About this keymap
|
||||||
|
|
||||||
|
This keymap is based on the qwertz layout.
|
||||||
|
It has a key for pressing the left control and the left alt key at once.
|
||||||
|
|
||||||
|
Linux makes a difference between AltGr and Control + Alt. Some keybindings are easier to press now.
|
||||||
|
|
||||||
|
Also, I added a layer for pressing Control + Alt + F-Keys very fast.
|
||||||
|
|
||||||
|
# Layer
|
||||||
|
|
||||||
|
Each layer in the *keymap.c*-file has a comment showing the mappings of the layer.
|
|
@ -0,0 +1,236 @@
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "keymap_german.h"
|
||||||
|
|
||||||
|
// Layer names
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbol layer
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
#define SHRT 3 // shortcut layer
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Caps | 1 | 2 | 3 | 4 | 5 |X ` X| | PRSC | 6 | 7 | 8 | 9 | 0 | ß |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | Ü |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Esc | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä/L2 |
|
||||||
|
* |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Y | X | C | V | B | | | | N | M | , | . | - | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | LGui | ^ | < | LEFT | RIGHT| | Up | Down | # | + | LCA |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | CTRL | ALT | | Alt |Ctrl/Esc|
|
||||||
|
* ,------+------+------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Del |------| |------| Bkspc | Enter|
|
||||||
|
* | | | 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
|
||||||
|
KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, DE_ACUT,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT,
|
||||||
|
KC_LCTRL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC ,KC_DELT,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE),
|
||||||
|
KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE),
|
||||||
|
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, DE_HASH, DE_PLUS, LCA_T(KC_NO),
|
||||||
|
KC_RALT, KC_RCTRL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV,
|
||||||
|
KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,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, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | Lclk | MsUp | Rclk | | | | | |VolDwn| Mute |VolUp | | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------| |------| | Prev | Stop | Play | Next | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | |WhRght|WhDown| WhUp |WhLeft|WhClk | | | |BwSrch|BwBack|BwHome|BwRefr|BwFwd | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | |MsAcl0|MsAcl1|MsAcl2| | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | |Brwser|Brwser|
|
||||||
|
* | Lclk | Rclk |------| |------|Back |Forwd |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5,
|
||||||
|
KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_BTN1, KC_BTN2, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11,
|
||||||
|
KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12,
|
||||||
|
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,
|
||||||
|
KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_WBAK, KC_WFWD
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 3: Linux shortcuts
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | |LCA-F1|LCA-F2|LCA-F3|LCA-F4|LCA-F5| | | |LCA-F6|LCA-F7|LCA-F8|LCA-F9| | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |LCA-Le| |LCA-Ri| |------| |------| | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | |LCA-Le|LCA-Ri| | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// Shortcuts
|
||||||
|
[SHRT] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, LCA(KC_LEFT), KC_TRNS, LCA(KC_RIGHT), KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_LEFT), LCA(KC_RIGHT),
|
||||||
|
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, LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
LCA(KC_UP), LCA(KC_DOWN), 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;
|
||||||
|
}
|
||||||
|
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) {
|
||||||
|
case SYMB:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case MDIA:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case SHRT:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ergodox_board_led_off();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
|
@ -0,0 +1,177 @@
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "bootloader.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC,
|
||||||
|
KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
|
||||||
|
KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,
|
||||||
|
KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT,
|
||||||
|
KC_NO , KC_NO ,
|
||||||
|
KC_NO ,
|
||||||
|
KC_BSPC,KC_DEL ,KC_FN23,
|
||||||
|
// right hand
|
||||||
|
KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28,
|
||||||
|
KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30,
|
||||||
|
KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29,
|
||||||
|
KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI,
|
||||||
|
KC_NO , KC_NO,
|
||||||
|
KC_NO ,
|
||||||
|
KC_FN29,KC_ENT ,KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
KEYMAP( // layer 1 : function and symbol keys
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
|
KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR,
|
||||||
|
KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1,
|
||||||
|
// right hand
|
||||||
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS,
|
||||||
|
LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS,
|
||||||
|
KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation
|
||||||
|
// left hand
|
||||||
|
KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO,
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1 ,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS,
|
||||||
|
KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS,
|
||||||
|
KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
KEYMAP( // layer 3 : teensy bootloader functions
|
||||||
|
// left hand
|
||||||
|
KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1 ,
|
||||||
|
// 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( // layer 4: numpad
|
||||||
|
// left 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,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC,
|
||||||
|
KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC,
|
||||||
|
KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT,
|
||||||
|
KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT,
|
||||||
|
KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/* id for user defined functions */
|
||||||
|
enum function_id {
|
||||||
|
TEENSY_KEY,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fn action definition
|
||||||
|
*/
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key
|
||||||
|
[1] = ACTION_LAYER_SET(0, ON_PRESS),
|
||||||
|
//[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM),
|
||||||
|
//[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT),
|
||||||
|
|
||||||
|
//[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH),
|
||||||
|
//[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN),
|
||||||
|
//[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
|
||||||
|
//[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT),
|
||||||
|
[23] = ACTION_LAYER_SET(3, ON_PRESS),
|
||||||
|
[24] = ACTION_LAYER_SET(2, ON_PRESS),
|
||||||
|
[25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB),
|
||||||
|
[26] = ACTION_LAYER_SET(1, ON_PRESS),
|
||||||
|
[27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS),
|
||||||
|
[28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS),
|
||||||
|
//[29] = ACTION_LAYER_TOGGLE(4),
|
||||||
|
[29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC),
|
||||||
|
[30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT),
|
||||||
|
[31] = ACTION_LAYER_MOMENTARY(2),
|
||||||
|
//[] = ACTION_LAYER_TAP_KEY(4, KC_S),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (id == TEENSY_KEY) {
|
||||||
|
clear_keyboard();
|
||||||
|
print("\n\nJump to bootloader... ");
|
||||||
|
_delay_ms(250);
|
||||||
|
bootloader_jump(); // should not return
|
||||||
|
print("not supported.\n");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,133 @@
|
||||||
|
My main layout (Layer 0) is based on qwerty. I tried to fit the layout of the kinesis keyboard onto the ergodox. Furthermore I did some tweaks.
|
||||||
|
The other layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I cant press the reset button, so i need a key to send the teensy into reprogram mode.
|
||||||
|
There is a layer with symbols a numpad. These layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I need a key to reprogram, because I can't access the reset button.
|
||||||
|
|
||||||
|
I am a linux user and need the esc key and str keys often therefore it is easyly accessed. Switching console str+alt+tab+f2 (layer 2 and 2) is tricky but you get it after a while.
|
||||||
|
As I live in germany and need to type umlaut frquently, i mapped the CAPS to the meta key, and swapped ' and ". So I can type ö with CAPS o + ¨. no need to press o+SHIFT+'
|
||||||
|
As a note for linux users i use str+p to get last command, instead of using the cursor keys.
|
||||||
|
|
||||||
|
HOWTO to convert CAPS to Meta-Key and swap ' with "
|
||||||
|
|
||||||
|
* create file with following content
|
||||||
|
.Xmodmap
|
||||||
|
clear Lock
|
||||||
|
keycode 48 = quotedbl apostrophe quotedbl apostrophe
|
||||||
|
keycode 66 = Multi_key
|
||||||
|
|
||||||
|
* apply with
|
||||||
|
xmodmap .Xmodmap
|
||||||
|
|
||||||
|
* convert to xkbmap
|
||||||
|
xkbcomp $DISPLAY $HOME/.xkbmap
|
||||||
|
|
||||||
|
* automatic startup each time you startup x
|
||||||
|
echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc
|
||||||
|
|
||||||
|
KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC,
|
||||||
|
KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
|
||||||
|
KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,
|
||||||
|
KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT,
|
||||||
|
KC_NO , KC_NO ,
|
||||||
|
KC_NO ,
|
||||||
|
KC_BSPC,KC_DEL ,KC_FN23,
|
||||||
|
// right hand
|
||||||
|
KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28,
|
||||||
|
KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30,
|
||||||
|
KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29,
|
||||||
|
KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI,
|
||||||
|
KC_NO , KC_NO,
|
||||||
|
KC_NO ,
|
||||||
|
KC_FN29,KC_ENT ,KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
KEYMAP( // layer 1 : function and symbol keys
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
|
KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR,
|
||||||
|
KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1,
|
||||||
|
// right hand
|
||||||
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS,
|
||||||
|
LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS,
|
||||||
|
KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation
|
||||||
|
// left hand
|
||||||
|
KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS,
|
||||||
|
KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO,
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1 ,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS,
|
||||||
|
KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS,
|
||||||
|
KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
KEYMAP( // layer 3 : teensy bootloader functions
|
||||||
|
// left hand
|
||||||
|
KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_FN1 ,
|
||||||
|
// 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( // layer 4: numpad
|
||||||
|
// left 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,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC,
|
||||||
|
KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC,
|
||||||
|
KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT,
|
||||||
|
KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT,
|
||||||
|
KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
// Runs just one time when the keyboard initializes.
|
// Runs just one time when the keyboard initializes.
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
eeconfig_init();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ for the left and right halves seperately. To flash them:
|
||||||
|
|
||||||
- Install the firmware with `sudo make infinity-keymapname-dfu-util`
|
- Install the firmware with `sudo make infinity-keymapname-dfu-util`
|
||||||
|
|
||||||
- Build left hand firmware with `make infinity-keymapname MASTER=right`
|
- Build right hand firmware with `make infinity-keymapname MASTER=right`
|
||||||
|
|
||||||
- Plug in the right hand keyboard only.
|
- Plug in the right hand keyboard only.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
|
@ -0,0 +1,20 @@
|
||||||
|
Magicforce 68 Handwired
|
||||||
|
=======================
|
||||||
|
|
||||||
|
This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro.
|
||||||
|
|
||||||
|
## Wiring Layout
|
||||||
|
|
||||||
|
![Wiring Layout](wiring-layout.png)
|
||||||
|
|
||||||
|
## Pinout
|
||||||
|
|
||||||
|
The following pins are used:
|
||||||
|
- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6
|
||||||
|
- Rows 1-5: F0, F1, F4, F5, F6
|
||||||
|
|
||||||
|
## Compiling and loading the firmware
|
||||||
|
|
||||||
|
To build the firmware, run `make`.
|
||||||
|
|
||||||
|
To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
|
|
@ -0,0 +1,162 @@
|
||||||
|
/*
|
||||||
|
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 Hexwire
|
||||||
|
#define PRODUCT Magicforce 68
|
||||||
|
#define DESCRIPTION Handwired Magicforce 68
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 }
|
||||||
|
#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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,67 @@
|
||||||
|
#include "magicforce68.h"
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _FN1 1
|
||||||
|
#define _FN2 2
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
#define KC_X0 LT(_FN2, KC_GRV)
|
||||||
|
#define KC_X1 MO(_FN1)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
|
||||||
|
/*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
|
||||||
|
/*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
|
||||||
|
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
|
||||||
|
/*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
|
||||||
|
LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
|
||||||
|
/*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
|
||||||
|
LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
|
||||||
|
/*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||||
|
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||||
|
, , , UP , , , , , , , , , , , VOLD,END,
|
||||||
|
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||||
|
, ,LEFT,DOWN,RGHT, , , , , , , , ,
|
||||||
|
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||||
|
, , , , , , ,MUTE, , , , , MUTE,
|
||||||
|
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||||
|
, , , , , , , MPRV,MPLY,MNXT
|
||||||
|
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN2] = KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||||
|
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||||
|
, , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
|
||||||
|
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||||
|
, ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
|
||||||
|
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||||
|
, , , , , , 0 , 1 , 2 , 3 , , , MUTE,
|
||||||
|
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||||
|
, , , , , , , MPRV,MPLY,MNXT
|
||||||
|
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include "magicforce68.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef MAGICFORCE68_H
|
||||||
|
#define MAGICFORCE68_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \
|
||||||
|
K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \
|
||||||
|
) { \
|
||||||
|
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
|
||||||
|
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
|
||||||
|
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \
|
||||||
|
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \
|
||||||
|
{ KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
||||||
|
|
||||||
|
avrdude: build
|
||||||
|
ls /dev/tty* > /tmp/1; \
|
||||||
|
echo "Reset your Pro Micro now"; \
|
||||||
|
while [[ -z $$USB ]]; do \
|
||||||
|
sleep 1; \
|
||||||
|
ls /dev/tty* > /tmp/2; \
|
||||||
|
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
|
||||||
|
done; \
|
||||||
|
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
|
||||||
|
|
||||||
|
.PHONY: avrdude
|
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
|
@ -183,6 +183,7 @@ enum quantum_keycodes {
|
||||||
#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
|
#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
|
||||||
#define SCMD(kc) (kc | QK_LGUI | QK_LSFT)
|
#define SCMD(kc) (kc | QK_LGUI | QK_LSFT)
|
||||||
#define SWIN(kc) SCMD(kc)
|
#define SWIN(kc) SCMD(kc)
|
||||||
|
#define LCA(kc) (kc | QK_LCTL | QK_LALT)
|
||||||
|
|
||||||
#define MOD_HYPR 0xf
|
#define MOD_HYPR 0xf
|
||||||
#define MOD_MEH 0x7
|
#define MOD_MEH 0x7
|
||||||
|
@ -339,6 +340,7 @@ enum quantum_keycodes {
|
||||||
#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
||||||
#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
|
#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
|
||||||
#define SWIN_T(kc) SCMD_T(kc)
|
#define SWIN_T(kc) SCMD_T(kc)
|
||||||
|
#define LCA_T(kc) MT((MOD_LCTL | MOD_LALT), kc) // Left control and left alt
|
||||||
|
|
||||||
// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
|
// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
|
||||||
#define KC_HYPR HYPR(KC_NO)
|
#define KC_HYPR HYPR(KC_NO)
|
||||||
|
|
|
@ -92,4 +92,23 @@ elif [[ -n "$(type -P zypper)" ]]; then
|
||||||
# TODO: The avr and eabi tools are not available as default packages, so we need
|
# TODO: The avr and eabi tools are not available as default packages, so we need
|
||||||
# another way to install them
|
# another way to install them
|
||||||
|
|
||||||
|
elif [[ -n "$(type -P pkg)" ]]; then
|
||||||
|
# FreeBSD
|
||||||
|
pkg update
|
||||||
|
pkg install -y \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
gmake \
|
||||||
|
gcc \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
avr-binutils \
|
||||||
|
avr-gcc \
|
||||||
|
avr-libc \
|
||||||
|
dfu-programmer \
|
||||||
|
dfu-util \
|
||||||
|
arm-none-eabi-gcc \
|
||||||
|
arm-none-eabi-binutils \
|
||||||
|
arm-none-eabi-newlib \
|
||||||
|
diffutils
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue