From 24d174595120aa6874604eed41db7ae02b26c9be Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 12:24:31 -0400 Subject: add config.h for customization --- keyboards/planck/keymaps/khord/config.h | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 keyboards/planck/keymaps/khord/config.h (limited to 'keyboards/planck/keymaps/khord/config.h') diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h new file mode 100644 index 000000000..5cf96bb88 --- /dev/null +++ b/keyboards/planck/keymaps/khord/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define AUDIO_VOICES + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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)) \ +) + +/* + * 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 + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif -- cgit v1.2.3 From 0c8f71e3c7fe258e6e084d7eec018b89a499d014 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 12:44:56 -0400 Subject: test tap dance --- keyboards/planck/keymaps/khord/Makefile | 1 + keyboards/planck/keymaps/khord/config.h | 3 +++ keyboards/planck/keymaps/khord/keymap.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'keyboards/planck/keymaps/khord/config.h') diff --git a/keyboards/planck/keymaps/khord/Makefile b/keyboards/planck/keymaps/khord/Makefile index 457a3d01d..666161d1f 100644 --- a/keyboards/planck/keymaps/khord/Makefile +++ b/keyboards/planck/keymaps/khord/Makefile @@ -1,3 +1,4 @@ ifndef QUANTUM_DIR include ../../../../Makefile endif +TAP_DANCE_ENABLE = yes diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 5cf96bb88..76a1f8832 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -62,6 +62,9 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* Tap Dance */ +#define TAPPING_TERM 200 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index e6c90c26d..04b95c744 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -33,6 +33,18 @@ enum planck_keycodes { EXT_PLV }; +// Tap Dance Declarations +enum { + TD_ESC_CAPS = 0 +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tape_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) + // Other declarations would go here, separated by commas, if you have them +}; + // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -56,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { {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_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {TD(TD_ESC_CAPS), 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_SLSH, SFT_T(KC_ENT) }, {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -- cgit v1.2.3 From 6ca1c49d38ddc31c5fc9ef1c180849804fe358fd Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 13:07:01 -0400 Subject: test fixes for tap dane --- keyboards/planck/keymaps/khord/config.h | 2 +- keyboards/planck/keymaps/khord/keymap.c | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'keyboards/planck/keymaps/khord/config.h') diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 76a1f8832..008f3a5c2 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . ) /* Tap Dance */ -#define TAPPING_TERM 200 +#define TAPPING_TERM 150 /* * Feature disable options diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 04b95c744..50a5daa57 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -33,22 +33,15 @@ enum planck_keycodes { EXT_PLV }; +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + // Tap Dance Declarations enum { TD_ESC_CAPS = 0 }; -// Tap Dance Definitions -qk_tap_dance_action_t tape_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) - // Other declarations would go here, separated by commas, if you have them -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Dylan's additions #define C_A_DEL LALT(LCTL(KC_DEL)) #define C_A_INS LALT(LCTL(KC_INS)) @@ -328,3 +321,9 @@ void music_scale_user(void) } #endif + +// Tap Dance Definitions +const qk_tap_dance_action_t tape_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +}; -- cgit v1.2.3