summaryrefslogtreecommitdiffstats
path: root/keyboards/planck/keymaps
diff options
context:
space:
mode:
authorGustavs Gūtmanis <gustavs-gutmanis@users.noreply.github.com>2020-06-29 21:27:29 +0300
committerGitHub <noreply@github.com>2020-06-29 19:27:29 +0100
commit207b17bc4dd014ac5543546132c55be7d3d90217 (patch)
tree22bb5955d8d55436f322b37ff9051c9a61983a43 /keyboards/planck/keymaps
parent1baa99c6473473ba3204c9861951e70c10d037cb (diff)
[keymap] adding a new keymap to planck and crkbd (#9374)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/planck/keymaps')
-rw-r--r--keyboards/planck/keymaps/copface/config.h17
-rw-r--r--keyboards/planck/keymaps/copface/keymap.c191
-rw-r--r--keyboards/planck/keymaps/copface/readme.md11
-rw-r--r--keyboards/planck/keymaps/copface/rules.mk11
4 files changed, 230 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/copface/config.h b/keyboards/planck/keymaps/copface/config.h
new file mode 100644
index 0000000000..da5d3858c8
--- /dev/null
+++ b/keyboards/planck/keymaps/copface/config.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+#define MIDI_BASIC
+#define ENCODER_RESOLUTION 4
+
+#define LEADER_TIMEOUT 300
+#define TAPPING_TERM 180
diff --git a/keyboards/planck/keymaps/copface/keymap.c b/keyboards/planck/keymaps/copface/keymap.c
new file mode 100644
index 0000000000..0754a0c742
--- /dev/null
+++ b/keyboards/planck/keymaps/copface/keymap.c
@@ -0,0 +1,191 @@
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+// Custom Keycode Definitions
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+#define META MO(_META)
+
+#define KC_PRS LGUI(LALT(LCTL(KC_4)))
+#define KC_EUR LALT(KC_4)
+#define KC_MGRV LALT(KC_GRV)
+
+#define KC_FORMAT LGUI(LALT(KC_L))
+#define KC_FBSP LALT(KC_BSPC)
+#define KC_FDEL LALT(KC_DEL)
+#define KC_PS3 LSFT(LCTL(LGUI(KC_3)))
+#define KC_PS4 LSFT(LCTL(LGUI(KC_4)))
+
+#define HK_TM LALT(KC_2)
+#define HK_AF9 LALT(KC_F9)
+
+#define KC_SRC LGUI(KC_F12)
+#define KC_RNME LSFT(KC_F6)
+
+#define M_LGSPC LGUI_T(KC_SPC)
+#define M_LCENT LCTL_T(KC_ENT)
+#define M_LGENT LGUI_T(KC_ENT)
+
+enum planck_layers {
+ _DEFAULT = 0,
+ _LOWER,
+ _RAISE,
+ _META,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ KC_ARR = SAFE_RANGE, // ->
+ KC_FARR, // =>
+ HK_CLOS, // />
+ XD1, // :D
+ XD3, // :DDD
+ XD5, // :DDDDD
+ XD15, // :DDDDDDDDDDDDDDD
+};
+
+enum tapdancers {
+ T_BR = 0, // [, ]
+ T_PA, // (, )
+ T_CU, // {, }
+ T_DL, // $, €
+ T_SL, // slash, backslash
+};
+
+//Tap Dance Definitions
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [T_BR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
+ [T_PA] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN),
+ [T_CU] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR),
+ [T_DL] = ACTION_TAP_DANCE_DOUBLE(KC_DLR, KC_EUR),
+ [T_SL] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_DEFAULT] = LAYOUT_planck_grid(
+ 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, XXXXXXX, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, XXXXXXX, KC_LEAD,
+ KC_LGUI, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_SPC, META, RAISE, KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT
+),
+
+[_LOWER] = LAYOUT_planck_grid(
+ KC_F1, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
+ _______, HK_TM, XD1, XD3, XD5, XD15, XXXXXXX, XXXXXXX, KC_ARR, KC_FARR, HK_CLOS, XXXXXXX,
+ _______, _______, _______, _______, _______, KC_DEL, KC_FBSP, RAISE, KC_RALT, KC_VOLD, KC_MUTE, KC_VOLU
+),
+
+[_RAISE] = LAYOUT_planck_grid(
+ KC_MGRV, KC_MINUS, KC_EQL, KC_EXLM, KC_QUES, KC_PLUS, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_FBSP,
+ KC_TILD, TD(T_BR), TD(T_CU), TD(T_PA), TD(T_DL), KC_SLSH, KC_RNME, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_FORMAT,
+ _______, KC_UNDS, KC_DQUO, KC_QUOT, KC_PIPE, KC_BSLS, XXXXXXX, KC_SCLN, KC_COLN, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, KC_DEL, KC_FDEL, _______, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU
+),
+
+[_META] = LAYOUT_planck_grid(
+ XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SRC, XXXXXXX,
+ XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, KC_F10, KC_F11, KC_F12, HK_AF9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+[_ADJUST] = LAYOUT_planck_grid(
+ XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX,
+ XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET
+)
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_ARR:
+ if (record->event.pressed) {
+ SEND_STRING("->");
+ }
+
+ return false;
+
+ case KC_FARR:
+ if (record->event.pressed) {
+ SEND_STRING("=>");
+ }
+
+ return false;
+
+ case XD1:
+ if (record->event.pressed) {
+ SEND_STRING(":D");
+ }
+
+ return false;
+
+ case XD3:
+ if (record->event.pressed) {
+ SEND_STRING(":DDD");
+ }
+
+ return false;
+
+ case XD5:
+ if (record->event.pressed) {
+ SEND_STRING(":DDDDD");
+ }
+
+ return false;
+
+ case XD15:
+ if (record->event.pressed) {
+ SEND_STRING(":DDDDDDDDDDDDDDD");
+ }
+
+ return false;
+
+ case HK_CLOS:
+ if (record->event.pressed) {
+ SEND_STRING("/>");
+ }
+
+ return false;
+ }
+
+ return true;
+}
+
+LEADER_EXTERNS();
+void matrix_scan_user(void) {
+ LEADER_DICTIONARY() {
+ leading = false;
+ leader_end();
+
+ // Screenshot
+ SEQ_ONE_KEY(KC_S) {
+ tap_code16(G(C(S(KC_4))));
+ }
+ // 1Pass browser
+ SEQ_ONE_KEY(KC_A) {
+ tap_code16(G(A(KC_BSLS)));
+ }
+ // 1Pass mini
+ SEQ_TWO_KEYS(KC_A, KC_A) {
+ tap_code16(G(KC_BSLS));
+ }
+ // Comment out
+ SEQ_ONE_KEY(KC_F) {
+ tap_code16(G(KC_SLSH));
+ }
+ // Spotlight
+ SEQ_ONE_KEY(KC_SPC) {
+ tap_code16(G(KC_SPC));
+ }
+ // Auto format
+ SEQ_ONE_KEY(KC_ENT) {
+ tap_code16(S(G(A(KC_F))));
+ }
+ }
+}
diff --git a/keyboards/planck/keymaps/copface/readme.md b/keyboards/planck/keymaps/copface/readme.md
new file mode 100644
index 0000000000..56a048c4a9
--- /dev/null
+++ b/keyboards/planck/keymaps/copface/readme.md
@@ -0,0 +1,11 @@
+# Copface's planck keyboard layout
+
+This layout utilizes tapdancing and leader keys as well as 3 extra layers for maximizing the efficiancy when programming.
+
+Please see the keymap.c for how the keymap looks and works.
+The home row is filled with everything one could need when working on web development,
+It's all a layer away.
+
+To build and flash this keymap, use this command:
+
+ qmk compile -kb planck/rev6 -km copface
diff --git a/keyboards/planck/keymaps/copface/rules.mk b/keyboards/planck/keymaps/copface/rules.mk
new file mode 100644
index 0000000000..aacc6c65a8
--- /dev/null
+++ b/keyboards/planck/keymaps/copface/rules.mk
@@ -0,0 +1,11 @@
+SRC += muse.c
+
+BOOTMAGIC_ENABLE = no
+MOUSEKEY_ENABLE = no
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no
+MIDI_ENABLE = no
+AUDIO_ENABLE = yes
+RGBLIGHT_ENABLE = no
+TAP_DANCE_ENABLE = yes
+LEADER_ENABLE = yes