summaryrefslogtreecommitdiff
path: root/keyboards/k34/keymaps/default
diff options
context:
space:
mode:
authorJP <wongjingping@gmail.com>2021-12-18 16:48:33 +0800
committerGitHub <noreply@github.com>2021-12-18 00:48:33 -0800
commitf79e1ab7481525cfa2b63e6bc062fb7d8250c8db (patch)
treeaa5cdbb9d5365461e6fddc883b80b7ec83532438 /keyboards/k34/keymaps/default
parentd8a98aeaf2fb92a5d92a97ed41af5c93cd8480b1 (diff)
downloadqmk_firmware-f79e1ab7481525cfa2b63e6bc062fb7d8250c8db.tar.gz
qmk_firmware-f79e1ab7481525cfa2b63e6bc062fb7d8250c8db.zip
[Keyboard] Add k34 keyboard (#15250)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: jingpingw <jingpingw@twitter.com>
Diffstat (limited to 'keyboards/k34/keymaps/default')
-rw-r--r--keyboards/k34/keymaps/default/config.h24
-rw-r--r--keyboards/k34/keymaps/default/keymap.c61
-rw-r--r--keyboards/k34/keymaps/default/readme.md1
-rw-r--r--keyboards/k34/keymaps/default/rules.mk1
4 files changed, 87 insertions, 0 deletions
diff --git a/keyboards/k34/keymaps/default/config.h b/keyboards/k34/keymaps/default/config.h
new file mode 100644
index 0000000000..803471e550
--- /dev/null
+++ b/keyboards/k34/keymaps/default/config.h
@@ -0,0 +1,24 @@
+ /* Copyright Wong Jing Ping <@wongjingping>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#pragma once
+
+// use 1 combo
+#define COMBO_COUNT 1
+#define COMBO_TERM 300
+
+// mod taps for home row mods
+#define TAPPING_TERM_PER_KEY
+#define IGNORE_MOD_TAP_INTERRUPT
+
diff --git a/keyboards/k34/keymaps/default/keymap.c b/keyboards/k34/keymaps/default/keymap.c
new file mode 100644
index 0000000000..6bd8e402da
--- /dev/null
+++ b/keyboards/k34/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
+// Copyright 2021 jp_smasher (@jp_smasher)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _L1,
+ _L2
+};
+
+// define layers
+#define L1 MO(_L1)
+#define L2 LT(_L2, KC_ENT)
+
+// define home-row styled alpha-mods
+#define C_C LCTL_T(KC_C)
+#define C_COMM LCTL_T(KC_COMM)
+#define G_A CMD_T(KC_A)
+#define G_SC CMD_T(KC_SCLN)
+#define A_X LOPT_T(KC_X)
+#define A_DOT LOPT_T(KC_DOT)
+#define S_Z SFT_T(KC_Z)
+#define S_SLSH SFT_T(KC_SLSH)
+
+// combos for application shortcuts
+#define SG_LBRC SGUI(KC_LBRC)
+#define SG_RBRC SGUI(KC_RBRC)
+#define G_LBRC G(KC_LBRC)
+#define G_RBRC G(KC_RBRC)
+#define A_SLSH A(KC_SLSH)
+
+/* combos */
+const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
+combo_t key_combos[COMBO_COUNT] = {COMBO(jk_combo, KC_ESC)};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [_BASE] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
+ G_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, G_SC,
+ S_Z, A_X, C_C, KC_V, KC_B, KC_N, KC_M, C_COMM, A_DOT, S_SLSH,
+ L1, KC_SPC, KC_SPC, L2
+ ),
+
+
+ [_L1] = LAYOUT(
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,
+ KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_GRV, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, KC_PIPE,
+ _______, _______, _______, KC_TAB, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT,
+ _______, _______, _______, _______
+ ),
+
+ [_L2] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
+ _______, _______, _______, _______, KC_DOT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_BSPC,
+ _______, _______, _______, _______, _______, A_SLSH, SG_LBRC, SG_RBRC, G_LBRC, G_RBRC,
+ KC_LALT, KC_LGUI, _______, _______
+ ),
+};
diff --git a/keyboards/k34/keymaps/default/readme.md b/keyboards/k34/keymaps/default/readme.md
new file mode 100644
index 0000000000..bad277222b
--- /dev/null
+++ b/keyboards/k34/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for k34
diff --git a/keyboards/k34/keymaps/default/rules.mk b/keyboards/k34/keymaps/default/rules.mk
new file mode 100644
index 0000000000..439d48d6e6
--- /dev/null
+++ b/keyboards/k34/keymaps/default/rules.mk
@@ -0,0 +1 @@
+COMBO_ENABLE = yes # enable combo