1
0
Fork 0

Keyboard: Add Tragicforce 68 (#3807)

* Fork MF68 to Tragicforce 68

* Set pinouts and key layout

* Reformat keymap, update comments/notes

* Cleanup rules.mk
This commit is contained in:
Danny 2018-08-31 14:13:55 -04:00 committed by Drashna Jaelre
parent c51b2266a0
commit acc06a0848
7 changed files with 223 additions and 0 deletions

View file

@ -0,0 +1,18 @@
Tragicforce 68
===============
Magicforce 68 with [Tragicforce 68 replacement PCB](https://keeb.io/products/mf68-magicforce-68-pcb-replacement-kit) from Keebio.
Keyboard Maintainer: [Keebio](https://keeb.io)
Hardware Supported: Pro Micro
Hardware Availability: [Keebio](https://keeb.io)
Make example for this keyboard (after setting up your build environment):
make tragicforce68:default
Example of flashing this keyboard:
make tragicforce68:default:avrdude
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.

View file

@ -0,0 +1,69 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xCEEB
#define PRODUCT_ID 0x0510
#define DEVICE_VER 0x0101
#define MANUFACTURER Keebio
#define PRODUCT Tragicforce 68
#define DESCRIPTION Programmable PCB replacement for Magicforce 68
/* key matrix size */
#define MATRIX_ROWS 9
#define MATRIX_COLS 8
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { D3, D2, D1, D0, B4, E6, C6, D7, D4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B5
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 7
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for magic key command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
#endif

View file

@ -0,0 +1,12 @@
{
"keyboard_name": "Tragicforce 68",
"url": "https://keeb.io",
"maintainer": "Keebio",
"width": 17.25,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
}
}
}

View file

@ -0,0 +1,34 @@
#include QMK_KEYBOARD_H
#define _QWERTY 0
#define _FN1 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_PGUP,
//├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤
KC_TAB, 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_BSLS, KC_DEL, KC_PGDN,
//├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER,
//├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
//├──────────┬───────┴──┬─────┴────┬───┴────────┴────────┴────────┴────────┴────────┴──────┬─┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(_FN1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
//└──────────┴──────────┴──────────┴───────────────────────────────────────────────────────┴──────────┴──────────┴──────────┘ └────────┴────────┴────────┘
),
[_FN1] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐
KC_GRV, 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_HOME,
//├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, BL_STEP, KC_BSLS, _______, KC_END,
//├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_QUOT, KC_ENTER,
//├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐
_______, _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_END, _______, BL_INC,
//├──────────┬───────┴──┬─────┴────┬───┴────────┴────────┴────────┴────────┴────────┴──────┬─┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐
_______, _______, _______, _______, _______, _______, KC_MENU, BL_BRTG, BL_DEC, BL_TOGG
//└──────────┴──────────┴──────────┴───────────────────────────────────────────────────────┴──────────┴──────────┴──────────┘ └────────┴────────┴────────┘
)
};

View file

@ -0,0 +1,26 @@
MCU = atmega32u4
F_CPU = 16000000
ARCH = AVR8
F_USB = $(F_CPU)
BOOTLOADER = caterina
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = yes # Console for debug(+400)
COMMAND_ENABLE = yes # 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 = yes # 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

View file

@ -0,0 +1,8 @@
#include "tragicforce68.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}

View file

@ -0,0 +1,56 @@
#pragma once
#include "quantum.h"
#define LAYOUT( \
A1, A2, A3, A4, A5, A6, A7, A8, E1, E2, E3, E4, E5, E6, E7, E8, \
B1, B2, B3, B4, B5, B6, B7, B8, F1, F2, F3, F4, F5, F6, F7, F8, \
C1, C2, C3, C4, C5, C6, C7, C8, G1, G2, G3, G4, G5, \
D1, D2, D3, D4, D5, D6, D7, D8, H1, H2, H3, H4, H5, \
J1, J2, J3, J5, J7, J8, H6, G6, G7, G8 \
) { \
{ A1, A2, A3, A4, A5, A6, A7, A8 }, \
{ B1, B2, B3, B4, B5, B6, B7, B8 }, \
{ C1, C2, C3, C4, C5, C6, C7, C8 }, \
{ D1, D2, D3, D4, D5, D6, D7, D8 }, \
{ E1, E2, E3, E4, E5, E6, E7, E8 }, \
{ F1, F2, F3, F4, F5, F6, F7, F8 }, \
{ G1, G2, G3, G4, G5, G6, G7, G8 }, \
{ H1, H2, H3, H4, H5, H6, KC_NO, KC_NO }, \
{ J1, J2, J3, KC_NO, J5, KC_NO, J7, J8 } \
}
#define LAYOUT_split_space( \
A1, A2, A3, A4, A5, A6, A7, A8, E1, E2, E3, E4, E5, E6, E7, E8, \
B1, B2, B3, B4, B5, B6, B7, B8, F1, F2, F3, F4, F5, F6, F7, F8, \
C1, C2, C3, C4, C5, C6, C7, C8, G1, G2, G3, G4, G5, \
D1, D2, D3, D4, D5, D6, D7, D8, H1, H2, H3, H4, H5, \
J1, J2, J3, J4, J5, J6, J7, J8, H6, G6, G7, G8 \
) { \
{ A1, A2, A3, A4, A5, A6, A7, A8 }, \
{ B1, B2, B3, B4, B5, B6, B7, B8 }, \
{ C1, C2, C3, C4, C5, C6, C7, C8 }, \
{ D1, D2, D3, D4, D5, D6, D7, D8 }, \
{ E1, E2, E3, E4, E5, E6, E7, E8 }, \
{ F1, F2, F3, F4, F5, F6, F7, F8 }, \
{ G1, G2, G3, G4, G5, G6, G7, G8 }, \
{ H1, H2, H3, H4, H5, H6, KC_NO, KC_NO }, \
{ J1, J2, J3, J4, J5, J6, J7, J8 } \
}
#define LAYOUT_kc( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
) LAYOUT( \
KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
)