Add macro to sleep Windows 10

This commit is contained in:
Dylan Khor 2017-10-24 02:14:42 -04:00 committed by Jack Humbert
parent 1f43495922
commit 9128ed50c2

View file

@ -16,7 +16,8 @@ enum planck_keycodes {
RAISE,
BACKLIT,
ADMIN,
SMSPC1
SMSPC1,
W10SLP
};
// LED backlight breathing
@ -64,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | End | Home | |
* | | F7 | F8 | F9 | F10 | F11 | F12 | SLP | | End | Home | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@ -72,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_END, KC_HOME, _______},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, W10SLP, _______, KC_END, KC_HOME, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
@ -196,6 +197,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case W10SLP:
if (record->event.pressed) {
SEND_STRING(SS_LGUI("x")"us");
}
return false;
break;
}
return true;
}