summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/gh60/config.h3
-rw-r--r--keyboard/gh60/keymap.c44
-rw-r--r--keyboard/hhkb/config.h3
3 files changed, 16 insertions, 34 deletions
diff --git a/keyboard/gh60/config.h b/keyboard/gh60/config.h
index fbe587081b..567b126b6f 100644
--- a/keyboard/gh60/config.h
+++ b/keyboard/gh60/config.h
@@ -61,8 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_PRINT
/* disable action features */
-//#define NO_ACTION_KEYMAP
-//#define NO_ACTION_OVERLAY
+//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
diff --git a/keyboard/gh60/keymap.c b/keyboard/gh60/keymap.c
index d6af16961c..2f41ad4fdc 100644
--- a/keyboard/gh60/keymap.c
+++ b/keyboard/gh60/keymap.c
@@ -91,7 +91,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
LCTL,A, S, D, F, G, H, J, K, L, FN2, QUOT, ENT, \
- LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, RSFT, \
+ LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, FN9, \
LCTL,LGUI,LALT, SPC, RALT,FN3, FN3, FN0),
/* Keymap 1: colemak */
KEYMAP_ANSI(
@@ -198,54 +198,38 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS),
};
-static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {};
-
/*
* Fn action definition
*/
static const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_KEYMAP_MOMENTARY(4),
- [1] = ACTION_KEYMAP_TAP_KEY(5, KC_SLASH),
- [2] = ACTION_KEYMAP_TAP_KEY(6, KC_SCLN),
- [3] = ACTION_KEYMAP_MOMENTARY(6),
- [4] = ACTION_KEYMAP_MOMENTARY(7), // to Layout selector
+ [0] = ACTION_LAYER_MOMENTARY(4),
+ [1] = ACTION_LAYER_TAP_KEY(5, KC_SLASH),
+ [2] = ACTION_LAYER_TAP_KEY(6, KC_SCLN),
+ [3] = ACTION_LAYER_MOMENTARY(6),
+ [4] = ACTION_LAYER_MOMENTARY(7), // to Layout selector
[5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout
[6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout
[7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout
[8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout
+ [9] = ACTION_RMOD_TAP_KEY(KC_RSFT, KC_GRV),
};
#endif
#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0]))
-#define OVERLAYS_SIZE (sizeof(overlays) / sizeof(overlays[0]))
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
- /* Overlay: 16-31(OVERLAY_BIT(0x10) | overlay_layer) */
- if (layer & OVERLAY_BIT) {
- layer &= OVERLAY_MASK;
- if (layer < OVERLAYS_SIZE) {
- return pgm_read_byte(&overlays[(layer)][(key.row)][(key.col)]);
- } else {
- // XXX: this may cuaes bootlaoder_jump incositent fail.
- //debug("key_to_keycode: overlay "); debug_dec(layer); debug(" is invalid.\n");
- return KC_TRANSPARENT;
- }
- }
- /* Keymap: 0-15 */
- else {
- if (layer < KEYMAPS_SIZE) {
- return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
- } else {
- // XXX: this may cuaes bootlaoder_jump incositent fail.
- //debug("key_to_keycode: base "); debug_dec(layer); debug(" is invalid.\n");
- // fall back to layer 0
- return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]);
- }
+ if (layer < KEYMAPS_SIZE) {
+ return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
+ } else {
+ // XXX: this may cuaes bootlaoder_jump inconsistent fail.
+ //debug("key_to_keycode: base "); debug_dec(layer); debug(" is invalid.\n");
+ // fall back to layer 0
+ return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]);
}
}
diff --git a/keyboard/hhkb/config.h b/keyboard/hhkb/config.h
index 6e26edbefc..9df86126e1 100644
--- a/keyboard/hhkb/config.h
+++ b/keyboard/hhkb/config.h
@@ -74,8 +74,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_PRINT
/* disable action features */
-//#define NO_ACTION_KEYMAP
-//#define NO_ACTION_OVERLAY
+//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO