1
0
Fork 0

Traveller cleanup (#13441)

* Traveller cleanup

* Update keyboards/handwired/traveller/info.json

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
Ryan 2021-07-05 20:45:31 +10:00 committed by GitHub
parent eb7178b542
commit 4c1c112a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 336 additions and 480 deletions

View file

@ -15,21 +15,20 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER You #define MANUFACTURER You
#define PRODUCT traveller #define PRODUCT traveller
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 4 #define MATRIX_ROWS 4
#define MATRIX_COLS 13 #define MATRIX_COLS 13
/* /*
* Keyboard Matrix Assignments * Keyboard Matrix Assignments
@ -40,26 +39,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* *
*/ */
#define MATRIX_ROW_PINS { D0, D1, D3, D2 } #define MATRIX_ROW_PINS { D0, D1, D3, D2 }
// no I can't say why this order seemed like a good idea
#define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 } #define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 }
#define UNUSED_PINS #define UNUSED_PINS
// LED stuff
#define RGB_DI_PIN B2
//#define RBLIGHT_TIMER
#define RGBLED_NUM 1 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7 //#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING //#define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
#define RGB_DI_PIN B2
#ifdef RGB_DI_PIN
# define RGBLED_NUM 1
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
//# define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
//# define RGBLIGHT_EFFECT_BREATHING
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//# define RGBLIGHT_EFFECT_SNAKE
//# define RGBLIGHT_EFFECT_KNIGHT
//# define RGBLIGHT_EFFECT_CHRISTMAS
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
//# define RGBLIGHT_EFFECT_RGB_TEST
//# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
@ -67,14 +85,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#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 */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE //#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
//#define GRAVE_ESC_CTRL_OVERRIDE
/* /*
* Force NKRO * Force NKRO
* *
@ -96,54 +116,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
//#define FORCE_NKRO //#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H
//#define MAGIC_KEY_HELP2 SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
@ -159,7 +131,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING //#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif /* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0

View file

@ -1,65 +1,67 @@
{ {
"keyboard_name": "traveller", "keyboard_name": "Traveller",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 1, "width": 13,
"height": 1, "height": 4,
"layouts": { "layouts": {
"KEYMAP": { "LAYOUT": {
"layout": [ "layout": [
{"x":0, "y":0}, {"x": 0, "y": 0},
{"x":1, "y":0}, {"x": 1, "y": 0},
{"x":2, "y":0}, {"x": 2, "y": 0},
{"x":3, "y":0}, {"x": 3, "y": 0},
{"x":4, "y":0}, {"x": 4, "y": 0},
{"x":5, "y":0}, {"x": 5, "y": 0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":0, "y":1}, {"x": 7, "y": 0},
{"x":1, "y":1}, {"x": 8, "y": 0},
{"x":2, "y":1}, {"x": 9, "y": 0},
{"x":3, "y":1}, {"x": 10, "y": 0},
{"x":4, "y":1}, {"x": 11, "y": 0},
{"x":5, "y":1}, {"x": 12, "y": 0},
{"x":7, "y":1},
{"x":8, "y":1},
{"x":9, "y":1},
{"x":10, "y":1},
{"x":11, "y":1},
{"x":12, "y":1},
{"x":0, "y":2}, {"x": 0, "y": 1},
{"x":1, "y":2}, {"x": 1, "y": 1},
{"x":2, "y":2}, {"x": 2, "y": 1},
{"x":3, "y":2}, {"x": 3, "y": 1},
{"x":4, "y":2}, {"x": 4, "y": 1},
{"x":5, "y":2}, {"x": 5, "y": 1},
{"x":6, "y":2},
{"x":7, "y":2},
{"x":8, "y":2},
{"x":9, "y":2},
{"x":10, "y":2},
{"x":11, "y":2},
{"x":12, "y":2},
{"x":0, "y":3}, {"x": 7, "y": 1},
{"x":1, "y":3}, {"x": 8, "y": 1},
{"x":2, "y":3}, {"x": 9, "y": 1},
{"x":3, "y":3}, {"x": 10, "y": 1},
{"x":4, "y":3}, {"x": 11, "y": 1},
{"x":5, "y":3}, {"x": 12, "y": 1},
{"x":6, "y":3},
{"x":7, "y":3}, {"x": 0, "y": 2},
{"x":8, "y":3}, {"x": 1, "y": 2},
{"x":9, "y":3}, {"x": 2, "y": 2},
{"x":10, "y":3}, {"x": 3, "y": 2},
{"x":11, "y":3}, {"x": 4, "y": 2},
{"x":12, "y":3} {"x": 5, "y": 2},
{"x": 6, "y": 2},
{"x": 7, "y": 2},
{"x": 8, "y": 2},
{"x": 9, "y": 2},
{"x": 10, "y": 2},
{"x": 11, "y": 2},
{"x": 12, "y": 2},
{"x": 0, "y": 3},
{"x": 1, "y": 3},
{"x": 2, "y": 3},
{"x": 3, "y": 3},
{"x": 4, "y": 3},
{"x": 5, "y": 3},
{"x": 6, "y": 3},
{"x": 7, "y": 3},
{"x": 8, "y": 3},
{"x": 9, "y": 3},
{"x": 10, "y": 3},
{"x": 11, "y": 3},
{"x": 12, "y": 3}
] ]
} }
} }

View file

@ -1,254 +1,227 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "mousekey.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below. enum layer_names {
// The underscores don't mean anything - you can have a layer called STUFF or any other name. _QW,
#define _QW 0 _LW,
#define _LW 1 _HI,
#define _HI 2 _NAV,
#define _NAV 4 _CUR,
#define _CUR 5 _FKEYS,
#define _FKEYS 6 _TRNS
#define _TRNS 8 };
// We do the same trick for functions
#define RGBLED_TOGGLE 10
#define _HIOUT 15
#define _LWOUT 16
enum custom_keycodes { enum custom_keycodes {
M_MUL = SAFE_RANGE, M_MUL = SAFE_RANGE,
M_MDL, M_MDL,
M_MDR, M_MDR,
M_MUR M_MUR
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------. .-----------------------------------------. * ,-----------------------------------------. .-----------------------------------------.
* | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = | * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = |
* |------+------+------+------+------+------| |------+------+------+------+------+------| * |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | S | D | F | G | | H | J | K | L | P | \ | * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------+------|
*|ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' | * |ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------| * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift | * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift |
* `------------------------------------------------------------------------------------------' * `------------------------------------------------------------------------------------------'
* */
*/ [_QW] = LAYOUT(
[_QW] = KEYMAP( TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL,
TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS,
KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT,
CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENT, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT
KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENTER, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT ),
),
/* LOW - numbers, missing or awkward programming keys /* LOW - numbers, missing or awkward programming keys
Doubled 1 key allows lazy reach with ring finger. Doubled 1 key allows lazy reach with ring finger.
* ,-----------------------------------------. .-----------------------------------------. * ,-----------------------------------------. .-----------------------------------------.
* | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del| * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del|
* |------+------+------+------+------+------| +------+------+------+------+------+------| * |------+------+------+------+------+------| +------+------+------+------+------+------|
* | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | | * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | |
* |------+------+------+------+------+------|------+------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------+------|
* | Caps | [ | | { | } | ` | /| # | { | } | | ] | | * | Caps | [ | | { | } | ` | /| # | { | } | | ] | |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------| * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | Shift| | | | Low | |/ | | Hi | | | |Shift | * | Shift| | | | Low | |/ | | Hi | | | |Shift |
* `------------------------------------------------------------------------------------------' * `------------------------------------------------------------------------------------------'
* */
*/ [_LW] = LAYOUT(
TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)),
_______, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, XXXXXXX, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, XXXXXXX, XXXXXXX,
KC_CAPS, KC_LBRC, XXXXXXX, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_HASH, KC_LCBR, KC_RCBR, XXXXXXX, KC_RBRC, XXXXXXX,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LW] = KEYMAP( /* HI - Punctuation, shell and
TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , * url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$
KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, * Right hand nav keys work pretty well chorded with the Right hand Hi Key
KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO, * ,-----------------------------------------. .-----------------------------------------.
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |
), * |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | ! | & | "|" | $ | % | | Vol+| Mute| | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
* | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right |
* `------------------------------------------------------------------------------------------'
*/
[_HI] = LAYOUT(
TG(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS,
_______, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, _______, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END,
_______, KC_SLSH, _______, _______, TT(_LW), _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT
),
/* HI - Punctuation, shell and /* NAV - mouse & navigation
url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ * gui left and right are line home/end, or fore & back in browser
Right hand nav keys work pretty well chorded with the Right hand Hi Key * Mouse buttons are reversed for comfort - bigger stretch is to the right button.
* ,-----------------------------------------. .-----------------------------------------. *
* |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | * ,-----------------------------------------. .-----------------------------------------.
* |------+------+------+------+------+------| |------+------+------+------+------+------| * | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm|
* | | ! | & | "|" | $ | % | | Vol+| Mute| | | | | * |------+------+------+------+------+------| |------+------+------+------+------+--------|
* |------+------+------+------+------+------|------+------+------+------+------+------+------| * | |Gui<- | Left | Down |Right | C^E | | BTN3 | MS_L |MS Up | MS_R | |Ms Fast |
* | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End | * |------+------+------+------+------+------|------|------+------+------+------+------+--------|
* |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | | C^A | GUI X| GUI C| GUI_V| |Enter/| MWD | M_DL |MS Dwn|MS_DR | Up |Ms Slow |
* | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right | * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* `------------------------------------------------------------------------------------------' * | | GuiZ | | | Low | |/ButnR|ButnL | Hi | | Left | Down | Right |
* * `------------------------------------------------------------------------------------------'
*/ */
[_NAV] = LAYOUT(
[_HI] = KEYMAP( TG(_NAV), XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, RGUI(KC_RGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, XXXXXXX, KC_ACL2,
TG(_FKEYS),KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, _______, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1,
KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, _______, LCTL(KC_A), LGUI(KC_X), RGUI(KC_C), RGUI(KC_V), XXXXXXX, KC_ENT, KC_WH_D, M_MDL, KC_MS_D, M_MDR, KC_UP, KC_ACL0,
KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, RGUI(KC_Z), _______, _______, _______, _______, KC_BTN2, KC_BTN1, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT ),
),
/* NAV - mouse & navigation
//gui left and right are line home/end, or fore & back in browser
// Mouse buttons are reversed for comfort - bigger stretch is to the right button.
* ,-----------------------------------------. .-----------------------------------------.
* | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm|
* |------+------+------+------+------+------| |------+------+------+------+------+--------|
* | |Gui<- | Left | Down |Right | C^E | | BTN3 | MS_L |MS Up | MS_R | |Ms Fast |
* |------+------+------+------+------+------|------|------+------+------+------+------+--------|
* | | C^A | GUI X| GUI C| GUI_V| |Enter/| MWD | M_DL |MS Dwn|MS_DR | Up |Ms Slow |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | | GuiZ | | | Low | |/ButnR|ButnL | Hi | | Left | Down | Right |
* `------------------------------------------------------------------------------------------'
*/
[_NAV] = KEYMAP(
TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, KC_NO, KC_ACL2,
KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1,
KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M_MDL, KC_MS_D, M_MDR, KC_UP, KC_ACL0,
KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
),
/* FKEYS - Funtion keys & mac stuff
* ,-----------------------------------------. .-----------------------------------------.
* | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
* |Qwerty| | | | | | /| | | | | | Del |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | |
* `------------------------------------------------------------------------------------------'
*
*/
[_FKEYS] = KEYMAP(
TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT ,
TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
/* TRNS - skeleton for laters
* ,-----------------------------------------. .-----------------------------------------.
* | . | . | . | . | . | . | | ^ | & | * | ( | ) | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | . | . | . | . | . | . | | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
* | . | . | . | . | . | . | /| | | | . | ; | " |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT |
* `------------------------------------------------------------------------------------------'
*
*/
[_TRNS] = {
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
}
/* FKEYS - Funtion keys & mac stuff
* ,-----------------------------------------. .-----------------------------------------.
* | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
* |Qwerty| | | | | | /| | | | | | Del |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | |
* `------------------------------------------------------------------------------------------'
*/
[_FKEYS] = LAYOUT(
TG(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT,
TO(_QW), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL,
_______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* TRNS - skeleton for laters
* ,-----------------------------------------. .-----------------------------------------.
* | . | . | . | . | . | . | | ^ | & | * | ( | ) | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | . | . | . | . | . | . | | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
* | . | . | . | . | . | . | /| | | | . | ; | " |
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT |
* `------------------------------------------------------------------------------------------'
*/
[_TRNS] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// from algernon's ErgoDox EZ layout, // from algernon's ErgoDox EZ layout,
case M_MUL: case M_MUL:
if (record->event.pressed) { if (record->event.pressed) {
mousekey_on(KC_MS_UP); mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_LEFT); mousekey_on(KC_MS_LEFT);
} else { } else {
mousekey_off(KC_MS_UP); mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_LEFT); mousekey_off(KC_MS_LEFT);
} }
mousekey_send(); mousekey_send();
return false; return false;
case M_MUR:
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
return false;
case M_MDL:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_LEFT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_LEFT);
}
mousekey_send();
return false;
case M_MDR:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
return false;
default:
return true;
}
case M_MUR:
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
return false;
case M_MDL:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_LEFT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_LEFT);
}
mousekey_send();
return false;
case M_MDR:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
return false;
default:
return true;
}
return true; return true;
}; };
void LayerLEDSet(uint8_t layr) { void LayerLEDSet(uint8_t layr) {
switch (layr) { switch (layr) {
case _QW: case _QW:
rgblight_setrgb(0,20, 0); // dim green // dim green
break; rgblight_setrgb(0, 20, 0);
break;
case _LW: case _LW:
// deep purple // deep purple
rgblight_setrgb(20,0,35); rgblight_setrgb(20, 0, 35);
break; break;
case _HI: case _HI:
// light blue // light blue
rgblight_setrgb(0,20,20); rgblight_setrgb(0, 20, 20);
break; break;
case _NAV: case _NAV:
// Yellowy orange // yellowy orange
rgblight_setrgb(25,20,0); // brighter rgblight_setrgb(25, 20, 0);
break; break;
case _FKEYS: case _FKEYS:
// RED // red
rgblight_setrgb(20,0,0); // brighter rgblight_setrgb(20, 0, 0);
break; break;
default: default:
rgblight_setrgb(20,2,20);//error // error
rgblight_setrgb(20,2,20);
break; break;
} }
return; return;
}
void matrix_init_user(void) {
} }
// Bleah globals need to be initialized. // Bleah globals need to be initialized.
uint8_t old_layer=_QW; uint8_t old_layer = _QW;
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
if (old_layer != layer) {
LayerLEDSet(layer);
old_layer=layer;
}
}
void led_set_user(uint8_t usb_led) {
if (old_layer != layer) {
LayerLEDSet(layer);
old_layer = layer;
}
} }

View file

@ -1,2 +0,0 @@
# The default keymap for handwired/traveller
this is a kitchen sink build

View file

@ -1,35 +1,21 @@
traveler keyboard firmware # Traveller
======================
## Traveller Specific Info ## The Traveller is a variant on the atreus keyboard.
The traveller is a varient on the atreus keyboard. Like the Atreus, it is designed to be a good compromise between size and ergonomics.
Like the Atreus, it is designed to be a good compromise between size and ergonomics.
key differences are Key differences are:
- an additional column for each pinky - An additional column for each pinky
- an RGB LED in the center to show the current layer - An RGB LED in the center to show the current layer
- more finger stagger, splay angle and contoured keycaps (F2 profile for space key). - More finger stagger, splay angle and contoured keycaps (F2 profile for space key).
You can make your own traveller keyboard by using the openscad tools from the atreus repository, and adding a hole for the LED to shine through. You can make your own Traveller keyboard by using the openscad tools from the atreus repository, and adding a hole for the LED to shine through.
## Quantum MK Firmware Make example for this keyboard (after setting up your build environment):
For the full Quantum feature list, see [the parent README.md](/readme.md). make handwired/traveller:default
## Building Flashing example for this keyboard:
Download or clone the whole firmware and navigate to the keyboard/traveler 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. make handwired/traveller:default:flash
Depending on which keymap you would like to use, you will have to compile slightly differently. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
### Default
To build with the default keymap, simply run `make`.
### 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 `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

View file

@ -2,42 +2,21 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
# Teensy halfkay BOOTLOADER = caterina
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
ifdef TEENSY2
BOOTLOADER = halfkay
OPT_DEFS += -DATREUS_TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
BOOTLOADER = caterina
OPT_DEFS += -DATREUS_ASTAR
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output
AUDIO_ENABLE = no # Audio output on port C6
RGBLIGHT_ENABLE = yes
# for avr upload
USB = /dev/cu.usbmodem1421

View file

@ -1,61 +1,18 @@
#include "traveller.h" #include "traveller.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave this function blank - it can be defined in a keymap file
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
void process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {
// leave this function blank - it can be defined in a keymap file
}
void matrix_init_kb(void) { void matrix_init_kb(void) {
// put your keyboard start-up code here // put your keyboard start-up code here
// runs once when the firmware starts up // runs once when the firmware starts up
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
rgblight_init(); rgblight_init();
rgblight_mode(1); // solid, no timer rgblight_mode(1); // solid, no timer
rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW
#endif #endif
// Turn status LED on // Turn status LED on
DDRC |= (1<<7); setPinOutput(C7);
PORTC |= (1<<7); writePinHigh(C7);
matrix_init_user(); matrix_init_user();
} }
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

View file

@ -1,32 +1,17 @@
#ifndef TRAVELLER_H #pragma once
#define TRAVELLER_H
#include "quantum.h" #include "quantum.h"
#include "led.h"
#ifdef RGBLIGHT_ENABLE #define XXX KC_NO
#include "rgblight.h"
#endif
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \ #define LAYOUT( \
k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \ k00, k01, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0C, \
k10, k11, k12, k13, k14, k15, k17, k18, k19, k1a, k1b, k1c, \ k10, k11, k12, k13, k14, k15, k17, k18, k19, k1A, k1B, k1C, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C \
) \ ) { \
{ \ { k00, k01, k02, k03, k04, k05, XXX, k07, k08, k09, k0A, k0B, k0C }, \
{ k00, k01, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0a, k0b, k0c }, \ { k10, k11, k12, k13, k14, k15, XXX, k17, k18, k19, k1A, k1B, k1C }, \
{ k10, k11, k12, k13, k14, k15, KC_NO, k17, k18, k19, k1a, k1b, k1c }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C } \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c } \
} }
#endif