updated drashna's keymaps (#1769)

* Add woodpad

* Cleanup

* Remove misc layouts for woodpad

* Move woodpad to handwired

* Updated RGB Underglow info
travis_phases
drashna 7 years ago committed by Jack Humbert
parent 6ec7ccec63
commit d28fb63fac

1
.gitignore vendored

@ -54,3 +54,4 @@ util/Win_Check_Output.txt
# things travis sees
secrets.tar
id_rsa_*
/.vs

@ -4,3 +4,11 @@
#define TAPPING_TERM 200
#ifdef RGBLIGHT_ENABLE
#undef RGBLIGHT_SAT_STEP
#define RGBLIGHT_SAT_STEP 12
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
#endif // RGBLIGHT_ENABLE
#define FORCE_NKRO

@ -40,14 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//define macro keycodes
#define M_VERSION M(0)
#define M_SYMM M(1)
#define M_SALT M(2)
#define M_HARD M(3)
#define M_MAKE M(4)
#define M_GOODGAME M(5)
#define M_MORESALT M(6)
#define M_DOOMFIST M(7)
#define M_MAKE M(1)
//define layer change stuff for underglow indicator
bool skip_leds = false;
@ -383,10 +376,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------'
*/
[OVERWATCH] = KEYMAP(
KC_ESCAPE, M_SALT, M_MORESALT, M_GOODGAME, M_SYMM, M_DOOMFIST, M_HARD,
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRNS,
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRNS,
KC_G, KC_U, KC_I, KC_Y, KC_T,
KC_O, KC_P,
KC_LGUI,
@ -395,7 +388,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, 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,
@ -507,46 +500,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return false;
}
case 1:
if (record->event.pressed) {
// Symmentra "Left Click to win" salt
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(L), U(LSFT), T(E), T(F), T(T), T(SPACE), T(C), T(L), T(I), T(C), T(K), T(SPACE), T(T), T(O), T(SPACE), T(W), T(I), T(N), D(LSFT), T(1), U(LSFT), T(ENTER), END );
}
case 2:
if (record->event.pressed) {
//salt salt salt
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(S), U(LSFT), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(DOT), T(DOT), T(DOT), T(ENTER), END );
}
case 3:
if (record->event.pressed) {
// your saltiness makes me hard
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(Y), U(LSFT), T(O), T(U), T(R), T(SPACE), T(S), T(A), T(L), T(T), T(SPACE), T(O), T(N), T(L), T(Y), T(SPACE), T(M), T(A), T(K), T(E), T(S), T(SPACE), T(M), T(Y), T(SPACE), T(P), T(E), T(N), T(I), T(S), T(SPACE), T(T), T(H), T(A), T(T), T(SPACE), T(M), T(U), T(C), T(H), T(SPACE), T(H), T(A), T(R), T(D), T(E), T(R), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), T(E), T(V), T(E), T(N), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(A), T(G), T(G), T(R), T(E), T(S), T(S), T(I), T(V), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END );
}
case 4:
if (record->event.pressed) {
// make ergodox-ez-drashna-custom-teensy
return MACRO(I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), D(LSFT), T(MINUS), U(LSFT), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END);
}
case 5:
if (record->event.pressed) {
//gg
return MACRO(I(50), T(ENTER), I(5), T(G), T(G), T(ENTER), END);
}
case 6:
if (record->event.pressed) {
// Please sir, can I have some more salt
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(P), U(LSFT), T(L), T(E), T(A), T(S), T(E), T(SPACE), T(S), T(I), T(R), T(COMMA), T(SPACE), T(C), T(A), T(N), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(H), T(A), T(V), T(E), T(SPACE), T(S), T(O), T(M), T(E), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(S), T(A), T(L), T(T), D(LSFT), T(SLASH), U(LSFT), D(LSFT), T(1), U(LSFT), T(ENTER), END );
}
break;
case 7:
if (record->event.pressed) {
// DoomFisted
// Hey, look at me. I'm Doomfist, and I'm overpowered!
// All I do is spam punches all day! I'm DPS, tank and
// defense, rolled into one! All I need is team healing to be complete!
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(H), U(LSFT), T(E), T(Y), T(COMMA), T(SPACE), T(L), T(O), T(O), T(K), T(SPACE), T(A), T(T), T(SPACE), T(M), T(E), T(DOT), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), T(O), T(O), T(M), T(F), T(I), T(S), T(T), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), T(O), T(V), T(E), T(R), T(P), T(O), T(W), T(E), T(R), T(E), T(D), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(D), T(O), T(SPACE), T(I), T(S), T(SPACE), T(S), T(P), T(A), T(M), T(SPACE), T(P), T(U), T(N), T(C), T(H), T(E), T(S), T(SPACE), T(A), T(L), T(L), T(SPACE), T(D), T(A), T(Y), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), D(LSFT), T(P), U(LSFT), D(LSFT), T(S), U(LSFT), T(COMMA), T(SPACE), T(T), T(A), T(N), T(K), T(SPACE), T(A), T(N), T(D), T(SPACE), T(D), T(E), T(F), T(E), T(N), T(S), T(E), T(COMMA), T(SPACE), T(R), T(O), T(L), T(L), T(E), T(D), T(SPACE), T(I), T(N), T(T), T(O), T(SPACE), T(O), T(N), T(E), D(LSFT), T(1), U(LSFT), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(N), T(E), T(E), T(D), T(SPACE), T(I), T(S), T(SPACE), T(T), T(E), T(A), T(M), T(SPACE), T(H), T(E), T(A), T(L), T(I), T(N), T(G), T(SPACE), T(T), T(O), T(SPACE), T(B), T(E), T(SPACE), T(C), T(O), T(M), T(P), T(L), T(E), T(T), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END );
}
break;
}
return MACRO_NONE;
};
@ -709,47 +666,37 @@ void matrix_scan_user(void) { // runs frequently to update info
}
// Check layer, and apply color if its changed since last check
switch (layer) {
case SYMB:
if (has_layer_changed) {
if (has_layer_changed) {
switch (layer) {
case SYMB:
rgblight_sethsv (255,255,255);
}
break;
case OVERWATCH:
if (has_layer_changed) {
rgblight_mode(23);
break;
case OVERWATCH:
rgblight_sethsv (30,255,255);
}
break;
case DIABLO:
if (has_layer_changed) {
rgblight_mode(17);
break;
case DIABLO:
rgblight_sethsv (0,255,255);
}
break;
case MOUS:
if (has_layer_changed) {
rgblight_mode(5);
break;
case MOUS:
rgblight_sethsv (60,255,255);
}
break;
case COLEMAK:
if (has_layer_changed) {
break;
case COLEMAK:
rgblight_sethsv (300,255,255);
}
break;
case DVORAK:
if (has_layer_changed) {
break;
case DVORAK:
rgblight_sethsv (120,255,255);
}
break;
case 7:
if (has_layer_changed) {
break;
case 7:
rgblight_sethsv (255,255,255);
}
break;
default:
if (has_layer_changed) {
break;
default:
rgblight_sethsv (195,255,255);
}
break;
rgblight_mode(1);
break;
}
}
// Update layer status at the end, so this sets the default color

@ -1,8 +1,9 @@
TAP_DANCE_ENABLE = yes
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
RGBLIGHT_ENABLE = yes
MIDI_ENABLE = no
TAP_DANCE_ENABLE = yes
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
RGBLIGHT_ENABLE = yes
MIDI_ENABLE = no
CONSOLE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile

@ -0,0 +1,185 @@
/*
Copyright 2017 REPLACE_WITH_YOUR_NAME
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6069
#define DEVICE_VER 0x0001
#define MANUFACTURER WoodKeys.click
#define PRODUCT woodpad
#define DESCRIPTION Basic numpad
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 }
#define MATRIX_COL_PINS { B1, B3, B2, B6 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
/* 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
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H
//#define MAGIC_KEY_HELP2 SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
#endif

@ -0,0 +1,24 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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
#endif

@ -0,0 +1,135 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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 "woodpad.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 _NUMLOCK 0
#define _NAV 1
#define _ALT 2
#define _ADJUST 3
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NUMLOCK] = KEYMAP( /* Base */
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, KC_PEQL, \
KC_P1, KC_P2, KC_P3, KC_COMM, \
KC_LALT, KC_P0, KC_PDOT, KC_PENT \
),
[_NAV] = KEYMAP( /* Base */
_______, _______, _______, _______,\
KC_HOME, KC_UP, KC_PGUP, _______, \
KC_LEFT, XXXXXXX, KC_RIGHT, _______, \
KC_END, KC_DOWN, KC_PGDN, _______, \
_______, KC_INS, KC_DEL, _______ \
),
[_ALT] = KEYMAP( /* Base */
_______, KC_MUTE, KC_VOLD, KC_VOLU,\
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______ \
),
[_ADJUST] = KEYMAP( /* Base */
_______, KC_A, _______, RESET,\
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______ \
),
};
const uint16_t PROGMEM fn_actions[] = {
};
void numlock_led_on(void) {
PORTF |= (1<<7);
}
void numlock_led_off(void) {
PORTF &= ~(1<<7);
}
static bool numlock_down = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_NLCK:
if (record->event.pressed) {
numlock_down = true;
if (IS_LAYER_ON(_ALT)) {
layer_on(_ADJUST);
}
} else{
if(!IS_LAYER_ON(_ADJUST)) {
if (!IS_LAYER_ON(_NAV)){
numlock_led_off();
layer_on(_NAV);
} else {
numlock_led_on();
layer_off(_NAV);
}
} else {
layer_off(_ADJUST);
}
numlock_down = false;
}
return false;
break;
case KC_LALT:
if (record->event.pressed) {
if (numlock_down) {
layer_on(_ADJUST);
} else {
layer_on(_ALT);
}
} else {
if(IS_LAYER_ON(_ADJUST)) {
layer_off(_ADJUST);
} else {
layer_off(_ALT);
}
}
// Allow normal processing of ALT?
return false;
break;
}
return true;
}
void matrix_init_user(void) {
// set Numlock LED to output and low
DDRF |= (1<<7);
PORTF &= ~(1<<7);
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

@ -0,0 +1 @@
# The default keymap for woodpad

@ -0,0 +1,37 @@
# Copyright 2013 Jun Wako <wakojun@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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

@ -0,0 +1,42 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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"
#ifdef TAP_DANCE_ENABLE
#define TAPPING_TERM 200
#endif // TAP_DANCE_ENABLE
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN D3
#define RGBLED_NUM 7 // Number of LEDs
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 12
#define RGBLIGHT_VAL_STEP 12
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
#endif // RGBLIGHT_ENABLE
#endif

@ -0,0 +1,440 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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 "woodpad.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 _NUMLOCK 0
#define _NAV 1
#define _DIABLO 2
#define _MACROS 3
#define _MEDIA 4
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
//define layer change stuff for underglow indicator
bool skip_leds = false;
bool is_overwatch = false;
//This is both for underglow, and Diablo 3 macros
bool has_layer_changed = false;
static uint8_t current_layer;
#ifdef TAP_DANCE_ENABLE
//define diablo macro timer variables
static uint16_t diablo_timer[4];
static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
static uint8_t diablo_key_time[4];
bool check_dtimer(uint8_t dtimer) {
// has the correct number of seconds elapsed (as defined by diablo_times)
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
};
#endif
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
KC_DIABLO_CLEAR,
KC_OVERWATCH,
KC_SALT,
KC_MORESALT,
KC_SALTHARD,
KC_GOODGAME,
KC_SYMM,
KC_DOOMFIST,
KC_JUSTGAME,
KC_GLHF,
KC_TORB
};
#ifdef TAP_DANCE_ENABLE
enum {
TD_DIABLO_1 = 0,
TD_DIABLO_2,
TD_DIABLO_3,
TD_DIABLO_4
};
// Cycle through the times for the macro, starting at 0, for disabled.
// Max of six values, so don't exceed
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
if (state->count >= 7) {
diablo_key_time[diablo_key] = diablo_times[0];
reset_tap_dance(state);
}
else {
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
}
}
// Would rather have one function for all of this, but no idea how to do that...
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 0);
}
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 1);
}
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 2);
}
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 3);
}
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// tap once to disable, and more to enable timed micros
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
};
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NUMLOCK] = KEYMAP( /* Base */
TG(_NAV), TG(_DIABLO), TG(_MACROS), KC_PSLS,\
KC_P7, KC_P8, KC_P9, KC_PAST, \
KC_P4, KC_P5, KC_P6, KC_PMNS, \
KC_P1, KC_P2, KC_P3, KC_PPLS, \
LT(_MEDIA,KC_P0), KC_PDOT, KC_COLN, KC_PENT \
),
[_NAV] = KEYMAP( /* Base */
_______, _______, _______, _______,\
KC_HOME, KC_UP, KC_PGUP, _______, \
KC_LEFT, XXXXXXX, KC_RIGHT, _______, \
KC_END, KC_DOWN, KC_PGDN, _______, \
KC_INS, KC_DEL, _______, _______ \
),
#ifdef TAP_DANCE_ENABLE
[_DIABLO] = KEYMAP( /* Base */
KC_ESC, _______, _______, _______,\
KC_S, KC_F, KC_I, KC_M, \
KC_1, KC_2, KC_3, KC_4, \
TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), \
_______, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
),
#else
[_DIABLO] = KEYMAP( /* Base */
KC_ESC, _______, _______, _______,\
KC_S, KC_F, KC_I, KC_M, \
KC_1, KC_2, KC_3, KC_4, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
_______, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
),
#endif
[_MACROS] = KEYMAP( /* Base */
KC_OVERWATCH, _______, _______, XXXXXXX,\
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, KC_JUSTGAME, \
KC_SYMM, KC_DOOMFIST, KC_TORB, KC_GOODGAME, \
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \
),
[_MEDIA] = KEYMAP( /* Base */
_______, KC_MUTE, KC_VOLD, KC_VOLU,\
_______, _______, RGB_HUI, RGB_HUD, \
KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, \
RGB_TOG, RGB_MOD, RGB_SAI, RGB_VAI, \
_______, _______, RGB_SAD, RGB_VAD \
),
};
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:
if (record->event.pressed) {
// Output Keyboard Firmware info
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP );
return false;
}
}
return MACRO_NONE;
};
void numlock_led_on(void) {
PORTF |= (1<<7);
}
void numlock_led_off(void) {
PORTF &= ~(1<<7);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint16_t kc;
if (is_overwatch) {
kc = KC_BSPC;
} else {
kc = KC_ENTER;
}
switch (keycode) {
#ifdef TAP_DANCE_ENABLE
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
if (record->event.pressed) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
diablo_key_time[dtime] = diablo_times[0];
}
}
return false;
break;
#endif
case KC_OVERWATCH: // reset all Diable timers, disabling them
if (record->event.pressed) {
is_overwatch = !is_overwatch;
has_layer_changed = true;
}
return false;
break;
case KC_SALT:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Salt, salt, salt...");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_MORESALT:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Please sir, can I have some more salt?!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_SALTHARD:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Your salt only makes my penis that much harder, and even more aggressive!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_GOODGAME:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Good game, everyone!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_GLHF:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Good luck, have fun!!!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_SYMM:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Left click to win!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_DOOMFIST:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("Hey, look at me. I'm Doomfist, and I'm overpowered! All I do is spam punches all day! I'm DPS, tank and defense, rolled into one! All I need is team healing to be complete!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_JUSTGAME:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
case KC_TORB:
if (!record->event.pressed) {
register_code(kc);
unregister_code(kc);
_delay_ms(50);
SEND_STRING("That was positively riveting!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
}
return false;
break;
}
return true;
}
#ifdef TAP_DANCE_ENABLE
// Sends the key press to system, but only if on the Diablo layer
void send_diablo_keystroke(uint8_t diablo_key) {
if (current_layer == _DIABLO) {
switch (diablo_key) {
case 0:
SEND_STRING("1");
break;
case 1:
SEND_STRING("2");
break;
case 2:
SEND_STRING("3");
break;
case 3:
SEND_STRING("4");
break;
}
}
}
// Checks each of the 4 timers/keys to see if enough time has elapsed
// Runs the "send string" command if enough time has passed, and resets the timer.
void run_diablo_macro_check(void) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
diablo_timer[dtime] = timer_read();
send_diablo_keystroke(dtime);
}
}
}
#endif
void matrix_init_user(void) {
has_layer_changed = true;
// set Numlock LED to output and low
DDRF |= (1<<7);
PORTF &= ~(1<<7);
}
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
#ifdef RGBLIGHT_ENABLE
numlock_led_off();
// Check layer, and apply color if its changed since last check
switch (layer) {
case _NAV:
if (has_layer_changed) {
rgblight_sethsv(240, 255, 255);
rgblight_mode(1);
}
break;
case _MACROS:
if (has_layer_changed) {
rgblight_sethsv(30, 255, 255);
if (is_overwatch) {
rgblight_mode(17);
} else {
rgblight_mode(18);
}
}
if (is_overwatch) {
numlock_led_on();
}
break;
case _DIABLO:
if (has_layer_changed) {
rgblight_sethsv(0, 255, 255);
rgblight_mode(5);
}
break;
case _MEDIA:
if (has_layer_changed) {
rgblight_sethsv(120, 255, 255);
rgblight_mode(22);
}
break;
default:
if (has_layer_changed) {
rgblight_sethsv(195, 255, 255);
rgblight_mode(1);
}
break;
}
#endif
// Update layer status at the end, so this sets the default color
// rather than relying on the init, which was unreliably...
// Probably due to a timing issue, but this requires no additional code
if (current_layer == layer) {
has_layer_changed = false;
}
else {
has_layer_changed = true;
current_layer = layer;
}
// Run Diablo 3 macro checking code.
#ifdef TAP_DANCE_ENABLE
run_diablo_macro_check();
#endif
}
void led_set_user(uint8_t usb_led) {
}

@ -0,0 +1,10 @@
TAP_DANCE_ENABLE = yes
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
RGBLIGHT_ENABLE = yes
MIDI_ENABLE = no
CONSOLE_ENABLE = no
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,28 @@
woodpad keyboard firmware
======================
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme](/).
## Building
Download or clone the whole firmware and navigate to the keyboards/woodpad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
Depending on which keymap you would like to use, you will have to compile slightly differently.
### Default
To build with the default keymap, simply run `make default`.
### Other Keymaps
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
```
$ make [default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

@ -0,0 +1,81 @@
# MCU name
#MCU = at90usb1286
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*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= no # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= no # Audio output on port C6
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE ?= no
#avrdude: build
# ls /dev/tty* > /tmp/1; \
# echo "Reset your Pro Micro now"; \
# while [ -z $$USB ]; do \
# sleep 1; \
# ls /dev/tty* > /tmp/2; \
# USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
# done; \
# avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
#
#.PHONY: avrdude

@ -0,0 +1,43 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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 "woodpad.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

@ -0,0 +1,40 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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 WOODPAD_H
#define WOODPAD_H
#include "quantum.h"
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, k23, \
k30, k31, k32, k33, \
k40, k41, k42, k43 \
) \
{ \
{ k00, k01, k02, k03 }, \
{ k10, k11, k12, k13 }, \
{ k20, k21, k22, k23 }, \
{ k30, k31, k32, k33 }, \
{ k40, k41, k42, k43 }, \
}
#endif

@ -0,0 +1,42 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2017 Art Ortenburger
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"
/* Use I2C or Serial, not both */
#define USE_SERIAL
// #define USE_I2C
/* Select hand configuration */
// #define MASTER_LEFT
// #define _MASTER_RIGHT
#define EE_HANDS
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
#endif

@ -0,0 +1,197 @@
/*
This is the keymap for the keyboard
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2017 Art Ortenburger
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 "orthodox.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// 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 _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#ifdef TAP_DANCE_ENABLE
enum {
TD_FLSH = 0,
};
// on the fourth tap, set the keyboard on flash state
// and set the underglow to red, because red == bad
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= 4) {
#ifdef RGBLIGHT_ENABLE
rgblight_mode(1);
rgblight_setrgb(0xff, 0x00, 0x00);
#endif
reset_keyboard();
reset_tap_dance(state);
}
}
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_flsh_finished, NULL),
};
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KEYMAP( \
KC_TAB, 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_A, KC_S, KC_D, KC_F, KC_G, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
),
[_COLEMAK] = KEYMAP(\
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
),
[_DVORAK] = KEYMAP(\
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
),
[_LOWER] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX, KC_F12, _______, XXXXXXX, KC_RCTL, KC_F11, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
TD(TD_FLSH),KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
),
[_RAISE] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX, KC_F12, _______, XXXXXXX, _______, KC_F11, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, KC_F12, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
),
[_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_qwerty);
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_colemak);
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_dvorak);
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

@ -0,0 +1,6 @@
CONSOLE_ENABLE = yes
TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
Loading…
Cancel
Save