aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/hhkb/keymaps/shela/Makefile1
-rw-r--r--keyboards/hhkb/keymaps/shela/action_pseudo_lut.c142
-rw-r--r--keyboards/hhkb/keymaps/shela/action_pseudo_lut.h15
-rw-r--r--keyboards/hhkb/keymaps/shela/config.h12
-rw-r--r--keyboards/hhkb/keymaps/shela/keymap.c179
-rw-r--r--keyboards/hhkb/keymaps/shela/keymap_jis2us.h32
-rw-r--r--keyboards/hhkb/keymaps/shela/readme.md14
-rw-r--r--quantum/keymap.h22
-rw-r--r--readme.md4
-rw-r--r--util/travis_compiled_push.sh2
10 files changed, 410 insertions, 13 deletions
diff --git a/keyboards/hhkb/keymaps/shela/Makefile b/keyboards/hhkb/keymaps/shela/Makefile
new file mode 100644
index 000000000..d0586bda6
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/Makefile
@@ -0,0 +1 @@
SRC += action_pseudo_lut.c
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c
new file mode 100644
index 000000000..b205968c7
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c
@@ -0,0 +1,142 @@
1#include "quantum.h"
2#include "action_pseudo_lut.h"
3
4static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
5
6/*
7 * Pseudo layout action.
8 * This action converts a keycode in order to output the character according to the keymap you specified
9 * still your keyboard layout recognized wrongly on your OS.
10 * Memo: Using other layer keymap to get keycode
11 */
12void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) {
13 static uint8_t prev_shift;
14 uint16_t keycode;
15 uint16_t pseudo_keycode;
16
17 /* get keycode from keymap you specified */
18 keycode = keymap_key_to_keycode(base_keymap_id, record->event.key);
19
20 prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
21
22 if (record->event.pressed) {
23 /* when magic commands entered, keycode does not converted */
24 if (IS_COMMAND()) {
25 if (prev_shift) {
26 add_shift_bit(keycode);
27 }
28 register_code(keycode);
29 return;
30 }
31
32 if (prev_shift) {
33 pseudo_keycode = convert_keycode(keymap, keycode, true);
34 dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
35 add_shift_bit(keycode);
36
37 if (IS_LSFT(pseudo_keycode)) {
38 register_code(QK_LSFT ^ pseudo_keycode);
39 } else {
40 /* delete shift mod temporarily */
41 del_mods(prev_shift);
42 send_keyboard_report();
43 register_code(pseudo_keycode);
44 add_mods(prev_shift);
45 send_keyboard_report();
46 }
47 } else {
48 pseudo_keycode = convert_keycode(keymap, keycode, false);
49 dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
50
51 if (IS_LSFT(pseudo_keycode)) {
52 add_weak_mods(MOD_BIT(KC_LSFT));
53 send_keyboard_report();
54 register_code(QK_LSFT ^ pseudo_keycode);
55 /* on Windows, prevent key repeat to avoid unintended output */
56 unregister_code(QK_LSFT ^ pseudo_keycode);
57 del_weak_mods(MOD_BIT(KC_LSFT));
58 send_keyboard_report();
59 } else {
60 register_code(pseudo_keycode);
61 }
62 }
63 } else {
64 if (get_shift_bit(keycode)) {
65 del_shift_bit(keycode);
66 pseudo_keycode = convert_keycode(keymap, keycode, true);
67 } else {
68 pseudo_keycode = convert_keycode(keymap, keycode, false);
69 }
70 dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode);
71
72 if (IS_LSFT(pseudo_keycode)) {
73 unregister_code(QK_LSFT ^ pseudo_keycode);
74 } else {
75 unregister_code(pseudo_keycode);
76 }
77 }
78}
79
80uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded)
81{
82 uint16_t pseudo_keycode;
83
84 switch (keycode) {
85 case KC_A ... KC_CAPSLOCK:
86#if defined(__AVR__)
87 if (shift_modded) {
88 pseudo_keycode = pgm_read_word(&keymap[keycode][1]);
89 } else {
90 pseudo_keycode = pgm_read_word(&keymap[keycode][0]);
91 }
92#else
93 if (shift_modded) {
94 pseudo_keycode = keymap[keycode][1];
95 } else {
96 pseudo_keycode = keymap[keycode][0];
97 }
98#endif
99 /* if undefined, use got keycode as it is */
100 if (pseudo_keycode == 0x00) {
101 if (shift_modded) {
102 pseudo_keycode = S(keycode);
103 } else {
104 pseudo_keycode = keycode;
105 }
106 }
107 break;
108 default:
109 if (shift_modded) {
110 pseudo_keycode = S(keycode);
111 } else {
112 pseudo_keycode = keycode;
113 }
114 break;
115 }
116 return pseudo_keycode;
117}
118
119uint8_t get_shift_bit(uint16_t keycode) {
120 if ((keycode >> 3) < SHIFT_BIT_SIZE) {
121 return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7));
122 } else {
123 dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode);
124 return 0;
125 }
126}
127
128void add_shift_bit(uint16_t keycode) {
129 if ((keycode >> 3) < SHIFT_BIT_SIZE) {
130 send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7));
131 } else {
132 dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode);
133 }
134}
135
136void del_shift_bit(uint16_t keycode) {
137 if ((keycode >> 3) < SHIFT_BIT_SIZE) {
138 send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7));
139 } else {
140 dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode);
141 }
142}
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h
new file mode 100644
index 000000000..681252440
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h
@@ -0,0 +1,15 @@
1#ifndef ACTION_PSEUDO_LUT_H
2#define ACTION_PSEUDO_LUT_H
3
4#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key
5
6#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT)
7
8void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]);
9uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool);
10
11uint8_t get_shift_bit(uint16_t);
12void add_shift_bit(uint16_t);
13void del_shift_bit(uint16_t);
14
15#endif
diff --git a/keyboards/hhkb/keymaps/shela/config.h b/keyboards/hhkb/keymaps/shela/config.h
new file mode 100644
index 000000000..08cc1fb46
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/config.h
@@ -0,0 +1,12 @@
1#ifndef CONFIG_SHELA_H
2#define CONFIG_SHELA_H
3
4#include "../../config.h"
5
6#undef TAPPING_TERM
7#define TAPPING_TERM 230
8
9#define ONESHOT_TAP_TOGGLE 2
10#define ONESHOT_TIMEOUT 2000
11
12#endif
diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c
new file mode 100644
index 000000000..c286b99de
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/keymap.c
@@ -0,0 +1,179 @@
1/*
2 * HHKB Pro 2 US Layout for shela
3 */
4#include "hhkb.h"
5#include "keymap_jis2us.h"
6#include "action_pseudo_lut.h"
7
8enum keymap_layout {
9 BASE = 0,
10 PSEUDO_US,
11 DVORAK,
12 MOUSE,
13 TENKEY,
14 HHKB,
15 SPACE_FN,
16};
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19
20 /* Layer 0: Default Layer
21 * ,-----------------------------------------------------------------------------------------.
22 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BSp |
23 * |-----------------------------------------------------------------------------------------|
24 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
25 * |-----------------------------------------------------------------------------------------|
26 * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
27 * |-----------------------------------------------------------------------------------------|
28 * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 |
29 * `-----------------------------------------------------------------------------------------'
30 * |LAlt | LGui | SpaceFN | RGui |RAlt |
31 * `-----------------------------------------------------------------'
32 */
33 [BASE] =
34 KEYMAP(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, \
35 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \
36 KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, \
37 OSM(MOD_LSFT),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_FN0, \
38 KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT),
39
40 /* Layer 1: Pseudo US Layout Layer */
41 [PSEUDO_US] =
42 KEYMAP(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, \
43 KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, \
44 KC_LCTL,KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, \
45 OSM(MOD_LSFT),KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT,KC_FN0, \
46 KC_LGUI,KC_FN3, KC_FN2, KC_FN4 ,KC_RGUI),
47
48 /* Layer 2: Dvorak Layer
49 * ,-----------------------------------------------------------------------------------------.
50 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp |
51 * |-----------------------------------------------------------------------------------------|
52 * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ |
53 * |-----------------------------------------------------------------------------------------|
54 * | Control | A | O | E | U | I | D | H | T | N | S | - | Enter |
55 * |-----------------------------------------------------------------------------------------|
56 * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 |
57 * `-----------------------------------------------------------------------------------------'
58 * |LAlt | LGui | SpaceFN | RGui |RAlt |
59 * `-----------------------------------------------------------------'
60 */
61 [DVORAK] =
62 KEYMAP(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,KC_RBRC,KC_GRV, KC_BSPC, \
63 KC_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,KC_EQL, KC_BSLS, \
64 KC_LCTL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,KC_ENT, \
65 KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,KC_FN0, \
66 KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT),
67
68 /* Layer 3: Mouse layer
69 * ,-----------------------------------------------------------------------------------------.
70 * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |
71 * |-----------------------------------------------------------------------------------------|
72 * | | | | | | | MwL | MwD | MwU | MwR | | | | |
73 * |-----------------------------------------------------------------------------------------|
74 * | | | | | | | McL | McD | McU | McR | | | |
75 * |-----------------------------------------------------------------------------------------|
76 * | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 |
77 * `-----------------------------------------------------------------------------------------'
78 * | | | Mb1 | | |
79 * `-----------------------------------------------------------------'
80 */
81 [MOUSE] =
82 KEYMAP(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, KC_NO, KC_TRNS, \
83 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,KC_NO, KC_NO, KC_NO, KC_NO, \
84 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,KC_NO, KC_NO, KC_TRNS, \
85 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1,KC_BTN2,KC_BTN3,KC_NO, KC_NO, KC_TRNS,KC_FN0, \
86 KC_TRNS,KC_TRNS, KC_BTN1, KC_TRNS,KC_TRNS),
87
88 /* Layer 4: Tenkey layer
89 * ,-----------------------------------------------------------------------------------------.
90 * | Esc | | | | | | | | | | / | * | - | | BSp |
91 * |-----------------------------------------------------------------------------------------|
92 * | | | | | | | | | | 7 | 8 | 9 | + | |
93 * |-----------------------------------------------------------------------------------------|
94 * | | | | | | | | | | 4 | 5 | 6 | Enter |
95 * |-----------------------------------------------------------------------------------------|
96 * | | | | | | | | | 1 | 2 | 3 | + | Fn0 |
97 * `-----------------------------------------------------------------------------------------'
98 * | | | SpaceFN | 0 | . |
99 * `-----------------------------------------------------------------'
100 */
101 [TENKEY] =
102 KEYMAP(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS,KC_PAST,KC_PMNS,KC_NO, KC_BSPC, \
103 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7,KC_KP_8,KC_KP_9,KC_PPLS,KC_NO, \
104 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4,KC_KP_5,KC_KP_6,KC_PENT, \
105 KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1,KC_KP_2,KC_KP_3,KC_PPLS,KC_FN0, \
106 KC_TRNS,KC_TRNS, KC_FN2, KC_KP_0,KC_PDOT),
107
108 /* Layer 5: HHKB mode (HHKB Fn)
109 * ,-----------------------------------------------------------------------------------------.
110 * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
111 * |-----------------------------------------------------------------------------------------|
112 * | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp |
113 * |-----------------------------------------------------------------------------------------|
114 * | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter |
115 * |-----------------------------------------------------------------------------------------|
116 * | | | | | | | + | - | End | PgD | Dow | | |
117 * `-----------------------------------------------------------------------------------------'
118 * | | | | | |
119 * `-----------------------------------------------------------------'
120 */
121 [HHKB] =
122 KEYMAP(KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
123 KC_CAPS,KC_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_UP, KC_TRNS,KC_BSPC, \
124 KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \
125 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS, \
126 KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
127
128 /* Layer 6: SpaceFN
129 * ,-----------------------------------------------------------------------------------------.
130 * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del |
131 * |-----------------------------------------------------------------------------------------|
132 * | | End | Up | Hom | | | | Hom | Up | End | Psc | Slk | Pau | Ins |
133 * |-----------------------------------------------------------------------------------------|
134 * | | Lef | Dow | Rig | PgU | | PgU | Lef | Dow | Rig | | | |
135 * |-----------------------------------------------------------------------------------------|
136 * | | | | PgD | | Spc | PgD | ` | ~ | | | | |
137 * `-----------------------------------------------------------------------------------------'
138 * | | | | | |
139 * `-----------------------------------------------------------------'
140 */
141 [SPACE_FN] =
142 KEYMAP(KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, \
143 KC_TRNS,KC_END, KC_UP, KC_HOME,KC_NO, KC_NO, KC_NO, KC_HOME,KC_UP, KC_END, KC_PSCR,KC_SLCK,KC_PAUS,KC_INS, \
144 KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_PGUP,KC_NO, KC_PGUP,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_NO, KC_TRNS, \
145 KC_TRNS,KC_NO, KC_NO, KC_PGDN,KC_NO, KC_SPC, KC_PGDN,KC_GRV, KC_TILD,KC_NO, KC_NO, KC_TRNS,KC_NO, \
146 KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
147};
148
149/*
150 * user defined action function
151 */
152enum function_id {
153 PSEUDO_US_FUNCTION,
154};
155
156void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
157
158 switch (id) {
159 case PSEUDO_US_FUNCTION:
160 action_pseudo_lut(record, BASE, keymap_jis2us);
161 break;
162 }
163}
164
165/*
166 * Fn action definition
167 */
168const uint16_t PROGMEM fn_actions[] = {
169 [0] = ACTION_LAYER_MOMENTARY(HHKB),
170 [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION),
171 [2] = ACTION_LAYER_TAP_KEY(SPACE_FN, KC_SPACE),
172 [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN),
173 [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA),
174 [5] = ACTION_DEFAULT_LAYER_SET(BASE),
175 [6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US),
176 [7] = ACTION_DEFAULT_LAYER_SET(MOUSE),
177 [8] = ACTION_DEFAULT_LAYER_SET(TENKEY),
178 [9] = ACTION_DEFAULT_LAYER_SET(DVORAK),
179};
diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/keymaps/shela/keymap_jis2us.h
new file mode 100644
index 000000000..cf2bd4f0e
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/keymap_jis2us.h
@@ -0,0 +1,32 @@
1#ifndef KEYMAP_JIS2US_H
2#define KEYMAP_JIS2US_H
3
4/* keymap for convert from JIS to US */
5const uint16_t PROGMEM keymap_jis2us[][2] = {
6 [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */
7
8 [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */
9 [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */
10 [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */
11 [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */
12 [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */
13 [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */
14 [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */
15 [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */
16 [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */
17 [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */
18 [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */
19 [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */
20 [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */
21 [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */
22 [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */
23 [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */
24 [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */
25 [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */
26 [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */
27 [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */
28 [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */
29 [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */
30};
31
32#endif
diff --git a/keyboards/hhkb/keymaps/shela/readme.md b/keyboards/hhkb/keymaps/shela/readme.md
new file mode 100644
index 000000000..5a06a8363
--- /dev/null
+++ b/keyboards/hhkb/keymaps/shela/readme.md
@@ -0,0 +1,14 @@
1# Shela's HHKB Layout
2
3Layer 0: US Layout
4Layer 1: Pseudo US Layout
5Layer 2: Dvorak Layout
6Layer 3: Mouse
7Layer 4: Tenkey
8Layer 5: HHKB Fn Key
9Layer 6: SpaceFN
10
11## Pseudo US Layout
12
13On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings.
14But, you can use HHKB like a US layout keyboard as it is.
diff --git a/quantum/keymap.h b/quantum/keymap.h
index a15865183..f2d94d75c 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -156,16 +156,16 @@ enum quantum_keycodes {
156 BL_INC, 156 BL_INC,
157 BL_TOGG, 157 BL_TOGG,
158 BL_STEP, 158 BL_STEP,
159 159
160 // RGB functionality 160 // RGB functionality
161 RGB_TOG, 161 RGB_TOG,
162 RGB_MOD, 162 RGB_MOD,
163 RGB_HUI, 163 RGB_HUI,
164 RGB_HUD, 164 RGB_HUD,
165 RGB_SAI, 165 RGB_SAI,
166 RGB_SAD, 166 RGB_SAD,
167 RGB_VAI, 167 RGB_VAI,
168 RGB_VAD, 168 RGB_VAD,
169 169
170 // Left shift, open paren 170 // Left shift, open paren
171 KC_LSPO, 171 KC_LSPO,
@@ -309,7 +309,7 @@ enum quantum_keycodes {
309#define OSL(layer) (layer | QK_ONE_SHOT_LAYER) 309#define OSL(layer) (layer | QK_ONE_SHOT_LAYER)
310 310
311// One-shot mod 311// One-shot mod
312#define OSM(layer) (layer | QK_ONE_SHOT_MOD) 312#define OSM(mod) (mod | QK_ONE_SHOT_MOD)
313 313
314// M-od, T-ap - 256 keycode max 314// M-od, T-ap - 256 keycode max
315#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8)) 315#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8))
diff --git a/readme.md b/readme.md
index 57629f8be..e2221e749 100644
--- a/readme.md
+++ b/readme.md
@@ -13,7 +13,7 @@ For an easy-to-read version of this document and the repository, check out [http
13* [Planck](/keyboards/planck/) 13* [Planck](/keyboards/planck/)
14* [Preonic](/keyboards/preonic/) 14* [Preonic](/keyboards/preonic/)
15* [Atomic](/keyboards/atomic/) 15* [Atomic](/keyboards/atomic/)
16* [ErgoDox EZ](/keyboards/ergodox_ez/) 16* [ErgoDox EZ](/keyboards/ergodox/ez/)
17* [Clueboard](/keyboards/clueboard/) 17* [Clueboard](/keyboards/clueboard/)
18* [Cluepad](/keyboards/cluepad/) 18* [Cluepad](/keyboards/cluepad/)
19 19
@@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j
31 31
32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: 32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest:
33 33
34* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox_ez/); for the Planck, it's [here](keyboards/planck/) and so on. 34* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on.
35* The list of possible keycodes you can use in your keymap is actually spread out in a few different places: 35* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
36 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. 36 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
37 * [quantum/keymap.h](quantum/keymap.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap.h` is where they're actually defined. 37 * [quantum/keymap.h](quantum/keymap.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap.h` is where they're actually defined.
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index 27ab3cec6..c2a994ef0 100644
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -7,6 +7,8 @@ rev=$(git rev-parse --short HEAD)
7git config --global user.name "Travis CI" 7git config --global user.name "Travis CI"
8git config --global user.email "jack.humb+travis.ci@gmail.com" 8git config --global user.email "jack.humb+travis.ci@gmail.com"
9 9
10make all-keymaps keyboard=ergodox/ez AUTOGEN=true
11
10find . -name ".build" | xargs rm -rf 12find . -name ".build" | xargs rm -rf
11cd .. 13cd ..
12git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git 14git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git