From 4c1c112a16532270d7744c19875287f3880edc55 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 5 Jul 2021 20:45:31 +1000 Subject: Traveller cleanup (#13441) * Traveller cleanup * Update keyboards/handwired/traveller/info.json Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/handwired/traveller/config.h | 130 +++---- keyboards/handwired/traveller/info.json | 110 +++--- .../handwired/traveller/keymaps/default/keymap.c | 405 ++++++++++----------- .../handwired/traveller/keymaps/default/readme.md | 2 - keyboards/handwired/traveller/readme.md | 40 +- keyboards/handwired/traveller/rules.mk | 41 +-- keyboards/handwired/traveller/traveller.c | 61 +--- keyboards/handwired/traveller/traveller.h | 37 +- 8 files changed, 341 insertions(+), 485 deletions(-) delete mode 100644 keyboards/handwired/traveller/keymaps/default/readme.md (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h index fbc05b59cc..2e3767e0cd 100644 --- a/keyboards/handwired/traveller/config.h +++ b/keyboards/handwired/traveller/config.h @@ -15,21 +15,20 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER You -#define PRODUCT traveller +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER You +#define PRODUCT traveller /* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 13 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 /* * Keyboard Matrix Assignments @@ -40,26 +39,45 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ + */ #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 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 */ #define DIODE_DIRECTION COL2ROW - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_BREATHING +//#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 */ #define DEBOUNCE 5 @@ -67,14 +85,16 @@ along with this program. If not, see . /* 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 +/* 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 * @@ -96,54 +116,6 @@ along with this program. If not, see . */ //#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 * These options are also useful to firmware size reduction. @@ -159,7 +131,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#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 diff --git a/keyboards/handwired/traveller/info.json b/keyboards/handwired/traveller/info.json index 0a13fab77a..019250eb61 100644 --- a/keyboards/handwired/traveller/info.json +++ b/keyboards/handwired/traveller/info.json @@ -1,65 +1,67 @@ { - "keyboard_name": "traveller", + "keyboard_name": "Traveller", "url": "", "maintainer": "qmk", - "width": 1, - "height": 1, + "width": 13, + "height": 4, "layouts": { - "KEYMAP": { + "LAYOUT": { "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":4, "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": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, - {"x":0, "y":1}, - {"x":1, "y":1}, - {"x":2, "y":1}, - {"x":3, "y":1}, - {"x":4, "y":1}, - {"x":5, "y":1}, - {"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": 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":2}, - {"x":1, "y":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":4, "y":2}, - {"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": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, - {"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} + {"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": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"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} ] } } diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 4802b05345..661385d5dc 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -1,254 +1,227 @@ #include QMK_KEYBOARD_H -#include "mousekey.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. -#define _QW 0 -#define _LW 1 -#define _HI 2 -#define _NAV 4 -#define _CUR 5 -#define _FKEYS 6 -#define _TRNS 8 - -// We do the same trick for functions -#define RGBLED_TOGGLE 10 -#define _HIOUT 15 -#define _LWOUT 16 +enum layer_names { + _QW, + _LW, + _HI, + _NAV, + _CUR, + _FKEYS, + _TRNS +}; enum custom_keycodes { - M_MUL = SAFE_RANGE, - M_MDL, - M_MDR, - M_MUR + M_MUL = SAFE_RANGE, + M_MDL, + M_MDR, + M_MUR }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------. .-----------------------------------------. - * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------+------| - *|ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' | - * |------+------+------+------+------+------+ // +------+------+------+------+------+------| - * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift | - * `------------------------------------------------------------------------------------------' - * - */ -[_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, - 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, - 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 - Doubled 1 key allows lazy reach with ring finger. - * ,-----------------------------------------. .-----------------------------------------. - * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del| - * |------+------+------+------+------+------| +------+------+------+------+------+------| - * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Caps | [ | | { | } | ` | /| # | { | } | | ] | | - * |------+------+------+------+------+------+ // +------+------+------+------+------+------| - * | Shift| | | | Low | |/ | | Hi | | | |Shift | - * `------------------------------------------------------------------------------------------' - * - */ - -[_LW] = KEYMAP( - 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_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, - 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 -), - -/* HI - Punctuation, shell and -url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ -Right hand nav keys work pretty well chorded with the Right hand Hi Key - * ,-----------------------------------------. .-----------------------------------------. - * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | & | "|" | $ | % | | Vol+| Mute| | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------| - * | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End | - * |------+------+------+------+------+------+ // +------+------+------+------+------+------| - * | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right | - * `------------------------------------------------------------------------------------------' - * - */ - -[_HI] = KEYMAP( - 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_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, - 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, - 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} - } - - + /* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * |ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift | + * `------------------------------------------------------------------------------------------' + */ + [_QW] = LAYOUT( + 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, + 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 + ), + + /* LOW - numbers, missing or awkward programming keys + Doubled 1 key allows lazy reach with ring finger. + * ,-----------------------------------------. .-----------------------------------------. + * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del| + * |------+------+------+------+------+------| +------+------+------+------+------+------| + * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Caps | [ | | { | } | ` | /| # | { | } | | ] | | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* HI - Punctuation, shell and + * url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ + * Right hand nav keys work pretty well chorded with the Right hand Hi Key + * ,-----------------------------------------. .-----------------------------------------. + * |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 + ), + + /* 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] = LAYOUT( + TG(_NAV), XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, RGUI(KC_RGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, XXXXXXX, KC_ACL2, + _______, 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, + _______, 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, + _______, RGUI(KC_Z), _______, _______, _______, _______, KC_BTN2, KC_BTN1, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 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) { - switch (keycode) { - // from algernon's ErgoDox EZ layout, - case M_MUL: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - 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; + switch (keycode) { + // from algernon's ErgoDox EZ layout, + case M_MUL: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_LEFT); + } + mousekey_send(); + 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_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; }; void LayerLEDSet(uint8_t layr) { - switch (layr) { case _QW: - rgblight_setrgb(0,20, 0); // dim green - break; + // dim green + rgblight_setrgb(0, 20, 0); + break; case _LW: // deep purple - rgblight_setrgb(20,0,35); + rgblight_setrgb(20, 0, 35); break; case _HI: // light blue - rgblight_setrgb(0,20,20); + rgblight_setrgb(0, 20, 20); break; case _NAV: - // Yellowy orange - rgblight_setrgb(25,20,0); // brighter + // yellowy orange + rgblight_setrgb(25, 20, 0); break; case _FKEYS: - // RED - rgblight_setrgb(20,0,0); // brighter + // red + rgblight_setrgb(20, 0, 0); break; default: - rgblight_setrgb(20,2,20);//error + // error + rgblight_setrgb(20,2,20); break; } - return; - -} - -void matrix_init_user(void) { + return; } // Bleah globals need to be initialized. -uint8_t old_layer=_QW; +uint8_t old_layer = _QW; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (old_layer != layer) { - LayerLEDSet(layer); - old_layer=layer; - } -} - -void led_set_user(uint8_t usb_led) { + uint8_t layer = biton32(layer_state); + if (old_layer != layer) { + LayerLEDSet(layer); + old_layer = layer; + } } diff --git a/keyboards/handwired/traveller/keymaps/default/readme.md b/keyboards/handwired/traveller/keymaps/default/readme.md deleted file mode 100644 index 7ddc40b3c3..0000000000 --- a/keyboards/handwired/traveller/keymaps/default/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# The default keymap for handwired/traveller -this is a kitchen sink build diff --git a/keyboards/handwired/traveller/readme.md b/keyboards/handwired/traveller/readme.md index 0be53a9628..135a0d2cad 100644 --- a/keyboards/handwired/traveller/readme.md +++ b/keyboards/handwired/traveller/readme.md @@ -1,35 +1,21 @@ -traveler keyboard firmware -====================== +# Traveller -## Traveller Specific Info ## -The traveller is a varient on the atreus keyboard. -Like the Atreus, it is designed to be a good compromise between size and ergonomics. +The Traveller is a variant on the atreus keyboard. +Like the Atreus, it is designed to be a good compromise between size and ergonomics. -key differences are -- an additional column for each pinky -- an RGB LED in the center to show the current layer -- more finger stagger, splay angle and contoured keycaps (F2 profile for space key). +Key differences are: +- An additional column for each pinky +- An RGB LED in the center to show the current layer +- 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. - -### 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 `.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|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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). diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk index 0758e59340..806a19af38 100644 --- a/keyboards/handwired/traveller/rules.mk +++ b/keyboards/handwired/traveller/rules.mk @@ -2,42 +2,21 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# 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 +BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -RGBLIGHT_ENABLE = yes - -# for avr upload -USB = /dev/cu.usbmodem1421 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/traveller/traveller.c b/keyboards/handwired/traveller/traveller.c index 9d25341300..409abe7d14 100644 --- a/keyboards/handwired/traveller/traveller.c +++ b/keyboards/handwired/traveller/traveller.c @@ -1,61 +1,18 @@ #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) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up #ifdef RGBLIGHT_ENABLE - rgblight_init(); - rgblight_mode(1); // solid, no timer - rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW + rgblight_init(); + rgblight_mode(1); // solid, no timer + rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW #endif -// Turn status LED on - DDRC |= (1<<7); - PORTC |= (1<<7); + // Turn status LED on + setPinOutput(C7); + 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); -} - - diff --git a/keyboards/handwired/traveller/traveller.h b/keyboards/handwired/traveller/traveller.h index acf2ee7028..e3c096e4ef 100644 --- a/keyboards/handwired/traveller/traveller.h +++ b/keyboards/handwired/traveller/traveller.h @@ -1,32 +1,17 @@ -#ifndef TRAVELLER_H -#define TRAVELLER_H +#pragma once #include "quantum.h" -#include "led.h" -#ifdef RGBLIGHT_ENABLE - #include "rgblight.h" -#endif -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#define XXX KC_NO - - -// 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( \ - k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \ - 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, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0a, k0b, k0c }, \ - { 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 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c } \ + k00, k01, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0C, \ + 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, \ + 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 }, \ + { k10, k11, k12, k13, k14, k15, XXX, k17, k18, k19, k1A, k1B, k1C }, \ + { 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 } \ } - -#endif -- cgit v1.2.3