summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorCallum Oakley <c.oakley108@gmail.com>2016-09-06 23:19:11 +0200
committerCallum Oakley <c.oakley108@gmail.com>2016-09-29 08:49:27 +0200
commitb51f51c614e2bcd64202811510719f25345cb1ce (patch)
tree64889f29607578cd40400e8c16ec969eef901865 /keyboards
parent41227856f4bfe24151009b20c0c412fe33756a4a (diff)
downloadqmk_firmware-b51f51c614e2bcd64202811510719f25345cb1ce.tar.gz
qmk_firmware-b51f51c614e2bcd64202811510719f25345cb1ce.tar.xz
added close key for alt-f4 macro
Diffstat (limited to 'keyboards')
-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 b47f8eb05..56808aa8c 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;
}