summaryrefslogtreecommitdiff
path: root/keyboards/planck/keymaps
diff options
context:
space:
mode:
authorCallum Oakley <c.oakley108@gmail.com>2016-09-06 22:19:11 +0100
committerCallum Oakley <c.oakley108@gmail.com>2016-09-29 07:49:27 +0100
commitb51f51c614e2bcd64202811510719f25345cb1ce (patch)
tree64889f29607578cd40400e8c16ec969eef901865 /keyboards/planck/keymaps
parent41227856f4bfe24151009b20c0c412fe33756a4a (diff)
added close key for alt-f4 macro
Diffstat (limited to 'keyboards/planck/keymaps')
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index b47f8eb05e..56808aa8ca 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -23,7 +23,8 @@ enum planck_keycodes {
MOVE,
SYMB,
FUNC,
- LOCK
+ LOCK,
+ CLOSE
};
// Fillers to make layering more clear
@@ -110,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------------------------------.
* | | Play | Prev | Next | BL+ | | | Lock | | | Mac | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | Mute | Vol- | Vol+ | BL- | | | | | | Win | |
+ * | | Mute | Vol- | Vol+ | BL- | | |Close | | | Win | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |Reset |
* `-----------------------------------------------------------------------------------'
@@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FUNC] = {
{KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______},
- {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, WIN, _______},
+ {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, CLOSE, _______, _______, WIN, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
}
@@ -183,6 +184,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
+ case CLOSE:
+ if (record->event.pressed) {
+ register_code(KC_LALT);
+ register_code(KC_F4);
+ } else {
+ unregister_code(KC_F4);
+ unregister_code(KC_LALT);
+ }
+ return false;
+ break;
}
return true;
}