aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilestogo <milestogo@users.noreply.github.com>2016-07-20 21:12:00 -0700
committermilestogo <milestogo@users.noreply.github.com>2016-07-20 21:12:00 -0700
commit24e4e6dd18924295a0ce0cab653be2e63008f0af (patch)
tree8e973748841306f02e3fb96c146b2c655e98a854
parent19848613380153f6d420f7807b41c70ee2f5797f (diff)
downloadqmk_firmware-24e4e6dd18924295a0ce0cab653be2e63008f0af.tar.gz
qmk_firmware-24e4e6dd18924295a0ce0cab653be2e63008f0af.zip
adding traveller keyboard
-rw-r--r--keyboards/handwired/traveller/Makefile89
-rw-r--r--keyboards/handwired/traveller/config.h173
-rw-r--r--keyboards/handwired/traveller/keymaps/default/keymap.c305
-rw-r--r--keyboards/handwired/traveller/keymaps/default/readme.md2
-rw-r--r--keyboards/handwired/traveller/readme.md35
-rw-r--r--keyboards/handwired/traveller/traveller.c61
-rw-r--r--keyboards/handwired/traveller/traveller.h32
7 files changed, 697 insertions, 0 deletions
diff --git a/keyboards/handwired/traveller/Makefile b/keyboards/handwired/traveller/Makefile
new file mode 100644
index 000000000..12a4b71f4
--- /dev/null
+++ b/keyboards/handwired/traveller/Makefile
@@ -0,0 +1,89 @@
1
2#MCU = at90usb1287
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18# for avr upload
19USB ?= /dev/cu.usbmodem1421
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39
40ifdef TEENSY2
41 OPT_DEFS += -DATREUS_TEENSY2
42 ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
43else
44 OPT_DEFS += -DATREUS_ASTAR
45 OPT_DEFS += -DCATERINA_BOOTLOADER
46 ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
47 avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
48endif
49# Interrupt driven control endpoint task(+60)
50OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
51
52
53# MCU name
54
55# Boot Section Size in *bytes*
56# Teensy halfKay 512
57# Teensy++ halfKay 1024
58# Atmel DFU loader 4096
59# LUFA bootloader 4096
60# USBaspLoader 2048
61OPT_DEFS += -DBOOTLOADER_SIZE=4096
62
63
64# Build Options
65# change yes to no to disable
66#
67BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
68MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
69EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
70CONSOLE_ENABLE ?= no # Console for debug(+400)
71COMMAND_ENABLE ?= no # Commands for debug and configuration
72# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
75NKRO_ENABLE ?= no # USB Nkey Rollover
76BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
77MIDI_ENABLE ?= no # MIDI controls
78UNICODE_ENABLE ?= no # Unicode
79BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
80AUDIO_ENABLE ?= no # Audio output on port C6
81RGBLIGHT_ENABLE = yes
82
83ifndef QUANTUM_DIR
84 include ../../../Makefile
85endif
86
87upload: build
88 $(ATREUS_UPLOAD_COMMAND)
89
diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h
new file mode 100644
index 000000000..2b82da447
--- /dev/null
+++ b/keyboards/handwired/traveller/config.h
@@ -0,0 +1,173 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER You
28#define PRODUCT traveller
29#define DESCRIPTION A custom keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 4
33#define MATRIX_COLS 13
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { D0, D1, D3, D2 }
46 // no I can't say why this order seemed like a good idea
47#define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 }
48#define UNUSED_PINS
49
50// LED stuff
51#define RGB_DI_PIN B2
52//#define RBLIGHT_TIMER
53#define RGBLED_NUM 1 // Number of LEDs
54#define RGBLIGHT_HUE_STEP 10
55#define RGBLIGHT_SAT_STEP 17
56#define RGBLIGHT_VAL_STEP 17
57
58
59/* COL2ROW or ROW2COL */
60#define DIODE_DIRECTION COL2ROW
61
62// #define BACKLIGHT_PIN B7
63// #define BACKLIGHT_BREATHING
64// #define BACKLIGHT_LEVELS 3
65
66
67/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
68#define DEBOUNCING_DELAY 5
69
70/* define if matrix has ghost (lacks anti-ghosting diodes) */
71//#define MATRIX_HAS_GHOST
72
73/* number of backlight levels */
74#define BACKLIGHT_LEVELS 3
75
76/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
77//#define LOCKING_SUPPORT_ENABLE
78/* Locking resynchronize hack */
79#define LOCKING_RESYNC_ENABLE
80
81/*
82 * Force NKRO
83 *
84 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
85 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
86 * makefile for this to work.)
87 *
88 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
89 * until the next keyboard reset.
90 *
91 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
92 * fully operational during normal computer usage.
93 *
94 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
95 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
96 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
97 * power-up.
98 *
99 */
100//#define FORCE_NKRO
101
102/*
103 * Magic Key Options
104 *
105 * Magic keys are hotkey commands that allow control over firmware functions of
106 * the keyboard. They are best used in combination with the HID Listen program,
107 * found here: https://www.pjrc.com/teensy/hid_listen.html
108 *
109 * The options below allow the magic key functionality to be changed. This is
110 * useful if your keyboard/keypad is missing keys and you want magic key support.
111 *
112 */
113
114/* key combination for magic key command */
115#define IS_COMMAND() ( \
116 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
117)
118
119/* control how magic key switches layers */
120//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
121//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
122//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
123
124/* override magic key keymap */
125//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
126//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
127//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
128//#define MAGIC_KEY_HELP1 H
129//#define MAGIC_KEY_HELP2 SLASH
130//#define MAGIC_KEY_DEBUG D
131//#define MAGIC_KEY_DEBUG_MATRIX X
132//#define MAGIC_KEY_DEBUG_KBD K
133//#define MAGIC_KEY_DEBUG_MOUSE M
134//#define MAGIC_KEY_VERSION V
135//#define MAGIC_KEY_STATUS S
136//#define MAGIC_KEY_CONSOLE C
137//#define MAGIC_KEY_LAYER0_ALT1 ESC
138//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
139//#define MAGIC_KEY_LAYER0 0
140//#define MAGIC_KEY_LAYER1 1
141//#define MAGIC_KEY_LAYER2 2
142//#define MAGIC_KEY_LAYER3 3
143//#define MAGIC_KEY_LAYER4 4
144//#define MAGIC_KEY_LAYER5 5
145//#define MAGIC_KEY_LAYER6 6
146//#define MAGIC_KEY_LAYER7 7
147//#define MAGIC_KEY_LAYER8 8
148//#define MAGIC_KEY_LAYER9 9
149//#define MAGIC_KEY_BOOTLOADER PAUSE
150//#define MAGIC_KEY_LOCK CAPS
151//#define MAGIC_KEY_EEPROM E
152//#define MAGIC_KEY_NKRO N
153//#define MAGIC_KEY_SLEEP_LED Z
154
155/*
156 * Feature disable options
157 * These options are also useful to firmware size reduction.
158 */
159
160/* disable debug print */
161//#define NO_DEBUG
162
163/* disable print */
164//#define NO_PRINT
165
166/* disable action features */
167//#define NO_ACTION_LAYER
168//#define NO_ACTION_TAPPING
169//#define NO_ACTION_ONESHOT
170//#define NO_ACTION_MACRO
171//#define NO_ACTION_FUNCTION
172
173#endif
diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c
new file mode 100644
index 000000000..13d889ab8
--- /dev/null
+++ b/keyboards/handwired/traveller/keymaps/default/keymap.c
@@ -0,0 +1,305 @@
1#include "traveller.h"
2#include "mousekey.h"
3#include "action_layer.h"
4
5// Each layer gets a name for readability, which is then used in the keymap matrix below.
6// The underscores don't mean anything - you can have a layer called STUFF or any other name.
7#define _QW 0
8#define _LW 1
9#define _HI 2
10#define _NAV 4
11#define _CUR 5
12#define _FKEYS 6
13#define _TRNS 8
14
15// We do the same trick for functions
16#define RGBLED_TOGGLE 10
17#define _HIOUT 15
18#define _LWOUT 16
19// Macros
20#define MDL 4
21#define MDR 5
22#define MUR 6
23#define MUL 3
24
25
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28/* Qwerty
29 * ,-----------------------------------------. .-----------------------------------------.
30 * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = |
31 * |------+------+------+------+------+------| |------+------+------+------+------+------|
32 * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ |
33 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
34 *|ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' |
35 * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
36 * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift |
37 * `------------------------------------------------------------------------------------------'
38 *
39 */
40[_QW] = KEYMAP(
41 F(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL,
42 KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS,
43 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,
44 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
45 ),
46
47/* LOW - numbers, missing or awkward programming keys
48 Doubled 1 key allows lazy reach with ring finger.
49 * ,-----------------------------------------. .-----------------------------------------.
50 * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del|
51 * |------+------+------+------+------+------| +------+------+------+------+------+------|
52 * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | |
53 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
54 * | Caps | [ | | { | } | ` | /| # | { | } | | ] | |
55 * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
56 * | Shift| | | | Low | |/ | | Hi | | | |Shift |
57 * `------------------------------------------------------------------------------------------'
58 *
59 */
60
61[_LW] = KEYMAP(
62 F(_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)) ,
63 KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO,
64 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,
65 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
66),
67
68/* HI - Punctuation, shell and
69url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$
70Right hand nav keys work pretty well chorded with the Right hand Hi Key
71 * ,-----------------------------------------. .-----------------------------------------.
72 * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |
73 * |------+------+------+------+------+------| |------+------+------+------+------+------|
74 * | | ! | & | "|" | $ | % | | Vol+| Mute| | | | |
75 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
76 * | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End |
77 * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
78 * | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right |
79 * `------------------------------------------------------------------------------------------'
80 *
81 */
82
83[_HI] = KEYMAP(
84 F(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS,
85 KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO,
86 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,
87 KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, F(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT
88),
89
90/* NAV - mouse & navigation
91//gui left and right are line home/end, or fore & back in browser
92// Mouse buttons are reversed for comfort - bigger stretch is to the right button.
93
94 * ,-----------------------------------------. .-----------------------------------------.
95* | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm|
96* |------+------+------+------+------+------| |------+------+------+------+------+--------|
97* | |Gui<- | Left | Down |Right | C^E | | BTN3 | MS_L |MS Up | MS_R | |Ms Fast |
98* |------+------+------+------+------+------|------|------+------+------+------+------+--------|
99* | | C^A | GUI X| GUI C| GUI_V| |Enter/| MWD | M_DL |MS Dwn|MS_DR | Up |Ms Slow |
100* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
101* | | GuiZ | | | Low | |/ButnR|ButnL | Hi | | Left | Down | Right |
102* `------------------------------------------------------------------------------------------'
103*/
104
105[_NAV] = KEYMAP(
106 F(_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,
107 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,
108 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,
109 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
110),
111
112/* FKEYS - Funtion keys & mac stuff
113 * ,-----------------------------------------. .-----------------------------------------.
114 * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
115 * |------+------+------+------+------+------| |------+------+------+------+------+------|
116 * | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt |
117 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
118 * |Qwerty| | | | | | /| | | | | | Del |
119 * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
120 * | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | |
121 * `------------------------------------------------------------------------------------------'
122 *
123 */
124
125[_FKEYS] = KEYMAP(
126 F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL,
127 KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT ,
128 F(_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,
129 KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
130),
131
132
133/* TRNS - skeleton for laters
134 * ,-----------------------------------------. .-----------------------------------------.
135 * | . | . | . | . | . | . | | ^ | & | * | ( | ) | |
136 * |------+------+------+------+------+------| |------+------+------+------+------+------|
137 * | . | . | . | . | . | . | | 6 | 7 | 8 | 9 | 0 | |
138 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
139 * | . | . | . | . | . | . | /| | | | . | ; | " |
140 * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
141 * | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT |
142 * `------------------------------------------------------------------------------------------'
143 *
144 */
145
146[_TRNS] = {
147 {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},
148 {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},
149 {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},
150 {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}
151 }
152
153
154};
155
156
157const uint16_t PROGMEM fn_actions[] = {
158 [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer
159 [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch
160 [_HI] = ACTION_LAYER_TAP_TOGGLE(_HI), // Turn on LW when holding, or tap 3 times to switch
161 [_NAV] = ACTION_LAYER_TOGGLE(_NAV),
162 [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS),
163 [_LWOUT] = ACTION_LAYER_OFF(_LW,ON_RELEASE),
164 [_HIOUT] = ACTION_LAYER_OFF(_HI,ON_RELEASE),
165
166 // Functions
167 [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE),
168
169};
170
171const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
172{
173 // MACRODOWN only works in this function
174 switch(id) {
175 case 0:
176 if (record->event.pressed) {
177 register_code(KC_RSFT);
178 #ifdef BACKLIGHT_ENABLE
179 backlight_step();
180 #endif
181 } else {
182 unregister_code(KC_RSFT);
183 }
184 break;
185
186 // from algernon's ErgoDox EZ layout,
187 case MUL:
188 if (record->event.pressed) {
189 mousekey_on(KC_MS_UP);
190 mousekey_on(KC_MS_LEFT);
191 } else {
192 mousekey_off(KC_MS_UP);
193 mousekey_off(KC_MS_LEFT);
194 }
195 mousekey_send();
196 break;
197
198 case MUR:
199 if (record->event.pressed) {
200 mousekey_on(KC_MS_UP);
201 mousekey_on(KC_MS_RIGHT);
202 } else {
203 mousekey_off(KC_MS_UP);
204 mousekey_off(KC_MS_RIGHT);
205 }
206 mousekey_send();
207 break;
208
209 case MDL:
210 if (record->event.pressed) {
211 mousekey_on(KC_MS_DOWN);
212 mousekey_on(KC_MS_LEFT);
213 } else {
214 mousekey_off(KC_MS_DOWN);
215 mousekey_off(KC_MS_LEFT);
216 }
217 mousekey_send();
218 break;
219
220 case MDR:
221 if (record->event.pressed) {
222 mousekey_on(KC_MS_DOWN);
223 mousekey_on(KC_MS_RIGHT);
224 } else {
225 mousekey_off(KC_MS_DOWN);
226 mousekey_off(KC_MS_RIGHT);
227 }
228 mousekey_send();
229 break;
230
231
232 }
233 return MACRO_NONE;
234};
235
236
237
238void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
239 switch (id) {
240 case RGBLED_TOGGLE:
241 //led operations
242 if (record->event.pressed) {
243 rgblight_toggle();
244 }
245 break;
246 }
247}
248
249
250
251void LayerLEDSet(uint8_t layr) {
252
253 switch (layr) {
254 case _QW:
255 rgblight_setrgb(0,20, 0); // dim green
256 break;
257 case _LW:
258 // deep purple
259 rgblight_setrgb(20,0,35);
260 break;
261 case _HI:
262 // light blue
263 rgblight_setrgb(0,20,20);
264 break;
265 case _NAV:
266 // Yellowy orange
267 rgblight_setrgb(25,20,0); // brighter
268 break;
269 case _FKEYS:
270 // RED
271 rgblight_setrgb(20,0,0); // brighter
272 break;
273 default:
274 rgblight_setrgb(20,2,20);//error
275 break;
276 }
277
278 return;
279
280}
281
282void matrix_init_user(void) {
283}
284
285// Bleah globals need to be initialized.
286uint8_t old_layer=_QW;
287
288void matrix_scan_user(void) {
289 uint8_t layer = biton32(layer_state);
290 if (old_layer != layer) {
291 LayerLEDSet(layer);
292 old_layer=layer;
293 }
294}
295
296
297bool process_record_user(uint16_t keycode, keyrecord_t *record) {
298 return true;
299}
300
301void led_set_user(uint8_t usb_led) {
302
303}
304
305
diff --git a/keyboards/handwired/traveller/keymaps/default/readme.md b/keyboards/handwired/traveller/keymaps/default/readme.md
new file mode 100644
index 000000000..7ddc40b3c
--- /dev/null
+++ b/keyboards/handwired/traveller/keymaps/default/readme.md
@@ -0,0 +1,2 @@
1# The default keymap for handwired/traveller
2this is a kitchen sink build
diff --git a/keyboards/handwired/traveller/readme.md b/keyboards/handwired/traveller/readme.md
new file mode 100644
index 000000000..646844b1d
--- /dev/null
+++ b/keyboards/handwired/traveller/readme.md
@@ -0,0 +1,35 @@
1traveler keyboard firmware
2======================
3
4## Traveller Specific Info ##
5The traveller is a varient on the atreus keyboard.
6Like the Atreus, it is designed to be a good compromise between size and ergonomics.
7
8key differences are
9- an additional column for each pinky
10- an RGB LED in the center to show the current layer
11- more finger stagger, splay angle and contoured keycaps (F2 profile for space key).
12
13You 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.
14
15## Quantum MK Firmware
16
17For the full Quantum feature list, see [the parent README.md](/README.md).
18
19## Building
20
21Download 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.
22
23Depending on which keymap you would like to use, you will have to compile slightly differently.
24
25### Default
26To build with the default keymap, simply run `make`.
27
28### Other Keymaps
29Several 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.
30
31To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
32```
33$ make KEYMAP=[default|jack|<name>]
34```
35Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/traveller/traveller.c b/keyboards/handwired/traveller/traveller.c
new file mode 100644
index 000000000..9d2534130
--- /dev/null
+++ b/keyboards/handwired/traveller/traveller.c
@@ -0,0 +1,61 @@
1#include "traveller.h"
2
3__attribute__ ((weak))
4void matrix_init_user(void) {
5 // leave this function blank - it can be defined in a keymap file
6};
7
8__attribute__ ((weak))
9void matrix_scan_user(void) {
10 // leave this function blank - it can be defined in a keymap file
11}
12
13__attribute__ ((weak))
14void process_action_user(keyrecord_t *record) {
15 // leave this function blank - it can be defined in a keymap file
16}
17
18__attribute__ ((weak))
19void led_set_user(uint8_t usb_led) {
20 // leave this function blank - it can be defined in a keymap file
21}
22
23void matrix_init_kb(void) {
24 // put your keyboard start-up code here
25 // runs once when the firmware starts up
26
27#ifdef RGBLIGHT_ENABLE
28 rgblight_init();
29 rgblight_mode(1); // solid, no timer
30 rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW
31#endif
32
33// Turn status LED on
34 DDRC |= (1<<7);
35 PORTC |= (1<<7);
36
37 matrix_init_user();
38}
39
40
41void matrix_scan_kb(void) {
42 // put your looping keyboard code here
43 // runs every cycle (a lot)
44
45 matrix_scan_user();
46}
47
48bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
49 // put your per-action keyboard code here
50 // runs for every action, just before processing by the firmware
51
52 return process_record_user(keycode, record);
53}
54
55void led_set_kb(uint8_t usb_led) {
56 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
57
58 led_set_user(usb_led);
59}
60
61
diff --git a/keyboards/handwired/traveller/traveller.h b/keyboards/handwired/traveller/traveller.h
new file mode 100644
index 000000000..972a1a94a
--- /dev/null
+++ b/keyboards/handwired/traveller/traveller.h
@@ -0,0 +1,32 @@
1#ifndef TRAVELLER_H
2#define TRAVELLER_H
3
4#include "quantum.h"
5#include "led.h"
6
7#ifdef RGBLIGHT_ENABLE
8 #include "rgblight.h"
9#endif
10#ifdef BACKLIGHT_ENABLE
11 #include "backlight.h"
12#endif
13
14
15
16// This a shortcut to help you visually see your layout.
17// The first section contains all of the arguements
18// The second converts the arguments into a two-dimensional array
19#define KEYMAP( \
20 k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \
21 k10, k11, k12, k13, k14, k15, k17, k18, k19, k1a, k1b, k1c, \
22 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
23 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c \
24) \
25{ \
26 { k00, k01, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0a, k0b, k0c }, \
27 { k10, k11, k12, k13, k14, k15, KC_NO, k17, k18, k19, k1a, k1b, k1c }, \
28 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \
29 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c } \
30}
31
32#endif