summaryrefslogtreecommitdiffstats
path: root/keyboards/jj40/keymaps/ajp10304/keymap.c
diff options
context:
space:
mode:
authorajp10304 <a.Pocklington@Gmail.com>2018-05-03 02:36:15 +0100
committerDrashna Jaelre <drashna@live.com>2018-05-02 18:36:15 -0700
commitc52b3c6126228b571891d2ad6553913a6cc7ebf4 (patch)
treea97295dc516e4ec3e2e31f622eff0a07b95bf971 /keyboards/jj40/keymaps/ajp10304/keymap.c
parent9b9178919388fc8e10167794ae719be23901b2fc (diff)
AJP10304 Planck and JJ40 layouts. Added fn2 layer (#2879)
Diffstat (limited to 'keyboards/jj40/keymaps/ajp10304/keymap.c')
-rw-r--r--keyboards/jj40/keymaps/ajp10304/keymap.c118
1 files changed, 99 insertions, 19 deletions
diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c
index 1da57c444f..b6d4d7b55e 100644
--- a/keyboards/jj40/keymaps/ajp10304/keymap.c
+++ b/keyboards/jj40/keymaps/ajp10304/keymap.c
@@ -14,6 +14,8 @@ enum jj40_layers {
_MRSE,
_FUNC,
_MFNC,
+ _FUNC2,
+ _MFNC2,
_ADJUST,
_MOUSE
};
@@ -23,6 +25,8 @@ enum jj40_keycodes {
MAC,
FUNC,
MFNC,
+ FUNC2,
+ MFNC2,
LOWER,
MLWR,
RAISE,
@@ -47,14 +51,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn |
+ * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP(\
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,\
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,\
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,\
- MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC) \
+ MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) \
),
/* Function
@@ -117,15 +121,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | STOP | STOP | Prev | Vol- | Next | | |
+ * | PC/MC| | | | | STOP | STOP | Prev | Vol- | Next | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = KEYMAP(\
- M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\
- KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\
- TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\
+ M(0), RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\
+ KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\
+ TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
@@ -147,32 +151,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
),
+/* Function 2 (Right hand side)
+ * ,-----------------------------------------------------------------------------------.
+ * | | |WRDSEL| | | | LNDEL| | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | LNSEL| DUP | | | | |LNJOIN| | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | UNDO | CUT | COPY | PASTE| | | | | | | MODE |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FUNC2] = KEYMAP(\
+ _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,\
+ _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,\
+ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98), \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
[_MAC]= KEYMAP(\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
- _______, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, _______\
+ MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 \
),
[_MLWR] = KEYMAP(\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
- _______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_MRSE] = KEYMAP(\
- _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_EQL) ,\
- _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
+ _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,\
+ _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_MFNC]= KEYMAP(\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\
- _______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+[_MFNC2] = KEYMAP(\
+ _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,\
+ _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,\
+ _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99), \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
@@ -243,6 +272,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_MFNC);
}
return false;
+ case MFNC2:
+ if (record->event.pressed) {
+ layer_on(_FUNC2);
+ layer_on(_MFNC2);
+ } else {
+ layer_off(_FUNC2);
+ layer_off(_MFNC2);
+ }
+ return false;
}
return true;
}
@@ -262,6 +300,48 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t op
case 2: // Word Select Mac
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
return false;
+
+ case 3: // Line Select
+ SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
+ return false;
+
+ case 4: // Line Select Mac
+ SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
+ return false;
+
+ case 5: // Line Delete
+ SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
+ SEND_STRING(SS_TAP(X_BSPACE));
+ return false;
+
+ case 6: // Line Delete Mac
+ SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
+ SEND_STRING(SS_TAP(X_BSPACE));
+ return false;
+
+ case 7: // Duplicate Selection
+ SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
+ return false;
+
+ case 8: // Duplicate Selection Mac
+ SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v"));
+ return false;
+
+ case 9: // Join line
+ SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE));
+ return false;
+
+ case 10: // Join line Mac
+ SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE));
+ return false;
+
+ case 98: // Print mode
+ SEND_STRING("PC");
+ return false;
+
+ case 99: // Print mode
+ SEND_STRING("OSX");
+ return false;
}
}
return MACRO_NONE;