@ -0,0 +1,48 @@
|
||||
#include "atreus.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 _QW 0
|
||||
#define _RS 1
|
||||
#define _LW 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* Qwerty */
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
|
||||
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
||||
},
|
||||
[_RS] = { /* [> RAISE <] */
|
||||
{KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||
{KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||
{KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS},
|
||||
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
||||
},
|
||||
[_LW] = { /* [> LOWER <] */
|
||||
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
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,96 @@
|
||||
/*
|
||||
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"
|
||||
|
||||
|
||||
/* Make Overloaded Keys switch faster */
|
||||
#define TAPPING_TERM 150
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Technomancy
|
||||
#define PRODUCT Atreus
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 11
|
||||
|
||||
// Change this to how you wired your keyboard
|
||||
// COLS: Left to right, ROWS: Top to bottom
|
||||
#if defined(ATREUS_ASTAR)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
||||
#if defined(PCBDOWN)
|
||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
||||
#else
|
||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
||||
#endif
|
||||
# define UNUSED_PINS
|
||||
#elif defined(ATREUS_TEENSY2)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
||||
# define UNUSED_PINS
|
||||
#endif
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* 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,61 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "atreus.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 BASE 0
|
||||
#define NUMS 1
|
||||
#define MOUS 2
|
||||
|
||||
// Some quick aliases, just to make it look pretty
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP( /* Qwerty */
|
||||
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
|
||||
KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN ,
|
||||
SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT),
|
||||
KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ),
|
||||
|
||||
[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */
|
||||
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC,
|
||||
KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC,
|
||||
_______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______,
|
||||
_______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[MOUS] = KEYMAP( /* Mouse and Media Keys */
|
||||
KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4,
|
||||
KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3,
|
||||
KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2,
|
||||
_______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1)
|
||||
};
|
||||
|
||||
|
||||
// I prefer this layer switching strategy to the TG and MO functions.
|
||||
// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
|
||||
[NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
|
||||
[MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,183 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | 1 | 2 | Home | | PgUp | 3 | 4 |
|
||||
* |------|------|------| |------|--------|------|
|
||||
* | Space| BkSp | End | | PgDn | Tab |Enter |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP_80( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_1, KC_2, KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,KC_3, KC_4,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | 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_80(
|
||||
// left hand
|
||||
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_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,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, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
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| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+----------.
|
||||
* | | | | | | | |
|
||||
* |------|------|------| |------|------|----------|
|
||||
* | | | | | | |BrwserBack|
|
||||
* `--------------------' `------------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP_80(
|
||||
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, 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_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
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,10 @@
|
||||
# ErgoDox 80 Default Configuration
|
||||
|
||||
This is based on the default Ergodox EZ keymap.
|
||||
The difference is that this keymap supports 80 key layouts.
|
||||
If you own an 80 key Ergodox, use this as an example to get your desired keymap.
|
||||
|
||||
**NOTE:** This layout is not physically supported by the Ergodox EZ.
|
||||
|
||||
|
||||
![Default80](ergodox80.png)
|
After Width: | Height: | Size: 1.4 MiB |
@ -0,0 +1,183 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A/L2 | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LS/PO |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RS/PC |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/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
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, 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_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
|
||||
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
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | 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
|
||||
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_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, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| left | down | up | down | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// 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_BTN1, KC_BTN2, 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
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,11 @@
|
||||
# ErgoDox EZ Absenth Configuration
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
* Sept. 14, 2016 (V0.2):
|
||||
* Added Space Cadet to Left and Right Shift. Pressing Left shift with no other key adds an "(" and pressing Right shift with no other key adds an ")"
|
||||
* Sept. 8, 2016 (V0.1):
|
||||
* Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer.
|
||||
|
||||
![Absenth](absenth_highres.png)
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
@ -1,2 +1,3 @@
|
||||
SLEEP_LED_ENABLE = no
|
||||
UNICODE_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
|
After Width: | Height: | Size: 137 KiB |
@ -0,0 +1,30 @@
|
||||
# Norwegian setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,30 @@
|
||||
# Norwegian Colemak setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian Colemak setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(not colemak software variants) on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
@ -1,28 +1,41 @@
|
||||
# Roman's Layout
|
||||
|
||||
There is only one layer based on [Norman layout](https://normanlayout.info/).
|
||||
There is only one layer, and it is based on [Norman
|
||||
layout](https://normanlayout.info/).
|
||||
|
||||
Looking for multiple-layer layouts?
|
||||
|
||||
- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Symbols, arrows, plover, HJKL
|
||||
arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/)
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195)
|
||||
|
||||
## Functional Keys
|
||||
## How to use Vim key
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
CTRL and ESC are frequently used in Vim.
|
||||
It is `CTL_T(KC_ESC)` and it works this way:
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
## How to activate N-rollover
|
||||
|
||||
- Hold left `SHIFT` and right `SHIFT` and then tap `N`.
|
||||
|
||||
## How to make and flash on OS X
|
||||
|
||||
First you need to install few brew packages.
|
||||
|
||||
```bash
|
||||
brew tap osx-cross/avr
|
||||
brew install dfu-programmer avr-libc teensy_loader_cli
|
||||
```
|
||||
|
||||
Then you can clone this repository, make and flash your ErgoDox.
|
||||
|
||||
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
||||
```bash
|
||||
git clone https://github.com/romanzolotarev/qmk_firmware
|
||||
cd qmk_firmware/keyboards/ergodox
|
||||
# Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c
|
||||
SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy
|
||||
```
|
||||
|
@ -0,0 +1,6 @@
|
||||
Section "InputClass"
|
||||
Identifier "ErgoDox EZ"
|
||||
MatchIsKeyboard "on"
|
||||
MatchProduct "ErgoDox EZ ErgoDox EZ"
|
||||
Option "XkbLayout" "ergodox_yoruian"
|
||||
EndSection
|
@ -0,0 +1,13 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
install-xorg-configuration:
|
||||
install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \
|
||||
/etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
install -m 0644 $(KEYBOARD)_$(KEYMAP) \
|
||||
/usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|
||||
|
||||
uninstall-xorg-configuration:
|
||||
-rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
-rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|
@ -0,0 +1,34 @@
|
||||
partial alphanumeric_keys modifier_keys
|
||||
xkb_symbols "ergodox_yoruian" {
|
||||
include "us"
|
||||
name[Group1]= "English (yoruian-1.0.0)";
|
||||
|
||||
replace key <KP2> { [ Multi_key, Multi_key ] };
|
||||
replace key <KP3> { [ Hyper_L, Hyper_L ] };
|
||||
replace key <AE09> { [ grave, 9 ] };
|
||||
replace key <AE07> { [ semicolon, 7 ] };
|
||||
replace key <AE05> { [ colon, 5 ] };
|
||||
replace key <AE03> { [ minus, 3 ] };
|
||||
replace key <AE01> { [ slash, 1 ] };
|
||||
replace key <AE10> { [ asciicircum, 0 ] };
|
||||
replace key <AE02> { [ percent, 2 ] };
|
||||
replace key <AE04> { [ asciitilde, 4 ] };
|
||||
replace key <AE06> { [ dead_greek, 6 ] };
|
||||
replace key <AE08> { [ dead_caron, 8 ] };
|
||||
replace key <KP1> { [ E, E ] };
|
||||
replace key <AD12> { [ period, asterisk ] };
|
||||
replace key <BKSL> { [ question, backslash ] };
|
||||
replace key <AC10> { [ exclam, bar ] };
|
||||
replace key <AC11> { [ apostrophe, numbersign ] };
|
||||
replace key <AB08> { [ quotedbl, dollar ] };
|
||||
replace key <AB09> { [ comma, at ] };
|
||||
replace key <AB10> { [ underscore, ampersand ] };
|
||||
replace key <KP0> { [ equal, plus ] };
|
||||
replace key <TLDE> { [ parenleft, bracketleft ] };
|
||||
replace key <AE11> { [ less, braceleft ] };
|
||||
replace key <AE12> { [ greater, braceright ] };
|
||||
replace key <AD11> { [ parenright, bracketright ] };
|
||||
|
||||
modifier_map none { <HYPR> };
|
||||
modifier_map Mod3 { <KP3> };
|
||||
};
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2016 Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
*
|
||||
* 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 3 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 "yoruian.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP\
|
||||
(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8,
|
||||
ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q,
|
||||
LC, U, I, A, N, SCLN, M, H, T, S, C, RC,
|
||||
FF, QUOT, COMM, DOT, SLSH, P0, LGUI, LGUI, K, L, P, G, B, X,
|
||||
IN, P1, NO, NO, LALT, LALT, NO, NO, Z, PS,
|
||||
BSPC, RALT, P2, TAB,
|
||||
NO, NO,
|
||||
E, LSFT, NO, NO, ENT, SPC),
|
||||
[1] = KEYMAP\
|
||||
(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT,
|
||||
TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, HOME, PGDN, PGUP, END, FW,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, TR,
|
||||
TR, TR, TR, TR,
|
||||
TR, TR,
|
||||
TR, TR, TR, TR, TR, TR),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
};
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* electric-indent-mode: nil
|
||||
* End:
|
||||
*/
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2016 Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
*
|
||||
* 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 3 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 "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#undef KEYMAP
|
||||
#define KEYMAP\
|
||||
( \
|
||||
/* Spacial positions. */ \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
|
||||
k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \
|
||||
k55, k56, k57, k58, \
|
||||
k54, k59, \
|
||||
k53, k52, k51, k5C, k5B, k5A) \
|
||||
\
|
||||
/* Matrix positions. */ \
|
||||
{ \
|
||||
{ KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \
|
||||
{ KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \
|
||||
{ KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \
|
||||
{ KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \
|
||||
{ KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \
|
||||
{ KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \
|
||||
{ KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \
|
||||
{ KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \
|
||||
{ KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \
|
||||
{ KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \
|
||||
{ KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \
|
||||
{ KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \
|
||||
{ KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \
|
||||
{ KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \
|
||||
}
|
||||
|
||||
#define KC_ES KC_ESC
|
||||
#define KC_LC KC_LCTL
|
||||
#define KC_RC KC_RCTL
|
||||
#define KC_FF MO(1)
|
||||
#define KC_IN KC_INS
|
||||
#define KC_PS KC_PSCR
|
||||
#define KC_TR KC_TRNS
|
||||
#define KC_FT KC_F10
|
||||
#define KC_FE KC_F11
|
||||
#define KC_FW KC_F12
|
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,60 @@
|
||||
retro_refit keyboard firmware
|
||||
======================
|
||||
|
||||
## Keyboard Info
|
||||
|
||||
The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop".
|
||||
|
||||
http://imgur.com/a/08Fyj
|
||||
|
||||
This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow".
|
||||
|
||||
The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y.
|
||||
|
||||
```
|
||||
#define KEYMAP( \
|
||||
K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
|
||||
K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
|
||||
K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
|
||||
K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
|
||||
K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
|
||||
K10, K06, K25, K07, K86, K85, K95, K90, K93 \
|
||||
) { \
|
||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \
|
||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \
|
||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \
|
||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \
|
||||
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \
|
||||
{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \
|
||||
{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \
|
||||
{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \
|
||||
{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \
|
||||
{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/retro_refit 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 file named `<name>.c` and see keymap document (you can find in top readme.md) and existent 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.
|
@ -1 +1 @@
|
||||
HHKB_JP=yes
|
||||
OPT_DEFS += -DHHKB_JP
|
||||
|
@ -1 +1 @@
|
||||
HHKB_JP=yes
|
||||
OPT_DEFS += -DHHKB_JP
|
||||
|
@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# 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
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../Makefile
|
||||
endif
|
||||
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
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 geekhack
|
||||
#define PRODUCT jd40v2
|
||||
#define DESCRIPTION t.m.k. keyboard firmware for JD40 MKII
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/*
|
||||
* 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, F5, B4 }
|
||||
#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* 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 */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLED_NUM 12 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
@ -0,0 +1,26 @@
|
||||
#include "jd40.h"
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
|
||||
// if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// gh60_caps_led_on();
|
||||
// } else {
|
||||
// gh60_caps_led_off();
|
||||
// }
|
||||
|
||||
// if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
// gh60_esc_led_on();
|
||||
// } else {
|
||||
// gh60_esc_led_off();
|
||||
// }
|
||||
|
||||
// if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
|
||||
// gh60_fn_led_on();
|
||||
// } else {
|
||||
// gh60_fn_led_off();
|
||||
// }
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
#ifndef JD40_H
|
||||
#define JD40_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "led.h"
|
||||
|
||||
/* GH60 LEDs
|
||||
* GPIO pads
|
||||
* 0 F7 WASD LEDs
|
||||
* 1 F6 ESC LED
|
||||
* 2 F5 FN LED
|
||||
* 3 F4 POKER Arrow LEDs
|
||||
* B2 Capslock LED
|
||||
* B0 not connected
|
||||
*/
|
||||
|
||||
/*
|
||||
inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
|
||||
inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); }
|
||||
inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
|
||||
inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); }
|
||||
inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
|
||||
|
||||
inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
|
||||
inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
|
||||
inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
|
||||
inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
|
||||
inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||
*/
|
||||
|
||||
/* JD40 MKII keymap definition macro
|
||||
*/
|
||||
#define KEYMAP( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
||||
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
||||
K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \
|
||||
) { \
|
||||
{ KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K10, KC_##K11, KC_##K12 }, \
|
||||
{ KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_NO }, \
|
||||
{ KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO }, \
|
||||
{ KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_NO, KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_NO } \
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,164 @@
|
||||
#include "jd40.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _BL 0
|
||||
#define _AL 1
|
||||
#define _FL 2
|
||||
#define _UL 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BL] = KEYMAP(
|
||||
F12, Q, W, E, R, T, Y, U, I, O, P, BSPC,
|
||||
TAB, A, S, D, F, G, H, J, K, L, ENT,
|
||||
LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT,
|
||||
LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT ),
|
||||
|
||||
[_AL] = KEYMAP(
|
||||
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL,
|
||||
CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT,
|
||||
TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END ),
|
||||
|
||||
[_FL] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
||||
|
||||
[_UL] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, FN4, FN5, FN11, FN10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
RGBLED_TOGGLE,
|
||||
RGBLED_STEP_MODE,
|
||||
RGBLED_INCREASE_HUE,
|
||||
RGBLED_DECREASE_HUE,
|
||||
RGBLED_INCREASE_SAT,
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay
|
||||
[1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay
|
||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
|
||||
[3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
|
||||
[4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
|
||||
[5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
|
||||
[6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
|
||||
[7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
|
||||
[8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
|
||||
[9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
|
||||
[10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
|
||||
[11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
|
||||
[12] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
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_scan_user(void) {
|
||||
|
||||
// Layer LED indicators
|
||||
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
|
||||
uint32_t layer = layer_state;
|
||||
if (layer & (1<<1)) {
|
||||
//gh60_wasd_leds_on();
|
||||
} else {
|
||||
//gh60_wasd_leds_off();
|
||||
}
|
||||
|
||||
if (layer & (1<<2)) {
|
||||
//gh60_esc_led_on();
|
||||
} else {
|
||||
//gh60_esc_led_off();
|
||||
}
|
||||
};
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
case RGBLED_TOGGLE:
|
||||
//led operations
|
||||
if (record->event.pressed) {
|
||||
rgblight_toggle();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_STEP_MODE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_step();
|
||||
}
|
||||
break;
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
// Shift + ESC = ~
|
||||
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,17 @@
|
||||
## jd40 mkii keyboard firmware
|
||||
|
||||
Pins:
|
||||
MATRIX_ROW_PINS { F0, F1, F5, B4 }
|
||||
MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 }
|
||||
RGB_DI_PIN D3
|
||||
|
||||
======================
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/jd40 folder.
|
||||
Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file.
|
@ -0,0 +1,69 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# 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
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
|
@ -0,0 +1,7 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#endif
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
@ -0,0 +1,8 @@
|
||||
check keymap.c to the layers
|
||||
|
||||
This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
||||
It has "üäöß" as it is optimized for a mix of German & English.
|
||||
My favourite features are the placement of the special characters often used for programming right on the home row
|
||||
and the number & navigation block combo, so you never have to move your hands from their home position.
|
||||
|
||||
Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
|
@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = 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 = yes # 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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define FORCE_NKRO
|
||||
#define WORKMAN_SOUND COLEMAK_SOUND
|
||||
|
||||
#endif
|
@ -0,0 +1,314 @@
|
||||
// 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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 _WORKMAN 0
|
||||
#define _DEAD 1
|
||||
#define _QWERTY 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _PLOVER 5
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
WORKMAN = SAFE_RANGE,
|
||||
DEAD,
|
||||
QWERTY,
|
||||
LOWER,
|
||||
RAISE,
|
||||
PLOVER,
|
||||
EXT_PLV,
|
||||
TOG_PLV
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* Workman
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | H | T | G | Y | N | E | O | I | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | M | C | V | K | L | Dead | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_WORKMAN] = {
|
||||
{KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
|
||||
{MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, KC_DOT, KC_SLSH, KC_ENT},
|
||||
{KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Workman Dead Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | % | & | ? | + | @ | $ | _ | [ | ] | ! | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | / | ( | = | 0 | { | } | 1 | * | ) | - | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | 6 | 7 | 8 | 9 | | | \ | 2 | 3 | 4 | 5 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | < | ~ | ` | , | # | ^ | > | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DEAD] = {
|
||||
{XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX},
|
||||
{XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX},
|
||||
{XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX},
|
||||
{XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||
{KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | Vol+ |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Prev | Next | Vol- | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, KC_VOLU, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise - KWM Interaction
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Restrt| |TgSplt|Flotng|Parent|FlScrn|InsMrk| InsW | InsS | InsN | InsE | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | Mark |Rotate|Prefix| Term | BSP |SwpMrk|SwapW |SwapS |SwapN |SwapE | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |MarkW |MarkS |MarkN |MarkE |Monocl|Float |FocusW|FocusS|FocusN|FocusE| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX},
|
||||
{XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX},
|
||||
{_______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
|
||||
{TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Workmn|Plover| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_workman[][2] = SONG(WORKMAN_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
void persistant_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 WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_workman, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DEAD:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_DEAD);
|
||||
set_oneshot_layer(_DEAD, ONESHOT_START);
|
||||
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistant_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 PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case TOG_PLV:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_R);
|
||||
register_code(KC_W);
|
||||
register_code(KC_T);
|
||||
register_code(KC_C);
|
||||
register_code(KC_P);
|
||||
register_code(KC_O);
|
||||
clear_keyboard();
|
||||
}
|
||||
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,41 @@
|
||||
# jhenahan's layout
|
||||
|
||||
## Layout
|
||||
|
||||
The base layer is based on the
|
||||
[Workman Dead](https://github.com/ojbucao/Workman/tree/master/mac) layout. The
|
||||
primary interaction layer is a slightly modified Workman layout with a 'dead'
|
||||
key on the third row under the middle finger. The dead key activates a layer of
|
||||
special characters.
|
||||
|
||||
## [Layers](http://www.keyboard-layout-editor.com/#/gists/2b875f7d5d76fe4408c0a5b3bd76ddae)
|
||||
### Function Layer
|
||||
|
||||
This is very slightly modified from the default, mainly just to rearrange the media keys.
|
||||
|
||||
### [KWM](https://github.com/koekeishiya/kwm) Interaction Layer
|
||||
|
||||
`kwm` is a tiling window manager for OS X. The keys defined in my keymap
|
||||
correspond to the settings I use in
|
||||
[my `kwmrc` file](https://github.com/jhenahan/dotfiles/blob/master/kwm/kwmrc).
|
||||
|
||||
### QWERTY
|
||||
|
||||
Just in case.
|
||||
|
||||
### [Plover](http://www.openstenoproject.org/plover/)
|
||||
|
||||
This layout functions exactly as a Workman layout unless you're running the Plover
|
||||
application. Includes a key for toggling Plover while it's running.
|
||||
|
||||
Add this in the appropriate section of your `plover.cfg` to allow this altered layout:
|
||||
|
||||
``` ini
|
||||
[System: English Stenotype]
|
||||
keymap[keyboard] = [["#", ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "="]], ["S-", ["q", "a"]], ["T-", ["d"]], ["K-", ["s"]], ["P-", ["r"]], ["W-", ["h"]], ["H-", ["w"]], ["R-", ["t"]], ["A-", ["m"]], ["O-", ["c"]], ["*", ["y", "g", "j", "b"]], ["-E", ["l"]], ["-U", [","]], ["-F", ["f"]], ["-R", ["n"]], ["-P", ["u"]], ["-B", ["e"]], ["-L", ["p"]], ["-G", ["o"]], ["-T", [";"]], ["-S", ["i"]], ["-D", ["BackSpace"]], ["-Z", ["'"]], ["no-op", ["\\", "]", "x", ".", "/"]], ["arpeggiate", ["space"]]]
|
||||
```
|
||||
|
||||
### Adjust Layer
|
||||
|
||||
This layer is only slightly modified from the default to remove Dvorak and
|
||||
Colemak and replace them with Workman.
|
@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = 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 = yes # 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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,233 @@
|
||||
// This is sgoodwin's layout file for the Quantum project.
|
||||
// It doesn't have Plover or Dvorak layers because he doesn't use that.
|
||||
// It Also doesn't allow for swapping alt with CMD because that only happens in error.
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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 1
|
||||
#define _COLEMAK 0
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
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] = {
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |SHEnt |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
|
||||
{ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |SHEnt |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
|
||||
{ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| | |Qwerty|Colemk| | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
void persistant_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
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
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,10 @@
|
||||
# sgoodwin's Planck Layout
|
||||
|
||||
Includes:
|
||||
|
||||
1. No Dvorak or Plover
|
||||
2. No alt-swapping
|
||||
3. Right enter is shift when held down, enter when tapped.
|
||||
4. Bottom left corner in normal layers is Hyper and not brightness control.
|
||||
5. Brightness is instead in the bottom corner on raise/lower.
|
||||
|
@ -0,0 +1,62 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the makefile.mk 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 = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = 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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,146 @@
|
||||
//Author: tong92 <tong92power@gmail.com>
|
||||
|
||||
#include "planck.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define LOWER M(1)
|
||||
#define RAISE M(2)
|
||||
#define GO_DEFT M(99)
|
||||
#
|
||||
|
||||
//MIT Layout
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: Qwerty layer (Default)
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | q | w | e | r | t | y | u | i | o | p | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| z | x | c | v | b | n | m | , | . | / |Shift|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[0] ={
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT },
|
||||
{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT},
|
||||
{MO(4), KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
|
||||
},
|
||||
/* 1: Lower layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[1] ={
|
||||
{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* 2: Upper layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[2] ={
|
||||
{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* 4: fn layer (Window shortcuts)
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[4] ={
|
||||
{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT},
|
||||
{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
|
||||
{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX},
|
||||
{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DELT)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,M(0)}
|
||||
},
|
||||
/* 10: mouse layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | GO_DEFT | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[10] ={
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
|
||||
{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX}
|
||||
}
|
||||
|
||||
};
|
||||
//Layout END
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
layer_on(1);
|
||||
update_tri_layer(1, 2, 10);
|
||||
} else {
|
||||
layer_off(1);
|
||||
update_tri_layer(1, 2, 10);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
layer_on(2);
|
||||
update_tri_layer(1, 2, 10);
|
||||
} else {
|
||||
layer_off(2);
|
||||
update_tri_layer(1, 2, 10);
|
||||
}
|
||||
break;
|
||||
case 99:
|
||||
if (record->event.pressed) {
|
||||
layer_off(10);
|
||||
layer_off(1);
|
||||
layer_off(2);
|
||||
layer_on(0);
|
||||
update_tri_layer(0 ,1 ,2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,66 @@
|
||||
# The Tong92 Layout
|
||||
- MIT Layout
|
||||
- my keymap for WIndow User
|
||||
- Lower && Upper Hold -> Mouse Layer
|
||||
- Mouse Layer : space -> Default Layer
|
||||
- No Audio
|
||||
|
||||
## 1. Default Layer - Qwerty
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
|Tab | q | w | e | r | t | y | u | i | o | p | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
|Ctrl | a | s | d | f | g | h | j | k | l | ; |enter|
|
||||
|-----------------------------------------------------------------------|
|
||||
|Shift| z | x | c | v | b | n | m | , | . | / |Shift|
|
||||
|-----------------------------------------------------------------------|
|
||||
| Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt |
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 2. Lower Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT|
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 3. Upper Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT|
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 4. Fn Layer - Window Shortcuts
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED |
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 5. Mouse Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | |GO_DEFAULT | | | | | |
|
||||
`-----------------------------------------------------------------------'
|
@ -1,3 +0,0 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -1,26 +0,0 @@
|
||||
retro_refit keyboard firmware
|
||||
======================
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/retro_refit 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 file named `<name>.c` and see keymap document (you can find in top readme.md) and existent 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,208 @@
|
||||
@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
@echo OFF
|
||||
set BAT_VERSION=v1.0
|
||||
set REPORT_NAME=Win_Check_Output.txt
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
cls
|
||||
|
||||
echo QMK Windows Check Output %BAT_VERSION%
|
||||
echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME%
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set MINGW_BASE_DIR=C:\MinGW
|
||||
|
||||
set KEYMAP=atomic-pvc
|
||||
set KEYMAP_CLEAN=atomic-pvc-clean
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
if /I "%1" EQU VERBOSE (goto :Verbose_Make) else (goto :Normal_Make)
|
||||
|
||||
:Normal_Make
|
||||
set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE
|
||||
set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE
|
||||
set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE
|
||||
goto :Start_Report
|
||||
|
||||
:Verbose_Make
|
||||
echo Verbose Mode
|
||||
set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE
|
||||
set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE
|
||||
set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE
|
||||
goto :Start_Report
|
||||
|
||||
:Start_Report
|
||||
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=CURRENT DIRECTORY & call :ReportHeader
|
||||
|
||||
echo %CD%>>%REPORT_NAME% 2>&1
|
||||
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=CURRENT PATHS & call :ReportHeader
|
||||
|
||||
for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1)
|
||||
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
rem set HEADER=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader
|
||||
|
||||
rem set>>%REPORT_NAME% 2>&1
|
||||
rem echo.>>%REPORT_NAME% 2>&1
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader
|
||||
|
||||
set FILENAME=make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
|
||||
set FILENAME=git.exe & set VERSION_CMD=--version & set VERSION_FIND="git" & call :ReportVersion
|
||||
set FILENAME=cmp.exe & set VERSION_CMD=--version & set VERSION_FIND="cmp" & call :ReportVersion
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader
|
||||
|
||||
set FILENAME=avr-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="avr" & call :ReportVersion
|
||||
set FILENAME=avr-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
|
||||
set FILENAME=avr-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
|
||||
set FILENAME=avr-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
|
||||
set FILENAME=avr-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
|
||||
set FILENAME=avr-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader
|
||||
|
||||
set FILENAME=arm-none-eabi-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="arm-none-eabi-gcc" & call :ReportVersion
|
||||
set FILENAME=arm-none-eabi-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
|
||||
set FILENAME=arm-none-eabi-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
|
||||
set FILENAME=arm-none-eabi-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
|
||||
set FILENAME=arm-none-eabi-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
|
||||
set FILENAME=arm-none-eabi-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader
|
||||
|
||||
set FILENAME=gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="gcc" & call :ReportVersion
|
||||
set FILENAME=objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
|
||||
set FILENAME=objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
|
||||
set FILENAME=size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
|
||||
set FILENAME=ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
|
||||
set FILENAME=nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader
|
||||
|
||||
set FILENAME=dfu-programmer.exe & set VERSION_CMD=--version & set VERSION_FIND="dfu" & call :ReportVersion
|
||||
set FILENAME=batchisp.exe & set VERSION_CMD=-version & set VERSION_FIND="batchisp" & call :ReportVersion
|
||||
set FILENAME=dfu-util.exe & call :Report
|
||||
set FILENAME=teensy_loader_cli.exe & call :Report
|
||||
set FILENAME=hid_bootloader_cli.exe & call :Report
|
||||
set FILENAME=avrdude.exe & call :Report
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader
|
||||
set FILENAME=cppcheck.exe & call :Report
|
||||
set FILENAME=doxygen.exe & call :Report
|
||||
set FILENAME=gdb-config.exe & call :Report
|
||||
set FILENAME=wget.exe & call :Report
|
||||
set FILENAME=unzip.exe & call :Report
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=MINGW CHECK - OPTIONAL & call :ReportHeader
|
||||
if exist %MINGW_BASE_DIR% (echo Expected MinGW Base Dir = %MINGW_BASE_DIR%>>%REPORT_NAME% 2>&1) else (echo Expected MinGW Base Dir = %MINGW_BASE_DIR% - Not Found>>%REPORT_NAME% 2>&1)
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
set FILENAME=mingw32-make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
|
||||
if exist %MINGW_BASE_DIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin.>>%REPORT_NAME% 2>&1 & echo.>>%REPORT_NAME% 2>&1)
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
set HEADER=MAKE CHECK & call :ReportHeader
|
||||
if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound)
|
||||
if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound)
|
||||
if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound)
|
||||
|
||||
echo No Makfile Found.>>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
|
||||
|
||||
goto :ContinueAfterMake
|
||||
|
||||
:MakeFound
|
||||
call :RunMake
|
||||
|
||||
:ContinueAfterMake
|
||||
goto :ExitBatch
|
||||
|
||||
:ExitBatch
|
||||
echo Done!
|
||||
echo.
|
||||
rem type %REPORT_NAME%
|
||||
echo.
|
||||
echo See %REPORT_NAME% for the report.
|
||||
endlocal
|
||||
exit /b
|
||||
|
||||
:: -----------------------------------------------------------------------------
|
||||
|
||||
:RunMake
|
||||
|
||||
echo Makfile Found.>>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
set HEADER=MAKE CLEAN & call :ReportHeader
|
||||
echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
%MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
|
||||
set HEADER=MAKE & call :ReportHeader
|
||||
echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
%MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
|
||||
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
exit /b
|
||||
|
||||
:ReportHeader
|
||||
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
echo %HEADER%>>%REPORT_NAME% 2>&1
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
exit /b
|
||||
|
||||
:Report
|
||||
echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
|
||||
<nul set /p output="Location = " >>%REPORT_NAME% 2>&1
|
||||
where %FILENAME% >>%REPORT_NAME% 2> NUL
|
||||
if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport)
|
||||
|
||||
:EndReport
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
<nul set /p output="."
|
||||
exit /b
|
||||
|
||||
:ReportVersion
|
||||
echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
|
||||
<nul set /p output="Location = " >>%REPORT_NAME% 2>&1
|
||||
where %FILENAME% >>%REPORT_NAME% 2> NUL
|
||||
if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion)
|
||||
<nul set /p output ="Version = " >>%REPORT_NAME% 2>&1
|
||||
|
||||
(%FILENAME% %VERSION_CMD% | find %VERSION_FIND%) >>%REPORT_NAME% 2>&1
|
||||
|
||||
:EndReportVersion
|
||||
echo.>>%REPORT_NAME% 2>&1
|
||||
<nul set /p output="."
|
||||
exit /b
|