aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsquizzler <56064906+squizzler@users.noreply.github.com>2020-05-27 13:23:57 +0100
committerGitHub <noreply@github.com>2020-05-27 13:23:57 +0100
commita1af8542c74525d7b5c5ff85052e6afa2589a418 (patch)
tree175a15d10c2811afbf440f9575bb6e3a7ce72a47
parent1a5dc278bc5aadfce220e18d53ff612d6592a12b (diff)
downloadqmk_firmware-a1af8542c74525d7b5c5ff85052e6afa2589a418.tar.gz
qmk_firmware-a1af8542c74525d7b5c5ff85052e6afa2589a418.zip
RSTHD keymap for Minidox (#9178)
* Re-add liles after hard reset * repopulate with keymap * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Updated how the layers are defined to reduce firmware bloat Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Removed unnecessary key codes Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Removed backslash from each line of the layers in accordance with current convention. Co-authored-by: Ryan <fauxpark@gmail.com> * Edit of readme Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/minidox/keymaps/rsthd_combos/config.h9
-rw-r--r--keyboards/minidox/keymaps/rsthd_combos/keymap.c109
-rw-r--r--keyboards/minidox/keymaps/rsthd_combos/readme.md22
-rw-r--r--keyboards/minidox/keymaps/rsthd_combos/rules.mk1
4 files changed, 141 insertions, 0 deletions
diff --git a/keyboards/minidox/keymaps/rsthd_combos/config.h b/keyboards/minidox/keymaps/rsthd_combos/config.h
new file mode 100644
index 000000000..1106412b5
--- /dev/null
+++ b/keyboards/minidox/keymaps/rsthd_combos/config.h
@@ -0,0 +1,9 @@
1#pragma once
2
3#define USE_SERIAL
4#define EE_HANDS
5
6
7#define COMBO_COUNT 10
8#define COMBO_TERM 100
9#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/minidox/keymaps/rsthd_combos/keymap.c b/keyboards/minidox/keymaps/rsthd_combos/keymap.c
new file mode 100644
index 000000000..a3ba423c6
--- /dev/null
+++ b/keyboards/minidox/keymaps/rsthd_combos/keymap.c
@@ -0,0 +1,109 @@
1#include QMK_KEYBOARD_H
2
3// Defines names for use in layer keycodes and the keymap
4enum layer_names {
5 _RSTHD,
6 _LOWER,
7 _RAISE,
8 _ADJUST
9};
10
11enum combo_events {
12 TOP_L,
13 TOP_R,
14 MID_L,
15 MID_R,
16 BOT_L,
17 BOT_R,
18 HN_QUOT,
19 TOP_CTR,
20 MID_CTR,
21 BOT_CTR,
22};
23
24const uint16_t PROGMEM fk_combo[] = {KC_F, KC_K, COMBO_END};
25const uint16_t PROGMEM zl_combo[] = {KC_Z, KC_L, COMBO_END};
26const uint16_t PROGMEM hd_combo[] = {KC_H, KC_D, COMBO_END};
27const uint16_t PROGMEM mn_combo[] = {KC_M, KC_N, COMBO_END};
28const uint16_t PROGMEM pb_combo[] = {KC_P, KC_B, COMBO_END};
29const uint16_t PROGMEM xw_combo[] = {KC_X, KC_W, COMBO_END};
30const uint16_t PROGMEM hn_combo[] = {KC_H, KC_N, COMBO_END};
31const uint16_t PROGMEM kz_combo[] = {KC_K, KC_Z, COMBO_END};
32const uint16_t PROGMEM dm_combo[] = {KC_D, KC_M, COMBO_END};
33const uint16_t PROGMEM bx_combo[] = {KC_B, KC_X, COMBO_END};
34
35combo_t key_combos[COMBO_COUNT] = {
36 [TOP_L] = COMBO(fk_combo, KC_ESC),
37 [TOP_R] = COMBO(zl_combo, KC_AT),
38 [MID_L] = COMBO(hd_combo, KC_TAB),
39 [MID_R] = COMBO_ACTION(mn_combo),
40 [BOT_L] = COMBO(pb_combo, KC_HASH),
41 [BOT_R] = COMBO(xw_combo, KC_AMPR),
42 [HN_QUOT] = COMBO(hn_combo, KC_QUOT),
43 [TOP_CTR] = COMBO_ACTION(kz_combo),
44 [MID_CTR] = COMBO_ACTION(dm_combo),
45 [BOT_CTR] = COMBO_ACTION(bx_combo),
46};
47
48 void process_combo_event(uint8_t combo_index, bool pressed) {
49 switch(combo_index) {
50 case MID_R:
51 if (pressed) {
52 tap_code16(LALT(KC_3));
53 }
54 break;
55 case TOP_CTR:
56 if (pressed) {
57 set_oneshot_mods(MOD_LGUI);
58 }
59 break;
60 case MID_CTR:
61 if (pressed) {
62 set_oneshot_mods(MOD_LALT);
63 }
64 break;
65 case BOT_CTR:
66 if (pressed) {
67 set_oneshot_mods(MOD_LCTL);
68 }
69 break;
70 }
71 }
72
73// Defines for task manager and such
74// For insertion in keymap
75#define KILL LGUI(LALT(KC_ESC)) //Force quit controls
76#define SCRCAP LCTL(LSFT(LGUI(KC_5))) //Screen capture controls
77#define DSK_LFT LGUI(LCTL(KC_LEFT))
78#define DSK_RT LGUI(LCTL(KC_RIGHT))
79
80
81const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
82
83
84[_RSTHD] = LAYOUT(
85 KC_J, KC_C, KC_Y, KC_F, KC_K, KC_Z, KC_L, KC_COMM, KC_U, KC_Q,
86 KC_R, KC_S, KC_T, KC_H, KC_D, KC_M, KC_N, KC_A, KC_I , KC_O,
87 LCTL_T(KC_SLSH), LALT_T(KC_V), LGUI_T(KC_G), KC_P, KC_B, KC_X, KC_W, RGUI_T(KC_DOT), RALT_T(KC_SCLN),RCTL_T(KC_MINS),
88 OSM(MOD_LSFT), LT(_LOWER, KC_BSPC), KC_E, KC_SPC, LT(_RAISE, KC_ENT), OSM(MOD_LSFT)
89),
90[_RAISE] = LAYOUT(
91 KC_PAST, KC_7, KC_8, KC_9, KC_PLUS, KC_NUBS, LALT(KC_2), _______, LALT(KC_4), KC_DLR,
92 KC_CIRC, KC_4, KC_5, KC_6, KC_EQL, LSFT(KC_NUBS), KC_GRV, KC_TILD, KC_PIPE, KC_BSLS,
93 _______, RALT_T(KC_1), KC_2, KC_3,KC_PERC, _______, _______, _______, _______, _______,
94 _______, MO(_ADJUST), KC_0, _______, _______, _______
95),
96[_LOWER] = LAYOUT(
97 _______, KC_LBRC, KC_QUES, KC_RBRC, KC_BRMU, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU,
98 KC_ESC, KC_LPRN, KC_EXLM, KC_RPRN, KC_BRMD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_VOLD,
99 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE,
100 _______, _______, _______, KC_DEL, MO(_ADJUST), _______
101),
102[_ADJUST] = LAYOUT(
103 _______, KC_F7, KC_F8, KC_F9, SCRCAP, _______, KC_F10, KC_F11, KC_F12, _______,
104 _______, KC_F1, KC_F2, KC_F3, _______, _______, KC_F4, KC_F5, KC_F6, _______,
105 OSM(MOD_LCTL),_______, _______, _______, RESET, KILL, _______, _______, _______, OSM(MOD_RCTL),
106 _______, _______, _______, _______, _______, _______
107)
108
109};
diff --git a/keyboards/minidox/keymaps/rsthd_combos/readme.md b/keyboards/minidox/keymaps/rsthd_combos/readme.md
new file mode 100644
index 000000000..877d7059e
--- /dev/null
+++ b/keyboards/minidox/keymaps/rsthd_combos/readme.md
@@ -0,0 +1,22 @@
1# The RSTHD Layout for minidox - Empowered with Combos
2An attempt at porting Xuming Zeng’s [RSTHD](https://xsznix.wordpress.com/2016/05/16/introducing-the-rsthd-layout/) from the Ergodox to the Minidox.
3[KLE Link](http://www.keyboard-layout-editor.com/#/gists/3161700bf3573325804716b2bdafa50f)
4![RSTHD empowered with chords](https://live.staticflickr.com/65535/49926249372_77ab8eba95_z.jpg)
5
6**Symbols and media/system keys work as shown with keyboard identified by MacOS as "International/ISO" hardware (not ANSI) and "Input Source" within Preferences set to "British" (Apple).**
7
8The key feature on this keymap, aside from the layout, is to telescope seven columns into five using combos. The top row and the bottom row form the basis of the number and nav layers respectively. Combos are shown in the above drawing using paired blue legends.
9## Writing specific
10As a hobby writer I have intended to make a layout that favours prose rather than code, with symbols used in everyday writing such as various (Western) currencies in easy reach. Hardcore coders will no doubt move their favourite symbols to where they feel most comfortable!
11The thumb mounted 'E' made it difficult to adapt other keymaps to this letter layout and eventually drove this fundamental redesign. I have strove to minimise the risk of ‘negligent discharge’ of functions whilst typing - whose interruption which can be fatal to creative flow - and which my previous layouts adapted from various ones in the repository seemed prone. To this end hold-tap keys are not placed on the home row nor thumb operated 'space' and 'E' keys, shift gets its own keys, and I use combos to create a useful number of virtual keys.
12## Combos!
13I employ combos to simulate the missing inner and outer columns that the minidox lacks relative to the Ergodox. All combos operate on keys within the inner pair of columns of each side because during normal typing the index finger has to cover both these columns, making press events of adjacent keys unlikely to overlap. They are assigned names within the keymap that relate to their position on the keyboard (not to my assigned functions) so their functions can be changed at will to suit user preference without confusing the keymap.
14- The six chords spanning the neighbouring two columns of each half correspond to keys in the outer columns of the Ergodox.
15- A further four chords span the central divide, using pairs of letters that infrequently occur consecutively.
16 - The three combos spanning adjacent keys over the central divide simulate the mirrored inboard columns of the RSTHD map for Ergodox, and are set to chamber one shot of their respective modifiers.
17 - The quotation mark is a combo of both resting keys of the index fingers. This is inspired by ‘air quotes’ used in conversation.
18I am confident these combos will rarely be accidentally triggered. If this occurs, try reducing the tapping term.
19## Other features
20- Number pad on left. This confers many benefits for the RSTHD layout, such as leaving key symbols on the primary layer uncovered that are useful for numbers (,.:-). On this layer ‘E’ becomes ‘0’.
21- The nav cluster is now on the right hand and, upon activation ’space’ becomes ‘del’, which allows rapid navigation and editing of text.
22- Pair of one shot shift keys, since mod-tap shift assigned to letters is a bad idea IMO. Some users might choose to move the shift onto the bottom left and right combos which corresponds to where shift lives in the outer columns of the ergodox layout.
diff --git a/keyboards/minidox/keymaps/rsthd_combos/rules.mk b/keyboards/minidox/keymaps/rsthd_combos/rules.mk
new file mode 100644
index 000000000..ab1e43818
--- /dev/null
+++ b/keyboards/minidox/keymaps/rsthd_combos/rules.mk
@@ -0,0 +1 @@
COMBO_ENABLE = yes