Compare commits

..

1 Commits

Author SHA1 Message Date
Jack Humbert
4a42e10ccd add gb port 2018-01-07 00:14:19 -05:00
72 changed files with 350 additions and 2825 deletions

View File

@@ -34,11 +34,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE OPT_DEFS += -DAUDIO_ENABLE
MUSIC_ENABLE := 1 MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
ifeq ($(PLATFORM),AVR) SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/audio.c
else
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
endif
SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c SRC += $(QUANTUM_DIR)/audio/luts.c
endif endif

View File

@@ -69,7 +69,7 @@ This is a C header file that is one of the first things included, and will persi
* `#define BACKLIGHT_PIN B7` * `#define BACKLIGHT_PIN B7`
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM * pin of the backlight - B5, B6, B7 use PWM, others use softPWM
* `#define BACKLIGHT_LEVELS 3` * `#define BACKLIGHT_LEVELS 3`
* number of levels your backlight will have (maximum 15 excluding off) * number of levels your backlight will have (not including off)
* `#define BACKLIGHT_BREATHING` * `#define BACKLIGHT_BREATHING`
* enables backlight breathing (only works with backlight pins B5, B6 and B7) * enables backlight breathing (only works with backlight pins B5, B6 and B7)
* `#define BREATHING_PERIOD 6` * `#define BREATHING_PERIOD 6`

View File

@@ -10,18 +10,18 @@ These keycodes control the backlight. Most keyboards use this for single color i
|---------|------------------------------------------| |---------|------------------------------------------|
|`BL_TOGG`|Turn the backlight on or off | |`BL_TOGG`|Turn the backlight on or off |
|`BL_STEP`|Cycle through backlight levels | |`BL_STEP`|Cycle through backlight levels |
|`BL_ON` |Set the backlight to max brightness | |`BL_ON` |Set backlight to max brightness |
|`BL_OFF` |Turn the backlight off | |`BL_OFF` |Turn backlight off |
|`BL_INC` |Increase the backlight level | |`BL_INC` |Increase backlight level |
|`BL_DEC` |Decrease the backlight level | |`BL_DEC` |Decrease backlight level |
|`BL_BRTG`|Toggle backlight breathing | |`BL_BRTG`|Toggle backlight breathing |
Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h. Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h.
## Configuration Options in `config.h` ## Configuration Options in `config.h`
* `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this. * `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this.
* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (maximum 15 excluding off). * `BACKLIGHT_LEVELS 3` defines the number of brightness levels (excluding OFF).
* `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7. * `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7.
* `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds. * `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds.

View File

@@ -256,11 +256,11 @@ This is a reference only. Each group of keys links to the page documenting their
|---------|------------------------------------------| |---------|------------------------------------------|
|`BL_TOGG`|Turn the backlight on or off | |`BL_TOGG`|Turn the backlight on or off |
|`BL_STEP`|Cycle through backlight levels | |`BL_STEP`|Cycle through backlight levels |
|`BL_ON` |Set the backlight to max brightness | |`BL_x` |Set a specific backlight level between 0-9|
|`BL_OFF` |Turn the backlight off | |`BL_ON` |An alias for `BL_9` |
|`BL_INC` |Increase the backlight level | |`BL_OFF` |An alias for `BL_0` |
|`BL_DEC` |Decrease the backlight level | |`BL_INC` |Increase backlight level |
|`BL_BRTG`|Toggle backlight breathing | |`BL_DEC` |Decrease backlight level |
## [RGB Lighting](feature_rgblight.md) ## [RGB Lighting](feature_rgblight.md)

View File

@@ -1 +0,0 @@
#include "_xmega.h"

View File

@@ -1,3 +0,0 @@
#include "quantum.h"
#define KEYMAP(k) { { k } }

View File

@@ -1,48 +0,0 @@
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER _SPINDLE
#define PRODUCT XMEGA
#define DESCRIPTION test board
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 1
/* key matrix pins */
#define MATRIX_ROW_PINS { D0 }
#define MATRIX_COL_PINS { A0 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
// #define BACKLIGHT_PIN B6
// #define BACKLIGHT_LEVELS 5
/* Set 0 if debouncing isn't 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 command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#undef USE_STATIC_OPTIONS
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
#endif

View File

@@ -1,5 +0,0 @@
#include "_xmega.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(KC_A)
};

View File

@@ -1,25 +0,0 @@
/* Copyright 2017 Balz Guenat
*
* 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_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// place overrides here
#define GRAVE_ESC_CTRL_OVERRIDE
#endif

View File

@@ -1,96 +0,0 @@
/* Copyright 2017 Balz Guenat
*
* 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/>.
*/
#include "bananasplit.h"
#define ______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
-------------------------------------------------------------------------------------------
|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
-------------------------------------------------------------------------------------------
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
-------------------------------------------------------------------------------------------
| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
-------------------------------------------------------------------------------------------
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | |
-------------------------------------------------------------------------------------------
| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl |
-------------------------------------------------------------------------------------------
*/
[0] = KEYMAP( \
KC_GESC, 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_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_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, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, M(0),\
MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(1), KC_RCTL \
),
/*
-------------------------------------------------------------------------------------------
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete |
-------------------------------------------------------------------------------------------
| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc |
-------------------------------------------------------------------------------------------
| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter |
-------------------------------------------------------------------------------------------
| Shift | | | | | | | | | | | Shift | |
-------------------------------------------------------------------------------------------
| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl |
-------------------------------------------------------------------------------------------
*/
[1] = KEYMAP( \
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_DEL, \
KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \
KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, \
KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_RSFT, ______, \
______, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, ______, ______, ______, KC_RCTL \
),
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch(id) {
case 0:
// Sends Alt+Shift on both key down and key up.
// Fesigned to switch between two keyboard layouts on Windows using a locking switch.
// Does nothing if right shift is pressed for easier resync.
if (!(get_mods() & MOD_BIT(KC_RSFT)))
return MACRO(D(LALT), T(LSFT), U(LALT), END);
else
return MACRO_NONE;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View File

@@ -1,34 +0,0 @@
# Kamon's keymap for the Bananasplit
A simple layout to get you started with the BananaSplit60.
Default layer:
```
-------------------------------------------------------------------------------------------
|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
-------------------------------------------------------------------------------------------
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
-------------------------------------------------------------------------------------------
| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
-------------------------------------------------------------------------------------------
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | |
-------------------------------------------------------------------------------------------
| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl |
-------------------------------------------------------------------------------------------
```
Fn1 layer:
```
-------------------------------------------------------------------------------------------
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete |
-------------------------------------------------------------------------------------------
| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc |
-------------------------------------------------------------------------------------------
| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter |
-------------------------------------------------------------------------------------------
| Shift | | | | | | | | | | | Shift | |
-------------------------------------------------------------------------------------------
| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl |
-------------------------------------------------------------------------------------------
```

View File

@@ -1,37 +0,0 @@
# Copyright 2017 Balz Guenat
#
# 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/>.
# QMK Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
# 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 = yes # Commands for debug and configuration
# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
# AUDIO_ENABLE = no # Audio output on port C6
# UNICODE_ENABLE = no # Unicode
# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -1,389 +0,0 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "chimera_ortho.h"
#include "action_layer.h"
#include "version.h"
#include "process_keycode/process_tap_dance.h"
#include "gordon.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.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define CALTDEL LCTL(LALT(KC_DEL))
#define TSKMGR LCTL(LSFT(KC_ESC))
#define KC_SNAPLEFT LGUI(KC_LEFT)
#define KC_SNAPRIGHT LGUI(KC_RIGHT)
#define KC_SNAPUP LGUI(KC_UP)
#define KC_SNAPDOWN LGUI(KC_DOWN)
#define KC_PREVTAB LCTL(LSFT(KC_TAB))
#define KC_NEXTTAB LCTL(KC_TAB)
#define KC_WORKRIGHT LCTL(LGUI(KC_RIGHT))
#define KC_WORKLEFT LCTL(LGUI(KC_LEFT))
#define KC_NMPD TG(_NUMPAD)
#define KC_SYMB TG(_SYMBOLS)
#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
#define KC_SPLT MT(MOD_LALT, KC_MINS)
#define KC_SPRT MT(MOD_LALT, KC_1)
#define KC_GBRC MT(MOD_RGUI, KC_8)
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
#define KC_CSHW MT(MOD_LCTL|MOD_LSFT,KC_W)
#define KC_CDEL LCTL(KC_DEL)
#define KC_AUDUP KC_AUDIO_VOL_UP
#define KC_AUDOWN KC_AUDIO_VOL_DOWN
#define KC_MEHS MEH_T(KC_S)
#define KC_MEHL MEH_T(KC_L)
#define KC_GWIN GUI_T(KC_G)
#define KC_FCTL CTL_T(KC_F)
#define KC_JCTL CTL_T(KC_J)
#define KC_ZCTL CTL_T(KC_Z)
#define KC_ALTV ALT_T(KC_V)
#define KC_ALTN ALT_T(KC_N)
#define KC_MEHX ALL_T(KC_X)
#define KC_RESET RESET
//LTs
#define KC_MESC LT(_MACROS, KC_ESC)
#define KC_DNUM LT(_NUMPAD, KC_D)
#define KC_SPFN LT(_NAV,KC_EQL)
#define KC_EMAUS LT(_MOUSE,KC_E)
#define KC_ENAV LT(_NAV,KC_E)
#define KC_INAV LT(_TEXTNAV,KC_I)
#define KC_BSPSYM LT(_SYMBOLS,KC_BSPACE)
#define KC_ENTSYM LT(_SYMBOLS,KC_ENTER)
#define KC_CLNMAUS LT(_MOUSE,KC_SCOLON)
#define KC_FUNC TT(_FUNCTION)
//TAP DANCE
#define KC_F6F7 TD(F6F7)
#define KC_ALF4 TD(ALTF4)
#define KC_TTT TD(TTT)
#define KC_ENHM TD(HOME_END)
#define KC_CLPS TD(CALC_PRINTSCREEN)
#define KC_INCL M(0)
#define KC_PULL M(1)
#define KC_PUSH M(2)
#define KC_SCAP M(3)
#define KC_SCOF M(4)
#define KC_CAD LALT(LCTL(KC_DEL))
#define LONGPRESS_DELAY 150
//#define LAYER_TOGGLE_DELAY 300
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define KC_ KC_TRNS
/* TODO:
*
* DONE: RESET and CAD into macro layer.
* DONE: WINUP AND WINDOWN in NAV layer
* DONE: Get rid of caps layer. not sure what it is even for.
* DONE: LMEH
* DONE: plus, divide, multiply on left hand for num layer
* DONE: F1 - F12 on a layer toggle (not a temp toggle but a one shot or something)
* DONE: Volume, page up and down for mouse layer.
* DONE: Add full user files - without using anything.
* DONE: Insert, ctrl delete
* DONE: Home and End
* DONE: Printscreen
* Easier way to open new terminal (instead of alt + F2)
* Intellij/text navigation layer (ctrl delete could be here).
* Macro for "System.exit(0)" probably macro layer and "c"
* Some sort of tap dance for comma, H, right pinky, and possibly other corners.
* Something more with the right hand. not sure what.
* Mouse: Left scroll, right scroll
* Passwords and any other macros.
* LED for control
* All modifiers reset
* Russain layer
* Hebrew layer
* Get rid of stupid git pull and push macros.
*
*/
//Tap dance enums
enum {
F12ETAPS = 0,
CALCCOMP,
ALTF4,
F6F7,
TTT,
HOME_END,
CALC_PRINTSCREEN
};
static xtap ttt_state = {
.is_press_action = true,
.state = 0
};
//Already exists in gordon.c, shouldn't need this anymore
/*// To activate SINGLE_HOLD, you will need to hold for 200ms first.
// This tap dance favors keys that are used frequently in typing like 'f'
int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted) {
return SINGLE_TAP;
}
else {
if (!state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
}
}
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
//with single tap.
else if (state->count == 2) {
if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP;
else if (state->count == 3) return TRIPLE_HOLD;
else return 8; //magic number. At some point this method will expand to work for more presses
}*/
/* "Super tap toggle"
* Basically, TT but for two or more layers for a single key.
* This particular dance:
* Single tap/hold - TT for Function layer
* Double tap/hold - TT for Numpad layer
* Triple tap/hold - TT for Mouse layer
*
*/
void TTT_finished (qk_tap_dance_state_t *state, void *user_data) {
ttt_state.state = cur_dance(state);
switch (ttt_state.state) {
case SINGLE_TAP: layer_invert(_FUNCTION); break;
case SINGLE_HOLD: layer_on(_FUNCTION); break;
case DOUBLE_TAP: layer_invert(_NUMPAD); break;
case DOUBLE_HOLD: layer_on(_NUMPAD); break;
case DOUBLE_SINGLE_TAP: layer_invert(_NUMPAD); break;
case TRIPLE_TAP: layer_invert(_MOUSE); break;
case TRIPLE_HOLD: layer_on(_MOUSE); break;
}
}
void TTT_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (ttt_state.state) {
case SINGLE_TAP: break;
case SINGLE_HOLD: layer_off(_FUNCTION); break;
case DOUBLE_TAP: break;
case DOUBLE_HOLD: layer_off(_NUMPAD); break;
case DOUBLE_SINGLE_TAP: break;
case TRIPLE_TAP: break;
case TRIPLE_HOLD: layer_off(_MOUSE); break;
}
ttt_state.state = 0;
}
qk_tap_dance_action_t tap_dance_actions[] = {
// simple tap dance
[F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))),
[CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER),
[CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR),
[ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)),
[F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)),
[HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME),
[TTT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,TTT_finished, TTT_reset),
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , A , MEHS,DNUM,FCTL,GWIN,GRAVE, TILD, H ,JCTL, K ,MEHL,CLNMAUS,ENHM,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
MINUS,ZCTL,MEHX, C ,ALTV, B ,DELETE, INS ,ALTN, M ,COMM,DOT ,SLSH,UNDS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSHIFT,BSPSYM, SPC ,ENTSYM
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_NUMPAD] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,MINS,PLUS,/**/,EQUAL, , , , , 4 , 5 , 6 ,PLUS, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , 0
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_SYMBOLS] = KEYMAP(
//,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----.
,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/,
//|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
,EXLM,EXLM,LPRN,RPRN , , , , ,DQUO,EQUAL,QUOTE,RCBR, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,DOLLAR, PERC,LBRACKET,RBRACKET, , , ,PIPE,BSLASH,PLUS, , , ,
//|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
UNDS,/**/, ,/**/
// \-------------------+----+----+---/ \---+----+----+-------------------/
),
[_FUNCTION] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_NAV] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,SNAPUP,PREVTAB, ,NEXTTAB,SNAPDOWN,, , ,LEFT,DOWN,RGHT, , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
CDEL ,DEL, ,
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_TEXTNAV] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , ,/**/, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_MOUSE] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , ,MS_UP, , , , , , , UP , , , ,/**/
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, ,MS_LEFT,MS_DOWN,MS_RIGHT, , , , ,LEFT,DOWN,RGHT,/**/, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,MS_BTN1 ,MS_BTN2 ,
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_MACROS] = KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
/**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
CAD ,SECRET_1, , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
SCAP, , , , , , , , , , , , ,SCAP,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
/* include some kind of library or header */
case 0:
if (record->event.pressed) {
SEND_STRING("#include <>");
return MACRO( T(LEFT), END);
}
break;
case 1:
if (record->event.pressed) {
SEND_STRING("git pull");
return MACRO( T(ENT), END );
}
break;
case 2:
if (record->event.pressed){
SEND_STRING("git push");
return MACRO( T(ENT), END );
}
break;
case 3:
if (record->event.pressed){
// layer_on(_CAPS);
// register_code(KC_CAPSLOCK);
// unregister_code(KC_CAPSLOCK);
}
break;
case 4:
if (record->event.pressed){
// layer_off(_CAPS);
// register_code(KC_CAPSLOCK);
// unregister_code(KC_CAPSLOCK);
}
break;
}
return MACRO_NONE;
};
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
switch (layer) {
case _QWERTY:
set_led_green;
break;
case _MOUSE:
set_led_yellow;
break;
case _NUMPAD:
set_led_blue;
break;
case _SYMBOLS:
set_led_red;
break;
case _NAV:
set_led_magenta;
break;
case _MACROS:
set_led_green;
_delay_ms(45);
set_led_red;
_delay_ms(45);
break;
case _FUNCTION:
set_led_green;
_delay_ms(45);
set_led_blue;
_delay_ms(45);
break;
default:
set_led_green;
break;
}
};

View File

@@ -3,35 +3,11 @@
#define _______ KC_TRNS #define _______ KC_TRNS
enum keyboard_layers { enum keyboard_layers {
_BL, _BL,
_FL, _FL,
_CL _CL
}; };
enum custom_keycodes {
S_BSKTC = SAFE_RANGE,
S_ODEJY,
S_RCKBY,
S_DOEDR,
S_SCALE,
S_ONEUP,
S_COIN,
S_SONIC,
S_ZELDA
};
#ifdef AUDIO_ENABLE
float song_basketcase[][2] = SONG(BASKET_CASE);
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float song_coin[][2] = SONG(COIN_SOUND);
float song_one_up[][2] = SONG(ONE_UP_SOUND);
float song_sonic_ring[][2] = SONG(SONIC_RING);
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
#endif
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer /* Layer 0: Default Layer
* ,-----------------------------------------------------------. * ,-----------------------------------------------------------.
@@ -57,71 +33,11 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
_______,_______,_______, _______, _______, _______, MO(_FL), _______), _______, _______, _______, _______, _______, _______, MO(_FL), _______),
[_CL] = KEYMAP( [_CL] = KEYMAP(
BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
_______, _______, _______, _______, _______, _______, MO(_FL), _______) _______, _______, _______, _______, _______, _______, MO(_FL), _______)
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case S_BSKTC:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_basketcase);
}
return false;
case S_ODEJY:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_ode_to_joy);
}
return false;
case S_RCKBY:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_rock_a_bye_baby);
}
return false;
case S_DOEDR:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_doe_a_deer);
}
return false;
case S_SCALE:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_scale);
}
return false;
case S_ONEUP:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_one_up);
}
return false;
case S_COIN:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_coin);
}
return false;
case S_SONIC:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_sonic_ring);
}
return false;
case S_ZELDA:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_zelda_puzzle);
}
return false;
}
return true;
}

View File

@@ -23,7 +23,7 @@
void backlight_init_ports(void) { void backlight_init_ports(void) {
printf("backlight_init_ports()\n"); printf("backlight_init_ports()\n");
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
palSetPad(GPIOB, 8); palSetPad(GPIOB, 8);
#endif #endif
} }
@@ -41,8 +41,13 @@ void backlight_set(uint8_t level) {
#endif #endif
} }
void led_init_ports() {
printf("led_init_ports()\n");
palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
}
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
printf("led_set_kb(%d)\n", usb_led); printf("led_init_ports()\n");
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on // Turn capslock on
palSetPad(GPIOB, 7); palSetPad(GPIOB, 7);

View File

@@ -11,7 +11,7 @@
/* Clueboard 60% /* Clueboard 60%
* *
* Column pins are input with internal pull-down. * Column pins are input with internal pull-down.
* Row pins are output and strobe with high. * Row pins are output and strobe with high.
* Key is high or 1 when it turns on. * Key is high or 1 when it turns on.
* *
@@ -68,10 +68,13 @@ void matrix_init(void) {
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, MATRIX_COLS);
/* Setup capslock */
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
// palClearPad(GPIOB, 7);
palClearPad(GPIOB, 7); // Turn off capslock
matrix_init_quantum(); matrix_init_quantum();
} }
@@ -81,20 +84,20 @@ uint8_t matrix_scan(void) {
// strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } // strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 }
switch (col) { switch (col) {
case 0: palSetPad(GPIOA, 2); break; case 0: palSetPad(GPIOA, 2); break;
case 1: palSetPad(GPIOA, 3); break; case 1: palSetPad(GPIOA, 3); break;
case 2: palSetPad(GPIOA, 6); break; case 2: palSetPad(GPIOA, 6); break;
case 3: palSetPad(GPIOB, 14); break; case 3: palSetPad(GPIOB, 14); break;
case 4: palSetPad(GPIOB, 15); break; case 4: palSetPad(GPIOB, 15); break;
case 5: palSetPad(GPIOA, 8); break; case 5: palSetPad(GPIOA, 8); break;
case 6: palSetPad(GPIOA, 9); break; case 6: palSetPad(GPIOA, 9); break;
case 7: palSetPad(GPIOA, 7); break; case 7: palSetPad(GPIOA, 7); break;
case 8: palSetPad(GPIOB, 3); break; case 8: palSetPad(GPIOB, 3); break;
case 9: palSetPad(GPIOB, 4); break; case 9: palSetPad(GPIOB, 4); break;
case 10: palSetPad(GPIOC, 15); break; case 10: palSetPad(GPIOC, 15); break;
case 11: palSetPad(GPIOC, 14); break; case 11: palSetPad(GPIOC, 14); break;
case 12: palSetPad(GPIOC, 13); break; case 12: palSetPad(GPIOC, 13); break;
case 13: palSetPad(GPIOB, 5); break; case 13: palSetPad(GPIOB, 5); break;
case 14: palSetPad(GPIOB, 6); break; case 14: palSetPad(GPIOB, 6); break;
} }
@@ -112,20 +115,20 @@ uint8_t matrix_scan(void) {
// unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } // unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 }
switch (col) { switch (col) {
case 0: palClearPad(GPIOA, 2); break; case 0: palClearPad(GPIOA, 2); break;
case 1: palClearPad(GPIOA, 3); break; case 1: palClearPad(GPIOA, 3); break;
case 2: palClearPad(GPIOA, 6); break; case 2: palClearPad(GPIOA, 6); break;
case 3: palClearPad(GPIOB, 14); break; case 3: palClearPad(GPIOB, 14); break;
case 4: palClearPad(GPIOB, 15); break; case 4: palClearPad(GPIOB, 15); break;
case 5: palClearPad(GPIOA, 8); break; case 5: palClearPad(GPIOA, 8); break;
case 6: palClearPad(GPIOA, 9); break; case 6: palClearPad(GPIOA, 9); break;
case 7: palClearPad(GPIOA, 7); break; case 7: palClearPad(GPIOA, 7); break;
case 8: palClearPad(GPIOB, 3); break; case 8: palClearPad(GPIOB, 3); break;
case 9: palClearPad(GPIOB, 4); break; case 9: palClearPad(GPIOB, 4); break;
case 10: palClearPad(GPIOC, 15); break; case 10: palClearPad(GPIOC, 15); break;
case 11: palClearPad(GPIOC, 14); break; case 11: palClearPad(GPIOC, 14); break;
case 12: palClearPad(GPIOC, 13); break; case 12: palClearPad(GPIOC, 13); break;
case 13: palClearPad(GPIOB, 5); break; case 13: palClearPad(GPIOB, 5); break;
case 14: palClearPad(GPIOB, 6); break; case 14: palClearPad(GPIOB, 6); break;
} }
@@ -135,7 +138,6 @@ uint8_t matrix_scan(void) {
debouncing_time = timer_read(); debouncing_time = timer_read();
} }
} }
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
for (int row = 0; row < MATRIX_ROWS; row++) { for (int row = 0; row < MATRIX_ROWS; row++) {
matrix[row] = 0; matrix[row] = 0;

View File

@@ -50,5 +50,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file CUSTOM_MATRIX = yes # Custom matrix file
AUDIO_ENABLE = yes #AUDIO_ENABLE = yes
# SERIAL_LINK_ENABLE = yes # SERIAL_LINK_ENABLE = yes

View File

@@ -7,7 +7,7 @@
"height": 5, "height": 5,
"layouts": { "layouts": {
"KEYMAP": { "KEYMAP": {
"layout": [{"label":"Esc", "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":"~", "x":13, "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}, {"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}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"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":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}] "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":6, "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":13, "y":0}, {"x":14, "y":0}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":13, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}]
} }
} }
} }

View File

@@ -12,8 +12,6 @@ extern inline void ergodox_right_led_2_off(void);
extern inline void ergodox_right_led_3_off(void); extern inline void ergodox_right_led_3_off(void);
extern inline void ergodox_right_led_off(uint8_t led); extern inline void ergodox_right_led_off(uint8_t led);
extern inline void ergodox_led_all_off(void);
void ergodox_led_init(void); void ergodox_led_init(void);
void ergodox_blink_all_leds(void); void ergodox_blink_all_leds(void);

View File

@@ -1,315 +0,0 @@
#include QMK_KEYBOARD_H
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "process_keycode/process_tap_dance.h"
#include "gordon.h"
#include "keymap_german.h"
#include "keymap_nordic.h"
#define TLSLSH M(TIL_SLASH)
#define F1_F13 TD(F1F13)
#define F2_F14 TD(F2F14)
#define F5_F15 TD(F5F15)
#define F4_ALTF4 TD(ALTF4)
#define END_ESC TD(ENDESC)
#define SHF6_AF7 TD(F6F7)
#define F12_RUN TD(F12ETAPS)
#define COMMA_TD TD(COMMA)
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
VRSN,
RGB_SLD,
};
//Tap dance enums
enum {
F12TAP = 0,
F12ETAPS,
CALCCOMP,
REFRESH, //send R, or Control+R if double tapped.
ENDESC,
XESC, //'quad function'. x, control, escape, alt
ALY2, //'quad function': a, Hyper, ctrl+a, layer 2
PRLOCK,
F6F7, // Shift F6 or Alt F7
TABCOMBO,
FCTRL,
F3D,
ALTF4,
COMMA,
AT,
HTAB,
F1F13,
F2F14,
F5F15
};
// Custom tapping terms for each key.
// Requires changes to action_taping.c
/* uint16_t get_tapping_term(keyevent_t* event) {
uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key);
if (keycode == LT(3,KC_E) ) {
return TAPPING_TERM + 50;
}
return TAPPING_TERM;
} */
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// simple tap dance
[F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))),
[REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)),
[ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC),
[CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER),
[ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)),
[F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)),
[F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13),
[F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14),
[F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15),
[TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset),
[F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset),
[COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset),
[HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//**************************FIRST LAYER - LAYER ZERO **************************************
[_QWERTY] = KEYMAP(
SHF6_AF7, F1_F13, F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11,
________, KC_Q, CTR_SH_W, NAV_E, CTR_AL_R, KC_T, PRINTSCR,
KC_TAB, KC_A, MEH_S, NUMPAD_D, CTRL_F, WIN_G,
ALT_SHFT, CTRL_Z, HYPER_X, MOUSE_C, ALT_V, KC_B, TT(_MOUSE),
KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT,
KC_INSERT, KC_DELETE,
ALT_HOME,
KC_LSHIFT, SYMB_BSP, END_ESC,
F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP),
________, KC_Y, KC_U, KC_I, KC_O, KC_P, ________,
WIN_H, CTRL_J, KC_K, MEH_L, COL_MOUS, ________,
KC_LEAD, KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, TD(TABCOMBO),
KC_UP, KC_DOWN, KC_ESC, KC_TILD, KC_UNDS,
KC_ESCAPE, KC_DELETE,
ALT_T(KC_PGUP),
RCTL_T(KC_PGDOWN), LT(_NAV,KC_ENTER), SPAC_SYM),
//**************************SYMBOLS LAYER**************************
[_SYMBOLS] = KEYMAP(
________, ________, ________, ________, ________, ________, ________,
________, TLSLSH, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________,
________, KC_EXLM, KC_PIPE, KC_LPRN, KC_RPRN, M(DEREF),
________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________,
________, M(TICK3), ________, ________, ________,
________,________,
________,
________,________,________,
________, ________, ________, ________, ________, ________, NUMLOCK,
________, TLSLSH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK,
M(EQRIGHT), KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________,
________, KC_PIPE, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________,
________,________,________,M(TILD3),________,
________,________,
________,
________,________,________),
//**************************MOUSE MOVEMENT LAYER**************************
[_MOUSE] = KEYMAP(RESET,________,________,________,________,________,________,
RESET,________,________,KC_MS_UP,________,KC_MS_WH_UP,CALTDEL,
________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN,
KC_SECRET_1,________,HYPR(KC_F13),________,HYPR(KC_F14),KC_SECRET_2,________,
________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT,
________,________,
________,
KC_MS_BTN1,KC_MS_BTN2,________,
________,________,________,________,________,________,________,
KC_MS_WH_UP,________,________,KC_UP,________,________,________,
________,KC_LEFT,KC_DOWN,KC_RIGHT,________,________,
KC_MS_WH_DOWN,________,KC_PGUP,KC_PGDOWN,KC_MEDIA_NEXT_TRACK,________,________,
KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_MEDIA_PLAY_PAUSE,________,
________,________,
________,
________,________,KC_WWW_BACK),
//**************************WINDOWS NAVIGATION LAYER**************************
[_NAV] = KEYMAP(________,________,________,________,________,________,________,
________,________,SNAPLEFT,________,SNAPRGHT,LALT(KC_LEFT),________,
________,LCTL(KC_W),PREVTAB,LGUI(KC_D),NEXTTAB,________,
________,________,WORKLEFT,________,WORKRIGHT,________,________,
________,________,________,________,________,
________,________,
________,
________,________,________,
________,________,________,________,________,________,________,
________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________,
________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________,
________,________,________,________,________,________,________,
________,________,________,________,________,
________,________,
________,
________,________,________),
//****************************NUMPAD LAYER****************************
[_NUMPAD] = KEYMAP(________,________,________,________,________,________,________,
________,________,________,________,________,________,________,
________,________,________,________,________,________,
________,________,________,________,________,________,________,
________,________,________,________,________,
________,________,
________,
________,________,________,
BL_TOGG ,BL_STEP ,________,________,________,________,________,
________,________,KC_7 ,KC_8 ,KC_9 ,________,________,
________,KC_4 ,KC_5 ,KC_6 ,________,________,
________,________,KC_1 ,KC_2 ,KC_3 ,________,________,
KC_0 ,KC_0 , KC_DOT ,________,________,
________,________,
________,
________,________,KC_0),
//****************************TEXT/INTELLIJ NAVIGATION LAYER****************************
[_TEXTNAV] = KEYMAP(________,________,________,________,________,________,________,
________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________,
________,LALT(KC_F7),LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)),
________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________,________,________,________,________,________,________,________,________,________,LCTL(KC_DELETE),________,LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)),________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)),LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________)
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(1)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case INFOQM: {
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
}
case TIL_SLASH: {
if (record->event.pressed) {
SEND_STRING ("~/.");
}
break;
}
case DEREF: {
if (record->event.pressed) {
SEND_STRING ("->");
}
break;
}
case EQRIGHT: {
if (record->event.pressed) {
SEND_STRING ("=>");
}
break;
}
case TICK3: {
if (record->event.pressed) {
SEND_STRING ("```");
}
break;
}
case TILD3: {
if (record->event.pressed) {
SEND_STRING ("~~~");
}
break;
}
case ALTTAB_START: {
register_code(KC_LALT);
layer_on(8);
}
case ALTTAB_END: {
unregister_code(KC_LALT);
layer_off(8);
}
}
return MACRO_NONE;
};
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_on();
ergodox_led_all_on();
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case _SYMBOLS:
ergodox_right_led_1_on();
break;
case _MOUSE:
ergodox_right_led_2_on();
break;
case _NUMPAD:
ergodox_right_led_3_on();
break;
case _NAV:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
break;
case 5:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
break;
case 6:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
case 7:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
default:
break;
}
};

View File

@@ -1,356 +0,0 @@
#include QMK_KEYBOARD_H
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#define QWERTY 0 // qwerty layer
#define HALFQWERTY 1 // mirrored qwerty layer
#define DVORAK 2 // dvorak layer
#define HALFDVORAK 3 // mirrored dvorak layer
#define SYMB 5 // symbols
#define MDIA 6 // media keys
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
VRSN,
RGB_SLD
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: qwerty
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror|
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[QWERTY] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, BL_ON,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
KC_LALT, TG(DVORAK),
KC_HOME,
LT(HALFQWERTY, KC_SPACE),KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
TG(DVORAK), KC_RALT,
KC_PGUP,
KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT)
),
/* Keymap 1: mirrored qwerty
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | \ | P | O | I | U | Y | L1 | | L1 | T | R | E | W | Q | TAB |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror|
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_LEFT,
KC_TAB, KC_P, KC_O, KC_I, KC_U, KC_Y, TG(SYMB),
KC_BSPC, KC_SCLN, KC_L, KC_K, KC_J, KC_H,
KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_TRANSPARENT,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
KC_LALT, KC_TRANSPARENT,
KC_HOME,
KC_TRANSPARENT,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC,
TG(SYMB), KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS,
KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT,
MEH_T(KC_NO),KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT,
KC_PGUP,
KC_PGDN,KC_TAB, KC_TRANSPARENT
),
/* Keymap 3: dvorak
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | O | E | U | I |------| |------| D | H | T | S | - |ENTER |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror|
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[DVORAK] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, TG(SYMB),
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO),
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
KC_LALT, KC_TRANSPARENT,
KC_HOME,
LT(HALFDVORAK, KC_SPACE),KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
TG(SYMB), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
KC_D, KC_H, KC_T, KC_S, KC_MINUS, KC_ENT,
MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT,
KC_PGUP,
KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT)
),
/* Keymap 3: mirrored dvorak
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | / |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | - | S | T | H | D |------| |------| I | U | E | O | A |ENTER |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror|
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, TG(SYMB),
KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D,
KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, ALL_T(KC_NO),
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI,
KC_LALT, KC_TRANSPARENT,
KC_HOME,
KC_TRANSPARENT,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC,
TG(SYMB), KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB,
KC_I, KC_U, KC_E, KC_O, KC_A, KC_ENT,
MEH_T(KC_NO),KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT,
KC_PGUP,
KC_PGDN,KC_TAB, KC_TRANSPARENT
),
/* Keymap 5: Symbol Layer
*
* ,---------------------------------------------------. ,--------------------------------------------------.
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | EPRM | | | | | | | . | 0 | = | |
* `-----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* |Animat| | |Toggle|Solid |
* ,------|------|------| |------+------+------.
* |Bright|Bright| | | |Hue- |Hue+ |
* |ness- |ness+ |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = LAYOUT_ergodox(
// left hand
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
RGB_MOD,KC_TRNS,
KC_TRNS,
RGB_VAD,RGB_VAI,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
RGB_TOG, RGB_SLD,
KC_TRNS,
KC_TRNS, RGB_HUD, RGB_HUI
),
/* Keymap 6: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = LAYOUT_ergodox(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
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_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
case 1:
if (record->event.pressed) { // For resetting EEPROM
eeconfig_init();
}
break;
}
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
case RGB_SLD:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
rgblight_mode(1);
#endif
}
return false;
break;
}
return true;
}
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View File

@@ -62,8 +62,8 @@ void matrix_init(void)
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
matrix_init_quantum(); matrix_init_quantum();
} }

View File

@@ -5,23 +5,23 @@
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6776 #define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER farmakon #define MANUFACTURER Tom Meyer
#define PRODUCT "XMMX" #define PRODUCT GarlicBoard
#define DESCRIPTION "XMMX" #define DESCRIPTION GarlicBoard
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 6 #define MATRIX_ROWS 4
#define MATRIX_COLS 17 #define MATRIX_COLS 17
/* key matrix pins */ /* key matrix pins */
#define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } #define MATRIX_ROW_PINS { B0, B1, B2, B3 }
#define MATRIX_COL_PINS { B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, D5, D2, D1, D0, B7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION ROW2COL
/* number of backlight levels */ /* number of backlight levels */

View File

@@ -0,0 +1,65 @@
#include "garlicboard.h"
#include "led.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
};
void led_init_ports(void) {
// * Set our LED pins as output
DDRE |= (1<<6);
DDRD |= (1<<3);
DDRC |= (1<<6);
DDRC |= (1<<7);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
PORTE |= (1<<6);
} else {
PORTE &= ~(1<<6);
}
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
PORTD |= (1<<3);
} else {
PORTD &= ~(1<<3);
}
}
uint32_t layer_state_set_kb(uint32_t state) {
if (state & (1<<4)) {
PORTC |= (1<<6);
} else {
PORTC &= ~(1<<6);
}
if (state & (1<<2)) {
PORTC |= (1<<7);
} else {
PORTC &= ~(1<<7);
}
if (state & (1<<5)) {
PORTE |= (1<<6);
PORTD |= (1<<3);
PORTC |= (1<<6);
PORTC |= (1<<7);
} else {
PORTE &= ~(1<<6);
PORTD &= ~(1<<3);
PORTC &= ~(1<<6);
PORTC &= ~(1<<7);
}
return state;
}

View File

@@ -0,0 +1,18 @@
#ifndef GARLICBOARD_H
#define GARLICBOARD_H
#include "quantum.h"
#define KEYMAP( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K112, K113, K114, K115, K116, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, K215, K216, \
K300, K301, K302, K303, K305, K307, K309, K310, K311, K312, K313, K314, K315, K316 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, KC_NO, K112, K113, K114, K115, K116 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214, K215, K216 }, \
{ K300, K301, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, K311, K312, K313, K314, K315, K316 } \
}
#endif

View File

@@ -0,0 +1,41 @@
#include "garlicboard.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_LSFT, KC_P1, KC_P2, KC_P3, KC_PENT,
MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(2), KC_P0, KC_P0, KC_PDOT, TG(1)),
KEYMAP(
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_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, 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_ESC, KC_UP, KC_SPC, KC_ENT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS),
KEYMAP(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_PSLS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_LBRC, KC_RBRC, KC_QUOT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_PAST,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_NO, KC_MSTP, KC_NO, KC_TAB,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PWR, TG(4), KC_NLCK, TG(5)),
KEYMAP(
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4,
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16),
KEYMAP(
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, 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_SPC, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS),
};

View File

@@ -1,5 +1,5 @@
# MCU name # MCU name
MCU = atxmega32a4u MCU = atmega32u4
# Processor frequency. # Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the # This will define a symbol, F_CPU, in all source code files equal to the
@@ -12,13 +12,13 @@ MCU = atxmega32a4u
# does not *change* the processor frequency - it should merely be updated to # does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate # reflect the processor speed set externally so that the code can use accurate
# software delays. # software delays.
F_CPU = 32000000 F_CPU = 16000000
# #
# LUFA specific # LUFA specific
# #
# Target architecture (see library "Board Types" documentation). # Target architecture (see library "Board Types" documentation).
ARCH = XMEGA ARCH = AVR8
# Input clock frequency. # Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the # This will define a symbol, F_USB, in all source code files equal to the
@@ -31,7 +31,7 @@ ARCH = XMEGA
# #
# If no clock division is performed on the input clock inside the AVR (via the # If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = 48000000 F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60) # Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT

View File

@@ -60,8 +60,8 @@ void matrix_init(void)
palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
#endif #endif
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, MATRIX_ROWS);
matrix_init_quantum(); matrix_init_quantum();
} }

View File

@@ -49,8 +49,8 @@ void matrix_init(void)
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, MATRIX_ROWS);
} }
uint8_t matrix_scan(void) uint8_t matrix_scan(void)

View File

@@ -42,8 +42,8 @@ void matrix_init(void)
palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, MATRIX_ROWS);
matrix_init_quantum(); matrix_init_quantum();
} }

View File

@@ -124,12 +124,6 @@ uint8_t matrix_cols(void)
void matrix_init(void) void matrix_init(void)
{ {
#ifdef DISABLE_JTAG
// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
#endif
debug_enable = true; debug_enable = true;
debug_matrix = true; debug_matrix = true;
debug_mouse = true; debug_mouse = true;

View File

@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// wiring of each half // wiring of each half
#define MATRIX_ROW_PINS { B1, B5, E6, B4 } #define MATRIX_ROW_PINS { B1, B5, E6, B4 }
#define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6} #define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6}
// #define MATRIX_COL_PINS { B6, B2, B3, D7, F7, F4} //uncomment this line and comment line above if you need to reverse left-to-right key order // #define MATRIX_COL_PINS { B6, B2, B3, C6, F7, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
/* define if matrix has ghost */ /* define if matrix has ghost */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@@ -59,8 +59,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
) )
/* ws2812 RGB LED */ /* ws2812 RGB LED */
#define RGB_DI_PIN D1 #define RGB_DI_PIN D4
#define RGBLIGHT_TIMER #define RGBLIGHT_TIMER
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define ws2812_PORTREG PORTD #define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD #define ws2812_DDRREG DDRD

View File

@@ -1,3 +1,3 @@
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = no
AUDIO_ENABLE = yes AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = yes #Don't enable this along with I2C RGBLIGHT_ENABLE = no

View File

@@ -1,6 +1,5 @@
#ifndef SOCKETS_H #ifndef REV2_H
#define SOCKETS_H #define REV2_H
#define DISABLE_JTAG // The keyboard uses PF4 and PF7, which are used by JTAG.
#include "lets_split.h" #include "lets_split.h"

View File

@@ -3,23 +3,25 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { [0] = {
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT},
{KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} {KC_LCTL, KC_LGUI, KC_1, KC_2, KC_3, KC_SPC, MO(2), MO(1), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
// NOTE MO(2) does not correspond to an actual key since the NIU only comes
// in MIT layout
}, },
[1] = { [1] = {
{KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS},
{KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, 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, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{RESET, 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}
}, },
[2] = { [2] = {
{KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
{KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {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, BL_TOGG, BL_STEP, 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, 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}
} }
}; };

View File

@@ -56,12 +56,12 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
API_SYSEX_ENABLE = no API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE

View File

@@ -10,7 +10,7 @@
"width": 12, "width": 12,
"height": 5, "height": 5,
"layouts": { "layouts": {
"KEYMAP": { "LAYOUT_preonic_mit": {
"key_count": 59, "key_count": 59,
"layout": [ "layout": [
{ "w": 1, "x": 0, "y": 0 }, { "w": 1, "x": 0, "y": 0 },
@@ -138,4 +138,4 @@
{ "w": 1, "x": 11, "y": 4 } ] { "w": 1, "x": 11, "y": 4 } ]
} }
} }
} }

View File

@@ -1,113 +0,0 @@
#include "tada68.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.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _GM 2
#define _GF 3
#define _______ KC_TRNS
// Tap dance declarations (These must go above the keymaps)
enum {
TD_F1 = 0,
TD_F2,
TD_F3,
TD_F4,
TD_F5,
TD_F6,
TD_F7,
TD_F8,
TD_F9,
TD_F10,
TD_F11,
TD_F12,
TD_AE_FITCOMP,
TD_AE_IN,
TD_AE_OUT
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |~ ` |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bksp |Del |
* |----------------------------------------------------------------|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |FN| Alt|Ctrl|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_BL] = KEYMAP_ANSI(
KC_ESC, TD(TD_F1), TD(TD_F2), TD(TD_F3), TD(TD_F4), TD(TD_F5), TD(TD_F6), TD(TD_F7), TD(TD_F8), TD(TD_F9), TD(TD_F10), TD(TD_F11), TD(TD_F12), KC_BSLS,KC_GRV, \
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_BSPC,KC_DEL, \
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \
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_PGDN, \
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(_FL),KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
/* Keymap _FL: Function Layer
* ,----------------------------------------------------------------.
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| _GM |Ins |
* |----------------------------------------------------------------|
* | | |Up | | | | | | | | | | | |Hme |
* |----------------------------------------------------------------|
* | Caps |<- |Dn | ->| | | | | | | | | |End |
* |----------------------------------------------------------------|
* | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR |
* |----------------------------------------------------------------|
* | | | | | | | |Prev|P/P|Next|
* `----------------------------------------------------------------'
*/
[_FL] = KEYMAP_ANSI(
_______, 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_INS , \
_______,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \
KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \
_______,_______,_______, TG(_GM), _______,_______,_______,KC_MPRV,KC_MPLY, KC_MNXT),
/* Keymap _GL: Gaming Layer. Basically makes Caps Lock behave normally. I know there is a better way to do this but copy and paste was my friend
* ,----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |~ ` |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bksp |Del |
* |----------------------------------------------------------------|
* |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |FN| Alt|Ctrl|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_GM] = KEYMAP_ANSI(
KC_ESC,TD(TD_F1), TD(TD_F2), TD(TD_F3), TD(TD_F4), TD(TD_F5), TD(TD_F6), TD(TD_F7), TD(TD_F8), TD(TD_F9), TD(TD_F10), TD(TD_F11), TD(TD_F12), _______, KC_GRV, \
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_BSPC,KC_DEL, \
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_ENT,KC_PGUP, \
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_PGDN, \
KC_LCTL, KC_LGUI,KC_LALT, _______, MO(_FL),KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
};
// Tapdance definitions. Tap Dance F Keys.
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1),
[TD_F2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_F2),
[TD_F3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_F3),
[TD_F4] = ACTION_TAP_DANCE_DOUBLE(KC_4, KC_F4),
[TD_F5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_F5),
[TD_F6] = ACTION_TAP_DANCE_DOUBLE(KC_6, KC_F6),
[TD_F7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_F7),
[TD_F8] = ACTION_TAP_DANCE_DOUBLE(KC_8, KC_F8),
[TD_F9] = ACTION_TAP_DANCE_DOUBLE(KC_9, KC_F9),
[TD_F10] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_F10),
[TD_F11] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_F11),
[TD_F12] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_F12),
[TD_AE_FITCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, LALT(KC_SLSH)),
[TD_AE_IN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LALT(KC_LBRC)),
[TD_AE_OUT] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, LALT(KC_RBRC))
};

View File

@@ -1,7 +0,0 @@
# Trashcat's Tada68
Just my simple layout for the Tada68.
Caps Lock behaves as LCtrl until switched to the Gaming Layer. I have a stupid reason for why I need caps lock at all but I won't get into it.
LCtrl is also LCtrl because I had no idea what else to put there.
Tap Dance for the F Row.. i.e double tap 1 and get F1 instead.

View File

@@ -1,21 +0,0 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
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 = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
TAP_DANCE_ENABLE = yes # Tappa Dance Bitch
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -47,9 +47,8 @@ void matrix_init(void)
palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); memset(matrix_debouncing, 0, MATRIX_ROWS);
matrix_init_quantum(); matrix_init_quantum();
} }

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(
KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, 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_BSPC, KC_INS,KC_HOME, 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_END, 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_NUHS, KC_ENT, KC_NO, KC_NO, KC_NO, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_NO, KC_UP, KC_NO, \
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TOAD_KEYMAP(
KC_ESC, 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_GRV, 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_BSPC, \
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, \
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TOAD_KEYMAP_ANSI_WK(
KC_ESC, 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_GRV, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TOAD_KEYMAP_ANSI_WKL(
KC_ESC, 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_GRV, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TOAD_KEYMAP_ISO_WK(
KC_ESC, 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_GRV, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TOAD_KEYMAP_ISO_WKL(
KC_ESC, 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_GRV, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ANSI_WK(
KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, 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_HOME, 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_END, 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_ENT, \
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_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ANSI_WKL(
KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, 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_HOME, 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_END, 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_ENT, \
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_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ISO_WK(
KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, 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_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS,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_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,30 +0,0 @@
#include "xmmx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ISO_WKL(
KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, 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_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS,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_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
)
};
void led_set_user(uint8_t usb_led) {
//LED1
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
}
//LED2
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
}

View File

@@ -1,20 +0,0 @@
XMMX and Toad
========
XMMX: Tenkeyless Mechanical Keyboard PCB designed to fit Filco Majestouch TKL and Cooler Master Quickfire Rapid cases
Toad: 70% Mechanical Keyboard PCB.
XMMX schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/XMMX-0447d28c1e4644b88fd04905d983684d)
Toad schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/70_Keyboard-d4f6baf4792d4ada9c0571fa3713e461)
For more informations on the XMMX please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=93422.0)
For more informations on the Toad please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=91388.0)
Make examples for these keyboards (after setting up your build environment):
make xmmx:default
make xmmx:toad
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

@@ -1,56 +0,0 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # 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
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= no

View File

@@ -1 +0,0 @@
#include "xmmx.h"

View File

@@ -1,177 +0,0 @@
#ifndef XMMX
#define XMMX
#include "quantum.h"
// 80% keyboard: default - all keys
#define KEYMAP( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \
K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416 }, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \
}
// 80% keyboard: ANSI Winkey
#define KEYMAP_ANSI_WK( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \
K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313, KC_NO,KC_NO,KC_NO}, \
{ K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \
}
// 80% keyboard: ANSI Winkeyless
#define KEYMAP_ANSI_WKL( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \
K500, K502, K507, K511, K513, K514, K515, K516 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313, KC_NO,KC_NO,KC_NO}, \
{ K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \
{ K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \
}
// 80% keyboard: ISO Winkey
#define KEYMAP_ISO_WK( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \
K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO,K214, K215, K216 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO,KC_NO,KC_NO}, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \
}
// 80% keyboard: ISO Winkeyless
#define KEYMAP_ISO_WKL( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \
K500, K502, K507, K511, K513, K514, K515, K516 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO,K214, K215, K216 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO,KC_NO,KC_NO}, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \
{ K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \
}
// 70% keyboard: default - all keys
#define TOAD_KEYMAP( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \
K500, K501, K502, K507, K510, K511, K512, K513 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413 }, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \
}
// 70% keyboard: ANSI Winkey
#define TOAD_KEYMAP_ANSI_WK( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \
K500, K501, K502, K507, K510, K511, K512, K513 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \
{ K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \
}
// 70% keyboard: ANSI Winkeyless
#define TOAD_KEYMAP_ANSI_WKL( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \
K500, K502, K507, K511, K513 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \
{ K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \
{ K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \
}
// 70% keyboard: ISO Winkey
#define TOAD_KEYMAP_ISO_WK( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \
K500, K501, K502, K507, K510, K511, K512, K513 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \
{ K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \
}
// 70% keyboard: ISO Winkeyless
#define TOAD_KEYMAP_ISO_WKL( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \
K500, K502, K507, K511, K513 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \
{ K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \
}
#endif

View File

@@ -58,7 +58,7 @@ MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\ Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\
make git-submodule\n\ make git-submodule\n\
You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\ You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\
or if you have modified the ChibiOS libraries yourself. \n\n$(NO_COLOR) or if you have modified the ChibiOS libraries yourself. \n\n
MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)
define GENERATE_MSG_MAKE_KB define GENERATE_MSG_MAKE_KB

View File

@@ -18,6 +18,7 @@
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include <stdio.h>
#include <string.h> #include <string.h>
#include "print.h" #include "print.h"
#include "keymap.h" #include "keymap.h"

View File

@@ -53,127 +53,127 @@
// Note Timbre // Note Timbre
// Changes how the notes sound // Changes how the notes sound
#define TIMBRE_12 0.125f #define TIMBRE_12 0.125
#define TIMBRE_25 0.250f #define TIMBRE_25 0.250
#define TIMBRE_50 0.500f #define TIMBRE_50 0.500
#define TIMBRE_75 0.750f #define TIMBRE_75 0.750
#define TIMBRE_DEFAULT TIMBRE_50 #define TIMBRE_DEFAULT TIMBRE_50
// Notes - # = Octave // Notes - # = Octave
#define NOTE_REST 0.00f #define NOTE_REST 0.00
/* These notes are currently bugged /* These notes are currently bugged
#define NOTE_C0 16.35f #define NOTE_C0 16.35
#define NOTE_CS0 17.32f #define NOTE_CS0 17.32
#define NOTE_D0 18.35f #define NOTE_D0 18.35
#define NOTE_DS0 19.45f #define NOTE_DS0 19.45
#define NOTE_E0 20.60f #define NOTE_E0 20.60
#define NOTE_F0 21.83f #define NOTE_F0 21.83
#define NOTE_FS0 23.12f #define NOTE_FS0 23.12
#define NOTE_G0 24.50f #define NOTE_G0 24.50
#define NOTE_GS0 25.96f #define NOTE_GS0 25.96
#define NOTE_A0 27.50f #define NOTE_A0 27.50
#define NOTE_AS0 29.14f #define NOTE_AS0 29.14
#define NOTE_B0 30.87f #define NOTE_B0 30.87
#define NOTE_C1 32.70f #define NOTE_C1 32.70
#define NOTE_CS1 34.65f #define NOTE_CS1 34.65
#define NOTE_D1 36.71f #define NOTE_D1 36.71
#define NOTE_DS1 38.89f #define NOTE_DS1 38.89
#define NOTE_E1 41.20f #define NOTE_E1 41.20
#define NOTE_F1 43.65f #define NOTE_F1 43.65
#define NOTE_FS1 46.25f #define NOTE_FS1 46.25
#define NOTE_G1 49.00f #define NOTE_G1 49.00
#define NOTE_GS1 51.91f #define NOTE_GS1 51.91
#define NOTE_A1 55.00f #define NOTE_A1 55.00
#define NOTE_AS1 58.27f #define NOTE_AS1 58.27
*/ */
#define NOTE_B1 61.74f #define NOTE_B1 61.74
#define NOTE_C2 65.41f #define NOTE_C2 65.41
#define NOTE_CS2 69.30f #define NOTE_CS2 69.30
#define NOTE_D2 73.42f #define NOTE_D2 73.42
#define NOTE_DS2 77.78f #define NOTE_DS2 77.78
#define NOTE_E2 82.41f #define NOTE_E2 82.41
#define NOTE_F2 87.31f #define NOTE_F2 87.31
#define NOTE_FS2 92.50f #define NOTE_FS2 92.50
#define NOTE_G2 98.00f #define NOTE_G2 98.00
#define NOTE_GS2 103.83f #define NOTE_GS2 103.83
#define NOTE_A2 110.00f #define NOTE_A2 110.00
#define NOTE_AS2 116.54f #define NOTE_AS2 116.54
#define NOTE_B2 123.47f #define NOTE_B2 123.47
#define NOTE_C3 130.81f #define NOTE_C3 130.81
#define NOTE_CS3 138.59f #define NOTE_CS3 138.59
#define NOTE_D3 146.83f #define NOTE_D3 146.83
#define NOTE_DS3 155.56f #define NOTE_DS3 155.56
#define NOTE_E3 164.81f #define NOTE_E3 164.81
#define NOTE_F3 174.61f #define NOTE_F3 174.61
#define NOTE_FS3 185.00f #define NOTE_FS3 185.00
#define NOTE_G3 196.00f #define NOTE_G3 196.00
#define NOTE_GS3 207.65f #define NOTE_GS3 207.65
#define NOTE_A3 220.00f #define NOTE_A3 220.00
#define NOTE_AS3 233.08f #define NOTE_AS3 233.08
#define NOTE_B3 246.94f #define NOTE_B3 246.94
#define NOTE_C4 261.63f #define NOTE_C4 261.63
#define NOTE_CS4 277.18f #define NOTE_CS4 277.18
#define NOTE_D4 293.66f #define NOTE_D4 293.66
#define NOTE_DS4 311.13f #define NOTE_DS4 311.13
#define NOTE_E4 329.63f #define NOTE_E4 329.63
#define NOTE_F4 349.23f #define NOTE_F4 349.23
#define NOTE_FS4 369.99f #define NOTE_FS4 369.99
#define NOTE_G4 392.00f #define NOTE_G4 392.00
#define NOTE_GS4 415.30f #define NOTE_GS4 415.30
#define NOTE_A4 440.00f #define NOTE_A4 440.00
#define NOTE_AS4 466.16f #define NOTE_AS4 466.16
#define NOTE_B4 493.88f #define NOTE_B4 493.88
#define NOTE_C5 523.25f #define NOTE_C5 523.25
#define NOTE_CS5 554.37f #define NOTE_CS5 554.37
#define NOTE_D5 587.33f #define NOTE_D5 587.33
#define NOTE_DS5 622.25f #define NOTE_DS5 622.25
#define NOTE_E5 659.26f #define NOTE_E5 659.26
#define NOTE_F5 698.46f #define NOTE_F5 698.46
#define NOTE_FS5 739.99f #define NOTE_FS5 739.99
#define NOTE_G5 783.99f #define NOTE_G5 783.99
#define NOTE_GS5 830.61f #define NOTE_GS5 830.61
#define NOTE_A5 880.00f #define NOTE_A5 880.00
#define NOTE_AS5 932.33f #define NOTE_AS5 932.33
#define NOTE_B5 987.77f #define NOTE_B5 987.77
#define NOTE_C6 1046.50f #define NOTE_C6 1046.50
#define NOTE_CS6 1108.73f #define NOTE_CS6 1108.73
#define NOTE_D6 1174.66f #define NOTE_D6 1174.66
#define NOTE_DS6 1244.51f #define NOTE_DS6 1244.51
#define NOTE_E6 1318.51f #define NOTE_E6 1318.51
#define NOTE_F6 1396.91f #define NOTE_F6 1396.91
#define NOTE_FS6 1479.98f #define NOTE_FS6 1479.98
#define NOTE_G6 1567.98f #define NOTE_G6 1567.98
#define NOTE_GS6 1661.22f #define NOTE_GS6 1661.22
#define NOTE_A6 1760.00f #define NOTE_A6 1760.00
#define NOTE_AS6 1864.66f #define NOTE_AS6 1864.66
#define NOTE_B6 1975.53f #define NOTE_B6 1975.53
#define NOTE_C7 2093.00f #define NOTE_C7 2093.00
#define NOTE_CS7 2217.46f #define NOTE_CS7 2217.46
#define NOTE_D7 2349.32f #define NOTE_D7 2349.32
#define NOTE_DS7 2489.02f #define NOTE_DS7 2489.02
#define NOTE_E7 2637.02f #define NOTE_E7 2637.02
#define NOTE_F7 2793.83f #define NOTE_F7 2793.83
#define NOTE_FS7 2959.96f #define NOTE_FS7 2959.96
#define NOTE_G7 3135.96f #define NOTE_G7 3135.96
#define NOTE_GS7 3322.44f #define NOTE_GS7 3322.44
#define NOTE_A7 3520.00f #define NOTE_A7 3520.00
#define NOTE_AS7 3729.31f #define NOTE_AS7 3729.31
#define NOTE_B7 3951.07f #define NOTE_B7 3951.07
#define NOTE_C8 4186.01f #define NOTE_C8 4186.01
#define NOTE_CS8 4434.92f #define NOTE_CS8 4434.92
#define NOTE_D8 4698.64f #define NOTE_D8 4698.64
#define NOTE_DS8 4978.03f #define NOTE_DS8 4978.03
#define NOTE_E8 5274.04f #define NOTE_E8 5274.04
#define NOTE_F8 5587.65f #define NOTE_F8 5587.65
#define NOTE_FS8 5919.91f #define NOTE_FS8 5919.91
#define NOTE_G8 6271.93f #define NOTE_G8 6271.93
#define NOTE_GS8 6644.88f #define NOTE_GS8 6644.88
#define NOTE_A8 7040.00f #define NOTE_A8 7040.00
#define NOTE_AS8 7458.62f #define NOTE_AS8 7458.62
#define NOTE_B8 7902.13f #define NOTE_B8 7902.13
// Flat Aliases // Flat Aliases
#define NOTE_DF0 NOTE_CS0 #define NOTE_DF0 NOTE_CS0

View File

@@ -53,24 +53,6 @@
E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \ E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \
E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4),
#define CLUEBOARD_SOUND \
HD_NOTE(_C3), HD_NOTE(_D3), HD_NOTE(_E3), HD_NOTE(_F3), HD_NOTE(_G3), HD_NOTE(_A4), HD_NOTE(_B4), HD_NOTE(_C4)
/*
HD_NOTE(_G3), HD_NOTE(_E3), HD_NOTE(_C3), \
Q__NOTE(_E3), Q__NOTE(_C3), Q__NOTE(_G3), \
Q__NOTE(_E3)
*/
/*
HD_NOTE(_C3), HD_NOTE(_G3), HD_NOTE(_E3), \
Q__NOTE(_G3), Q__NOTE(_E3), Q__NOTE(_G3), \
Q__NOTE(_F3)
*/
#define BASKET_CASE \
QD_NOTE(_G3), E__NOTE(_F3), E__NOTE(_E3), Q__NOTE(_F3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), E__NOTE(_A4), E__NOTE(_C4), QD_NOTE(_B4), HD_NOTE(_B4)
#define STARTUP_SOUND \ #define STARTUP_SOUND \
E__NOTE(_E6), \ E__NOTE(_E6), \
E__NOTE(_A6), \ E__NOTE(_A6), \

View File

@@ -79,7 +79,6 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti
return; return;
action->state.finished = true; action->state.finished = true;
add_mods(action->state.oneshot_mods); add_mods(action->state.oneshot_mods);
add_weak_mods(action->state.weak_mods);
send_keyboard_report(); send_keyboard_report();
_process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished);
} }
@@ -88,7 +87,6 @@ static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *act
{ {
_process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset);
del_mods(action->state.oneshot_mods); del_mods(action->state.oneshot_mods);
del_weak_mods(action->state.weak_mods);
send_keyboard_report(); send_keyboard_report();
} }
@@ -112,8 +110,6 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
action->state.count++; action->state.count++;
action->state.timer = timer_read(); action->state.timer = timer_read();
action->state.oneshot_mods = get_oneshot_mods(); action->state.oneshot_mods = get_oneshot_mods();
action->state.weak_mods = get_mods();
action->state.weak_mods |= get_weak_mods();
process_tap_dance_action_on_each_tap (action); process_tap_dance_action_on_each_tap (action);
if (last_td && last_td != keycode) { if (last_td && last_td != keycode) {

View File

@@ -25,7 +25,6 @@ typedef struct
{ {
uint8_t count; uint8_t count;
uint8_t oneshot_mods; uint8_t oneshot_mods;
uint8_t weak_mods;
uint16_t keycode; uint16_t keycode;
uint16_t timer; uint16_t timer;
bool interrupted; bool interrupted;

View File

@@ -173,10 +173,10 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size
echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
else \ else \
ls /dev/tty* > /tmp/1; \ ls /dev/tty* > /tmp/1; \
echo -e "Detecting USB port, reset your controller now.\c"; \ echo "Detecting USB port, reset your controller now.\c"; \
while [ -z $$USB ]; do \ while [ -z $$USB ]; do \
sleep 1; \ sleep 1; \
echo -e ".\c"; \ echo ".\c"; \
ls /dev/tty* > /tmp/2; \ ls /dev/tty* > /tmp/2; \
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
done; \ done; \

View File

@@ -6,9 +6,7 @@
#include <avr/wdt.h> #include <avr/wdt.h>
#include <util/delay.h> #include <util/delay.h>
#include "bootloader.h" #include "bootloader.h"
#ifndef __AVR_XMEGA__ #include <avr/boot.h>
#include <avr/boot.h>
#endif
#ifdef PROTOCOL_LUFA #ifdef PROTOCOL_LUFA
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
@@ -154,7 +152,7 @@ void bootloader_jump(void) {
#else // Assume remaining boards are DFU, even if the flag isn't set #else // Assume remaining boards are DFU, even if the flag isn't set
#ifdef BOOTLOADER_BOOTLOADHID // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? #ifndef __AVR_ATmega32A__ // no USB - maybe BOOTLOADER_BOOTLOADHID instead though?
UDCON = 1; UDCON = 1;
USBCON = (1<<FRZCLK); // disable USB USBCON = (1<<FRZCLK); // disable USB
UCSR1B = 0; UCSR1B = 0;
@@ -180,11 +178,6 @@ void bootloader_jump(void) {
#define MCUSR MCUCSR #define MCUSR MCUCSR
#endif #endif
#ifdef __AVR_XMEGA__
#define MCUSR RST_STATUS
#define WDRF RST_WDRF_bp
#endif
/* this runs before main() */ /* this runs before main() */
void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3"))); void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3")));
void bootloader_jump_after_watchdog_reset(void) void bootloader_jump_after_watchdog_reset(void)

View File

@@ -20,11 +20,6 @@
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
#ifdef __AVR_XMEGA__
#define wdt_intr_enable(value) wdt_enable(value)
#else
#define wdt_intr_enable(value) \ #define wdt_intr_enable(value) \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
@@ -42,7 +37,6 @@ __asm__ __volatile__ ( \
: "r0" \ : "r0" \
) )
#endif
void suspend_idle(uint8_t time) void suspend_idle(uint8_t time)
{ {
@@ -140,7 +134,6 @@ void suspend_wakeup_init(void)
led_set(host_keyboard_leds()); led_set(host_keyboard_leds());
} }
#ifndef __AVR_XMEGA__
#ifndef NO_SUSPEND_POWER_DOWN #ifndef NO_SUSPEND_POWER_DOWN
/* watchdog timeout */ /* watchdog timeout */
ISR(WDT_vect) ISR(WDT_vect)
@@ -155,4 +148,3 @@ ISR(WDT_vect)
} }
} }
#endif #endif
#endif

View File

@@ -7,7 +7,6 @@
#include <avr/wdt.h> #include <avr/wdt.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#ifndef __AVR_XMEGA__
#define wdt_intr_enable(value) \ #define wdt_intr_enable(value) \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
@@ -26,5 +25,3 @@ __asm__ __volatile__ ( \
) )
#endif #endif
#endif

View File

@@ -43,7 +43,6 @@ void timer_init(void)
# error "Timer prescaler value is NOT vaild." # error "Timer prescaler value is NOT vaild."
#endif #endif
#ifndef __AVR_XMEGA__
#ifndef __AVR_ATmega32A__ #ifndef __AVR_ATmega32A__
// Timer0 CTC mode // Timer0 CTC mode
TCCR0A = 0x02; TCCR0A = 0x02;
@@ -59,13 +58,6 @@ void timer_init(void)
OCR0 = TIMER_RAW_TOP; OCR0 = TIMER_RAW_TOP;
TIMSK = (1 << OCIE0); TIMSK = (1 << OCIE0);
#endif #endif
#else
TCC0.CTRLE = 0x01; // set timer in 8bit mode (default is 16 bits)
TCC0.INTCTRLA = 0x02; // Interrupt Enable register A (enable INT for tc0 (medium level))
TCC0.PER = 132; // set period to 228 khz
TCC0.PERBUF = 132; // buffer for writing to TCC0.PER.
TCC0.CTRLA = prescaler; // clk=30324000 H
#endif
} }
inline inline
@@ -125,15 +117,11 @@ uint32_t timer_elapsed32(uint32_t last)
} }
// excecuted once per 1ms.(excess for just timer count?) // excecuted once per 1ms.(excess for just timer count?)
#ifndef __AVR_XMEGA__
#ifndef __AVR_ATmega32A__ #ifndef __AVR_ATmega32A__
#define TIMER_INTERRUPT_VECTOR TIMER0_COMPA_vect #define TIMER_INTERRUPT_VECTOR TIMER0_COMPA_vect
#else #else
#define TIMER_INTERRUPT_VECTOR TIMER0_COMP_vect #define TIMER_INTERRUPT_VECTOR TIMER0_COMP_vect
#endif #endif
#else
#define TIMER_INTERRUPT_VECTOR TCE0_OVF_vect
#endif
ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK) ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK)
{ {
timer_count++; timer_count++;

View File

@@ -1082,7 +1082,6 @@ void virtser_send(const uint8_t byte)
******************************************************************************/ ******************************************************************************/
static void setup_mcu(void) static void setup_mcu(void)
{ {
#ifndef __AVR_XMEGA__
/* Disable watchdog if enabled by bootloader/fuses */ /* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF); MCUSR &= ~(1 << WDRF);
wdt_disable(); wdt_disable();
@@ -1092,7 +1091,6 @@ static void setup_mcu(void)
CLKPR = (1 << CLKPCE); CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
#endif
} }
static void setup_usb(void) static void setup_usb(void)

View File

@@ -61,11 +61,6 @@ extern host_driver_t lufa_driver;
} }
#endif #endif
#ifdef __AVR_XMEGA__
#define MCUSR RST_STATUS
#define WDRF RST_WDRF_bp
#endif
/* extra report structure */ /* extra report structure */
typedef struct { typedef struct {
uint8_t report_id; uint8_t report_id;

View File

@@ -1,275 +0,0 @@
#include "gordon.h"
#include "quantum.h"
#include "action.h"
#include "process_keycode/process_tap_dance.h"
#if (__has_include("secret.h"))
#include "secret.h"
#else
const char secret[][64] = {
"test1",
"test2",
"test3",
"test4",
"test5"
};
#endif
void register_hyper (void) { //Helper function to invoke Hyper
register_code (KC_LSFT);
register_code (KC_LCTL);
register_code (KC_LALT);
register_code (KC_LGUI);
}
void unregister_hyper (void) { //Helper function to invoke Hyper
unregister_code (KC_LSFT);
unregister_code (KC_LCTL);
unregister_code (KC_LALT);
unregister_code (KC_LGUI);
}
void register_ctrl_a (void) {
register_code(KC_LCTL);
register_code(KC_A);
}
void unregister_ctrl_a (void) {
unregister_code(KC_LCTL);
unregister_code(KC_A);
}
void register_alt_f7 (void) {
register_code (KC_LALT);
register_code (KC_F7);
}
void unregister_alt_f7 (void) {
unregister_code (KC_LALT);
unregister_code (KC_F7);
}
void register_shift_f6 (void) {
register_code (KC_LSFT);
register_code (KC_F6);
}
void unregister_shift_f6 (void) {
unregister_code (KC_LSFT);
unregister_code (KC_F6);
}
void register_ctrl_shift (void) {
register_code (KC_LSFT);
register_code (KC_LCTRL);
}
void unregister_ctrl_shift (void) {
unregister_code (KC_LSFT);
unregister_code (KC_LCTRL);
}
void register_alt_shift (void) {
register_code (KC_LSFT);
register_code (KC_LALT);
}
void unregister_alt_shift (void) {
unregister_code (KC_LSFT);
unregister_code (KC_LALT);
}
// To activate SINGLE_HOLD, you will need to hold for 200ms first.
// This tap dance favors keys that are used frequently in typing like 'f'
int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
if (state->interrupted) {
// if (!state->pressed) return SINGLE_TAP;
//need "permissive hold" here.
// else return SINsGLE_HOLD;
//If the interrupting key is released before the tap-dance key, then it is a single HOLD
//However, if the tap-dance key is released first, then it is a single TAP
//But how to get access to the state of the interrupting key????
return SINGLE_TAP;
}
else {
if (!state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
}
}
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
//with single tap.
else if (state->count == 2) {
if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP;
else if (state->count == 3) return TRIPLE_HOLD;
else return 8; //magic number. At some point this method will expand to work for more presses
}
//This works well if you want this key to work as a "fast modifier". It favors being held over being tapped.
int hold_cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted) {
if (!state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
}
else {
if (!state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
}
}
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
//with single tap.
else if (state->count == 2) {
if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
else if (state->count == 3) {
if (!state->pressed) return TRIPLE_TAP;
else return TRIPLE_HOLD;
}
else return 8; //magic number. At some point this method will expand to work for more presses
}
static xtap htap_state = {
.is_press_action = true,
.state = 0
};
void h_finished (qk_tap_dance_state_t *state, void *user_data) {
htap_state.state = cur_dance(state);
switch (htap_state.state) {
case SINGLE_TAP: register_code(KC_H); break;
case SINGLE_HOLD: layer_on(8); register_code(KC_LALT); break;
case DOUBLE_TAP: layer_invert(8); register_code(KC_LALT); break;
// case DOUBLE_HOLD: register_code(KC_LALT);
case DOUBLE_SINGLE_TAP: register_code(KC_H);unregister_code(KC_H);register_code(KC_H);
}
}
void h_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (htap_state.state) {
case SINGLE_TAP: unregister_code(KC_H); break;
case SINGLE_HOLD: layer_off(8); unregister_code(KC_LALT); break;
case DOUBLE_TAP: unregister_code(KC_LALT);break;
// case DOUBLE_HOLD: unregister_code(KC_LALT);
case DOUBLE_SINGLE_TAP: unregister_code(KC_H);
}
htap_state.state = 0;
}
/**************** QUAD FUNCTION FOR TAB ****************/
// TAB, ALT + SHIFT, TAB TAB, CTRL + SHIFT
static xtap tab_state = {
.is_press_action = true,
.state = 0
};
void tab_finished (qk_tap_dance_state_t *state, void *user_data) {
tab_state.state = cur_dance(state);
switch (tab_state.state) {
case SINGLE_TAP: register_code(KC_TAB); break; //send tab on single press
case SINGLE_HOLD: register_ctrl_shift(); break;
case DOUBLE_HOLD: register_alt_shift(); break; //alt shift on single hold
case DOUBLE_TAP: register_code(KC_TAB); unregister_code(KC_TAB); register_code(KC_TAB); break; //tab tab
case TRIPLE_TAP: register_code(KC_LSHIFT) ;register_code(KC_ESC); break;
case TRIPLE_HOLD: register_code(KC_LSHIFT); register_code(KC_LGUI); break;
}
}
void tab_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (tab_state.state) {
case SINGLE_TAP: unregister_code(KC_TAB); break; //unregister tab
case DOUBLE_HOLD: unregister_alt_shift(); break; //let go of alt shift
case DOUBLE_TAP: unregister_code(KC_TAB); break;
case SINGLE_HOLD: unregister_ctrl_shift(); break;
case TRIPLE_TAP: unregister_code(KC_LSHIFT); unregister_code(KC_ESC); break;
case TRIPLE_HOLD: unregister_code(KC_LSHIFT); unregister_code(KC_LGUI); break;
}
tab_state.state = 0;
}
/**************** QUAD FUNCTION FOR TAB ****************/
//*************** SUPER COMMA *******************//
// Assumption: we don't care about trying to hit ,, quickly
//*************** SUPER COMMA *******************//
static xtap comma_state = {
.is_press_action = true,
.state = 0
};
void comma_finished (qk_tap_dance_state_t *state, void *user_data) {
comma_state.state = hold_cur_dance(state); //Use the dance that favors being held
switch (comma_state.state) {
case SINGLE_TAP: register_code(KC_COMMA); break;
case SINGLE_HOLD: layer_on(1); break; //turn on symbols layer
case DOUBLE_TAP: layer_invert(4); break; //toggle numbers layer
case DOUBLE_HOLD: layer_on(2); break;
case TRIPLE_TAP: register_code(KC_CALCULATOR); break;
case TRIPLE_HOLD: layer_on(3);
}
}
void comma_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (comma_state.state) {
case SINGLE_TAP: unregister_code(KC_COMMA); break; //unregister comma
case SINGLE_HOLD: layer_off(1); break;
case DOUBLE_TAP: ;break;
case DOUBLE_HOLD: layer_off(2); break;
case TRIPLE_TAP: unregister_code(KC_CALCULATOR); break;
case TRIPLE_HOLD: layer_off(3);
}
comma_state.state = 0;
}
//*************** SUPER COMMA *******************//
//*************** SUPER COMMA *******************//
//*************** F3 TAP DANCE *******************//
//Good example for accessing multiple layers from the same key.
static xtap S1_state = {
.is_press_action = true,
.state = 0
};
void bt_finished (qk_tap_dance_state_t *state, void *user_data) {
S1_state.state = cur_dance(state);
switch (S1_state.state) {
case SINGLE_TAP: register_code(KC_F3); break;
case SINGLE_HOLD: layer_on(4); break;
case DOUBLE_TAP: layer_invert(4); break;
case DOUBLE_HOLD: layer_on(5); break;
case DOUBLE_SINGLE_TAP: layer_invert(4); break;
}
}
void bt_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (S1_state.state) {
case SINGLE_TAP: unregister_code(KC_F3); break;
case SINGLE_HOLD: layer_off(4); break;
case DOUBLE_TAP: break; //already inverted. Don't do anything.
case DOUBLE_HOLD: layer_off(5); break;
case DOUBLE_SINGLE_TAP: break;
}
S1_state.state = 0;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_SECRET_1 ... KC_SECRET_5:
if (!record->event.pressed) {
send_string(secret[keycode - KC_SECRET_1]);
}
return false;
break;
}
return true;
}

View File

@@ -1,157 +0,0 @@
#ifndef GORDON
#define GORDON
#include "quantum.h"
#include "process_keycode/process_tap_dance.h"
// Fillers to make layering more clear
#define _______ KC_TRNS
#define ________ KC_TRNS
#define _________ KC_TRNS
#define XXXXXXX KC_NO
// KC codes that are too long
#define DOLLAR KC_DOLLAR
#define LSQUIGLY KC_LBRACKET
#define RSQUIGLY KC_RBRACKET
#define NUMLOCK KC_NUMLOCK
#define CAPLOCK KC_CAPSLOCK
#define BK_SLASH KC_BSLASH
#define ASTERSK KC_KP_ASTERISK
// Navigation
#define SNAPLEFT LGUI(KC_LEFT)
#define SNAPRGHT LGUI(KC_RIGHT)
#define SNAPUP LGUI(KC_UP)
#define SNAPDOWN LGUI(KC_DOWN)
#define PREVTAB LCTL(LSFT(KC_TAB))
#define NEXTTAB LCTL(KC_TAB)
#define WORKRIGHT LCTL(LGUI(KC_RIGHT))
#define WORKLEFT LCTL(LGUI(KC_LEFT))
// KC/modifier hold
#define CTRL_F CTL_T(KC_F)
#define CTRL_J CTL_T(KC_J)
#define CTRL_Z CTL_T(KC_Z)
#define ALT_V ALT_T(KC_V)
#define ALT_M ALT_T(KC_M)
#define WIN_G GUI_T(KC_G)
#define WIN_H GUI_T(KC_H)
#define HYPER_X ALL_T(KC_X)
#define HYPE_DOT ALL_T(KC_DOT)
#define MEH_S MEH_T(KC_S)
#define MEH_L MEH_T(KC_L)
#define ALT_HOME ALT_T(KC_HOME)
// KC/Layer Hold
#define NAV_E LT(_NAV,KC_E)
#define NUMPAD_D LT(_NUMPAD,KC_D)
#define MOUSE_C LT(_MOUSE,KC_C)
#define SYMB_BSP LT(_SYMBOLS,KC_BSPACE)
#define COL_MOUS LT(_MOUSE,KC_SCOLON)
#define SPAC_SYM LT(_SYMBOLS,KC_SPACE)
// Double Modifier ONLY hold
#define ALT_SHFT LSFT(KC_LALT)
#define CTR_SHFT LSFT(KC_LCTL)
// KC/Double modifier Hold
#define CTR_SH_W MT(MOD_LCTL|MOD_LSFT,KC_W)
#define CTR_AL_R MT(MOD_LCTL|MOD_LALT,KC_R)
//MISC
#define PRINTSCR KC_PSCREEN
#define CALTDEL LCTL(LALT(KC_DEL))
#define TSKMGR LCTL(LSFT(KC_ESC))
typedef struct {
bool is_press_action;
int state;
} xtap;
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_HOLD = 4,
DOUBLE_SINGLE_TAP = 5, //send two single taps
TRIPLE_TAP = 6,
TRIPLE_HOLD = 7
};
enum gordon_layers
{
_QWERTY = 0,
_SYMBOLS,
_MOUSE,
_NUMPAD,
_NAV,
_MACROS,
_FUNCTION,
_TEXTNAV
};
void register_hyper (void);
void unregister_hyper (void);
void register_ctrl_a (void);
void unregister_ctrl_a (void);
void register_alt_f7 (void);
void unregister_alt_f7 (void);
void register_shift_f6 (void);
void unregister_shift_f6 (void);
void register_ctrl_shift (void);
void unregister_ctrl_shift (void);
void register_alt_shift (void);
void unregister_alt_shift (void);
int cur_dance (qk_tap_dance_state_t *state);
int hold_cur_dance (qk_tap_dance_state_t *state);
void x_finished (qk_tap_dance_state_t *state, void *user_data);
void x_reset (qk_tap_dance_state_t *state, void *user_data);
void h_finished (qk_tap_dance_state_t *state, void *user_data);
void h_reset (qk_tap_dance_state_t *state, void *user_data);
void tab_finished (qk_tap_dance_state_t *state, void *user_data);
void tab_reset (qk_tap_dance_state_t *state, void *user_data);
void comma_finished (qk_tap_dance_state_t *state, void *user_data);
void comma_reset (qk_tap_dance_state_t *state, void *user_data);
void bt_finished (qk_tap_dance_state_t *state, void *user_data);
void bt_reset (qk_tap_dance_state_t *state, void *user_data);
// Macro Declarations
enum {
INFOQM,
TIL_SLASH,
DEREF,
EQRIGHT,
TILD3,
TICK3,
ALTTAB_START,
ALTTAB_END
};
enum secret_strings {
KC_SECRET_1 = SAFE_RANGE,
KC_SECRET_2,
KC_SECRET_3,
KC_SECRET_4,
KC_SECRET_5,
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
#endif

View File

@@ -1,14 +0,0 @@
Copyright <year> <name> <email> @<github_username>
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/>.

View File

@@ -1 +0,0 @@
SRC += gordon.c