aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Pace <s.pace1@studenti.unimol.it>2021-05-27 06:17:02 +0200
committerGitHub <noreply@github.com>2021-05-26 21:17:02 -0700
commit722b1d655d0d0c911e043a9bed7bed5c42960139 (patch)
tree16bc9e4854b1ba9bfa496ec1472a66872afa07f0
parente7d68c500b5e29b2273bd8339beba141d49a8bc3 (diff)
downloadqmk_firmware-722b1d655d0d0c911e043a9bed7bed5c42960139.tar.gz
qmk_firmware-722b1d655d0d0c911e043a9bed7bed5c42960139.zip
[Keymap] Add new keymap for ut472 (#12974)
-rw-r--r--keyboards/ut472/keymaps/stefanopace/config.h20
-rw-r--r--keyboards/ut472/keymaps/stefanopace/keymap.c185
-rw-r--r--keyboards/ut472/keymaps/stefanopace/readme.md6
-rw-r--r--keyboards/ut472/keymaps/stefanopace/rules.mk7
4 files changed, 218 insertions, 0 deletions
diff --git a/keyboards/ut472/keymaps/stefanopace/config.h b/keyboards/ut472/keymaps/stefanopace/config.h
new file mode 100644
index 000000000..792ddbc7d
--- /dev/null
+++ b/keyboards/ut472/keymaps/stefanopace/config.h
@@ -0,0 +1,20 @@
1/* Copyright 2021 Stefano Pace
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#define TAPPING_TOGGLE 3
20#define TAPPING_TERM 175
diff --git a/keyboards/ut472/keymaps/stefanopace/keymap.c b/keyboards/ut472/keymaps/stefanopace/keymap.c
new file mode 100644
index 000000000..b9411b33d
--- /dev/null
+++ b/keyboards/ut472/keymaps/stefanopace/keymap.c
@@ -0,0 +1,185 @@
1/* Copyright 2021 Stefano Pace
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum layers {
20 _QWE,
21 _SYM,
22 _NUM,
23 _NAV,
24 _NV2,
25 _FN,
26};
27
28enum tapdance {
29 TD_SINGLE_QUOTE_DOUBLE_QUOTES,
30 TD_APP_CAPS_LOCK,
31};
32
33qk_tap_dance_action_t tap_dance_actions[] = {
34 [TD_SINGLE_QUOTE_DOUBLE_QUOTES] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO),
35 [TD_APP_CAPS_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_APP, KC_CAPS),
36};
37
38#define LTFN_ESC LT(_FN, KC_ESC)
39#define LTSYM_F LT(_SYM, KC_F)
40#define LTSYM_J LT(_SYM, KC_J)
41#define TD_QUOT TD(TD_SINGLE_QUOTE_DOUBLE_QUOTES)
42#define TD_APP_CAPS TD(TD_APP_CAPS_LOCK)
43#define SFT_SLSH RSFT_T(KC_SLSH)
44
45#define UNDO LCTL(KC_Z)
46#define REDO LCTL(KC_Y)
47#define CUT LCTL(KC_X)
48#define COPY LCTL(KC_C)
49#define PASTE LCTL(KC_V)
50
51#define CUSTOM1 LCA(KC_EQL)
52#define CUSTOM2 MEH(KC_PLUS)
53
54const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 /* Base qwerty Layer
56 *
57 * Holding Esc activates the Fn layer
58 * Holding F or J activates Symbols layer
59 * Holding / acts as Shift
60 * Double tap on ' acts as "
61 * Doulbe tap on Menu activates CapsLock
62 *
63 * Nav and Num layers are togglable with triple tapping on relative keys while holding them will activate layers momentarily.
64 *
65 * I personally use Pause to mute/unmute microphone
66 * I personally use Menu to act as compose key to input accented letters
67 *
68 * ,----------------------------------------------------------------------------.
69 * |Esc-Fn| Q | W | E | R | T | Y | U | I | O | P | Bspace |
70 * |----------------------------------------------------------------------------+
71 * | Tab | A | S | D |F-Sym| G | H |J-Sym| K | L | '* | Enter |
72 * |----------------------------------------------------------------------------+
73 * | Shift | Z | X | C | V | B | N | M | , | . |/-Shift|Menu*|
74 * |----------------------------------------------------------------------------+
75 * | Ctrl | Gui | Alt |Pause|(Nav) | Space |(Num) |Left |Down | Up |Right |
76 * `----------------------------------------------------------------------------'
77 */
78 [_QWE] = LAYOUT(
79 LTFN_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
80 KC_TAB, KC_A, KC_S, KC_D, LTSYM_F, KC_G, KC_H, LTSYM_J, KC_K, KC_L, TD_QUOT, KC_ENT,
81 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_SLSH, TD_APP_CAPS,
82 KC_LCTL, KC_LGUI, KC_LALT, KC_PAUS, TT(_NAV), KC_SPC, TT(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
83 ),
84
85 /* Symbols Layer (Sym)
86 * ,----------------------------------------------------------------------------.
87 * | | ` | @ | # | $ | % | | & | * | ^ | | Del |
88 * |----------------------------------------------------------------------------+
89 * | | ~ | { | - | ( | + | = | ) | | | } | ; | |
90 * |----------------------------------------------------------------------------+
91 * | | ! | < | _ | [ | | : | ] | \ | > | ? | |
92 * |----------------------------------------------------------------------------+
93 * | | | | | | | | | | | |
94 * `----------------------------------------------------------------------------'
95 */
96 [_SYM] = LAYOUT(
97 _______, KC_GRV, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, KC_AMPR, KC_ASTR, KC_CIRC, XXXXXXX, KC_DEL,
98 _______, KC_TILD, KC_LCBR, KC_MINS, KC_LPRN, KC_PLUS, KC_EQL, KC_RPRN, KC_PIPE, KC_RCBR, KC_SCLN, _______,
99 _______, KC_EXLM, KC_LT, KC_UNDS, KC_LBRC, XXXXXXX, KC_COLN, KC_RBRC, KC_BSLS, KC_GT, KC_QUES, _______,
100 _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______
101 ),
102
103 /* Numbers Layer (Num)
104 *
105 * Custom2 will act as Ctrl+Shift+Alt+"+" that can be used for example to spawn new terminal instances
106 * ,----------------------------------------------------------------------------.
107 * | | | | | | |Ctrl-y| | | | | |
108 * |----------------------------------------------------------------------------+
109 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
110 * |----------------------------------------------------------------------------+
111 * | |Ctr-z|Ctr-x|Ctr-c|Ctr-v| | | | , | . | | |
112 * |----------------------------------------------------------------------------+
113 * | | | | |Custom2| | | | | | |
114 * `----------------------------------------------------------------------------'
115 */
116 [_NUM] = LAYOUT(
117 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, REDO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
118 _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
119 _______, UNDO, CUT, COPY, PASTE, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, _______, _______,
120 _______, _______, _______, _______, CUSTOM2, _______, _______, _______, _______, _______, _______
121 ),
122
123 /* Navigation Layer (Nav)
124 *
125 * This layer is optimized for gui handling and code navigation
126 * It makes easier to reach common key combinations as: Ctrl+Shift, Gui+Shift, Ctrl+Alt, Alt+Tab, Ctrl+F, Ctrl+S
127 *
128 * Holding (Nav2) replaces arrow keys with Home PgDown PgUp End
129 *
130 *
131 * Custom1 will act as Ctrl+Alt+"=" that can be used for example to focus last spawned terminal
132 *
133 * ,----------------------------------------------------------------------------.
134 * | |Shift|Shift|Shift| | | | | | | | |
135 * |----------------------------------------------------------------------------+
136 * |(Nav2) |Ctrl | Gui | Alt | Tab | |Left |Down | Up |Right| F | |
137 * |----------------------------------------------------------------------------+
138 * | |Ctr-z|Ctr-x|Ctr-c|Ctr-v| | | | L | | A | S |
139 * |----------------------------------------------------------------------------+
140 * | | | | | | |Custom1| | | | |
141 * `----------------------------------------------------------------------------'
142 */
143 [_NAV] = LAYOUT(
144 _______, KC_LSFT, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______,
145 MO(_NV2), KC_LCTL, KC_LGUI, KC_LALT, KC_TAB, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F, _______,
146 _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, KC_L, KC_DOT, KC_A, KC_S,
147 _______, _______, _______, _______, _______, _______, CUSTOM1, _______, _______, _______, _______
148 ),
149
150 /* Speed Navigation Layer (Nav2)
151 * ,----------------------------------------------------------------------------.
152 * | | | | | | | | | | | | |
153 * |----------------------------------------------------------------------------+
154 * | | | | | | |Home |PgUp |PgDown|End | | |
155 * |----------------------------------------------------------------------------+
156 * | | | | | | | | | | | | |
157 * |----------------------------------------------------------------------------+
158 * | | | | | | | | | | |Reset |
159 * `----------------------------------------------------------------------------'
160 */
161 [_NV2] = LAYOUT(
162 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
163 _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
164 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
165 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
166 ),
167
168 /* Fn Layer (Fn)
169 * ,----------------------------------------------------------------------------.
170 * | | | | | | | | F1 | F2 | F3 | F10 | |
171 * |----------------------------------------------------------------------------+
172 * | Print | | | | | | | F4 | F5 | F6 | F11 | |
173 * |----------------------------------------------------------------------------+
174 * |ScrLock | | | | | | | F7 | F8 | F9 | F12 | |
175 * |----------------------------------------------------------------------------+
176 * | Ins | | | | | | | | | | |
177 * `----------------------------------------------------------------------------'
178 */
179 [_FN] = LAYOUT(
180 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX,
181 KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX,
182 KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX,
183 KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
184 ),
185};
diff --git a/keyboards/ut472/keymaps/stefanopace/readme.md b/keyboards/ut472/keymaps/stefanopace/readme.md
new file mode 100644
index 000000000..63cef0934
--- /dev/null
+++ b/keyboards/ut472/keymaps/stefanopace/readme.md
@@ -0,0 +1,6 @@
1# Stefanopace's layout
2
3This layout is optimized for developers workflow.
4It includes layouts for symbols, numbers and text/gui navigation, all activables
5and usable without leaving the homerow position.
6More details are explained in the keymap.c file.
diff --git a/keyboards/ut472/keymaps/stefanopace/rules.mk b/keyboards/ut472/keymaps/stefanopace/rules.mk
new file mode 100644
index 000000000..f9d9cd465
--- /dev/null
+++ b/keyboards/ut472/keymaps/stefanopace/rules.mk
@@ -0,0 +1,7 @@
1TAP_DANCE_ENABLE = yes
2
3MOUSEKEY_ENABLE = no
4EXTRAKEY_ENABLE = no
5
6BACKLIGHT_ENABLE = no
7RGBLIGHT_ENABLE = no