summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired/baredev/rev1/keymaps/manoshu
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-12-27 10:25:01 +0000
committerQMK Bot <hello@qmk.fm>2021-12-27 10:25:01 +0000
commit0709d208dbf0aa1ea39b7fa3a6938e2b3d5b5249 (patch)
treeea26b77c4e432166094206d8a4827e268156573a /keyboards/handwired/baredev/rev1/keymaps/manoshu
parentbe2265d0d173ac347f0ee9ed809c2a689bf835a2 (diff)
parent07465c0ebbabf35079fed70a58e73da1e9419444 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/handwired/baredev/rev1/keymaps/manoshu')
-rw-r--r--keyboards/handwired/baredev/rev1/keymaps/manoshu/keymap.c99
-rw-r--r--keyboards/handwired/baredev/rev1/keymaps/manoshu/readme.md16
2 files changed, 115 insertions, 0 deletions
diff --git a/keyboards/handwired/baredev/rev1/keymaps/manoshu/keymap.c b/keyboards/handwired/baredev/rev1/keymaps/manoshu/keymap.c
new file mode 100644
index 0000000000..4bbf4c2cbc
--- /dev/null
+++ b/keyboards/handwired/baredev/rev1/keymaps/manoshu/keymap.c
@@ -0,0 +1,99 @@
+/* Copyright 2021 Fernando "ManoShu" Rodrigues
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#include "keymap_br_abnt2.h"
+#include "sendstring_br_abnt2.h"
+
+enum {
+ LAYER_BASE,
+ LAYER_FUNCTIONS
+};
+
+#define L_FUNCT MO(LAYER_FUNCTIONS)
+#define W_CHOLD LGUI_T(KC_CAPS)
+
+//Combination keycodes
+#define KC_PSBR C(KC_PAUSE) // Ctrl+Pause/Break
+#define KC_SNIP SGUI(BR_S) // Screen Snip (GUI + Shift + S)
+#define KC_WRUN G(BR_R) // Run (GUI + R)
+#define KC_WLCK G(BR_L) // Lock (GUI + L)
+#define KC_WDSK G(BR_D) // Desktop (GUI + D)
+#define KC_WEXP G(BR_E) // Explorer (GUI + E)
+#define KC_WPSE G(KC_PAUSE) // System Properties (GUI + Pause)
+#define KC_WMGP G(BR_EQL) // Magnify (+)
+#define KC_WMGM G(BR_MINS) // Magnify (-)
+
+enum custom_keycodes {
+ KC_WPRN = SAFE_RANGE, // Project (P)
+ KC_WSPC // Input Select (Space)
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ if (get_highest_layer(state) == LAYER_BASE) {
+ unregister_mods(MOD_MASK_GUI);
+ }
+ return state;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if(keycode == KC_WPRN || keycode == KC_WSPC) {
+ if (record->event.pressed) {
+
+ register_code(KC_LGUI);
+
+ if(keycode == KC_WPRN) {
+ tap_code(KC_P);
+ } else if (keycode == KC_WSPC) {
+ tap_code(KC_SPACE);
+ }
+ }
+ }
+ return true;
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [LAYER_BASE] = LAYOUT(
+ /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
+ BR_QUOT, BR_1, BR_2, BR_3, BR_4, BR_5, BR_6, BR_7, BR_8, BR_9, BR_0, BR_MINS, BR_EQL, KC_BSPC,
+ /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
+ KC_TAB, BR_Q, BR_W, BR_E, BR_R, BR_T, BR_Y, BR_U, BR_I, BR_O, BR_P, BR_ACUT, BR_LBRC, KC_ENT,
+ /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
+ W_CHOLD, BR_A, BR_S, BR_D, BR_F, BR_G, BR_H, BR_J, BR_K, BR_L, BR_CCED, BR_TILD, BR_RBRC,
+ /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
+ KC_LSFT, BR_BSLS, BR_Z, BR_X, BR_C, BR_V, BR_B, BR_N, BR_M, BR_COMM, BR_DOT, BR_SCLN, BR_SLSH, KC_UP,
+ /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
+ KC_LCTL, L_FUNCT, KC_LALT, KC_SPC, KC_APP, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
+ /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ ),
+ [LAYER_FUNCTIONS] = LAYOUT(
+ /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSBR, KC_SNIP,
+ /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WMGM, KC_WMGP, _______,
+ /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
+ _______, KC_MPLY, KC_MUTE, KC_WEXP, KC_WRUN, _______, _______, _______, _______, _______, KC_WPRN, _______, _______, _______,
+ /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
+ _______, KC_MPRV, KC_MNXT, KC_WDSK, _______, _______, _______, _______, _______, KC_WLCK, _______, _______, _______,
+ /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
+ _______, _______, KC_VOLU, KC_VOLD, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
+ /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
+ _______, _______, _______, KC_WSPC, _______, KC_INS, KC_HOME, KC_PGDN, KC_END
+ /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ )
+}; \ No newline at end of file
diff --git a/keyboards/handwired/baredev/rev1/keymaps/manoshu/readme.md b/keyboards/handwired/baredev/rev1/keymaps/manoshu/readme.md
new file mode 100644
index 0000000000..1852a0fbc2
--- /dev/null
+++ b/keyboards/handwired/baredev/rev1/keymaps/manoshu/readme.md
@@ -0,0 +1,16 @@
+![BareDev Layout Image](https://i.imgur.com/FXye4Hn.png)
+
+# ManoShu's custom layout
+
+Has all the functions of a ABNT TKL keyboard, sans right shift.
+
+Basic media functions also included.
+
+Trying to emulate where notebooks/smaller OEM keyboard put the function key, for this reason the GUI key was moved and it can be used by holding the Caps Lock key.
+
+To not use the new GUI position very often, commonly used GUI + [X] commands are sent using `SEND_STRING()`, `(un)register_code()` and `tap_code()`.
+
+## Why you didn't used `LT(FUNCTIONS, KC_LGUI)` on the GUI/FN key?
+Because I don't want rely on the tapping term to determine I will send either KC_HOME or snap the active window to the left.
+
+If there is a better way to solve this, please let me know. \ No newline at end of file