]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
test tap dance
authorDylan Khor <khord@simspace.com>
Thu, 16 Mar 2017 16:44:56 +0000 (12:44 -0400)
committerDylan Khor <khord@simspace.com>
Thu, 16 Mar 2017 16:44:56 +0000 (12:44 -0400)
keyboards/planck/keymaps/khord/Makefile
keyboards/planck/keymaps/khord/config.h
keyboards/planck/keymaps/khord/keymap.c

index 457a3d01d4a4f6d3a66baaac45d37543aacf7888..666161d1ff030b995ed717b9916b4148b6b9d7af 100644 (file)
@@ -1,3 +1,4 @@
 ifndef QUANTUM_DIR
        include ../../../../Makefile
 endif
+TAP_DANCE_ENABLE = yes
index 5cf96bb88cb02c72525f8528587f0da00c7df4a2..76a1f8832222a9cdd0f701ad5400a5267a3351b6 100644 (file)
@@ -62,6 +62,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     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.
index e6c90c26d00d9c6795ab3424d7496972ab9a5099..04b95c74471410452545890cba7dd2f556b315b2 100644 (file)
@@ -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}
 },