Skip to content

Commit 58993d3

Browse files
deemcodrashna
authored andcommitted
[Keyboard] Tmo50 initial commit (#4891)
* Create ISO HHKB keymapping for GH60 * Add media controls to Fn layer * Use M(x) instead of F(x), add Copyright text * Create initial firmware for TMO50 * Correct year and author * Fix repos README * Remove unnecessary code * Change include guard in tmo50.h
1 parent b0d308e commit 58993d3

File tree

7 files changed

+433
-0
lines changed

7 files changed

+433
-0
lines changed

keyboards/tmo50/config.h

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
/*
2+
Copyright 2019 funderburker
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#pragma once
19+
20+
#include "config_common.h"
21+
22+
/* USB Device descriptor parameter */
23+
#define VENDOR_ID 0xFEED
24+
#define PRODUCT_ID 0x0000
25+
#define DEVICE_VER 0x0001
26+
#define MANUFACTURER funderburker
27+
#define PRODUCT TMO50
28+
#define DESCRIPTION 50% mechanical keyboard with macro column
29+
30+
/* key matrix size */
31+
#define MATRIX_ROWS 4
32+
#define MATRIX_COLS 14
33+
34+
/*
35+
* Keyboard Matrix Assignments
36+
*
37+
* Change this to how you wired your keyboard
38+
* COLS: AVR pins used for columns, left to right
39+
* ROWS: AVR pins used for rows, top to bottom
40+
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41+
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42+
*
43+
*/
44+
#define MATRIX_ROW_PINS { D5, D3, D2, D0 }
45+
#define MATRIX_COL_PINS { D1, D4, F0, F1, F4, F5, F6, F7, D6, D7, B4, B5, B6, C6 }
46+
#define UNUSED_PINS
47+
48+
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49+
#define DIODE_DIRECTION COL2ROW
50+
51+
/* number of backlight levels */
52+
#define BACKLIGHT_PIN B7
53+
#define BACKLIGHT_BREATHING
54+
#define BACKLIGHT_LEVELS 3
55+
56+
#define RGB_DI_PIN C7
57+
#ifdef RGB_DI_PIN
58+
#define RGBLED_NUM 10
59+
#define RGBLIGHT_HUE_STEP 8
60+
#define RGBLIGHT_SAT_STEP 8
61+
#define RGBLIGHT_VAL_STEP 8
62+
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
63+
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
64+
/*== all animations enable ==*/
65+
#define RGBLIGHT_ANIMATIONS
66+
/*== or choose animations ==*/
67+
// #define RGBLIGHT_EFFECT_BREATHING
68+
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
69+
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
70+
// #define RGBLIGHT_EFFECT_SNAKE
71+
// #define RGBLIGHT_EFFECT_KNIGHT
72+
// #define RGBLIGHT_EFFECT_CHRISTMAS
73+
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
74+
// #define RGBLIGHT_EFFECT_RGB_TEST
75+
// #define RGBLIGHT_EFFECT_ALTERNATING
76+
#endif
77+
78+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
79+
#define DEBOUNCING_DELAY 5
80+
81+
/* define if matrix has ghost (lacks anti-ghosting diodes) */
82+
//#define MATRIX_HAS_GHOST
83+
84+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
85+
#define LOCKING_SUPPORT_ENABLE
86+
/* Locking resynchronize hack */
87+
#define LOCKING_RESYNC_ENABLE
88+
89+
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
90+
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
91+
*/
92+
// #define GRAVE_ESC_CTRL_OVERRIDE
93+
94+
/*
95+
* Force NKRO
96+
*
97+
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
98+
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
99+
* makefile for this to work.)
100+
*
101+
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
102+
* until the next keyboard reset.
103+
*
104+
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
105+
* fully operational during normal computer usage.
106+
*
107+
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
108+
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
109+
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
110+
* power-up.
111+
*
112+
*/
113+
//#define FORCE_NKRO
114+
115+
/*
116+
* Magic Key Options
117+
*
118+
* Magic keys are hotkey commands that allow control over firmware functions of
119+
* the keyboard. They are best used in combination with the HID Listen program,
120+
* found here: https://www.pjrc.com/teensy/hid_listen.html
121+
*
122+
* The options below allow the magic key functionality to be changed. This is
123+
* useful if your keyboard/keypad is missing keys and you want magic key support.
124+
*
125+
*/
126+
127+
/* key combination for magic key command */
128+
#define IS_COMMAND() ( \
129+
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
130+
)
131+
132+
/* control how magic key switches layers */
133+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
134+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
135+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
136+
137+
/* override magic key keymap */
138+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
139+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
140+
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
141+
//#define MAGIC_KEY_HELP1 H
142+
//#define MAGIC_KEY_HELP2 SLASH
143+
//#define MAGIC_KEY_DEBUG D
144+
//#define MAGIC_KEY_DEBUG_MATRIX X
145+
//#define MAGIC_KEY_DEBUG_KBD K
146+
//#define MAGIC_KEY_DEBUG_MOUSE M
147+
//#define MAGIC_KEY_VERSION V
148+
//#define MAGIC_KEY_STATUS S
149+
//#define MAGIC_KEY_CONSOLE C
150+
//#define MAGIC_KEY_LAYER0_ALT1 ESC
151+
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
152+
//#define MAGIC_KEY_LAYER0 0
153+
//#define MAGIC_KEY_LAYER1 1
154+
//#define MAGIC_KEY_LAYER2 2
155+
//#define MAGIC_KEY_LAYER3 3
156+
//#define MAGIC_KEY_LAYER4 4
157+
//#define MAGIC_KEY_LAYER5 5
158+
//#define MAGIC_KEY_LAYER6 6
159+
//#define MAGIC_KEY_LAYER7 7
160+
//#define MAGIC_KEY_LAYER8 8
161+
//#define MAGIC_KEY_LAYER9 9
162+
//#define MAGIC_KEY_BOOTLOADER PAUSE
163+
//#define MAGIC_KEY_LOCK CAPS
164+
//#define MAGIC_KEY_EEPROM E
165+
//#define MAGIC_KEY_NKRO N
166+
//#define MAGIC_KEY_SLEEP_LED Z
167+
168+
/*
169+
* Feature disable options
170+
* These options are also useful to firmware size reduction.
171+
*/
172+
173+
/* disable debug print */
174+
//#define NO_DEBUG
175+
176+
/* disable print */
177+
//#define NO_PRINT
178+
179+
/* disable action features */
180+
//#define NO_ACTION_LAYER
181+
//#define NO_ACTION_TAPPING
182+
//#define NO_ACTION_ONESHOT
183+
//#define NO_ACTION_MACRO
184+
//#define NO_ACTION_FUNCTION
185+
186+
/*
187+
* MIDI options
188+
*/
189+
190+
/* Prevent use of disabled MIDI features in the keymap */
191+
//#define MIDI_ENABLE_STRICT 1
192+
193+
/* enable basic MIDI features:
194+
- MIDI notes can be sent when in Music mode is on
195+
*/
196+
//#define MIDI_BASIC
197+
198+
/* enable advanced MIDI features:
199+
- MIDI notes can be added to the keymap
200+
- Octave shift and transpose
201+
- Virtual sustain, portamento, and modulation wheel
202+
- etc.
203+
*/
204+
//#define MIDI_ADVANCED
205+
206+
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
207+
//#define MIDI_TONE_KEYCODE_OCTAVES 1
208+

keyboards/tmo50/info.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"keyboard_name": "TMO50",
3+
"url": "",
4+
"maintainer": "funderburker",
5+
"bootloader": "atmel-dfu",
6+
"width": 15.25,
7+
"height": 4,
8+
"layouts": {
9+
"LAYOUT": {
10+
"layout": [{"label":"", "x":0, "y":0}, {"label":"", "x":1.25, "y":0}, {"label":"", "x":2.25, "y":0}, {"label":"", "x":3.25, "y":0}, {"label":"", "x":4.25, "y":0}, {"label":"", "x":5.25, "y":0}, {"label":"", "x":6.25, "y":0}, {"label":"", "x":7.25, "y":0}, {"label":"", "x":8.25, "y":0}, {"label":"", "x":9.25, "y":0}, {"label":"", "x":10.25, "y":0}, {"label":"", "x":11.25, "y":0}, {"label":"", "x":12.25, "y":0}, {"label":"", "x":13.25, "y":0}, {"label":"", "x":14.25, "y":0}, {"x":0, "y":1}, {"label":"Ctrl", "x":1.25, "y":1, "w":1.25}, {"label":"", "x":2.5, "y":1}, {"label":"", "x":3.5, "y":1}, {"label":"", "x":4.5, "y":1}, {"label":"", "x":5.5, "y":1}, {"label":"", "x":6.5, "y":1}, {"label":"", "x":7.5, "y":1}, {"label":"", "x":8.5, "y":1}, {"label":"", "x":9.5, "y":1}, {"label":"", "x":10.5, "y":1}, {"label":"", "x":11.5, "y":1}, {"label":"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"", "x":3, "y":2}, {"label":"", "x":4, "y":2}, {"label":"", "x":5, "y":2}, {"label":"", "x":6, "y":2}, {"label":"b", "x":7, "y":2}, {"label":"", "x":8, "y":2}, {"label":"m", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"", "x":11, "y":2}, {"label":"", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"", "x":14.25, "y":2}, {"x":0, "y":3}, {"label":"Alt", "x":2.75, "y":3}, {"label":"Win", "x":3.75, "y":3, "w":1.5}, {"label":"", "x":5.25, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"AltGr", "x":10.25, "y":3, "w":1.5}, {"label":"L3", "x":11.75, "y":3}]
11+
}
12+
}
13+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* Copyright 2019 funderburker
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
#include QMK_KEYBOARD_H
17+
18+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19+
// Default layer
20+
[0] = LAYOUT(
21+
KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
22+
KC_TRNS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
23+
KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2),
24+
KC_TRNS, KC_TAB, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3)
25+
),
26+
27+
// Fn1 layer
28+
[1] = LAYOUT(
29+
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC,
30+
KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS,
31+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
32+
KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
33+
),
34+
35+
// Fn2 layer
36+
[2] = LAYOUT(
37+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL,
38+
KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS,
39+
KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
40+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
41+
),
42+
43+
// Fn3 layer
44+
[3] = LAYOUT(
45+
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
46+
KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
47+
KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
48+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
49+
),
50+
};
51+

keyboards/tmo50/readme.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# tmo50
2+
3+
![tmo50](https://imgur.com/BhRYzl6.jpg)
4+
5+
TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises.
6+
7+
Keyboard Maintainer: [funderburker](https://github.com/emiilsd)
8+
Hardware Supported: TMO50 mechanical keyboard
9+
Hardware Availability: Group buys
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make tmo50:default
14+
15+
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).

keyboards/tmo50/rules.mk

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# MCU name
2+
#MCU = at90usb1286
3+
MCU = 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.
16+
F_CPU = 16000000
17+
18+
19+
#
20+
# LUFA specific
21+
#
22+
# Target architecture (see library "Board Types" documentation).
23+
ARCH = AVR8
24+
25+
# Input clock frequency.
26+
# This will define a symbol, F_USB, in all source code files equal to the
27+
# input clock frequency (before any prescaling is performed) in Hz. This value may
28+
# differ from F_CPU if prescaling is used on the latter, and is required as the
29+
# raw input clock is fed directly to the PLL sections of the AVR for high speed
30+
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31+
# at the end, this will be done automatically to create a 32-bit value in your
32+
# source code.
33+
#
34+
# If no clock division is performed on the input clock inside the AVR (via the
35+
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36+
F_USB = $(F_CPU)
37+
38+
# Interrupt driven control endpoint task(+60)
39+
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40+
41+
# Bootloader selection
42+
BOOTLOADER = atmel-dfu
43+
44+
# Build Options
45+
# change yes to no to disable
46+
#
47+
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
48+
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
49+
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
50+
CONSOLE_ENABLE = no # Console for debug(+400)
51+
COMMAND_ENABLE = no # Commands for debug and configuration
52+
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
53+
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
54+
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
55+
NKRO_ENABLE = yes # USB Nkey Rollover
56+
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
57+
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
58+
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
59+
UNICODE_ENABLE = no # Unicode
60+
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
61+
AUDIO_ENABLE = no # Audio output on port C6
62+
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
63+
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)

keyboards/tmo50/tmo50.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Copyright 2019 funderburker
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
#include "tmo50.h"
17+
18+
void matrix_init_kb(void) {
19+
// put your keyboard start-up code here
20+
// runs once when the firmware starts up
21+
22+
matrix_init_user();
23+
}
24+
25+
void matrix_scan_kb(void) {
26+
// put your looping keyboard code here
27+
// runs every cycle (a lot)
28+
29+
matrix_scan_user();
30+
}
31+
32+
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33+
// put your per-action keyboard code here
34+
// runs for every action, just before processing by the firmware
35+
36+
return process_record_user(keycode, record);
37+
}
38+
39+
void led_set_kb(uint8_t usb_led) {
40+
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41+
42+
led_set_user(usb_led);
43+
}

0 commit comments

Comments
 (0)