Skip to content

Commit

Permalink
Add a "no sleep" variant of the keyboard where the sleep key is repla…
Browse files Browse the repository at this point in the history
…ced by ctrl+alt+l.
  • Loading branch information
mkende committed May 2, 2024
1 parent 1a784bb commit b3ae37c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
29 changes: 19 additions & 10 deletions keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
// The number of arrows that are sent by the fast arrow keys.
#define FAST_ARROW_TIME 10

#ifdef NO_SLEEP_MODE
// For the no_sleep variant, the Sleep key in the upper left corner is replaced
// by Left Ctrl + Alt + L which locks a linux computer.
#define MK_SLEEP LCA(BP_L)
#else
// Otherwise, we just send the Sleep keycode.
#define MK_SLEEP KC_SLEP
#endif

// Custom keycodes
enum {
// SAFE_RANGE must be used to tag the first element of the enum.
Expand Down Expand Up @@ -84,11 +93,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Layer 1: function and media keys.
[FN] = LAYOUT_ergodox(
/* left hand */
KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
___, CTRL_B, ___, ___, ___, ___, ___,
___, COPY_ALL, CTRL_U, CTRL_I, ___, KC_LSFT,
___, PASTE_LINK, MK_CUT, MK_COPY, MK_PASTE, KC_LCTL, ___,
___, ___, ___, ___, ___,
MK_SLEEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
___, CTRL_B, ___, ___, ___, ___, ___,
___, COPY_ALL, CTRL_U, CTRL_I, ___, KC_LSFT,
___, PASTE_LINK, MK_CUT, MK_COPY, MK_PASTE, KC_LCTL, ___,
___, ___, ___, ___, ___,
___, KC_MNXT,
KC_MPLY,
___, ___, KC_MPRV,
Expand All @@ -107,11 +116,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Layer 2: Mouse control.
[MOUSE] = LAYOUT_ergodox(
/* left hand */
KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
___, ___, KC_BTN1, KC_MS_U, KC_BTN2, ___, ___,
___, COPY_ALL, KC_MS_L, KC_MS_D, KC_MS_R, KC_LSFT,
___, PASTE_LINK, MK_CUT, MK_COPY, MK_PASTE, KC_LCTL, ___,
___, ___, ___, ___, ___,
MK_SLEEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
___, ___, KC_BTN1, KC_MS_U, KC_BTN2, ___, ___,
___, COPY_ALL, KC_MS_L, KC_MS_D, KC_MS_R, KC_LSFT,
___, PASTE_LINK, MK_CUT, MK_COPY, MK_PASTE, KC_LCTL, ___,
___, ___, ___, ___, ___,
___, KC_MPRV,
KC_MPLY,
___, ___, KC_MNXT,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../bepo_tm_style/config.h"
2 changes: 2 additions & 0 deletions keyboards/ergodox_ez/keymaps/bepo_tm_style_no_sleep/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define NO_SLEEP_MODE
#include "../bepo_tm_style/keymap.c"
4 changes: 4 additions & 0 deletions keyboards/ergodox_ez/keymaps/bepo_tm_style_no_sleep/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
RULES:=$(ROOT_DIR)/../bepo_tm_style/rules.mk

include $(RULES)
3 changes: 2 additions & 1 deletion qmk.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"userspace_version": "1.0",
"build_targets": [
["ergodox_ez/base", "bepo_tm_style"]
["ergodox_ez/base", "bepo_tm_style"],
["ergodox_ez/base", "bepo_tm_style_no_sleep"]
]
}

0 comments on commit b3ae37c

Please sign in to comment.