[Keymap] Remove LAYOUT_kc macros from edvorakjp keymaps (#12217)
This commit is contained in:
parent
93e8a401df
commit
3dbb7f261d
20 changed files with 525 additions and 627 deletions
|
@ -1,54 +1,76 @@
|
|||
#ifndef EDVORAKJP
|
||||
#define EDVORAKJP
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define EECONFIG_EDVORAK (uint8_t *)20
|
||||
|
||||
// clang-format off
|
||||
#define __EDVORAKJP_BASE_L1__ KC_QUOTE, KC_COMMA, KC_DOT, KC_Y, KC_Q
|
||||
#define __EDVORAKJP_BASE_L2__ KC_A, LALT_T(KC_O), LGUI_T(KC_E), LCTL_T(KC_I), KC_U
|
||||
#define __EDVORAKJP_BASE_L3__ KC_SCOLON, KC_X, KC_C, KC_V, KC_Z
|
||||
|
||||
#define __EDVORAKJP_BASE_R1__ KC_F, KC_G, KC_R, KC_W, KC_P
|
||||
#define __EDVORAKJP_BASE_R2__ KC_D, RSFT_T(KC_T), RGUI_T(KC_N), RALT_T(KC_S), KC_M
|
||||
#define __EDVORAKJP_BASE_R3__ KC_H, KC_J, KC_K, KC_L, KC_B
|
||||
|
||||
#define __EDVORAKJP_NUMBER_L__ KC_1, LALT_T(KC_2), LGUI_T(KC_3), LCTL_T(KC_4), KC_5
|
||||
#define __EDVORAKJP_NUMBER_R__ KC_6, RSFT_T(KC_7), RGUI_T(KC_8), RALT_T(KC_9), KC_0
|
||||
|
||||
#define __EDVORAKJP_FUNCTION_L__ KC_F1, KC_F2, LALT_T(KC_F3), LGUI_T(KC_F4), LCTL_T(KC_F5), KC_F6
|
||||
#define __EDVORAKJP_FUNCTION_R__ KC_F7, RSFT_T(KC_F8), RGUI_T(KC_F9), RALT_T(KC_F10), KC_F11, KC_F12
|
||||
|
||||
#define __EDVORAKJP_SYMBOL_L__ KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR
|
||||
#define __EDVORAKJP_SYMBOL_R__ KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK
|
||||
|
||||
#define __EDVORAKJP_BRACKET_L__ KC_LEFT_CURLY_BRACE, KC_LBRACKET, KC_LEFT_PAREN
|
||||
#define __EDVORAKJP_BRACKET_R__ KC_RIGHT_PAREN, KC_RBRACKET, KC_RIGHT_CURLY_BRACE
|
||||
|
||||
#define __EDVORAKJP_PAGE__ KC_HOME, KC_PGDOWN, KC_PGUP, KC_END
|
||||
#define __EDVORAKJP_CURSOR__ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
|
||||
#define LA_TAB LALT_T(KC_TAB)
|
||||
#define LS_SPC LSFT_T(KC_SPACE)
|
||||
#define RC_BSPC RCTL_T(KC_BSPACE)
|
||||
#define RC_DEL RCTL_T(KC_DELETE)
|
||||
#define RG_ENT RGUI_T(KC_ENTER)
|
||||
|
||||
#define LOWER_TD TD(TD_EDVORAKJP_LOWER)
|
||||
#define RAISE_TD TD(TD_EDVORAKJP_RAISE)
|
||||
// clang-format on
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum edvorakjp_layers {
|
||||
_EDVORAK = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_EXTRA,
|
||||
L_EDVORAKJP_BASE = 0,
|
||||
L_EDVORAKJP_LOWER,
|
||||
L_EDVORAKJP_RAISE,
|
||||
L_EDVORAKJP_ADJUST,
|
||||
L_EDVORAKJP_EXTRA,
|
||||
};
|
||||
|
||||
enum edvorakjp_keycodes {
|
||||
EDVORAK = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
KC_MAC,
|
||||
KC_WIN,
|
||||
KC_JPN,
|
||||
KC_ENG,
|
||||
NEW_SAFE_RANGE
|
||||
KC_EDVORAKJP_LOWER = SAFE_RANGE,
|
||||
KC_EDVORAKJP_RAISE,
|
||||
KC_MAC,
|
||||
KC_WIN,
|
||||
KC_JPN,
|
||||
KC_ENG,
|
||||
NEW_SAFE_RANGE,
|
||||
};
|
||||
|
||||
#define KC_LC(k) LCTL_T(KC_##k)
|
||||
#define KC_LS(k) LSFT_T(KC_##k)
|
||||
#define KC_LA(k) LALT_T(KC_##k)
|
||||
#define KC_LG(k) LGUI_T(KC_##k)
|
||||
#define KC_RC(k) RCTL_T(KC_##k)
|
||||
#define KC_RS(k) RSFT_T(KC_##k)
|
||||
#define KC_RG(k) RGUI_T(KC_##k)
|
||||
#define KC_RA(k) RALT_T(KC_##k)
|
||||
|
||||
enum tap_dance_code {
|
||||
TD_LOWER = 0,
|
||||
TD_RAISE
|
||||
TD_EDVORAKJP_LOWER = 0,
|
||||
TD_EDVORAKJP_RAISE,
|
||||
};
|
||||
|
||||
// base
|
||||
void dvorakj_layer_off(void);
|
||||
void matrix_init_user(void);
|
||||
void matrix_init_keymap(void);
|
||||
void matrix_init_user(void);
|
||||
void matrix_init_keymap(void);
|
||||
uint32_t layer_state_set_user(uint32_t state);
|
||||
uint32_t layer_state_set_keymap(uint32_t state);
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
// status
|
||||
void edvorakjp_status_init(void);
|
||||
|
@ -66,5 +88,3 @@ bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record);
|
|||
bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_layer(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_ime(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#endif // EDVORAKJP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue