summaryrefslogtreecommitdiff
path: root/keyboards/preonic/keymaps/brauner
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-04-16 07:33:54 +0200
committerGitHub <noreply@github.com>2023-04-15 23:33:54 -0600
commit1e3d2f2c1e620a18f2f3549f7b5f9d19196df188 (patch)
tree06f6b9f00dbd158d9b0365e6c1e267c7b363d591 /keyboards/preonic/keymaps/brauner
parent6a0a59475d7e1a13db4897f5fb8580c2ee9f3516 (diff)
[Keymap] Update brauner preonic layout (#20439)
Diffstat (limited to 'keyboards/preonic/keymaps/brauner')
-rw-r--r--keyboards/preonic/keymaps/brauner/config.h1
-rw-r--r--keyboards/preonic/keymaps/brauner/keymap.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/keyboards/preonic/keymaps/brauner/config.h b/keyboards/preonic/keymaps/brauner/config.h
index 7c3893ff38..4591d62102 100644
--- a/keyboards/preonic/keymaps/brauner/config.h
+++ b/keyboards/preonic/keymaps/brauner/config.h
@@ -25,6 +25,7 @@
#define MUSIC_MASK (keycode != KC_NO)
#define PERMISSVE_HOLD
+#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
#define LEADER_PER_KEY_TIMING
diff --git a/keyboards/preonic/keymaps/brauner/keymap.c b/keyboards/preonic/keymaps/brauner/keymap.c
index fa1c7611cf..24a350e6d4 100644
--- a/keyboards/preonic/keymaps/brauner/keymap.c
+++ b/keyboards/preonic/keymaps/brauner/keymap.c
@@ -279,6 +279,18 @@ static inline bool toggle_layer(enum preonic_layers layer, keyrecord_t *record)
return false;
}
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MOD_TAP_LSFT_ENT:
+ case MOD_TAP_LSFT_ESC:
+ /* Immediately select the hold action when another key is pressed. */
+ return true;
+ default:
+ /* Do not select the hold action when another key is pressed. */
+ return false;
+ }
+}
+
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY: