Last active
October 7, 2017 13:40
-
-
Save DavidRambo/966113c7c14df0ada554edc6a4651915 to your computer and use it in GitHub Desktop.
rambo keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "planck.h" // This is in ../qmk_firmware/keyboards/planck | |
//alias for clarity in layering | |
#define _______ KC_TRNS | |
#define _COLEMAK 0 | |
#define _SYMBOL 1 | |
//tapdance declarations | |
enum { | |
SFT_LCK | |
}; | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* Colemak | |
* ,-----------------------------------------------------------------------------------. | |
* | ESC` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | |
* |------+------+------+------+------+-------------+------+------+------+------+------| | |
* | Tab | A | R | S | T | D | H | N | E | I | O | " | | |
* |------+------+------+------+------+------|------+------+------+------+------+------| | |
* |SftLck| Z | X | C | V | B | K | M | , | . | /? |SftEnt| | |
* |------+------+------+------+------+------+------+------+------+------+------+------| | |
* | Del | GUI | Ctrl | Alt | GUI | Space |Symbol| Left | Down | Up |Right | | |
* `-----------------------------------------------------------------------------------' | |
*/ | |
[_COLEMAK] = { | |
{KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | |
{KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, | |
{TD(SFT_LCK),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)}, | |
{KC_DEL, KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | |
}, | |
/* Symbol | |
* ,-----------------------------------------------------------------------------------. | |
* | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] | | |
* |------+------+------+------+------+-------------+------+------+------+------+------| | |
* | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | = | | |
* |------+------+------+------+------+------|------+------+------+------+------+------| | |
* | | Home | End | ScUp | ScDn | | F11 | |Pg Up | | / | - | | |
* |------+------+------+------+------+------+------+------+------+------+------+------| | |
* | | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | | | |
* `-----------------------------------------------------------------------------------' | |
*/ | |
[_SYMBOL] = { | |
{KC_LBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC}, | |
{KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL}, | |
{_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D, _______, KC_F11, _______, KC_PGUP, _______, KC_SLSH, KC_MINS}, | |
{_______, _______, _______, _______, LALT(KC_BSPC), _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, _______} | |
}, | |
}; | |
// Shift vs capslock function. From ../../bbaserdem | |
void caps_tap (qk_tap_dance_state_t *state, void *user_data) { | |
if (state->count == 1) { | |
register_code (KC_LSFT); | |
} else if (state->count == 2) { | |
unregister_code (KC_LSFT); | |
register_code (KC_CAPS); | |
} | |
} | |
void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { | |
if (state->count == 1) { | |
unregister_code (KC_LSFT); | |
} else { | |
unregister_code (KC_CAPS); | |
} | |
} | |
//Tap Dance Definitions | |
qk_tap_dance_action_t tap_dance_actions[] = { | |
//Tap once for Shift, twice for Caps Lock | |
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment