Eric Gebhart user space and keymaps (#17487)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
49a78b8114
commit
050472a4d0
46
keyboards/crkbd/keymaps/ericgebhart/keymap.c
Executable file → Normal file
46
keyboards/crkbd/keymaps/ericgebhart/keymap.c
Executable file → Normal file
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -14,47 +14,5 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ericgebhart.h"
|
||||
|
||||
#define Crkbd_base(...) Base_3x6_3(__VA_ARGS__)
|
||||
#define Crkbd_bepo(...) Base_bepo_3x6_3(__VA_ARGS__)
|
||||
#define Crkbd_bepo6(...) Base_bepo6_3x6_3(__VA_ARGS__)
|
||||
#define Crkbd_transient(...) Transient6_3x6_3(__VA_ARGS__)
|
||||
|
||||
/*
|
||||
* The `Crkbd_base` macro is a template to allow the use of identical
|
||||
* modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
|
||||
* that there is no need to set them up for each layout, and modify all of
|
||||
* them if I want to change them. This helps to keep consistency and ease
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Qwerty based Base layers
|
||||
[_DVORAK] = Crkbd_base(___DVORAK___),
|
||||
[_BEAKL] = Crkbd_base(___BEAKL15___),
|
||||
[_COLEMAK] = Crkbd_base(___COLEMAK_DH___),
|
||||
[_QWERTY] = Crkbd_base(___QWERTY___),
|
||||
|
||||
// Bepo base layers
|
||||
[_BEAKL_BP] = Crkbd_bepo(___BEAKL15_FR___),
|
||||
[_DVORAK_BP] = Crkbd_bepo(___DVORAK_FR___),
|
||||
[_BEPO] = Crkbd_bepo6(___BEPO6___),
|
||||
|
||||
// Transient layers.
|
||||
[_SYMB] = Crkbd_transient(___SYMB_BEAKLB_3x12___),
|
||||
[_SYMB_BP] = Crkbd_transient(___SYMB_BEAKLB_BP_3x12___),
|
||||
|
||||
[_KEYPAD] = Crkbd_transient(___KP_C_3x12___),
|
||||
[_KEYPAD_BP] = Crkbd_transient(___KP_C_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = Crkbd_transient(___TOPROWS_3x12___),
|
||||
[_TOPROWS_BP] = Crkbd_transient(___TOPROWS_BP_3x12___),
|
||||
|
||||
[_NAV] = Crkbd_transient(___NAV_3x12___),
|
||||
|
||||
[_LAYERS] = Crkbd_transient(___LAYERS_3x12___),
|
||||
//[_RGB] = Crkbd_transient(___RGB_3x12___),
|
||||
[_ADJUST] = Crkbd_transient(___ADJUST_3x12___),
|
||||
///HPT_TOG, KC_NUKE, ___, ___, TG_MODS, HPT_FBK
|
||||
};
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -14,35 +14,5 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "keymap_bepo.h"
|
||||
#include "ericgebhart.h"
|
||||
#include "layouts.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Qwerty Base layers
|
||||
[_DVORAK] = Dox_base(___NUMS___, ___DVORAK___),
|
||||
[_QWERTY] = Dox_base(___NUMS___, ___QWERTY___),
|
||||
[_COLEMAK] = Dox_base(___NUMS___, ___COLEMAK_DH___),
|
||||
[_BEAKL] = Dox_base(___NUMS___, ___BEAKL15___),
|
||||
// Bepo Base layers
|
||||
[_DVORAK_BP] = Dox_bepo_base(___NUMS_BP___, ___DVORAK_FR___),
|
||||
[_BEAKL_BP] = Dox_bepo_base(___BKLNUMS_BP___, ___BEAKL15_FR___),
|
||||
[_BEPO] = Dox_bepo_base6(___BEPO6___),
|
||||
|
||||
|
||||
// transient layers.
|
||||
// Switch to using a transient layer macro
|
||||
[_SYMB] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_3x12___),
|
||||
[_SYMB_BP] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = Dox_transient(___12___, ___TOPROWS_3x12___),
|
||||
[_TOPROWS_BP] = Dox_transient(___12___, ___TOPROWS_BP_3x12___),
|
||||
|
||||
[_KEYPAD] = Dox_transient(___KEYPAD_BKL_FUNC_4x12___),
|
||||
[_KEYPAD_BP] = Dox_transient(___KEYPAD_BKL_FUNC_BP_4x12___),
|
||||
|
||||
[_NAV] = Dox_transient(___12___, ___NAV_3x12___),
|
||||
[_LAYERS] = Dox_transient(___12___, ___LAYERS_3x12___),
|
||||
[_RGB] = Dox_transient(___12___, ___RGB_3x12___),
|
||||
};
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/********************************************************************/
|
||||
/* Ergodox EZ */
|
||||
/********************************************************************/
|
||||
// This one is is set up to pass in the number row.
|
||||
// Beakl and bepo both change the number row.
|
||||
// Left, middle, right, bottom, and thumbs all stay the same.
|
||||
#define Base_dox( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
) \
|
||||
LVARG_edox( \
|
||||
ROW0_LEFT(K01, K02, K03, K04, K05), \
|
||||
___2_MIDDLE_1___, \
|
||||
ROW0_RIGHT(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
ROW1_LEFT(K11, K12, K13, K14, K15), \
|
||||
___2_MIDDLE_2___, \
|
||||
ROW1_RIGHT(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
ROW2_LEFT(K21, K22, K23, K24, K25), \
|
||||
ROW2_RIGHT(K26, K27, K28, K29, K2A), \
|
||||
\
|
||||
ROW3_LEFT(K31, K32, K33, K34, K35), \
|
||||
___2_MIDDLE_3___, \
|
||||
ROW3_RIGHT(K36, K37, K38, K39, K3A), \
|
||||
___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \
|
||||
___12_DOX_ALL_THUMBS___ \
|
||||
)
|
||||
|
||||
#define Base_dox_bepo( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
) \
|
||||
LVARG_edox( \
|
||||
ROW0_LEFT(K01, K02, K03, K04, K05), \
|
||||
___2_MIDDLE_1___, \
|
||||
ROW0_RIGHT(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
ROW1_LEFT(K11, K12, K13, K14, K15), \
|
||||
___2_MIDDLE_2___, \
|
||||
ROW1_RIGHT(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
ROW2_LEFT(K21, K22, K23, K24, K25), \
|
||||
ROW2_RIGHT(K26, K27, K28, K29, K2A), \
|
||||
\
|
||||
ROW3_LEFT(K31, K32, K33, K34, K35), \
|
||||
___2_MIDDLE_3___, \
|
||||
ROW3_RIGHT(K36, K37, K38, K39, K3A), \
|
||||
___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \
|
||||
___12_DOX_ALL_THUMBS_BP___ \
|
||||
)
|
||||
|
||||
|
||||
#define Base_dox_bepo6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C \
|
||||
) \
|
||||
LVARG_edox( \
|
||||
___6SYMBOL_BEPO_L___, \
|
||||
___2_MIDDLE_T_BP___, \
|
||||
___6SYMBOL_BEPO_R___, \
|
||||
ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
|
||||
___2_MIDDLE_2_BP___, \
|
||||
ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
|
||||
\
|
||||
ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
|
||||
ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
|
||||
\
|
||||
ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
|
||||
___2_MIDDLE_3_BP___, \
|
||||
ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
|
||||
\
|
||||
___5_BOTTOM_LEFT_BP___, ___5_BOTTOM_RIGHT_BP___, \
|
||||
___12_DOX_ALL_THUMBS_BP___ \
|
||||
)
|
||||
|
||||
#define Transient_dox6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C \
|
||||
) \
|
||||
LVARG_edox( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
___2___, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
___2___, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
___2___, \
|
||||
K37, K38, K39, K3A, K3B, K3C, \
|
||||
___5___, ___5___, \
|
||||
___12___ \
|
||||
)
|
||||
|
||||
#define Dox_base(...) Base_dox(__VA_ARGS__)
|
||||
#define Dox_bepo_base(...) Base_dox_bepo(__VA_ARGS__)
|
||||
#define Dox_bepo_base6(...) Base_dox_bepo6(__VA_ARGS__)
|
||||
#define Dox_transient(...) Transient_dox6(__VA_ARGS__)
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,34 +15,4 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "keymap_bepo.h"
|
||||
#include "ericgebhart.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// 4x10
|
||||
[_DVORAK] = BASE_5x14(___NUMS___, ___DVORAK___),
|
||||
[_QWERTY] = BASE_5x14(___NUMS___, ___QWERTY___),
|
||||
[_COLEMAK] = BASE_5x14(___NUMS___, ___COLEMAK_DH___),
|
||||
[_BEAKL] = BASE_5x14(___BKLNUMS___, ___BEAKL15___),
|
||||
|
||||
//[_DVORAK_BP] = BASE_5x14_bepo(___DVORAK_FR___),
|
||||
//[_BEAKL_BP] = BASE_5x14_bepo(___BEAKL15_FR___),
|
||||
|
||||
// 4x12
|
||||
//[_BEPO] = BASE_5x14_bepo6(___BEPO6_FR___),
|
||||
|
||||
// transient macro takes a 3x12 for args
|
||||
[_SYMB] = TRANSIENT_5x14(___12___, ___SYMB_BEAKLA_3x12___),
|
||||
//[_SYMB_BP] = TRANSIENT_5x14(___SYMB_BEAKLA_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = TRANSIENT_5x14(___12___, ___TOPROWS_3x12___),
|
||||
//[_TOPROWS_BP] = TRANSIENT_5x14(___TOPROWS_BP_3x12___),
|
||||
|
||||
[_KEYPAD] = TRANSIENT_5x14(___12___, ___KP_C_3x12___),
|
||||
//[_KEYPAD_BP] = TRANSIENT_5x14(___KP_C_BP_3x12___),
|
||||
|
||||
// Navigation and control
|
||||
[_NAV] = TRANSIENT_5x14(___12___, ___NAV_3x12___),
|
||||
[_LAYERS] = TRANSIENT_5x14(___12___, ___LAYERS_3x12___),
|
||||
//[_RGB] = TRANSIENT_5x14(___12___, ___RGB_3x12___),
|
||||
};
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -14,40 +14,5 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "keymap_bepo.h"
|
||||
#include "ericgebhart.h"
|
||||
|
||||
#define LAYOUT_PVARG(...) LAYOUT_pretty(__VA_ARGS__)
|
||||
|
||||
#define Kinesis_base(...) Base_4x6_4_6(__VA_ARGS__)
|
||||
#define Kinesis_bepo_base(...) Base_bepo_4x6_4_6(__VA_ARGS__)
|
||||
#define Kinesis_bepo_base6(...) Base_bepo6_4x6_4_6(__VA_ARGS__)
|
||||
#define Kinesis_transient(...) Transient6_4x6_4_6(__VA_ARGS__)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Qwerty Base layers
|
||||
[_DVORAK] = Kinesis_base(___NUMS___, ___DVORAK___),
|
||||
[_QWERTY] = Kinesis_base(___NUMS___, ___QWERTY___),
|
||||
[_COLEMAK] = Kinesis_base(___NUMS___, ___COLEMAK_DH___),
|
||||
[_BEAKL] = Kinesis_base(___BKLNUMS___, ___BEAKL15___),
|
||||
// Bepo Base layers
|
||||
[_DVORAK_BP] = Kinesis_bepo_base(___NUMS_BP___, ___DVORAK_FR___),
|
||||
[_BEAKL_BP] = Kinesis_bepo_base(___BKLNUMS_BP___, ___BEAKL15_FR___),
|
||||
|
||||
[_BEPO] = Kinesis_bepo_base6(___BEPO6___),
|
||||
|
||||
// transient layers.
|
||||
// Switch to using a transient layer macro
|
||||
[_SYMB] = Kinesis_transient(___12_FUNC___, ___SYMB_BEAKLA_3x12___),
|
||||
[_SYMB_BP] = Kinesis_transient(___12_FUNC___, ___SYMB_BEAKLA_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = Kinesis_transient(___12___, ___TOPROWS_3x12___),
|
||||
[_TOPROWS_BP] = Kinesis_transient(___12___, ___TOPROWS_BP_3x12___),
|
||||
|
||||
[_NAV] = Kinesis_transient(___12___, ___NAV_3x12___),
|
||||
[_LAYERS] = Kinesis_transient(___12___, ___LAYERS_3x12___),
|
||||
[_ADJUST] = Kinesis_transient(___12___, ___ADJUST_3x12___),
|
||||
//[_RGB] = Kinesis_transient(___12___, ___RGB_3x12___),
|
||||
};
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -13,4 +13,3 @@ AUDIO_ENABLE = no # Audio output
|
|||
UNICODE_ENABLE = no # Unicode
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -14,88 +14,5 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ericgebhart.h"
|
||||
#include "layouts.h"
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Qwerty based Base layers
|
||||
[_DVORAK] = Rebound_base(___DVORAK___),
|
||||
[_BEAKL] = Rebound_base(___BEAKL15___),
|
||||
[_COLEMAK] = Rebound_base(___COLEMAK_DH___),
|
||||
[_QWERTY] = Rebound_base(___QWERTY___),
|
||||
|
||||
// Bepo base layers
|
||||
[_BEAKL_BP] = Rebound_base_bepo(___BEAKL15_FR___),
|
||||
[_DVORAK_BP] = Rebound_base_bepo(___DVORAK_FR___),
|
||||
[_BEPO] = Rebound_base_bepo6(___BEPO6___),
|
||||
|
||||
// Transient layers.
|
||||
[_SYMB] = Rebound_transient(___SYMB_BEAKLA_3x12___),
|
||||
[_SYMB_BP] = Rebound_transient(___SYMB_BEAKLA_BP_3x12___),
|
||||
|
||||
[_KEYPAD] = Rebound_transient(___KP_C_3x12___),
|
||||
[_KEYPAD_BP] = Rebound_transient(___KP_C_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = Rebound_transient(___TOPROWS_3x12___),
|
||||
[_TOPROWS_BP] = Rebound_transient(___TOPROWS_BP_3x12___),
|
||||
[_NAV] = Rebound_transient(___NAV_3x12___),
|
||||
[_LAYERS] = Rebound_transient(___LAYERS_3x12___),
|
||||
};
|
||||
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
switch(get_highest_layer(layer_state)){
|
||||
case _DVORAK:
|
||||
if (clockwise) {
|
||||
tap_code16(KC_VOLD);
|
||||
} else {
|
||||
tap_code16(KC_VOLU);
|
||||
}
|
||||
break;
|
||||
|
||||
case _NAV:
|
||||
if (clockwise) {
|
||||
tap_code16(S(KC_TAB));
|
||||
} else {
|
||||
tap_code16(KC_TAB);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR(""), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _BASE:
|
||||
oled_write_P(PSTR("Rebound\n"), false);
|
||||
oled_write_P(PSTR("Rev4\n"), false);
|
||||
break;
|
||||
case _NAV:
|
||||
oled_write_P(PSTR("Nav\n"), false);
|
||||
break;
|
||||
case _SYMB_BEAKL:
|
||||
case _SYMB:
|
||||
oled_write_P(PSTR("Symbols\n"), false);
|
||||
break;
|
||||
case _KEYPAD:
|
||||
oled_write_P(PSTR("Top Rows\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/********************************************************************/
|
||||
/* Rebound 4 rows, 1x12, 3x13 */
|
||||
/********************************************************************/
|
||||
|
||||
#define LVARG_rebound(...) LAYOUT_all(__VA_ARGS__)
|
||||
#define LAYOUT_rebound_base( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
ROW1_LEFT(K01, K02, K03, K04, K05), \
|
||||
ROW1_RIGHT(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
ROW2_LEFT(K11, K12, K13, K14, K15), \
|
||||
KC_CCCV, \
|
||||
ROW2_RIGHT(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
ROW3_LEFT(K21, K22, K23, K24, K25), \
|
||||
MO(_ADJUST), \
|
||||
ROW3_RIGHT(K26, K27, K28, K29, K2A), \
|
||||
___13_BOTTOM___ \
|
||||
)
|
||||
|
||||
#define LAYOUT_rebound_base_bepo( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
ROW1_LEFT_BP(K01, K02, K03, K04, K05), \
|
||||
ROW1_RIGHT_BP(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
ROW2_LEFT_BP(K11, K12, K13, K14, K15), \
|
||||
KC_CCCV, \
|
||||
ROW2_RIGHT_BP(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
ROW3_LEFT_BP(K21, K22, K23, K24, K25), \
|
||||
MO(_ADJUST), \
|
||||
ROW3_RIGHT_BP(K26, K27, K28, K29, K2A), \
|
||||
___13_BOTTOM_BP___ \
|
||||
)
|
||||
|
||||
// Just for bepo because it's a 3x6 matrix on each side.
|
||||
// So 3 pairs of 6 keys, left and right.
|
||||
#define LAYOUT_rebound_base_bepo6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
|
||||
ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
|
||||
\
|
||||
ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
|
||||
KC_CCCV, \
|
||||
ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
|
||||
\
|
||||
ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
|
||||
MO(_ADJUST), \
|
||||
ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
|
||||
___13_BOTTOM_BP___ \
|
||||
)
|
||||
|
||||
#define LAYOUT_rebound_transient( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
___, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
___, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
___, ___12___)
|
||||
|
||||
#define Rebound_base(...) LAYOUT_rebound_base(__VA_ARGS__)
|
||||
#define Rebound_base_bepo(...) LAYOUT_rebound_base_bepo(__VA_ARGS__)
|
||||
#define Rebound_base_bepo6(...) LAYOUT_rebound_base_bepo6(__VA_ARGS__)
|
||||
#define Rebound_transient(...) LAYOUT_rebound_transient(__VA_ARGS__)
|
|
@ -1,6 +1,7 @@
|
|||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
|
@ -11,6 +12,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
|
||||
|
|
25
keyboards/splitkb/kyria/keymaps/ericgebhart/config.h
Executable file
25
keyboards/splitkb/kyria/keymaps/ericgebhart/config.h
Executable file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// otherwise the other promicro v3 isn't found
|
||||
#define SPLIT_USB_DETECT
|
||||
#define OLED_DISPLAY_128X64
|
18
keyboards/splitkb/kyria/keymaps/ericgebhart/keymap.c
Normal file
18
keyboards/splitkb/kyria/keymaps/ericgebhart/keymap.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// See: users/ericgebhart.
|
3
keyboards/splitkb/kyria/keymaps/ericgebhart/rules.mk
Normal file
3
keyboards/splitkb/kyria/keymaps/ericgebhart/rules.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
ENCODER_ENABLE = no # Enables the use of one or more encoders
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,125 +15,4 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "keymap_bepo.h"
|
||||
#include "ericgebhart.h"
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// 4x10
|
||||
[_DVORAK] = BASE_5x15(___NUMS___, ___DVORAK___),
|
||||
[_QWERTY] = BASE_5x15(___NUMS___, ___QWERTY___),
|
||||
[_COLEMAK] = BASE_5x15(___NUMS___, ___COLEMAK_DH___),
|
||||
[_BEAKL] = BASE_5x15(___BKLNUMS___, ___BEAKL15___),
|
||||
|
||||
//[_DVORAK_BP] = BASE_5x15_bepo(___DVORAK_FR___),
|
||||
//[_BEAKL_BP] = BASE_5x15_bepo(___BEAKL15_FR___),
|
||||
|
||||
// 4x12
|
||||
//[_BEPO] = BASE_5x15_bepo6(___BEPO6_FR___),
|
||||
|
||||
// transient macro takes a 4x12 for args
|
||||
[_SYMB] = TRANSIENT_5x15(___12___, ___SYMB_BEAKLA_3x12___),
|
||||
//[_SYMB_BP] = TRANSIENT_5x15(___12___, ___SYMB_BEAKLA_BP_3x12___),
|
||||
|
||||
[_TOPROWS] = TRANSIENT_5x15(___12___, ___TOPROWS_3x12___),
|
||||
//[_TOPROWS_BP] = TRANSIENT_5x15(___12___, ___TOPROWS_BP_3x12___),
|
||||
|
||||
[_KEYPAD] = TRANSIENT_5x15(___12___, ___KP_C_3x12___),
|
||||
//[_KEYPAD_BP] = TRANSIENT_5x15(___12___, ___KP_C_BP_3x12___),
|
||||
|
||||
// Navigation and control
|
||||
[_NAV] = TRANSIENT_5x15(___12___, ___NAV_3x12___),
|
||||
[_LAYERS] = TRANSIENT_5x15(___12___, ___LAYERS_3x12___),
|
||||
//[_RGB] = TRANSIENT_5x15(___12___, ___RGB_3x12___),
|
||||
[_ADJUST] = TRANSIENT_5x15(___12___, ___ADJUST_3x12___),
|
||||
};
|
||||
|
||||
|
||||
/********************************************************************************/
|
||||
/* Using layers to do RGB underlighting */
|
||||
/********************************************************************************/
|
||||
|
||||
const rgblight_segment_t PROGMEM on_bepo[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 2, HSV_AZURE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM bepo[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{3, 2, HSV_MAGENTA}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM dvorak[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{3, 2, HSV_AZURE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM media[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{5, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM symbol[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{4, 2, HSV_GOLD}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM keypad[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{4, 2, HSV_BLUE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM layers[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{5, 1, HSV_RED}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{5, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(on_bepo, bepo, dvorak, media, symbol,
|
||||
keypad, layers, rgb);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_sethsv_noeeprom(HSV_PURPLE);
|
||||
rgblight_layers = rgb_layers;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
// rgblight_set_layer_state(0, !on_qwerty());
|
||||
rgblight_set_layer_state(0, layer_state_cmp(state, _DVORAK));
|
||||
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, _BEPO));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, _DVORAK));
|
||||
//|| layer_state_cmp(state, DVORAK_ON_BEPO)));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, _NAV));
|
||||
rgblight_set_layer_state(4, layer_state_cmp(state, _SYMB) );
|
||||
|
||||
//(layer_state_cmp(state, SYMB) || (layer_state_cmp(state, SYMB_ON_BEPO))));
|
||||
rgblight_set_layer_state(5, layer_state_cmp(state, _KEYPAD) );
|
||||
///(layer_state_cmp(state, KEYPAD) || (layer_state_cmp(state, KEYPAD_ON_BEPO))));
|
||||
rgblight_set_layer_state(6, layer_state_cmp(state, _LAYERS));
|
||||
rgblight_set_layer_state(7, layer_state_cmp(state, _RGB));
|
||||
return state;
|
||||
}
|
||||
|
||||
/* void suspend_power_down_user(void) { */
|
||||
/* rgblight_disable(); */
|
||||
/* } */
|
||||
|
||||
/* void suspend_wakeup_init_user(void) { */
|
||||
/* rgblight_enable(); */
|
||||
/* } */
|
||||
|
||||
/* bool is_shift_pressed = false; */
|
||||
|
||||
/* bool led_update_user(led_t led_state) { */
|
||||
/* rgblight_set_layer_state(2, is_shift_pressed != led_state.caps_lock); */
|
||||
/* return true; */
|
||||
/* } */
|
||||
|
||||
/* bool process_record_user(uint16_t keycode, keyrecord_t* record) { */
|
||||
/* switch (keycode) { */
|
||||
/* case KC_LSFT: */
|
||||
/* case KC_RSFT: */
|
||||
/* is_shift_pressed = record->event.pressed; */
|
||||
/* rgblight_set_layer_state(2, is_shift_pressed != host_keyboard_led_state().caps_lock); */
|
||||
/* default: */
|
||||
/* return true; */
|
||||
/* } */
|
||||
/* } */
|
||||
// See: users/ericgebhart.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
# The default keymap for xd75, with led controls
|
|
@ -1,3 +1,3 @@
|
|||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ANIMATION = yes
|
||||
RGBLIGHT_ANIMATION = no
|
||||
# BACKLIGHT_ENABLE = yes
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ericgebhart.h"
|
||||
#include "altlocal_keys.h"
|
||||
|
||||
#include "keymap_bepo.h"
|
||||
|
||||
// These are the keys for dvorak on bepo. column one is the keycode and mods for
|
||||
// the unshifted key, the second column is the keycode and mods for the shifted key.
|
||||
// GR is Good Range. It subtracts SAFE_RANGE from the keycode so we can make a
|
||||
// reasnably sized array without difficulties. The macro is for the constant declarations
|
||||
// the function is for when we use it.
|
||||
const uint16_t key_translations[][2][2] = {
|
||||
[GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}},
|
||||
[GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}},
|
||||
[GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
|
||||
[GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}},
|
||||
[GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}},
|
||||
[GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}},
|
||||
[GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
|
||||
[GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}},
|
||||
[GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}},
|
||||
[GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}},
|
||||
[GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}},
|
||||
[GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}},
|
||||
[GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_RBRC)] = {{BP_X, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
|
||||
// For the symbol layer
|
||||
[GR(DB_HASH)] = {{BP_DLR, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
|
||||
[GR(DB_LCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_RCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
|
||||
[GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
|
||||
// Keys for BEAKL on Qwerty
|
||||
[GR(BQ_COMM)] = {{KC_COMMA, MOD_NONE}, {KC_1, MOD_LSFT}},
|
||||
[GR(BQ_DOT)] = {{KC_DOT, MOD_NONE}, {KC_2, MOD_LSFT}},
|
||||
[GR(BQ_QUOT)] = {{KC_QUOT, MOD_NONE}, {KC_GRV, MOD_NONE}},
|
||||
};
|
||||
|
||||
|
||||
uint8_t gr(uint16_t kc){
|
||||
return (kc - SAFE_RANGE);
|
||||
}
|
||||
// send the right keycode for the right mod.
|
||||
// remove the mods we are taking care of,
|
||||
// send our keycodes then restore them.
|
||||
// all so we can make dvorak keys from bepo keycodes.
|
||||
void send_keycode(uint16_t kc){
|
||||
uint8_t tmp_mods = get_mods();
|
||||
bool is_shifted = ( tmp_mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
|
||||
//uint8_t key[2][2] = key_translations[GR(kc)];
|
||||
// need to turn of the shift if it is on.
|
||||
unregister_mods((MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)));
|
||||
if(is_shifted){
|
||||
register_mods(SHIFTED_MODS(kc));
|
||||
register_code(SHIFTED_KEY(kc));
|
||||
unregister_code(SHIFTED_KEY(kc));
|
||||
unregister_mods(SHIFTED_MODS(kc));
|
||||
} else{
|
||||
register_mods(UNSHIFTED_MODS(kc));
|
||||
register_code(UNSHIFTED_KEY(kc));
|
||||
unregister_code(UNSHIFTED_KEY(kc));
|
||||
unregister_mods(UNSHIFTED_MODS(kc));
|
||||
}
|
||||
clear_mods();
|
||||
register_mods(tmp_mods);
|
||||
}
|
90
users/ericgebhart/base_layers/accents.h
Normal file
90
users/ericgebhart/base_layers/accents.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// probably best to have e and é on different fingers.
|
||||
|
||||
// doesnt work, oled displays garbage
|
||||
/* #define CARTE_ACCENTED \ */
|
||||
/* carte_de_map(" æœêùì ¿ïüöë ", \ */
|
||||
/* " àôèéî ûçñß^", \ */
|
||||
/* " âöíúí ") */
|
||||
|
||||
// need to figure out a better way to display these on the oled.
|
||||
#define CARTE_ACCENTED \
|
||||
carte_de_map(" aoeui ?iuoe ", \
|
||||
" aoeei ucnS^", \
|
||||
" aoiúi ")
|
||||
|
||||
#define ___ACCENTED___ \
|
||||
LANG_MAP(_AE, _OE, _ECIR, _UGRV, _IGRV, _IQUE, _IIAE, _UIAE, _OIAE, _EIAE, \
|
||||
_AGRV, _OCIR, _EGRV, _EACU, _ICIR, _UCIR, _CCED, _NTIL, _SS, _DCIR, \
|
||||
_AACU, _ODIA, _IACU, _UACU, _IACU, _SPC, _SPC, _SPC , _SPC, _SPC)
|
||||
|
||||
|
||||
// A dead key layer, optimized for Most common,
|
||||
// western european.
|
||||
#define CARTE_MORTE \
|
||||
carte_de_map(" ˝˘̉ ̛ ˙° ", \
|
||||
"/`^´ ¸¨~¤", \
|
||||
" ,ˇ. ˛µ¯")
|
||||
|
||||
#define ___MORTE___ \
|
||||
LANG_MAP(_, _DACU, _BREV, _HOKA, _, _, _HORN, _DOTA, _RNGA, _, \
|
||||
_DSLS, _DGRV, _DCIR, _ACUT, _, _, _CEDL, _DIAE, _DTIL, _CURR, \
|
||||
_, _DCMM, _CARN, _DOTB, _, _, _OGON, _DGRK, _MACR, _)
|
||||
|
||||
// Just taking a guess and putting the things I know are most
|
||||
// used in easy to use places., not sure about ntil and ss, put
|
||||
// them in their dvorak spots on the home row.
|
||||
|
||||
/* #define CARTE_ACCENTS_MORTE \ */
|
||||
/* carte_de_map(" æœêùì ¿`^´ë ", \ */
|
||||
/* " àôèéî ¸çñß~", \ */
|
||||
/* " âö,úí ¨ˇ° ") */
|
||||
|
||||
#define CARTE_ACCENTS_MORTE \
|
||||
carte_de_map(" aoeui ?`^'e ", \
|
||||
" aoeei ,cnS~", \
|
||||
" ao,ui \"^o")
|
||||
|
||||
#define ___ACCENTS_MORTE___ \
|
||||
LANG_MAP(_AE, _OE, _ECIR, _UGRV, _IGRV, _IQUE, _DGRV, _DCIR, _ACUT, _EIAE, \
|
||||
_AGRV, _OCIR, _EGRV, _EACU, _ICIR, _CEDL, _CCED, _NTIL, _SS, _DTIL, \
|
||||
_AACU, _OIAE, _DCMM, _UACU, _IACU, _OGON, _DIAE, _CARN, _RNGA, _HORN)
|
||||
|
||||
/* // DEAD layer. */
|
||||
/* BP_DCIR // ^ (dead) */
|
||||
/* BP_ACUT // ´ (dead) */
|
||||
/* BP_DGRV // ` (dead) */
|
||||
/* BP_CARN // ˇ (dead) */
|
||||
/* BP_DSLS // / (dead) */
|
||||
/* BP_BREV // ˘ (dead) */
|
||||
/* BP_DIAE // ¨ (dead) */
|
||||
/* BP_DTIL // ~ (dead) */
|
||||
/* BP_MACR // ¯ (dead) */
|
||||
/* BP_CEDL // ¸ (dead) */
|
||||
/* BP_RNGA // ° (dead) */
|
||||
/* BP_DGRK // µ (dead Greek key) */
|
||||
/* BP_OGON // ˛ (dead) */
|
||||
/* BP_DACU // ˝ (dead) */
|
||||
/* BP_DOTA // ˙ (dead) */
|
||||
/* BP_CURR // ¤ (dead) */
|
||||
/* BP_HORN // ̛ (dead) */
|
||||
/* BP_DCMM // , (dead) */
|
||||
/* BP_HOKA // ̉ (dead) */
|
||||
/* BP_DOTB // ̣ (dead) */
|
150
users/ericgebhart/base_layers/alt.h
Normal file
150
users/ericgebhart/base_layers/alt.h
Normal file
|
@ -0,0 +1,150 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// e goes on the left thumb
|
||||
#define CARTE_MALTRON \
|
||||
carte_de_map(" qpycb vmuzl", \
|
||||
" anisf ctdor", \
|
||||
" ;/jg, .wk-x e")
|
||||
|
||||
#define ___MALTRON___ \
|
||||
LANG_MAP(_Q, _P, _Y, _C, _B, _V, _M, _U, _Z, _L, \
|
||||
_A, _N, _I, _S, _F, _D, _T, _D, _O, _R, \
|
||||
TL_SCLN, TL_SLSH, _J, _G, TL_COMM, TL_DOT, _W, _K, TL_MINS, _X)
|
||||
|
||||
#define CARTE_EUCALYN \
|
||||
carte_de_map(" /,.fq aoeiu", \
|
||||
" zxcvw mrdyp", \
|
||||
" gtksn bhjl;")
|
||||
|
||||
#define ___EUCALYN___ \
|
||||
LANG_MAP(TL_SLSH, TL_COMM, TL_DOT, _F, _Q, _A, _O, _E, _I, _U, \
|
||||
_Z, _X, _C, _V, _W, _M, _R, _D, _Y, _P, \
|
||||
_G, _T, _K, _S, _N, _B, _H, _J, _L, TL_SCLN)
|
||||
|
||||
|
||||
|
||||
// RSTHD
|
||||
/* j c y f k | z l , u q = */
|
||||
/* r s t h d | m n a i o - */
|
||||
/* / v g p b | x w . ; ' */
|
||||
/* e */
|
||||
|
||||
// need a thumb cluster for this.
|
||||
// removed = and -, edge keys if you've got them.
|
||||
// e goes on left thumb
|
||||
|
||||
#define CARTE_RSTHD \
|
||||
carte_de_map(" jcyfk zl,uq", \
|
||||
" rsthd mnaio", \
|
||||
" /vgpb xw.;' e")
|
||||
|
||||
#define ___RSTHD___ \
|
||||
LANG_MAP(_J, _C, _Y, _F, _K, _Z, _L, TL_COMM, _U, _Q, \
|
||||
_R, _S, _T, _H, _D, _M, _N, _A, _I, _O, \
|
||||
_/, _V, _G, _P, _B, _X, _W, TL_DOT, TL_SCLN, TL_QUOT)
|
||||
|
||||
#define CARTE_HANDS_UP \
|
||||
carte_de_map(" fyou, kwclp", \
|
||||
" hiea. dtsrn", \
|
||||
" bj'z; vmgxq")
|
||||
|
||||
#define ___HANDS_UP___ \
|
||||
LANG_MAP(_F, _Y, _O, _U, TL_COMM, _K, _W, _C, _L, _P, \
|
||||
_H, _I, _E, _A, TL_DOT , _D, _T, _S, _R, _N, \
|
||||
_B, _J, TL_QUOT, _Z, TL_SCLN, _V, _M, _G, _X, _Q)
|
||||
|
||||
#define CARTE_WHITE \
|
||||
carte_de_map(" vyd,' jmlu-", \
|
||||
" atheb csnoi", \
|
||||
" pkgwq xrf.z")
|
||||
|
||||
#define ___WHITE___ \
|
||||
LANG_MAP(_V, _Y, _D, TL_COMM, TL_QUOT, _J, _M, _L, _U, _MINS, \
|
||||
_A, _T, _H, _E, _B, _C, _S, _N, _O, _I, \
|
||||
_P, _K, _G, _W, _Q, _X, _R, _F, TL_DOT, _Z)
|
||||
|
||||
|
||||
#define CARTE_ISRT \
|
||||
carte_de_map(" yclmk zfu,'", \
|
||||
" isrtg pneao", \
|
||||
" qvwdj bh/.x")
|
||||
|
||||
#define ___ISRT___ \
|
||||
LANG_MAP(_Y, _C, _L, _M, _K, _Z, _F, _U, TL_COMM, TL_QUOT, \
|
||||
_I, _S, _R, _T, _G, _P, _N, _E, _A, _O, \
|
||||
_Q, _V, _W, _D, _J, _B, _H, TL_SLSH, TL_DOT, _X)
|
||||
|
||||
#define CARTE_SOUL \
|
||||
carte_de_map(" qwldp kmuy;", \
|
||||
" srtg fneio", \
|
||||
" zxcvj bh,./")
|
||||
|
||||
#define ___SOUL___ \
|
||||
LANG_MAP(_Q, _W, _L, _D, _P, _K, _M, _U, _Y, TL_SCLN, \
|
||||
_A, _S, _R, _T, _G, _F, _N, _E, _I, _O, \
|
||||
_Z, _X, _C, _V, _J, _B, _H, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_NIRO \
|
||||
carte_de_map(" qwudp jfyl;", \
|
||||
" asetg hniro", \
|
||||
" zxcvb km,./")
|
||||
|
||||
#define ___NIRO___ \
|
||||
LANG_MAP(_Q, _W, _U, _D, _P, _J, _F, _Y, _L, TL_SCLN, \
|
||||
_A, _S, _E, _T, _G, _H, _N, _I, _R, _O, \
|
||||
_Z, _X, _C, _V, _B, _K, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_ASSET \
|
||||
carte_de_map(" qwjfg ypul;", \
|
||||
" asetd hnior", \
|
||||
" zxcvb km,./")
|
||||
|
||||
#define ___Asset___ \
|
||||
LANG_MAP(_Q, _W, _J, _F, _G, _Y, _P, _U, _L, TL_SCLN, \
|
||||
_A, _S, _E, _T, _D, _H, _N, _I, _O, _R, \
|
||||
_Z, _X, _C, _V, _B, _K, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_WHORF \
|
||||
carte_de_map("flhdm vwou,", \
|
||||
"srntk gyaei", \
|
||||
"xjbzq pc';. ")
|
||||
|
||||
#define ___WHORF___ \
|
||||
LANG_MAP(_F, _L, _H, _D, _M, _V, _W, _O, _U, TL_COMM, \
|
||||
_S, _R, _N, _T, _K, _G, _Y, _A, _E, _I, \
|
||||
_X, _J, _B, _Z, _Q, _P, _C, TL_QUOT, TL_SCLN, TL_DOT )
|
||||
|
||||
#define CARTE_WHORF6 \
|
||||
carte_de_map("vlhkj gwou.", \
|
||||
"srntk ydeai", \
|
||||
"xqbfz pc',; ")
|
||||
|
||||
#define ___WHORF6___ \
|
||||
LANG_MAP(_V, _L, _H, _D, _M, _G, _W, _O, _U, TL_DOT, \
|
||||
_S, _R, _N, _T, _K, _Y, _D, _E, _A, _I, \
|
||||
_X, _Q, _B, _F, _Z, _P, _C, TL_QUOT, TL_COMM, TL_SCLN )
|
||||
|
||||
/* rsht/iena */
|
||||
/* jfldv @uopq */
|
||||
/* zrshtg .iena: */
|
||||
/* xcmwk /y,b? */
|
||||
|
||||
// pine
|
||||
/* y l r d w j m o u , */
|
||||
/* c s n t g p h a e i */
|
||||
/* x z q v k b f ' / . */
|
58
users/ericgebhart/base_layers/base_layers.h
Normal file
58
users/ericgebhart/base_layers/base_layers.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "keycodes.h"
|
||||
#include "lang_map.h"
|
||||
#include "oled_stuff.h"
|
||||
|
||||
|
||||
// an empty template.
|
||||
|
||||
/* #define CARTE_EMPTY \ */
|
||||
/* carte_de_map(" ", \ */
|
||||
/* " ", \ */
|
||||
/* " ") */
|
||||
/* */
|
||||
/* #define ___EMPTY___ \ */
|
||||
/* LANG_MAP(_, _, _, _, _, _, _, _, _, _, \ */
|
||||
/* _, _, _, _, _, _, _, _, _, _, \ */
|
||||
/* _, _, _, _, _, _, _, _, _, _) */
|
||||
|
||||
|
||||
// dvorak, capewell-dvorak, ahei, and boo.
|
||||
#include "dvorak.h"
|
||||
//qwerty, workman, norman,
|
||||
#include "qwerty.h"
|
||||
// Colemak, halmak, minimak, etc.
|
||||
#include "maks.h"
|
||||
// eucalyn, maltron
|
||||
#include "alt.h"
|
||||
// mtgap, ctgap, apt
|
||||
#include "gap.h"
|
||||
// some hands down.
|
||||
#include "hands_down.h"
|
||||
// some beakls.
|
||||
#include "beakl.h"
|
||||
// bepo, optimot, beakl19bis, godox-fr?.
|
||||
#include "bepo.h"
|
||||
// some carpalxs.
|
||||
#include "carpalx.h"
|
||||
// The symbol, number function rows for all the above.
|
||||
#include "toprows.h"
|
||||
// some layers with accents and dead keys.
|
||||
#include "accents.h"
|
158
users/ericgebhart/base_layers/beakl.h
Normal file
158
users/ericgebhart/base_layers/beakl.h
Normal file
|
@ -0,0 +1,158 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// beakl, balanced effort key layout.
|
||||
// Beakl 15 and 19 are somewhat more related.
|
||||
// Beakl-wi is the latest. It feels a little bit more like a system.
|
||||
|
||||
|
||||
// Remember the - and ; outside pinky keys.
|
||||
// Or use the 6 size.
|
||||
// Both are on the symbol layer too. So you
|
||||
// wont lose them at least.
|
||||
// KC_BK_COMM, KC_BK_QUOT, KC_BK_DOT - Beakl->Qwerty
|
||||
// BP_BK_COMM, BP_BK_QUOT, BP_BK_DOT - Beakl->Bepo
|
||||
// take care of the different shifted chars.
|
||||
|
||||
|
||||
/* BEAKL 27 (main layer): */
|
||||
/* // altered shifted pairs: dot = .` comma = ,? dquot = !" */
|
||||
/* Alt target is BK2 */
|
||||
|
||||
/* 32104 76598 */
|
||||
/* qhoux gcmrv */
|
||||
/* yiea. dstnb */
|
||||
/* j",k' wflpz */
|
||||
|
||||
/* BEAKL 27 (shift layer): */
|
||||
/* !@$#% ^(*)& */
|
||||
/* QHOUX GCMRV */
|
||||
/* YIEA` DSTNB */
|
||||
/* J!?K' WFLPZ */
|
||||
|
||||
|
||||
#define CARTE_BEAKL27 \
|
||||
carte_de_map(" qhoux gcmrz ", \
|
||||
" yiea. dstnb ", \
|
||||
" j\",k' wflpv ")
|
||||
|
||||
// Alt target is BK
|
||||
#define ___BEAKL27___ \
|
||||
LANG_MAP(_Q, _H, _O, _U, _X, _G, _C, _M, _R, _Z, \
|
||||
_Y, _I, _E, _A, TL_DOT, _D, _S, _T, _N, _B, \
|
||||
_J, TL_EXLM, TL_COMM, _K, TL_QUOT, _W, _F, _L, _P, _V)
|
||||
|
||||
/* BEAKL 15 (main layer): */
|
||||
// altered shifted pairs: quot = '` comma = ,! dot = .@
|
||||
/* 40123 76598 */
|
||||
#define CARTE_BEAKL15 \
|
||||
carte_de_map(" qhoux gcrfz ", \
|
||||
" yiea. dstnb ", \
|
||||
" j/,k' wmlpv ")
|
||||
|
||||
// Alt target is BK
|
||||
#define ___BEAKL15___ \
|
||||
LANG_MAP(_Q, _H, _O, _U, _X, _G, _C, _R, _F, _Z, \
|
||||
_Y, _I, _E, _A, TL_DOT, _D, _S, _T, _N, _B, \
|
||||
_J, _SLSH, TL_COMM, _K, TL_QUOT, _W, _M, _L, _P, _V)
|
||||
|
||||
/* BEAKL 19 */
|
||||
// Beakl 19. scores better than 15, better in french also.
|
||||
// Both are lots better than dvorak or bepo.
|
||||
|
||||
/* same symbols and keypad as 15 */
|
||||
/* number row is different */
|
||||
/* 32104 76598 */
|
||||
|
||||
// Alt target is BK
|
||||
#define CARTE_BEAKL19 \
|
||||
carte_de_map(" q.ouj wdnm, ", \
|
||||
" haeik gsrtp ", \
|
||||
" z'/yx bclfv ")
|
||||
|
||||
#define ___BEAKL19___ \
|
||||
LANG_MAP(_Q, _DOT, _O, _U, _J, _W, _D, _N, _M, TL_COMM, \
|
||||
_H, _A, _E, _I, _K, _G, _S, _R, _T, _P, \
|
||||
_Z, _QUOT, _SLSH, _Y, _X, _B, _C, _L, _F, _V)
|
||||
|
||||
//BEAKL 19bis - original.
|
||||
// the é and è were simply added for analysis not real use.
|
||||
// even so, this layout scores well for french, better than
|
||||
// bepo and mtgap
|
||||
/* qyouz wdnck */
|
||||
/* -hiea, gtrsp; */
|
||||
/* èj'é.x vmlfb */
|
||||
|
||||
// A 3x12
|
||||
//BEAKL 19bis mod z.
|
||||
// French optimised with some english.
|
||||
// This version rearranges things a little based on fequency.
|
||||
// Since it needs 3x12, I filled in the corners and removed ;.
|
||||
// Leaving y where it is. the o and the e might cause sfbs.
|
||||
// Put é on a different finger from e.
|
||||
// swap z, e's, add à, ^, and ê, swap ; for -.
|
||||
// it might be beneficial to swap w and à, as à is much more frequent than w
|
||||
#define CARTE_BEAKL19bis \
|
||||
carte_de_map(" àqyoué wdnck^ ", \
|
||||
" ;hiea, gtrsp- ", \
|
||||
" zj'è.x vmlfbê ")
|
||||
|
||||
#define ___BEAKL19bis_3x12___ \
|
||||
LANG_MAP6( \
|
||||
_AGRV, _Q, _Y, _O, _U, _EACU, _W, _D, _N, _C, _K, _DCIR, \
|
||||
_SCLN, _H, _I, _E, _A, _COMM, _G, _T, _R, _S, _P, _MINS, \
|
||||
_Z, _J, _QUOT, _EGRV, _DOT, _X, _V, _M, _L, _F, _B, _ECIR)
|
||||
|
||||
|
||||
// Beakl Wi. This is the most current beakl this size. 18/01/2022.
|
||||
// Nothing on the 6th outer columns but layer toggle buttons. All 6.
|
||||
// altered shifted pairs: dot = .` comma = ,~ colon = :;
|
||||
// i is on the left thumb.
|
||||
/* ;you- ctrsv */
|
||||
/* qheaw gdnmz */
|
||||
/* j,.k' bplfx */
|
||||
/* i */
|
||||
|
||||
#define CARTE_BEAKLWI \
|
||||
carte_de_map(" ;you- ctrsv ", \
|
||||
" qheaw gdnmz ", \
|
||||
" j,.k' bplfx i")
|
||||
|
||||
#define ___BEAKLWI___ \
|
||||
LANG_MAP(TL_COLN, _Y, _O, _U, _MINS, _C, _T, _R, _S, _V, \
|
||||
_Q, _H, _E, _A, _W, _G, _D, _N, _M, _Z, \
|
||||
_J, TL_COMM, TL_DOT, _K, _QUOT, _B, _P, _L, _F, _X)
|
||||
|
||||
// Thumbs.
|
||||
#define ___BEAKLWI_CRKBD_THUMBS___ LT_ESC, LT_I, LT_TAB, LT_ENT, LT_SPC, LT_BSPC
|
||||
|
||||
// My version, loses KC_mins, because it's easier on my symbol layer.
|
||||
// put I in it's dvorak spot instead of thumbs, move W up to make room for I.
|
||||
// I'd rather have w and i on different fingers. One domino...
|
||||
|
||||
// beakl-wi - mod iw-
|
||||
|
||||
#define CARTE_BEAKLWIa \
|
||||
carte_de_map(" ;youw ctrsv ", \
|
||||
" qheai gdnmz ", \
|
||||
" j,.k' bplfx ")
|
||||
|
||||
// Alt target is BKW
|
||||
#define ___BEAKLWIa___ \
|
||||
LANG_MAP(TL_COLN, _Y, _O, _U, _W, _C, _T, _R, _S, _V, \
|
||||
_Q, _H, _E, _A, _I, _G, _D, _N, _M, _Z, \
|
||||
_J, TL_COMM, TL_DOT, _K, _QUOT, _B, _P, _L, _F, _X)
|
114
users/ericgebhart/base_layers/bepo.h
Normal file
114
users/ericgebhart/base_layers/bepo.h
Normal file
|
@ -0,0 +1,114 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Maps based on BEPO Mostly 3x12
|
||||
|
||||
// BEAKL 19bis - English with French optimisations.
|
||||
// Least used letters in french xzykw QJÀ are fairly high.
|
||||
// XZ are good choices for pushing out, from english and french,
|
||||
// or using chords in both languages.
|
||||
|
||||
// Note: The percentages came from different sources so do not
|
||||
// match between languages.
|
||||
// French
|
||||
/* Q 0.89 % */
|
||||
/* J 0.71 % */
|
||||
/* À 0.54 % */
|
||||
/*-------------*/
|
||||
/* X 0.42 % */
|
||||
/* È 0.35 % */
|
||||
/* Ê 0.24 % */
|
||||
/* Z 0.21 % */
|
||||
/* Y 0.19 % */
|
||||
/* K 0.16 % */
|
||||
/* Ô 0.07 % */
|
||||
/* Û 0.05 % */
|
||||
/* W 0.04 % */
|
||||
|
||||
/* Least used letters in english. */
|
||||
/* X 0.2902% 1.48 */
|
||||
/* Z 0.2722% 1.39 */
|
||||
/* J 0.1965% 1.00 */
|
||||
/* Q 0.1962% (1) */
|
||||
|
||||
|
||||
// OPtimot by @Pyjam.
|
||||
/* àjoéb fdl’qxz */
|
||||
/* aieu, ptsrn^ç */
|
||||
/* êkyè.w gcmhvz */
|
||||
|
||||
// -- rearranged z, and ç to get 3x12
|
||||
#define CARTE_OPTIMOT \
|
||||
carte_de_map(" çàjoéb fdl’qx ", \
|
||||
" aieu, ptsrn^ ", \
|
||||
" êkyè.w gcmhvz ")
|
||||
|
||||
#define ___OPTIMOT_3x12___ \
|
||||
LANG_MAP6( \
|
||||
_CCED, _AGRV, _J, _O, _EACU, _B, _F, _D, _L, _QUOT, _Q, _X, \
|
||||
_TAB, _A, _I, _E, _U, _COMM, _P, _T, _S, _R, _N, _DCIR, \
|
||||
_ECIR, _K, _Y, _EGRV, _DOT, _W, _G, _C, _M, _H, _V, _Z)
|
||||
|
||||
// no z or x. combos exist for them.
|
||||
#define CARTE_OPTIMOT_COMPACT \
|
||||
carte_de_map(" àjoéb fdl’q ", \
|
||||
" aieu, ptsrn ", \
|
||||
" kyè.w gcmhv ")
|
||||
|
||||
#define ___OPTIMOT_3x10___ \
|
||||
LANG_MAP6( \
|
||||
_AGRV, _J, _O, _EACU, _B, _F, _D, _L, _QUOT, _Q, \
|
||||
_A, _I, _E, _U, _COMM, _P, _T, _S, _R, _N, \
|
||||
_K, _Y, _EGRV, _DOT, _W, _G, _C, _M, _H, _V,)
|
||||
|
||||
// Maybe Use this for C
|
||||
//BP_C_CCED = MT(BP_CCED, BP_C)
|
||||
|
||||
// BEPO
|
||||
|
||||
// No quot, à or ç
|
||||
/* bépoè vdljz */
|
||||
/* auie, ctsrn */
|
||||
/* myx.k qghfw */
|
||||
#define CARTE_BEPOc \
|
||||
carte_de_map(" bépoè vdljz", \
|
||||
" auie, ctsrn", \
|
||||
" myx.k qghfw")
|
||||
|
||||
#define ___BEPOc_3x10___ \
|
||||
LANG_MAP( \
|
||||
_B, _EACU, _P, _O, _EGRV, _V, _D, _L, _J, _Z, \
|
||||
_A, _U, _I, _E, _COMM, _C, _T, _S, _R, _N, \
|
||||
_M, _Y, _X, _DOT, _K, _Q, _G, _H, _F, _W)
|
||||
|
||||
|
||||
#define CARTE_BEPO \
|
||||
carte_de_map(" çbépoè ^vdljz ", \
|
||||
" auie, ctsrnm ", \
|
||||
" êàyx.k ’qghfw ")
|
||||
|
||||
#define ___BEPO_3x12___ \
|
||||
LANG_MAP6(_CCED, _B, _EACU, _P, _O, _EGRV, _DCIR, _V, _D, _L, _J, _Z, \
|
||||
_TAB, _A, _U, _I, _E, _COMM, _C, _T, _S, _R, _N, _M, \
|
||||
_ECIR, _AGRV, _Y, _X, _DOT, _K, _QUOT, _Q, _G, _H, _F, _W)
|
||||
|
||||
// dont like this one much.
|
||||
/* #define ___GODOX_3x12___ \ */
|
||||
/* LANG_MAP6(___, _AGRV, _B, _EACU, _dot, _mins, _DCIR, _V, _L, _M, _X, _CCED, \ */
|
||||
/* ___, _O, _U, _I, _A, _J, _G, _T, _S, _N, _R, _F, \ */
|
||||
/* ___, _Q, _Y, _EGRV, _P, _K, _W, _D, _UP, _H, _C, _Z) */
|
||||
/* // E goes on left thumb. */
|
46
users/ericgebhart/base_layers/carpalx.h
Normal file
46
users/ericgebhart/base_layers/carpalx.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define CARTE_CARPALX_QFMLWY \
|
||||
carte_de_map(" qfmlw yuobj", \
|
||||
" dstnr iaeh;", \
|
||||
" zvgcx pk,./")
|
||||
|
||||
#define ___CARPALX_QFMLWY___ \
|
||||
LANG_MAP(_Q, _F, _M, _L, _W, _Y, _U, _O, _B, _J, \
|
||||
_D, _S, _T, _N, _R, _I, _A, _E, _H, TL_SCLN, \
|
||||
_Z, _V, _G, _C, _X, _P, _K, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_CARPALX_QFMLWB \
|
||||
carte_de_map(" qgmlw byuv;", \
|
||||
" dstnr iaeoh", \
|
||||
" zxcfj kp,./")
|
||||
|
||||
#define ___CARPALX_QGMLWB___ \
|
||||
LANG_MAP(_Q, _G, _M, _L, _W, _B, _Y, _U, _V, TL_SCLN, \
|
||||
_D, _S, _T, _N, _R, _I, _A, _E, _O, _H, \
|
||||
_Z, _X, _C, _F, _J, _K, _P, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_CARPALX_QGMLWY \
|
||||
carte_de_map(" qgmlw yfub;", \
|
||||
" dstnr iaeoh", \
|
||||
" zxcvj kp,./")
|
||||
|
||||
#define ___CARPALX_QGMLWY___ \
|
||||
LANG_MAP(_Q, _G, _M, _L, _W, _Y, _F, _U, _B, TL_SCLN, \
|
||||
_D, _S, _T, _N, _R, _I, _A, _E, _O, _H, \
|
||||
_Z, _X, _C, _V, _J, _K, _P, TL_COMM, TL_DOT, TL_SLSH)
|
73
users/ericgebhart/base_layers/dvorak.h
Normal file
73
users/ericgebhart/base_layers/dvorak.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define CARTE_DVORAK \
|
||||
carte_de_map(" ',.py fgcrl ", \
|
||||
" aoeui dhtns ", \
|
||||
" ;qjkx bmwvz ")
|
||||
|
||||
#define ___DVORAK___ \
|
||||
LANG_MAP(TL_QUOT, TL_COMM, TL_DOT, _P, _Y, _F, _G, _C, _R, _L, \
|
||||
_A, _O, _E, _U, _I, _D, _H, _T, _N, _S, \
|
||||
TL_SCLN, _Q, _J, _K, _X, _B, _M, _W, _V, _Z)
|
||||
|
||||
#define CARTE_DVORAK_RLC_IU \
|
||||
carte_de_map(" ',.py fgrlc ", \
|
||||
" aoeiu dhtns ", \
|
||||
" ;qjkx bmwvz ")
|
||||
|
||||
#define ___DVORAK_RLC_IU___ \
|
||||
LANG_MAP(TL_QUOT, TL_COMM, TL_DOT, _P, _Y, _F, _G, _R, _L, _C, \
|
||||
_A, _O, _E, _I, _U, _D, _H, _T, _N, _S, \
|
||||
TL_SCLN, _Q, _J, _K, _X, _B, _M, _W, _V, _Z)
|
||||
|
||||
#define CARTE_BOO \
|
||||
carte_de_map(" ,.ucv qfdly", \
|
||||
" aoesg bntri", \
|
||||
" ;x'wz phmkj")
|
||||
|
||||
#define ___BOO___ \
|
||||
LANG_MAP( TL_COMM, TL_DOT, _U, _C, _V, _Q, _F, _D, _L, _Y, \
|
||||
_A, _O, _E, _S, _G, _B, _N, _T, _R, _I, \
|
||||
TL_SCLN, _X, TL_QUOT, _W, _Z, _P, _H, _M, _K, _J)
|
||||
|
||||
#define CARTE_CAPEWELL_DVORAK \
|
||||
carte_de_map( " ',.py qfgrk", \
|
||||
" oaeiu dhtns", \
|
||||
" zxcvj lmwb;")
|
||||
|
||||
#define ___CAPEWELL_DVORAK___ \
|
||||
LANG_MAP(TL_QUOT, TL_COMM, TL_DOT, _P, _Y, _Q, _F, _G, _R, _K, \
|
||||
_O, _A, _E, _I, _U, _D, _H, _T, _N, _S, \
|
||||
_Z, _X, _C, _V, _J, _L, _M, _W, _B, TL_SCLN)
|
||||
|
||||
//ahei - derived from dvorak.
|
||||
// x moved to left side. j on pinky.
|
||||
/*;pouyq gdlm/= */
|
||||
/* ahei, fstnr- */
|
||||
/* j'k.x bcwvz */
|
||||
|
||||
#define CARTE_AHEI \
|
||||
carte_de_map("pouyq gdlm/", \
|
||||
"ahei, fstnr", \
|
||||
"j'k.x bcwvz")
|
||||
|
||||
#define ___AHEI___ \
|
||||
LANG_MAP(_P, _O, _U, _Y, _Q, _G, _D, _L, _M, TL_SLSH, \
|
||||
_A, _H, _E, _I, TL_COMM, _F, _S, _T, _N, _R, \
|
||||
_J, TL_QUOT, _K, TL_DOT, _X, _B, _C, _W, _V, _Z)
|
67
users/ericgebhart/base_layers/gap.h
Normal file
67
users/ericgebhart/base_layers/gap.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// an alternate I found.
|
||||
/* Reference: MTGAP */
|
||||
/* y p o u - | b d l c k j */
|
||||
/* i n e a , | m h t s r v */
|
||||
/* ( " ' . _ | ) f w g x */
|
||||
/* z */
|
||||
|
||||
#define CARTE_MTGAP \
|
||||
carte_de_map(" ypouj kdlcw", \
|
||||
" inea, mhtsr", \
|
||||
" qz/.; bfgvx")
|
||||
|
||||
#define ___MTGAP___ \
|
||||
LANG_MAP(_Y, _P, _O, _U, _J, _K, _D, _L, _C, _W, \
|
||||
_I, _N, _E, _A, TL_COMM, _M, _H, _T, _S, _R, \
|
||||
_Q, _Z, TL_SLSH, TL_DOT, TL_SCLN, _B, _F, _G, _V, _X)
|
||||
|
||||
/* //APT v3*/
|
||||
/* https://github.com/Apsu/APT */
|
||||
#define CARTE_APT \
|
||||
carte_de_map(" wgdfb qluoy", \
|
||||
" rsthk jneai; ", \
|
||||
" xcmpv z,.'/")
|
||||
|
||||
#define ___APT___ \
|
||||
LANG_MAP(_W, _G, _D, _F, _B, _Q, _L, _U, _O, _Y, \
|
||||
_R, _S, _T, _H, _K, _J, _N, _E, _A, _I, TL_SCLN, \
|
||||
_X, _C, _M, _P, _V, _Z, TL_COMM, TL_DOT, TL_QUOT, TL_SLSH)
|
||||
|
||||
|
||||
#define CARTE_CTGAP \
|
||||
carte_de_map(" vplcf kuoyj", \
|
||||
" rntsd 'aeih", \
|
||||
" zbmgw x,.;q")
|
||||
|
||||
#define ___CTGAP___ \
|
||||
LANG_MAP(_V, _P, _L, _C, _F, _K, _U, _O, _Y, _J, \
|
||||
_R, _N, _T, _S, _D, TL_QUOT, _A, _E, _I, _H, \
|
||||
_Z, _B, _M, _G, _W, _X, TL_COMM, TL_DOT, TL_SCLN, _Q)
|
||||
|
||||
#define CARTE_CANARY \
|
||||
carte_de_map( " wlypb zfou'", \
|
||||
" crstg mneia", \
|
||||
" qjvd kxh/,.")
|
||||
|
||||
#define ___CANARY___ \
|
||||
LANG_MAP(_W, _L, _Y, _P, _B, _Z, _F, _O, _U, TL_QUOT, \
|
||||
_C, _R, _S, _T, _G, _M, _N, _E, _I, _A, \
|
||||
_Q, _J, _V, _D, _K, _X, _H, TL_SLSH, TL_COMM, TL_DOT)
|
147
users/ericgebhart/base_layers/hands_down.h
Normal file
147
users/ericgebhart/base_layers/hands_down.h
Normal file
|
@ -0,0 +1,147 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// https://sites.google.com/alanreiser.com/handsdown/home
|
||||
|
||||
// The only 3x12 layout. The rest are 3x10.
|
||||
#define CARTE_HD_NEU \
|
||||
carte_de_map( " wfmpv /.q\"'z", \
|
||||
" rsntb ,aeihj", \
|
||||
" xcldg -uoykK")
|
||||
|
||||
#define ___HD_NEU___ \
|
||||
LANG_MAP(_SML_NAV, _W, _F, _M, _P, _V , TL_SLSH, TL_DOT, _Q, TL_DQUO, TL_QUOT, _Z, \
|
||||
_TAB, _R, _S, _N, _T, _B , TL_COMM, _A, _E, _I, _H, _J, \
|
||||
_OS_ACCENT, _X, _C, _L, _D, _G , TL_MINS, _U, _O, _Y, _K, _SML_KEYPAD)
|
||||
|
||||
|
||||
// modified to fit 3x10.
|
||||
#define CARTE_HD_NEU_NARROW \
|
||||
carte_de_map(" xcldb zuoyq", \
|
||||
" rsntg ,aeih", \
|
||||
" wfmpv ;./jk")
|
||||
|
||||
#define ___HD_NEU_NARROW___ \
|
||||
LANG_MAP(_X, _C, _L, _D, _B, _Z, _U, _O, _Y, _Q, \
|
||||
_R, _S, _N, _T, _G, TL_COMM, _A, _E, _I, _H, \
|
||||
_W, _F, _M, _P, _V, _SCLN, TL_DOT, TL_SLSH, _J, _K)
|
||||
|
||||
|
||||
#define CARTE_HD_REF \
|
||||
carte_de_map(" qchpv kyoj/", \
|
||||
" rsntg wueia", \
|
||||
" xmldb zf',.")
|
||||
|
||||
#define ___HD_REF___ \
|
||||
LANG_MAP(_Q, _C, _H, _P, _V, _K, _Y, _O, _J, TL_SLSH, \
|
||||
_R, _S, _N, _T, _G, _W, _U, _E, _I, _A, \
|
||||
_X, _M, _L, _D, _B, _Z, _F, TL_QUOT, TL_COMM, TL_DOT )
|
||||
|
||||
|
||||
// All of these have a consonant or vowel on the thumb keys.
|
||||
|
||||
/* alt shift keys "? '! dash and elan */
|
||||
/* (< {[ - elan */
|
||||
/* dash has thumbs of ,; and .: */
|
||||
/* dash and the rest get these too. */
|
||||
/* alt shifts ;: .& /\* '? "! ,| -+ */
|
||||
/* COMBOS - z = jg, z=vg, q=uk, q=mp. */
|
||||
|
||||
|
||||
// no z or q, use combos.
|
||||
#define CARTE_HD_TITANIUM \
|
||||
carte_de_map(" jgmpv ;./\"' ", \
|
||||
" csntw ,aeih ", \
|
||||
" xfldb -uoyk r")
|
||||
|
||||
#define ___HD_TITANIUM___ \
|
||||
LANG_MAP(_J, _G, _M, _P, _V, TL_SCLN, TL_DOT, TL_SLSH, TL_DQUO, TL_QUOT, \
|
||||
_C, _S, _N, _T, _W , TL_COMM, _A, _E, _I, _H, \
|
||||
_X, _F, _L, _D, _B , TL_MINS, _U, _O, _Y, _K)
|
||||
|
||||
|
||||
#define CARTE_HD_GOLD \
|
||||
carte_de_map(" jgmpv ;./\"' ", \
|
||||
" rsndb ,aeih ", \
|
||||
" xflcw -uoyk t")
|
||||
|
||||
#define ___HD_GOLD___ \
|
||||
LANG_MAP(_J, _G, _M, _P, _V, TL_SCLN, TL_DOT, TL_SLSH, TL_DQUO, TL_QUOT, \
|
||||
_R, _S, _N, _D, _B , TL_COMM, _A, _E, _I, _H, \
|
||||
_X, _F, _L, _C, _W , TL_MINS, _U, _O, _Y, _K)
|
||||
/* t, ␣ */
|
||||
|
||||
/* jz pq alt shifts ;: .& /\* '? "! ,| -+ */
|
||||
|
||||
#define CARTE_HD_PLATINUM \
|
||||
carte_de_map( "jghpv ;./'\"", \
|
||||
"rsntb ,aeic", \
|
||||
"xfmdk -uowy l")
|
||||
/* l ␣ */
|
||||
|
||||
#define ___HD_PLATINUM___ \
|
||||
LANG_MAP(_J, _G, _H, _P, _V, TL_SCLN, TL_DOT, TL_SLSH, TL_QUOT, TL_DQUO, \
|
||||
_R, _S, _N, _T, _B, TL_COMM, _A, _E, _I, _C, \
|
||||
_X, _F, _M, _D, _K, TL_MINS, _U, _O, _W, _Y)
|
||||
|
||||
#define CARTE_HD_SILVER \
|
||||
carte_de_map("jgmpv ;./'\"", \
|
||||
"rshtb ,aeic", \
|
||||
"xfldk -uowy n")
|
||||
/* n ␣ */
|
||||
|
||||
#define ___HD_SILVER___ \
|
||||
LANG_MAP(_J, _G, _M, _P, _V, TL_SCLN, TL_DOT, TL_SLSH, TL_QUOT, TL_DQUO, \
|
||||
_R, _S, _H, _T, _B, TL_COMM, _A, _E, _I, _C, \
|
||||
_X, _F, _L, _D, _K, TL_MINS, _U, _O, _W, _Y)
|
||||
|
||||
#define CARTE_HD_BRONZE \
|
||||
carte_de_map("jgmpv ;./'\"", \
|
||||
"rsntb ,aeic", \
|
||||
"xfldk -uowy h")
|
||||
/* h ␣ */
|
||||
|
||||
#define ___HD_BRONZE___ \
|
||||
LANG_MAP(_J, _G , _M, _P, _V , TL_SCLN, TL_DOT, TL_SLSH , TL_QUOT, TL_DQUO, \
|
||||
_R, _S, _N, _T, _B , TL_COMM, _A, _E, _I, _C, \
|
||||
_X, _F, _L, _D, _K , TL_MINS, _U, _O, _W, _Y)
|
||||
|
||||
#define CARTE_HD_ELAN \
|
||||
carte_de_map("vghpk /({'\"", \
|
||||
"rsntf jaeci", \
|
||||
"xmldb -uowy")
|
||||
/* ,; .: ␣ ⏎ */
|
||||
|
||||
/* vz g h p kq /\* (< {[ '! "? */
|
||||
/* TL_COMM; TL_DOT: _␣ ⏎ */
|
||||
#define ___HD_ELAN___ \
|
||||
LANG_MAP(_V, _G, _H, _P, _K, TL_SLSH, TL_LPRN, TL_LCBR, TL_QUOT, TL_DQUO, \
|
||||
_R, _S, _N, _T, _F, _J, _A, _E, _C, _I, \
|
||||
_X, _M, _L, _D, _B, TL_MINS, _U, _O, _W, _Y)
|
||||
|
||||
|
||||
#define CARTE_HD_DASH \
|
||||
carte_de_map("jgmpv ;.'\"/", \
|
||||
"rsntb ,haoi", \
|
||||
"xcldw -fuky e")
|
||||
/* e ␣ */
|
||||
|
||||
#define ___HD_DASH___ \
|
||||
LANG_MAP(_J, _G, _M, _P, _V , TL_SCLN, TL_DOT, TL_QUOT, TL_DQUO, TL_SLSH, \
|
||||
_R, _S, _N, _T, _B , TL_COMM, _H, _A, _O, _I, \
|
||||
_X, _C, _L, _D, _W , TL_MINS, _F, _U, _K, _Y)
|
300
users/ericgebhart/base_layers/keymaps.txt
Normal file
300
users/ericgebhart/base_layers/keymaps.txt
Normal file
|
@ -0,0 +1,300 @@
|
|||
/*
|
||||
This file can be commented by blocks or single lines using //
|
||||
Blank lines are ignored
|
||||
*/
|
||||
/*
|
||||
Bigram frequencies in stats.csv
|
||||
*/
|
||||
|
||||
[keys]
|
||||
L21 L22 L23 L24 L25 L26 R26 R25 R24 R23 R22 R21
|
||||
L31 L32 L33 L34 L35 L36 R36 R35 R34 R33 R32 R31
|
||||
L41 L42 L43 L44 L45 L46 R46 R45 R44 R43 R42 R41
|
||||
|
||||
[weights]
|
||||
5.0 3.6 2.4 1.8 2.2 3.5 3.5 2.2 1.8 2.4 3.6 5.0
|
||||
4.0 1.6 1.2 1.0 1.0 3.0 3.0 1.0 1.0 1.2 1.6 4.0
|
||||
5.0 3.4 2.6 2.2 1.8 4.0 4.0 1.8 2.2 2.6 3.4 5.0
|
||||
|
||||
/*
|
||||
Weights should:
|
||||
- limit weak fingers
|
||||
- limit bottom row
|
||||
- increase home row
|
||||
- limit finger travel distance
|
||||
|
||||
https://colemakmods.github.io/mod-dh/compare.html
|
||||
*/
|
||||
|
||||
[penalties]
|
||||
,same_row,row_jump1,row_jump2
|
||||
ii, 2.5, 3.5, 4.5 // same finger
|
||||
im, 0.5, 1.0, 2.0
|
||||
ir, 0.5, 0.8, 1.5
|
||||
ip, 0.5, 0.8, 1.1
|
||||
mi, -1.5, -0.5, 1.5 // inward roll
|
||||
mm, 2.5, 3.5, 4.5 // same finger
|
||||
mr, 0.5, 1.0, 2.0
|
||||
mp, 0.5, 0.8, 1.5
|
||||
ri, -1.5, -0.5, 1.5 // inward roll
|
||||
rm, -2.0, -0.5, 1.2 // inward roll
|
||||
rr, 2.5, 3.5, 4.5 // same finger
|
||||
rp, 1.0, 1.5, 2.5
|
||||
pi, -1.0, 0.0, 1.0 // inward roll
|
||||
pm, -1.0, 0.0, 1.5 // inward roll
|
||||
pr, -1.0, 0.0, 1.5 // inward roll
|
||||
pp, 3.0, 4.0, 5.5 // same finger
|
||||
|
||||
/*
|
||||
Only apply if not the same letter, and both letters on the same hand.
|
||||
|
||||
i, m, r, and p refer to the fingers (index, middle, ring, pinky)
|
||||
The columns refer to how many rows separate the two keys
|
||||
|
||||
Penalties should:
|
||||
- limit same finger typing (except same key twice)
|
||||
- balance hands
|
||||
- favor inward rolling
|
||||
(last 2 in opposition with each other)
|
||||
*/
|
||||
|
||||
[layouts]
|
||||
|
||||
>>Qwerty
|
||||
# q w e r t y i o u p #
|
||||
é a s d f g h j k l ; '
|
||||
è z x c v b n m , . / -
|
||||
|
||||
>>Azerty
|
||||
è a z e r t y u i o p ^
|
||||
' q s d f g h j k l m ù
|
||||
é w x c v b n , . : ! -
|
||||
|
||||
>>Qwertz
|
||||
# q w e r t z u i o p ü
|
||||
é a s d f g h j k l ö ä
|
||||
è y x c v b n m , . - '
|
||||
|
||||
>>Bépo 40%
|
||||
# b é p o è ^ v d l j z
|
||||
- a u i e , c t s r n m
|
||||
ç à y x . k ' q g h f w
|
||||
|
||||
// https://github.com/TeXitoi/keyberon#whats-the-layout
|
||||
>>Bépo keyberon
|
||||
# b é p o è ^ v d l j z
|
||||
w a u i e , c t s r n m
|
||||
- à y x . k ' q g h f ç
|
||||
|
||||
>>Dvorak
|
||||
- ' , . p y f g c r l #
|
||||
é a o e u i d h t n s #
|
||||
è ; q j k x b m w v z #
|
||||
|
||||
>>Colemak
|
||||
# q w f p g j l u y ; #
|
||||
é a r s t d h n e i o '
|
||||
è z x c v b k m , . / -
|
||||
|
||||
>>Colemak DH
|
||||
# q w f p b j l u y ; #
|
||||
é a r s t g m n e i o '
|
||||
è z x c d v k h , . / -
|
||||
|
||||
>>Colemak DH mod
|
||||
# q w f p b j l u y é è
|
||||
# a r s t g m n e i o -
|
||||
# z x c d v k h , . ' /
|
||||
|
||||
>>Workman
|
||||
# q d r w b j f u p ; #
|
||||
é a s h t g y n e o i '
|
||||
è z x m c v k l , . / -
|
||||
|
||||
>>Norman
|
||||
# q w d f k j u r l ; #
|
||||
é a s e t g y n i o h '
|
||||
è z x c v b p m , . / -
|
||||
|
||||
>>Carpalx
|
||||
# q g m l w b y u v ; é
|
||||
è d s t n r i a e o h '
|
||||
# z x c f j k p , . / -
|
||||
|
||||
>>Neo
|
||||
- x v l c w k h g f q ß
|
||||
é u i a e o s n r t d y
|
||||
è ü ö ä p z b m , . j '
|
||||
|
||||
// http://mkweb.bcgsc.ca/carpalx/?full_optimization
|
||||
>>qgmlwyfub
|
||||
# q g m l w y f u b ; é
|
||||
è d s t n r i a e o h '
|
||||
# z x c v j k p , . / -
|
||||
|
||||
// https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/
|
||||
>>MTGAP
|
||||
# y p o u j k d l c w #
|
||||
é i n e a , m h t s r '
|
||||
è q z / . : b f g v x -
|
||||
|
||||
// http://mtgap.bilfo.com/official_keyboard.html
|
||||
// http://mtgap.bilfo.com/completed_keyboard.html
|
||||
>>MTGAP 2.0
|
||||
# , f h d k j c u l . #
|
||||
é o a n t g m s e r i -
|
||||
è q x b p z y w ' v ; #
|
||||
|
||||
>>MTGAP "Easy"
|
||||
# q w l d b j f u k p #
|
||||
é a s r t g h n e o i -
|
||||
è z x c v ; y m , . / '
|
||||
|
||||
>>MTGAP "shortcuts"
|
||||
# k g l d b j h u f . #
|
||||
é r o t s w m n e a i -
|
||||
è z x v c q y p , ' ; #
|
||||
|
||||
>>MTGAP "standard"
|
||||
# k l h c b j d u f . #
|
||||
é o r n s g w t e a i -
|
||||
è x q v m z y p , ' ; #
|
||||
|
||||
>>MTGAP "ergonomic"
|
||||
# . f u d j q h c w k #
|
||||
é i a e t p l n s r o -
|
||||
è ' , y g z - m b v x #
|
||||
|
||||
// https://geekhack.org/index.php?topic=67604.0
|
||||
>>Oneproduct
|
||||
# p l d w g j x o y q è
|
||||
- n r s t m u a e i h '
|
||||
# z c f v b , . ? ; k é
|
||||
|
||||
// https://bepo.fr/wiki/Utilisateur:Bibidibop
|
||||
>>Coeur
|
||||
# é w o p y b ' d l j z
|
||||
x a u e i , c t s r n h
|
||||
# - à è . k g m f q v #
|
||||
|
||||
// https://geekhack.org/index.php?topic=98275.0
|
||||
>>Kaehi
|
||||
# q w l d g j u o p / é
|
||||
è n r s t m k a e h i '
|
||||
# z x c v b y f , . ; -
|
||||
|
||||
// https://deskthority.net/wiki/BEAKL
|
||||
>>BEAKL 15
|
||||
é q h o u x g c r f z #
|
||||
- y i e a . d s t n b ;
|
||||
è j / , k ' w m l p v #
|
||||
|
||||
// https://web.archive.org/web/20190906220509/http://shenafu.com/smf/index.php?topic=89.msg2566#msg2566
|
||||
>>BEAKL 19
|
||||
é q . o u j w d n m , #
|
||||
- h a e i k g s r t p ;
|
||||
è z ' / y x b c l f v #
|
||||
|
||||
// https://www.reddit.com/r/ErgoDoxEZ/comments/gsvpug/layout_of_the_month_beakl_15/ftcan68/?context=3
|
||||
>>BEAKL 19bis
|
||||
# q y o u z w d n c k #
|
||||
- h i e a , g t r s p ;
|
||||
è j ' é . x v m l f b #
|
||||
|
||||
// https://www.reddit.com/r/ErgoMechKeyboards/comments/j1eopm/hands_down_layout_is_ready_for_daily_use/g7bjmr7/?context=3
|
||||
>>BEAKL 19 Opt French
|
||||
# w m r d v y u o q x #
|
||||
# g s n t p , i e a h -
|
||||
# k f l c b j é ' . z è
|
||||
|
||||
// http://millikeys.sourceforge.net/asset/
|
||||
>>ASSET
|
||||
# q w j f g y p u l ; #
|
||||
é a s e t d h n i o r '
|
||||
è z x c v b k m , . / -
|
||||
|
||||
// https://sourceforge.net/projects/qwpr/
|
||||
>>Qwpr
|
||||
# q w p r f y u k l ; #
|
||||
é a s d t g h n i o e '
|
||||
è z x c v b j m , . / -
|
||||
|
||||
// http://www.minimak.org/
|
||||
>>Minimak-8key
|
||||
# q w d r k y u i l p #
|
||||
é a s t f g h n e o ; '
|
||||
è z x c v b j m , . / -
|
||||
|
||||
// https://github.com/mw8/white_keyboard_layout
|
||||
// adapted to ergo keyboard
|
||||
>>White
|
||||
# v y d , ' j m l u ( )
|
||||
é a t h e b c s n o i -
|
||||
è p k g w q x r f . z #
|
||||
|
||||
// https://github.com/jackrosenthal/threelayout
|
||||
>>Three
|
||||
# q f u y z x k c w b #
|
||||
é o h e a i d r t n s -
|
||||
è , m . j ; g l p v ' #
|
||||
|
||||
//https://sites.google.com/alanreiser.com/handsdown
|
||||
>>Hands down
|
||||
# q c h g j y f o b ' #
|
||||
é s n r t p w u e i a #
|
||||
è x m l d z v k . , ; -
|
||||
|
||||
//https://sites.google.com/alanreiser.com/handsdown
|
||||
>>Notarize
|
||||
# q w d f p y u k l ' #
|
||||
é a s t e g h n i o r #
|
||||
è z x c v b j m . , ; -
|
||||
|
||||
// http://kennetchaz.github.io/symmetric-typing/soul.html
|
||||
>>Soul mod
|
||||
# q w l d p k m u y ; '
|
||||
è a s r t g f n e i o é
|
||||
# j z x c v b h , . / -
|
||||
|
||||
// http://kennetchaz.github.io/symmetric-typing/niro.html
|
||||
>>Niro mod
|
||||
# q w u d p j f y l ; #
|
||||
é a s e t g h n i r o '
|
||||
è b z x c v k m , . / -
|
||||
|
||||
// https://docs.google.com/document/d/1yiCnIi1oagV1D8ZouMt-TRFRG8d6AfSBIwQkBvSflvY/edit
|
||||
>>The-1
|
||||
# k m l u ? v d r ' q #
|
||||
é a t h e . c s n o i -
|
||||
è z p f j , b g w x y /
|
||||
|
||||
// https://engram.dev
|
||||
>>Engram 2.0
|
||||
# b y o u ' " l d w v z
|
||||
é c i e a , . h t s n q
|
||||
è g x j k - ? r m f p #
|
||||
|
||||
// https://github.com/MadRabbit/halmak
|
||||
>>Halmak
|
||||
# w l r b z ; q u d j #
|
||||
é s h n t , . a e o i '
|
||||
è f m v c / g p x k y -
|
||||
|
||||
// https://keyboard-design.com/letterlayout.html?layout=optimal-digram.en.ansi
|
||||
>>Optimal digram
|
||||
# q y u . , f m l d p z
|
||||
é s i e a o h n r t c g
|
||||
è j ) ' ? ( x v w k b -
|
||||
|
||||
// https://keyboard-design.com/letterlayout.html?layout=uciea-keyboard.en.ansi
|
||||
>>Uciea
|
||||
# p y u o - k d h f x q
|
||||
é c i e a ' g t n s r v
|
||||
è z " , . ; w m l b j -
|
||||
|
||||
// https://keyboard-design.com/letterlayout.html?layout=x1.en.ergodox
|
||||
// . and , moved
|
||||
>>x1
|
||||
# k y o ' ! f c l p q z
|
||||
é h i e a u d s t n r v
|
||||
è j ? . , # w g m b x -
|
61
users/ericgebhart/base_layers/maks.h
Normal file
61
users/ericgebhart/base_layers/maks.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
#define CARTE_COLEMAK \
|
||||
carte_de_map(" qwfpg jluy;", \
|
||||
" arstd hneio", \
|
||||
" zxcvb km,./")
|
||||
|
||||
#define ___COLEMAK___ \
|
||||
LANG_MAP(_Q, _W, _F, _P, _G, _J, _L, _U, _Y, TL_SCLN, \
|
||||
_A, _R, _S, _T, _D, _H, _N, _E, _I, _O, \
|
||||
_Z, _X, _C, _V, _B, _K, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
|
||||
#define CARTE_COLEMAK_DH \
|
||||
carte_de_map(" qwfpb jluy;", \
|
||||
" arstg mneio", \
|
||||
" zxcdv kh,./")
|
||||
|
||||
#define ___COLEMAK_DH___ \
|
||||
LANG_MAP(_Q, _W, _F, _P, _B, _J, _L, _U, _Y, TL_SCLN, \
|
||||
_A, _R, _S, _T, _G, _M, _N, _E, _I, _O, \
|
||||
_Z, _X, _C, _D, _V, _K, _H, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_HALMAK \
|
||||
carte_de_map(" wlrbz ;qudj", \
|
||||
" shnt, .aeoi", \
|
||||
" fmvc/ gpxky")
|
||||
|
||||
#define ___HALMAK___ \
|
||||
LANG_MAP(_W, _L, _R, _B, _Z, TL_SCLN, _Q, _U, _D, _J, \
|
||||
_S, _H, _N, _T, TL_COMM, _DOT, _A, _E, _O, _I, \
|
||||
_F, _M, _V, _C, TL_SLSH, _G, _P, _X, _K, _Y)
|
||||
|
||||
#define CARTE_MINIMAK \
|
||||
carte_de_map(" qwdrk yuiop", \
|
||||
" astfg hjel;", \
|
||||
" zxcvb nm,./")
|
||||
|
||||
#define ___MINIMAK___ \
|
||||
LANG_MAP(_Q, _W, _D, _R, _K, _Y, _U, _I, _O, _P, \
|
||||
_A, _S, _T, _F, _G, _H, _J, _E, _L, TL_SCLN, \
|
||||
_Z, _X, _C, _V, _B, _N, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_MINIMAK_8 \
|
||||
carte_de_map(" qwdrk yuilp", \
|
||||
" astfg hneo;", \
|
||||
" zxcvb jm,./")
|
||||
|
||||
#define ___MINIMAK_8___ \
|
||||
LANG_MAP(_Q, _W, _D, _R, _K, _Y, _U, _I, _L, _P, \
|
||||
_A, _S, _T, _F, _G, _H, _N, _E, _O, TL_SCLN, \
|
||||
_Z, _X, _C, _V, _B, _J, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
|
||||
#define CARTE_MINIMAK_12 \
|
||||
carte_de_map(" qwdfk yuil;", \
|
||||
" astrg hneop", \
|
||||
" zxcvb jm,./")
|
||||
|
||||
#define ___MINIMAK_12___ \
|
||||
LANG_MAP(_Q, _W, _D, _F, _K, _Y, _U, _I, _L, _SCLN, \
|
||||
_A, _S, _T, _R, _G, _H, _N, _E, _O, _P, \
|
||||
_Z, _X, _C, _V, _B, _J, _M, TL_COMM, TL_DOT, TL_SLSH)
|
69
users/ericgebhart/base_layers/qwerty.h
Normal file
69
users/ericgebhart/base_layers/qwerty.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Layer for combo reference. Make more than one by changing lang is.
|
||||
#define ___COMBO_REF___ \
|
||||
LANG_MAP(_1L1, _1L2, _1L3, _1L4, _1L5, _1R1, _1R2, _1R3, _1R4, _1R5, \
|
||||
_2L1, _2L2, _2L3, _2L4, _2L5, _2R1, _2R2, _2R3, _2R4, _2R5, \
|
||||
_3L1, _3L2, _3L3, _3L4, _3L5, _3R1, _3R2, _3R3, _3R4, _3R5)
|
||||
|
||||
|
||||
#define CARTE_QWERTY \
|
||||
carte_de_map(" qwert yuiop", \
|
||||
" asdfg hjkl;", \
|
||||
" zxcvb nm,./")
|
||||
|
||||
// Need TLKC around comm, dot, and quot, and scln
|
||||
// Qwerty based layers that I don't really use.
|
||||
#define ___QWERTY___ \
|
||||
LANG_MAP(_Q, _W, _E, _R, _T, _Y, _U, _I, _O, _P, \
|
||||
_A, _S, _D, _F, _G, _H, _J, _K, _L, TL_SCLN, \
|
||||
_Z, _X, _C, _V, _B, _N, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_AZERTY \
|
||||
carte_de_map(" azert yuiop", \
|
||||
" qsdfg hjkl;", \
|
||||
" wxcvb nm,./")
|
||||
|
||||
// Need TLKC around comm, dot, and quot, and scln
|
||||
// Qwerty based layers that I don't really use.
|
||||
#define ___AZERTY___ \
|
||||
LANG_MAP(_A, _Z, _E, _R, _T, _Y, _U, _I, _O, _P, \
|
||||
_Q, _S, _D, _F, _G, _H, _J, _K, _L, TL_SCLN, \
|
||||
_W, _X, _C, _V, _B, _N, _M, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
|
||||
|
||||
#define CARTE_WORKMAN \
|
||||
carte_de_map(" qdrwb jfup;", \
|
||||
" ashtg yneio", \
|
||||
" zxmcv kl,./")
|
||||
|
||||
#define ___WORKMAN___ \
|
||||
LANG_MAP(_Q, _D, _R, _W, _B, _J, _F, _U, _P, _SCLN, \
|
||||
_A, _S, _H, _T, _G, _Y, _N, _E, _O, _I, \
|
||||
_Z, _X, _M, _C, _V, _K, _L, TL_COMM, TL_DOT, TL_SLSH)
|
||||
|
||||
#define CARTE_NORMAN \
|
||||
carte_de_map(" qwdfk jurl;", \
|
||||
" asetg yniou", \
|
||||
" zxcvb pm,./")
|
||||
#define ___NORMAN___ \
|
||||
LANG_MAP(_Q, _W, _D, _F, _K, _J, _U, _R, _L, TL_SCLN, \
|
||||
_A, _S, _E, _T, _G, _Y, _N, _I, _O, _U, \
|
||||
_Z, _X, _C, _V, _B, _P, _M, TL_COMM, TL_DOT, TL_SLSH)
|
56
users/ericgebhart/base_layers/toprows.h
Normal file
56
users/ericgebhart/base_layers/toprows.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*******************************************************************/
|
||||
/** TOP ROWS Func,Symbols, Numbers you find there. **/
|
||||
/*******************************************************************/
|
||||
// ltkc language target keycode DV, BK, BKW, NONE
|
||||
// _1 = DV_1 or _1 = BP_DV_1 or KC_1
|
||||
#define ___10_NUMBERS___ \
|
||||
LANG_ROW(_1, _2, _3, _4, _5, _6, _7, _8, _9, _0)
|
||||
|
||||
/* 40123 76598 */
|
||||
#define ___10_NUMBERS_BEAKL15___ \
|
||||
LANG_ROW(_4, _0, _1, _2, _3, _7, _6, _5, _9, _8)
|
||||
|
||||
/* 32104 76598 */
|
||||
#define ___10_NUMBERS_BEAKL19___ \
|
||||
LANG_ROW(_3, _2, _1, _0, _4, _7, _6, _5, _9, _8)
|
||||
|
||||
// a top symbol row if someone wants it.
|
||||
#define ___10_SYMBOLS___ \
|
||||
LANG_ROW(_EXLM, _AT, _HASH, _DLR, _PERC, _CIRC, _AMPR, _ASTR, _LPRN, _RPRN)
|
||||
|
||||
// standard bepo top row
|
||||
#define ___10_SYMBOLS_BEPO___ \
|
||||
LANG_ROW(_DQUO, _LDAQ, _RDAQ, _LPRN, _RPRN, _AT, _PLUS, _MINS, _SLSH, _ASTR)
|
||||
|
||||
#define ___12_SYMBOLS_BEPO___ \
|
||||
LANG_ROW12(_DLR, _DQUO, _LDAQ, _RDAQ, _LPRN, _RPRN, \
|
||||
_AT, _PLUS, _MINS, _SLSH, _ASTR, _EQL)
|
||||
|
||||
// function key rows work for everyone.
|
||||
#define ___10_FUNCS___ \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
|
||||
|
||||
#define ___12_FUNCS___ ___10_FUNCS___, KC_F11, KC_F12
|
||||
|
||||
#define ___10_FUNCS_BEAKL15___ \
|
||||
KC_F4, KC_F10, KC_F1, KC_F2, KC_F3, \
|
||||
KC_F7, KC_F6, KC_F5, KC_F9, KC_F8
|
||||
|
||||
#define ___12_FUNCS_BEAKL15___ KC_F11, ___10_FUNCS_BEAKL15___, KC_F12
|
|
@ -1,81 +0,0 @@
|
|||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/caps-word
|
||||
|
||||
#include "caps_word.h"
|
||||
|
||||
bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
|
||||
static bool caps_word_enabled = false;
|
||||
static bool shifted = false;
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
const uint8_t mods = get_mods() | get_oneshot_mods();
|
||||
#else
|
||||
const uint8_t mods = get_mods();
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
|
||||
if (!caps_word_enabled) {
|
||||
// Pressing both shift keys at the same time enables caps word.
|
||||
if ((mods & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
|
||||
clear_mods();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
clear_oneshot_mods();
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
shifted = false;
|
||||
caps_word_enabled = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!record->event.pressed) { return true; }
|
||||
|
||||
if (!(mods & ~MOD_MASK_SHIFT)) {
|
||||
switch (keycode) {
|
||||
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
|
||||
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
||||
// Earlier return if this has not been considered tapped yet.
|
||||
if (record->tap.count == 0) { return true; }
|
||||
// Get the base tapping keycode of a mod- or layer-tap key.
|
||||
keycode &= 0xff;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
// Letter keys should be shifted.
|
||||
case KC_A ... KC_Z:
|
||||
if (!shifted) { register_code(KC_LSFT); }
|
||||
shifted = true;
|
||||
return true;
|
||||
|
||||
// Keycodes that continue caps word but shouldn't get shifted.
|
||||
case KC_1 ... KC_0:
|
||||
case KC_BSPC:
|
||||
case KC_MINS:
|
||||
case KC_UNDS:
|
||||
if (shifted) { unregister_code(KC_LSFT); }
|
||||
shifted = false;
|
||||
return true;
|
||||
|
||||
// Any other keycode disables caps word.
|
||||
}
|
||||
}
|
||||
|
||||
// Disable caps word.
|
||||
caps_word_enabled = false;
|
||||
if (shifted) { unregister_code(KC_LSFT); }
|
||||
shifted = false;
|
||||
return true;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// Caps Word, activated by pressing both shift keys at the same time.
|
||||
//
|
||||
// This library implements "Caps Word", which is like conventional Caps Lock,
|
||||
// but automatically disables itself at the end of the word. This is useful for
|
||||
// typing all-caps identifiers like `MOD_MASK_ALT`.
|
||||
//
|
||||
// Caps Word is activated by pressing the left and right shift keys at the same
|
||||
// time. This way you don't need a dedicated key for using Caps Word. I've
|
||||
// tested that this works as expected with one-shot mods and Space Cadet Shift.
|
||||
// If your shift keys are mod-taps, activate Caps Word by holding both shift
|
||||
// mod-tap keys until the tapping term, release them, then begin typing.
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/caps-word
|
||||
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
bool process_caps_word(uint16_t keycode, keyrecord_t* record);
|
|
@ -1,10 +0,0 @@
|
|||
// name result chord keys
|
||||
COMB(LNAV, TG(_NAV), SPC_TOPR, ENT_NAV)
|
||||
COMB(OSLSYM, OSL(_SYMB), ESC_TOPR, BSPC_SYMB)
|
||||
COMB(OSLSYMBP, OSL(_SYMB_BP), ESC_TOPR_BP, BSPC_SYMB_BP)
|
||||
COMB(LKEYPAD, TG(_KEYPAD), SPC_TOPR, BSPC_SYMB)
|
||||
COMB(LKEYPADBP, TG(_KEYPAD_BP), SPC_TOPR_BP, BSPC_SYMB_BP)
|
||||
COMB(LLAYERS, OSL(_LAYERS), KC_TAB, ENT_NAV)
|
||||
|
||||
//COMB(JKL_SPC, KC_SPC, KC_J, KC_X)
|
||||
//SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the given string.
|
275
users/ericgebhart/config.h
Executable file → Normal file
275
users/ericgebhart/config.h
Executable file → Normal file
|
@ -18,12 +18,11 @@
|
|||
#ifndef USERSPACE_CONFIG_H
|
||||
#define USERSPACE_CONFIG_H
|
||||
|
||||
#include "../../config.h"
|
||||
// pro-micro v3's don't always detect otherwise.
|
||||
/* #define SPLIT_USB_DETECT */
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#define COMBO_MUST_HOLD_MODS
|
||||
#define COMBO_HOLD_TERM 150
|
||||
// Sets good default for the speed of the mouse.
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#undef MOUSEKEY_DELAY
|
||||
|
@ -51,4 +50,274 @@
|
|||
#define TAPPING_TERM 200
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
|
||||
#define TAP_HOLD_TERM 200
|
||||
#define COMBO_MUST_HOLD_MODS
|
||||
#define COMBO_HOLD_TERM 150
|
||||
#define TAP_CODE_DELAY 5 // for send string with delay
|
||||
|
||||
// change the behavior of Mod taps for HRMs.
|
||||
// #define GLOBAL_QUICK_TAP
|
||||
|
||||
/* Control switches for my keymaps. */
|
||||
/* if needed, this goes in the keyboard's config.h */
|
||||
/* Alternately, fix the number row in the layout template. */
|
||||
/* #define BASE_NUMBER_ROW // turn on 4 row base templates. */
|
||||
|
||||
// Extensions, turn them on and off.
|
||||
#define USERSPACE_H "ericgebhart.h"
|
||||
|
||||
// Layout definitions, which language, thumb cluster, mod layer.
|
||||
// Columns in and out.
|
||||
|
||||
// the default. set it, use it, set it back.
|
||||
// US_INT // EN, BEPO, US_INT
|
||||
#define LANG_IS US_INT
|
||||
#define DEFAULT_LANG US_INT
|
||||
#define DEFAULT_LANG_NAME " us"
|
||||
|
||||
// Enable a second locale, for another set of layers.
|
||||
// This will add bepo versions of all layers chosen.
|
||||
/* #define SECOND_LOCALE BEPO */
|
||||
/* #define SECOND_LOCALE_NAME " bepo" */
|
||||
|
||||
// Choose a mod layer. Can be changed per layer.
|
||||
// TRNS, ALT, HRS_NAV HRM_GACS, HRM_SCAG, HRM_GASC, MIRYOKU_HRM_GASC
|
||||
#define MODS_ARE HRS_NAV
|
||||
#define DEFAULT_MODS MODS_ARE
|
||||
|
||||
// Choose a thumb cluster.
|
||||
// WI, WIa, DEFAULT, TEST, TRNS, MODS, LAYERS, MODS_LAYERS,
|
||||
// MIRYOKU, MIRYOKU_TR, MODS_LAYERS_NAV,
|
||||
// The following use THUMB_LETTER to place a letter on the Thumbs.
|
||||
// for use with the hands down metals, maltron, and rsthd.
|
||||
// HD, HDA, HD_SIMPLE, TH_LTR, HD_DASH,
|
||||
// MIRYOKU_TR_LTR, MIRYOKU_LTR
|
||||
#define THUMBS_ARE DEFAULT
|
||||
#define DEFAULT_THUMBS DEFAULT
|
||||
|
||||
// pick the edge key set. normie, no kc, smart locks or test.
|
||||
// NORM, NOKC, SML, TEST
|
||||
#define EDGE_KEY_SET_IS SML
|
||||
#define DEFAULT_EDGE_SET SML
|
||||
|
||||
// for the base layers which need a thumb cluster which takes a letter.
|
||||
#define HANDS_DOWN_LTR_THUMBS_ARE TH_LTR
|
||||
#define MALTRON_LTR_THUMBS_ARE TH_LTR
|
||||
#define RSTHD_LTR_THUMBS_ARE TH_LTR
|
||||
|
||||
// layout io, matrix size.
|
||||
// a reasonable default for most keyboards.
|
||||
// give a 3x10 and get a 3x12, managed in keyboards/keyboards.h
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
|
||||
// OLED STUFF.
|
||||
#define OLED_CUSTOM_ENABLE // custom oled here.
|
||||
//#define OLED_LOGO_ENABLE // turn on/off the logo.
|
||||
#define KEYLOGGER_ENABLE // 1500 bytes, track and print keypress info to oled.
|
||||
//#define SPLIT_LAYER_STATE_ENABLE // to sync state between sides.
|
||||
|
||||
// EXTENSIONS
|
||||
|
||||
// Combos
|
||||
#define COMBO_REF_LAYER_ENABLE
|
||||
// #define COMBO_REF_LAYER_TWO_ENABLE
|
||||
// works if you know the number of your layer.
|
||||
// otherwise set and use them later.
|
||||
// #define COMBO_ONLY_FROM_LAYER 2
|
||||
// #define COMBO_REF_DEFAULT 2
|
||||
|
||||
|
||||
// Console key logging for creation of heatmaps, etc.
|
||||
// CONSOLE must be enabled for this to work.
|
||||
// To create Precondition's heat maps, from console key logging
|
||||
// with hid_listen or qmk console
|
||||
//#define CONSOLE_KEY_LOGGER_ENABLE // turn on keylogging for heat maps.
|
||||
|
||||
#define ALT_LOCAL_ENABLE // alternate key combinations, with mods as needed.
|
||||
#define ACCENTED_KEYS_ENABLE // direct access to altgr keys.
|
||||
|
||||
#define SMART_LOCK_ENABLE // smart lock layers and mods.
|
||||
//#define MOD_LOCK_ENABLE // smart lock mods, similar/overlapping with Smart lock.
|
||||
#define NSHOT_ENABLE // smart n-shot for count.
|
||||
//#define ONESHOT_MOD_ENABLE // oneshot mods, similar/overlapping with nshots
|
||||
|
||||
#define TAP_HOLD_ENABLE // tap for one thing, hold for tapping term to get another.
|
||||
//#define SWAPPER_ENABLE // enable swapper keys.
|
||||
#define NOT_DEAD_ENABLE // make undead versions (US_DQUO_ND) of dead keys.
|
||||
//#define ALT_SHIFT_ENABLE // alternate shift behaviors for existing keys.
|
||||
//#define SEND_STRING_ENABLE // Turn on send string keys
|
||||
//#define SEND_UNICODE_ENABLE // Unicode must be enabled for this to work.
|
||||
|
||||
|
||||
// Turn on the base layers do not exceed 4 if doing two locales.
|
||||
// That will likely push a layer past 15 and then it will
|
||||
// no longer work with the LT macro.
|
||||
|
||||
// dvorak and relatives
|
||||
#define DVORAK_LAYER_ENABLE
|
||||
//#define DVORAK_RLC_IU_LAYER_ENABLE
|
||||
//#define CAPEWELL_DVORAK_LAYER_ENABLE
|
||||
//#define AHEI_LAYER_ENABLE
|
||||
//#define BOO_LAYER_ENABLE
|
||||
|
||||
// qwerty and derivitives
|
||||
//#define QWERTY_LAYER_ENABLE
|
||||
//#define AZERTY_LAYER_ENABLE
|
||||
//#define WORKMAN_LAYER_ENABLE
|
||||
//#define NORMAN_LAYER_ENABLE
|
||||
|
||||
// COLEMAK and relatives
|
||||
//#define COLEMAK_LAYER_ENABLE
|
||||
//#define COLEMAK_DH_LAYER_ENABLE
|
||||
//#define HALMAK_LAYER_ENABLE
|
||||
//#define MINIMAK_LAYER_ENABLE
|
||||
//#define MINIMAK_8_LAYER_ENABLE
|
||||
//#define MINIMAK_12_LAYER_ENABLE
|
||||
|
||||
// BEAKL
|
||||
// #define BEAKL15_LAYER_ENABLE
|
||||
//#define BEAKL19_LAYER_ENABLE
|
||||
//#define BEAKL27_LAYER_ENABLE
|
||||
//#define BEAKLWI_LAYER_ENABLE
|
||||
|
||||
// carpalx layouts
|
||||
//#define CARPALX_QFMLWY_LAYER_ENABLE
|
||||
//#define CARPALX_QGMLWB_LAYER_ENABLE
|
||||
//#define CARPALX_QGMLWY_LAYER_ENABLE
|
||||
|
||||
// alternate layouts
|
||||
//#define MALTRON_LAYER_ENABLE
|
||||
//#define EUCALYN_LAYER_ENABLE
|
||||
//#define HANDS_UP_LAYER_ENABLE
|
||||
//#define RSTHD_LAYER_ENABLE
|
||||
//#define HANDS_UP_LAYER_ENABLE
|
||||
//#define WHITE_LAYER_ENABLE
|
||||
//#define ISRT_LAYER_ENABLE
|
||||
//#define SOUL_LAYER_ENABLE
|
||||
//#define NIRO_LAYER_ENABLE
|
||||
//#define ASSET_LAYER_ENABLE
|
||||
//#define WHORF_LAYER_ENABLE
|
||||
//#define WHORF6_LAYER_ENABLE
|
||||
|
||||
// mtgap and relatives
|
||||
//#define MTGAP_LAYER_ENABLE
|
||||
//#define CTGAP_LAYER_ENABLE
|
||||
//#define APT_LAYER_ENABLE
|
||||
//#define CANARY_LAYER_ENABLE
|
||||
|
||||
// Hands down
|
||||
#define HD_NEU_NARROW_LAYER_ENABLE
|
||||
//#define HD_REF_LAYER_ENABLE
|
||||
//#define HD_DASH_LAYER_ENABLE
|
||||
//#define HD_ELAN_LAYER_ENABLE
|
||||
//#define HD_BRONZE_LAYER_ENABLE
|
||||
//#define HD_SILVER_LAYER_ENABLE
|
||||
//#define HD_PLATINUM_LAYER_ENABLE
|
||||
//#define HD_GOLD_LAYER_ENABLE
|
||||
//#define HD_TITANIUM_LAYER_ENABLE
|
||||
|
||||
// A compact optimot for 3x10.
|
||||
// requires accent characters.
|
||||
//#define OPTIMOT_COMPACT_LAYER_ENABLE
|
||||
|
||||
// 3x12 sized base layers
|
||||
//--------------------------
|
||||
//#define HD_NEU_LAYER_ENABLE
|
||||
|
||||
// Optimized for french
|
||||
// All these have accent characters on base layer.
|
||||
// so these dont work for En, but do for US-international and Bepo.
|
||||
|
||||
//#define BEPO_LAYER_ENABLE
|
||||
//#define OPTIMOT_LAYER_ENABLE
|
||||
//#define BEAKL19bis_LAYER_ENABLE
|
||||
|
||||
|
||||
// enable transient function layers.
|
||||
#define SYMBOL_LAYER_ENABLE
|
||||
#define NAV_LAYER_ENABLE
|
||||
// #define MOUSE_LAYER_ENABLE
|
||||
#define TOPROWS_LAYER_ENABLE
|
||||
// #define LAYERS_LAYER_ENABLE - defunct. always on.
|
||||
#define KEYPAD_LAYER_ENABLE
|
||||
//#define ADJUST_LAYER_ENABLE
|
||||
//#define RGB_LAYER_ENABLE
|
||||
//#define MEDIA_LAYER_ENABLE
|
||||
//#define FUNC_LAYER_ENABLE
|
||||
|
||||
|
||||
// define alternate thumb definitions for the transient layers.
|
||||
#define MEDIA_LAYER_THUMBS MEDIA_THUMBS
|
||||
#define MOUSE_LAYER_THUMBS MOUSE_THUMBS
|
||||
#define NAV_LAYER_THUMBS TRNS_THUMBS
|
||||
#define KEYPAD_LAYER_THUMBS KEYPAD_THUMBS
|
||||
#define SYMB_LAYER_THUMBS SYMB_THUMBS
|
||||
#define TOPROWS_LAYER_THUMBS DEFAULT
|
||||
|
||||
// Extra character layers.
|
||||
// Bepo has dead keys (altgr) and accented keycodes
|
||||
// A layer of accented keys
|
||||
// #define ACCENTS_LAYER_ENABLE
|
||||
// A layer of dead keys
|
||||
// #define MORTE_LAYER_ENABLE
|
||||
// A layer of the most popular accented keys and dead keys
|
||||
#define ACCENTS_MORTE_LAYER_ENABLE
|
||||
|
||||
// Functional layer choices.
|
||||
/* configure the function layers. */
|
||||
/* They have to be turned on above. */
|
||||
/* Choose one of each as desired. */
|
||||
/* There are reasonable defaults */
|
||||
/* for each if nothing is defined. */
|
||||
|
||||
/* nav */
|
||||
//#define NAV_FULL // monolithic, two sided nav with mouse and arrows.
|
||||
#define NAV_FULL_LOCK_MODS // Replace left mouse buttons with lockmods.
|
||||
|
||||
// Just the non mouse bits, with lock mods, n-shot mods on the left.
|
||||
// if mousekeys enabled, adds a mouse layer accessible via smart lock.
|
||||
// #define NAV_NO_MOUSE
|
||||
// #define NAV_MIRYOKU
|
||||
// #define NAV_MOUSE_MIRYOKU
|
||||
|
||||
|
||||
/* keypads */
|
||||
// beakl keypads are usual, if not chosen, regular keypads will be used.
|
||||
// left side is the default.
|
||||
// Beakl, except for WI, is only on the left side.
|
||||
// Miryoku is on the left also.
|
||||
|
||||
//#define KEYPAD_RIGHT
|
||||
#define KEYPAD_BEAKL // beakl doesn't have a rightside, swap hands?
|
||||
//#define KEYPAD_MODS // give mods on the other side instead of funcs.
|
||||
//#define KEYPAD_BEAKL_WI // right side with hexpad on left.
|
||||
//#define KEYPAD_MIRYOKU // use the miryoku keypad
|
||||
// the default if nothing chosen,
|
||||
// is a functionpad on the left and normal keypad on the right.
|
||||
|
||||
// funcpad from miryoku
|
||||
// #define FUNCPAD_MIRYOKU
|
||||
|
||||
|
||||
/* symbols */
|
||||
// pick one of these or get the default.
|
||||
//#define SYMBOL_BEAKL // original - the default if nothing else.
|
||||
//#define SYMBOL_BEAKL_EXT // extended for non beakl base layers.
|
||||
//#define SYMBOL_BEAKL_EXT_VI // extended with vi keybinding in mind.
|
||||
#define SYMBOL_BEAKL_C // more alterations by frequency
|
||||
// #define SYMBOL_NEO // The symbol layer from the Neo layout.
|
||||
// #define SYMBOL_MIRYOKU // minimalist symbols after miryoku
|
||||
//#define SYMBOL_BEAKL_WI // original wi
|
||||
|
||||
|
||||
/* toprows. */
|
||||
// The default, if not defined, is a standard qwerty set of rows.
|
||||
// symbols, numbers, function keys. Numbers on the home row.
|
||||
|
||||
// #define TOPROWS_BKL_15_NUMS // center row with Beakl15 order. 40123 76598.
|
||||
// #define TOPROWS_BKL_19_NUMS // Beakl 19 order: 32104 76598
|
||||
#define TOPROWS_MOD // beakl 15 nums, oneshot and smart lock mods. no Fkeys.
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,280 +0,0 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
#include "process_keycode/process_tap_dance.h"
|
||||
#include "eeconfig.h"
|
||||
#include "keymap_bepo.h"
|
||||
#include "altlocal_keys.h"
|
||||
|
||||
//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */
|
||||
|
||||
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
enum userspace_custom_keycodes {
|
||||
// keep the keycodes using the send_key function close to SAFE_RANGE
|
||||
// so the array of keycodes remains a reasonbale size.
|
||||
DB_1 = SAFE_RANGE, // can always be here
|
||||
DB_2,
|
||||
DB_3,
|
||||
DB_4,
|
||||
DB_5,
|
||||
DB_6,
|
||||
DB_7,
|
||||
DB_8,
|
||||
DB_9,
|
||||
DB_0,
|
||||
DB_GRV,
|
||||
DB_SCOLON,
|
||||
DB_SLASH,
|
||||
DB_BACKSLASH,
|
||||
DB_EQL,
|
||||
DB_DOT,
|
||||
DB_COMM,
|
||||
DB_QUOT,
|
||||
DB_MINUS,
|
||||
DB_RPRN,
|
||||
DB_LPRN,
|
||||
DB_RBRC,
|
||||
DB_LBRC,
|
||||
// for symbols layer
|
||||
DB_HASH,
|
||||
DB_LCBR,
|
||||
DB_RCBR,
|
||||
DB_PIPE,
|
||||
DB_TILD,
|
||||
DB_CIRC,
|
||||
DB_LESS,
|
||||
DB_GRTR,
|
||||
// End of dvorak on bepo translation keys.
|
||||
// BEAKL on Qwerty..
|
||||
BQ_DOT,
|
||||
BQ_COMM,
|
||||
BQ_QUOT,
|
||||
// End of beakl on qwerty
|
||||
BB_DOT,
|
||||
BB_COMM,
|
||||
BB_QUOT,
|
||||
// End of beakl on Bepo
|
||||
|
||||
EPRM,
|
||||
VRSN,
|
||||
// Default keyboard layouts - Same order as enum.
|
||||
KC_DVORAK,
|
||||
KC_QWERTY,
|
||||
KC_COLEMAK,
|
||||
KC_BEAKL,
|
||||
// KC_WORKMAN,
|
||||
// KC_NORMAN,
|
||||
// KC_MALTRON,
|
||||
// KC_EUCALYN,
|
||||
// KC_CARPLAX,
|
||||
KC_DVORAK_BP,
|
||||
KC_BEAKL_BP,
|
||||
KC_BEPO,
|
||||
KC_LAYERS,
|
||||
|
||||
// Misc.
|
||||
KC_MAKE,
|
||||
KC_RESET,
|
||||
KC_RGB_T,
|
||||
RGB_IDL,
|
||||
KC_SECRET_1,
|
||||
KC_SECRET_2,
|
||||
KC_SECRET_3,
|
||||
KC_SECRET_4,
|
||||
KC_SECRET_5,
|
||||
KC_CCCV, // Ctrl-C V in one key.
|
||||
BP_CCCV,
|
||||
KC_CTCN, // Ctrl-T N in one key.
|
||||
BP_CTCN,
|
||||
KC_CWCQ, // Ctrl-W Q in one key.
|
||||
BP_CWCQ,
|
||||
KC_XM_PORD, // Xmonad gui-e, gui-t for the scratchpads or desktops.
|
||||
BP_XM_PORD,
|
||||
KC_OCPRN, // Open, or open and close, cursor in the middle with hold.
|
||||
BP_OCPRN,
|
||||
KC_OCBRC,
|
||||
BP_OCBRC,
|
||||
KC_OCCBR,
|
||||
BP_OCCBR,
|
||||
KC_OCDQUO,
|
||||
BP_OCDQUO,
|
||||
KC_OCQUOT,
|
||||
BP_OCQUOT,
|
||||
KC_OCGRV,
|
||||
BP_OCGRV,
|
||||
KC_OCLTGT,
|
||||
BP_OCLTGT,
|
||||
UC_FLIP,
|
||||
UC_TABL,
|
||||
UC_SHRG,
|
||||
UC_DISA,
|
||||
KC_SPACETEST,
|
||||
NEW_SAFE_RANGE
|
||||
};
|
||||
|
||||
#define CTLGUI_T(kc) MT(MOD_LGUI | MOD_LCTL, kc)
|
||||
#define SFTGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc)
|
||||
#define ALTGUI_T(kc) MT(MOD_LGUI | MOD_LALT, kc)
|
||||
|
||||
#define ALT_ENT ALT_T(KC_ENT) // Alt or enter
|
||||
#define CTL_SPC CTL_T(KC_SPC) // ctrl or space
|
||||
#define CTL_BSPC CTL_T(KC_BSPC) // ctrl or backspace
|
||||
#define ALT_DEL ALT_T(KC_DEL) // Alt or delete
|
||||
#define GUI_ESC GUI_T(KC_ESC) // Gui or escape
|
||||
#define ALGR_SYMB ALGR_T(TG(_SYMB)) // Alt gre or toggle symbol layer
|
||||
|
||||
#define ENT_NAV LT(_NAV, KC_ENT)
|
||||
#define ENT_TOPR LT(_TOPROWS, KC_ENT)
|
||||
#define ENT_TOPR_BP LT(_TOPROWS_BP, KC_ENT)
|
||||
#define ESC_TOPR LT(_TOPROWS, KC_ESC)
|
||||
#define ESC_TOPR_BP LT(_TOPROWS_BP, KC_ESC)
|
||||
#define ESC_SYMB LT(_SYMB, KC_ESC)
|
||||
#define ESC_SYMB_BP LT(_SYMB_BP, KC_ESC)
|
||||
#define SPC_NAV LT(_NAV, KC_SPC)
|
||||
#define SPC_TOPR LT(_TOPROWS, KC_SPC)
|
||||
#define SPC_TOPR_BP LT(_TOPROWS_BP, KC_SPC)
|
||||
#define SPC_LAYR LT(_LAYERS, KC_SPC)
|
||||
#define SPC_LAYR_BP LT(_LAYERS, KC_SPC)
|
||||
#define SPC_ADJ LT(_ADJUST, KC_SPC)
|
||||
#define SPC_ADJ_BP LT(_ADJUST, KC_SPC)
|
||||
#define BSPC_SYMB LT(_SYMB, KC_BSPC)
|
||||
#define BSPC_SYMB_BP LT(_SYMB_BP, KC_BSPC)
|
||||
#define BSPC_TOPR LT(_TOPROWS, KC_BSPC)
|
||||
#define BSPC_TOPR_BP LT(_TOPROWS_BP, KC_BSPC)
|
||||
#define SPC_NUM LT(_KEYPAD, KC_SPC)
|
||||
#define SPC_NUM_BP LT(_KEYPAD_BP, KC_SPC)
|
||||
#define BSPC_NUM LT(_KEYPAD, KC_BSPC)
|
||||
#define BSPC_NUM_BP LT(_KEYPAD_BP, KC_BSPC)
|
||||
|
||||
// OSM keycodes, to keep things clean and easy to change
|
||||
#define KC_MLSF OSM(MOD_LSFT)
|
||||
#define KC_MRSF OSM(MOD_RSFT)
|
||||
#define OS_LGUI OSM(MOD_LGUI)
|
||||
#define OS_RGUI OSM(MOD_RGUI)
|
||||
#define OS_LSFT OSM(MOD_LSFT)
|
||||
#define OS_RSFT OSM(MOD_RSFT)
|
||||
#define OS_LCTL OSM(MOD_LCTL)
|
||||
#define OS_RCTL OSM(MOD_RCTL)
|
||||
#define OS_LALT OSM(MOD_LALT)
|
||||
#define OS_RALT OSM(MOD_RALT)
|
||||
#define ALT_APP ALT_T(KC_APP)
|
||||
|
||||
#define MG_NKRO MAGIC_TOGGLE_NKRO
|
||||
|
||||
#define UC_IRNY UC(0x2E2E)
|
||||
#define UC_CLUE UC(0x203D)
|
||||
|
||||
|
||||
//// TAP DANCE
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tdtap;
|
||||
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_HOLD = 4,
|
||||
DOUBLE_SINGLE_TAP = 5, //send two single taps
|
||||
TRIPLE_TAP = 6,
|
||||
TRIPLE_HOLD = 7
|
||||
};
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_ESC_CAPS = 0,
|
||||
TD_TAB_BKTAB = 1,
|
||||
TD_MDIA_SYMB = 2,
|
||||
TD_HOME_END = 3,
|
||||
TD_XMONAD_ESC = 4,
|
||||
TD_DEF_LAYER_SW = 5,
|
||||
TD_DEF_OS_LAYER_SW = 6,
|
||||
TD_MOUSE_BTNS = 7,
|
||||
TD_DVORAK_BEPO = 8,
|
||||
TD_UP_HOME = 9,
|
||||
TD_DOWN_END = 10,
|
||||
TD_RIGHT_TAB = 11,
|
||||
TD_LEFT_BACKTAB = 12
|
||||
};
|
||||
|
||||
|
||||
// Tap dance
|
||||
#define KC_BKTAB LSFT(KC_TAB)
|
||||
#define TAB_BKTAB TD(TD_TAB_BKTAB) // Tab or backtab tapdance.
|
||||
#define MDIA_SYMB_KP_LAYERS TD(TD_MDIA_SYMB) // MDIA, symb, keypad, layouts layer tapdance toggle.
|
||||
#define DEF_LAYER_SW TD(TD_DEF_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer
|
||||
#define DEF_OS_LAYER_SW TD(TD_DEF_OS_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer
|
||||
#define HOME_END TD(TD_HOME_END) // home or end tapdance.
|
||||
#define XMONAD_ESC TD(TD_XMONAD_ESC) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
|
||||
#define DVORAK_ET_BEPO TD(TD_DVORAK_BEPO) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
|
||||
#define TDMOUSE_BTNS TD(TD_MOUSE_BTNS) // hmmm. 1-5
|
||||
#define RIGHT_TAB TD(TD_RIGHT_TAB) // Bad idea these 4. Maybe with good timing...
|
||||
#define LEFT_BACKTAB TD(TD_LEFT_BACKTAB)
|
||||
#define UP_HOME TD(TD_UP_HOME)
|
||||
#define DOWN_END TD(TD_DOWN_END) // No! Down Down Not End....
|
||||
|
||||
// HOME ROW LAYER TOGGLE (LT) and Shift.
|
||||
// both sides of the home row have "shift, ___, media , symb, ___" and "___, symb, media, ___, shift".
|
||||
// so pinky fingers are shift when held and the index and second fingers are symbol and
|
||||
// media layers when held.
|
||||
|
||||
// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators).
|
||||
// The KC_CCCV key takes care of the last two...
|
||||
#define MK_CUT LSFT(KC_DEL) // shift + delete
|
||||
#define MK_COPY LCTL(KC_INS) // ctrl + insert
|
||||
#define MK_PASTE LSFT(KC_INS) // shift + insert
|
||||
|
||||
#undef ___ //kint defines it as KC_NO
|
||||
#define ___ KC_TRNS
|
||||
#define XXX KC_NO
|
||||
|
||||
// Blocking keys
|
||||
#define _X_ XXX
|
||||
#define ___X___ XXX
|
||||
#define ___X2___ XXX, XXX
|
||||
#define ___X3___ ___X2___, XXX
|
||||
#define ___X5___ ___X3___, XXX, XXX
|
||||
#define ___X6___ ___X5___, XXX
|
||||
#define ___X12___ ___X6___, ___X6___
|
||||
#define ___X15___ ___X5___, ___X5___, ___X5___
|
||||
|
||||
// Transparent keys
|
||||
#define ___2___ ___, ___
|
||||
#define ___3___ ___2___, ___
|
||||
#define ___4___ ___3___, ___
|
||||
#define ___5___ ___4___, ___
|
||||
#define ___6___ ___5___, ___
|
||||
#define ___12___ ___6___, ___6___
|
||||
#define ___14___ ___5___, ___4___, ___5___
|
||||
#define ___15___ ___5___, ___5___, ___5___
|
||||
#define ___16___ ___15___, ___
|
||||
|
||||
int on_qwerty(void);
|
||||
int get_xmonad_layer(void);
|
||||
|
||||
#ifdef TAP_DANCES_ENABLE
|
||||
int cur_dance (qk_tap_dance_state_t *state);
|
||||
|
||||
//for the x tap dance. Put it here so it can be used in any keymap
|
||||
void x_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||
void x_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
#endif
|
|
@ -1,345 +0,0 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "core_keys.h"
|
||||
/********************************************************************/
|
||||
/** The Core rows of each given layout. **/
|
||||
/********************************************************************/
|
||||
//Dvorak on a qwerty software layer in the OS
|
||||
#define ___DVORAK_L1___ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
||||
#define ___DVORAK_L2___ KC_A, KC_O, KC_E, KC_U, KC_I
|
||||
#define ___DVORAK_L3___ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
|
||||
|
||||
#define ___DVORAK_R1___ KC_F, KC_G, KC_C, KC_R, KC_L
|
||||
#define ___DVORAK_R2___ KC_D, KC_H, KC_T, KC_N, KC_S
|
||||
#define ___DVORAK_R3___ KC_B, KC_M, KC_W, KC_V, KC_Z
|
||||
|
||||
#define ___DVORAK___ ___DVORAK_L1___, ___DVORAK_R1___, \
|
||||
___DVORAK_L2___, ___DVORAK_R2___, \
|
||||
___DVORAK_L3___, ___DVORAK_R3___
|
||||
|
||||
/* BEAKL 15 (main layer): */
|
||||
/* 40123 76598 */
|
||||
/* qhoux gcrfz */
|
||||
/* - yiea. dstnb ; */
|
||||
/* j/,k' wmlpv */
|
||||
|
||||
// Remember the - and ; outside pinky keys.
|
||||
// Or use the 6 size.
|
||||
// Both are on the symbol layer too. So you
|
||||
// wont lose them at least.
|
||||
// BQ_COMM, BQ_QUOT, BQ_DOT - Beakl->Qwerty
|
||||
// BB_COMM, BB_QUOT, BB_DOT - Beakl->Bepo
|
||||
// take care of the different shifted chars.
|
||||
/* BEAKL 15 (shift layer): */
|
||||
/* QHOUX GCRFZ */
|
||||
/* - YIEA@ DSTNB ; */
|
||||
/* J?!K` WMLPV */
|
||||
#define ___BEAKL15_L1___ KC_Q, KC_H, KC_O, KC_U, KC_X
|
||||
#define ___BEAKL15_L2___ KC_Y, KC_I, KC_E, KC_A, BQ_DOT
|
||||
#define ___BEAKL15_L3___ KC_J, KC_SLASH, BQ_COMM, KC_K, BQ_QUOT
|
||||
|
||||
#define ___BEAKL15_R1___ KC_G, KC_C, KC_R, KC_F, KC_Z
|
||||
#define ___BEAKL15_R2___ KC_D, KC_S, KC_T, KC_N, KC_B
|
||||
#define ___BEAKL15_R3___ KC_W, KC_M, KC_L, KC_P, KC_V
|
||||
|
||||
#define ___BEAKL15___ ___BEAKL15_L1___, ___BEAKL15_R1___, \
|
||||
___BEAKL15_L2___, ___BEAKL15_R2___, \
|
||||
___BEAKL15_L3___, ___BEAKL15_R3___
|
||||
|
||||
#define ___6BEAKL15_L1___ ___, KC_Q, KC_H, KC_O, KC_U, KC_X
|
||||
#define ___6BEAKL15_L2___ KC_MINS, KC_Y, KC_I, KC_E, KC_A, BQ_DOT
|
||||
#define ___6BEAKL15_L3___ ___, KC_J, KC_SLASH, BQ_COMM, KC_K, BQ_QUOT
|
||||
|
||||
#define ___6BEAKL15_R1___ KC_G, KC_C, KC_R, KC_F, KC_Z, ___
|
||||
#define ___6BEAKL15_R2___ KC_D, KC_S, KC_T, KC_N, KC_B, KC_SCLN
|
||||
#define ___6BEAKL15_R3___ KC_W, KC_M, KC_L, KC_P, KC_V, ___
|
||||
|
||||
#define ___6BEAKL15___ ___6BEAKL15_L1___, ___6BEAKL15_R1___, \
|
||||
___6BEAKL15_L2___, ___6BEAKL15_R2___, \
|
||||
___6BEAKL15_L3___, ___6BEAKL15_R3___
|
||||
|
||||
// Qwerty based layers that I don't really use.
|
||||
#define ___QWERTY_L1___ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||
#define ___QWERTY_L2___ KC_A, KC_S, KC_D, KC_F, KC_G
|
||||
#define ___QWERTY_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||
|
||||
#define ___QWERTY_R1___ KC_Y, KC_U, KC_I, KC_O, KC_P
|
||||
#define ___QWERTY_R2___ KC_H, KC_J, KC_K, KC_L, KC_SCLN
|
||||
#define ___QWERTY_R3___ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||
|
||||
#define ___QWERTY___ ___QWERTY_L1___, ___QWERTY_R1___, \
|
||||
___QWERTY_L2___, ___QWERTY_R2___, \
|
||||
___QWERTY_L3___, ___QWERTY_R3___
|
||||
|
||||
// Qwerty based layers that I don't really use.
|
||||
|
||||
// COLEMAK
|
||||
#define ___COLEMAK_L1___ KC_Q, KC_W, KC_F, KC_P, KC_G
|
||||
#define ___COLEMAK_L2___ KC_A, KC_R, KC_S, KC_T, KC_D
|
||||
#define ___COLEMAK_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||
|
||||
#define ___COLEMAK_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
||||
#define ___COLEMAK_R2___ KC_H, KC_N, KC_E, KC_I, KC_O
|
||||
#define ___COLEMAK_R3___ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||
|
||||
#define ___COLEMAK___ ___COLEMAK_L1___, ___COLEMAK_R1___, \
|
||||
___COLEMAK_L2___, ___COLEMAK_R2___, \
|
||||
___COLEMAK_L3___, ___COLEMAK_R3___
|
||||
|
||||
// COLEMAK-DH
|
||||
#define ___COLEMAK_DH_L1___ KC_Q, KC_W, KC_F, KC_P, KC_B
|
||||
#define ___COLEMAK_DH_L2___ KC_A, KC_R, KC_S, KC_T, KC_G
|
||||
#define ___COLEMAK_DH_L3___ KC_Z, KC_X, KC_C, KC_D, KC_V
|
||||
|
||||
#define ___COLEMAK_DH_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
||||
#define ___COLEMAK_DH_R2___ KC_M, KC_N, KC_E, KC_I, KC_O
|
||||
#define ___COLEMAK_DH_R3___ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
|
||||
|
||||
#define ___COLEMAK_DH___ ___COLEMAK_DH_L1___, ___COLEMAK_DH_R1___, \
|
||||
___COLEMAK_DH_L2___, ___COLEMAK_DH_R2___, \
|
||||
___COLEMAK_DH_L3___, ___COLEMAK_DH_R3___
|
||||
|
||||
|
||||
// WORKMAN
|
||||
#define ___WORKMAN_L1___ KC_Q, KC_D, KC_R, KC_W, KC_B
|
||||
#define ___WORKMAN_L2___ KC_A, KC_S, KC_H, KC_T, KC_G
|
||||
#define ___WORKMAN_L3___ KC_Z, KC_X, KC_M, KC_C, KC_V
|
||||
|
||||
#define ___WORKMAN_R1___ KC_J, KC_F, KC_U, KC_P, KC_SCLN
|
||||
#define ___WORKMAN_R2___ KC_Y, KC_N, KC_E, KC_O, KC_I
|
||||
#define ___WORKMAN_R3___ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
|
||||
|
||||
#define ___WORKMAN___ ___WORKMAN_L1___, ___WORKMAN_R1___, \
|
||||
___WORKMAN_L2___, ___WORKMAN_R2___, \
|
||||
___WORKMAN_L3___, ___WORKMAN_R3___
|
||||
|
||||
|
||||
// NORMAN
|
||||
#define ___NORMAN_L1___ KC_Q, KC_W, KC_D, KC_F, KC_K
|
||||
#define ___NORMAN_L2___ KC_A, KC_S, KC_E, KC_T, KC_G
|
||||
#define ___NORMAN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||
|
||||
#define ___NORMAN_R1___ KC_J, KC_U, KC_R, KC_L, KC_SCLN
|
||||
#define ___NORMAN_R2___ KC_Y, KC_N, KC_I, KC_O, KC_U
|
||||
#define ___NORMAN_R3___ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||
|
||||
#define ___NORMAN___ ___NORMAN_L1___, ___NORMAN_R1___, \
|
||||
___NORMAN_L2___, ___NORMAN_R2___, \
|
||||
___NORMAN_L3___, ___NORMAN_R3___
|
||||
|
||||
|
||||
#define ___MALTRON_L1___ KC_Q, KC_P, KC_Y, KC_C, KC_B
|
||||
#define ___MALTRON_L2___ KC_A, KC_N, KC_I, KC_S, KC_F
|
||||
#define ___MALTRON_L3___ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM
|
||||
|
||||
#define ___MALTRON_R1___ KC_V, KC_M, KC_U, KC_Z, KC_L
|
||||
#define ___MALTRON_R2___ KC_D, KC_T, KC_D, KC_O, KC_R
|
||||
#define ___MALTRON_R3___ KC_DOT, KC_W, KC_K, KC_MINS, KC_X
|
||||
|
||||
#define ___MALTRON___ ___MALTRON_L1___, ___MALTRON_R1___, \
|
||||
___MALTRON_L2___, ___MALTRON_R2___, \
|
||||
___MALTRON_L3___, ___MALTRON_R3___
|
||||
|
||||
|
||||
#define ___EUCALYN_L1___ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q
|
||||
#define ___EUCALYN_L2___ KC_A, KC_O, KC_E, KC_I, KC_U
|
||||
#define ___EUCALYN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_W
|
||||
|
||||
#define ___EUCALYN_R1___ KC_M, KC_R, KC_D, KC_Y, KC_P
|
||||
#define ___EUCALYN_R2___ KC_G, KC_T, KC_K, KC_S, KC_N
|
||||
#define ___EUCALYN_R3___ KC_B, KC_H, KC_J, KC_L, KC_SCLN
|
||||
|
||||
#define ___EUCALYN___ ___EUCALYN_L1___, ___EUCALYN_R1___, \
|
||||
___EUCALYN_L2___, ___EUCALYN_R2___, \
|
||||
___EUCALYN_L3___, ___EUCALYN_R3___
|
||||
|
||||
|
||||
#define ___CARPLAX_QFMLWY_L1___ KC_Q, KC_F, KC_M, KC_L, KC_W
|
||||
#define ___CARPLAX_QFMLWY_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||
#define ___CARPLAX_QFMLWY_L3___ KC_Z, KC_V, KC_G, KC_C, KC_X
|
||||
|
||||
#define ___CARPLAX_QFMLWY_R1___ KC_Y, KC_U, KC_O, KC_B, KC_J
|
||||
#define ___CARPLAX_QFMLWY_R2___ KC_I, KC_A, KC_E, KC_H, KC_SCLN
|
||||
#define ___CARPLAX_QFMLWY_R3___ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH
|
||||
|
||||
#define ___CARPLAX_QFMLWY___ ___CARPLAX_QFMLWY_L1___, ___CARPLAX_QFMLWY_R1___, \
|
||||
___CARPLAX_QFMLWY_L2___, ___CARPLAX_QFMLWY_R2___, \
|
||||
___CARPLAX_QFMLWY_L3___, ___CARPLAX_QFMLWY_R3___
|
||||
|
||||
|
||||
#define ___CARPLAX_QGMLWB_L1___ KC_Q, KC_G, KC_M, KC_L, KC_W
|
||||
#define ___CARPLAX_QGMLWB_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||
#define ___CARPLAX_QGMLWB_L3___ KC_Z, KC_X, KC_C, KC_F, KC_J
|
||||
|
||||
#define ___CARPLAX_QGMLWB_R1___ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
|
||||
#define ___CARPLAX_QGMLWB_R2___ KC_I, KC_A, KC_E, KC_O, KC_H
|
||||
#define ___CARPLAX_QGMLWB_R3___ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
|
||||
|
||||
#define ___CARPLAX_QGMLWB___ ___CARPLAX_QGMLWB_L1___, ___CARPLAX_QGMLWB_R1___, \
|
||||
___CARPLAX_QGMLWB_L2___, ___CARPLAX_QGMLWB_R2___, \
|
||||
___CARPLAX_QGMLWB_L3___, ___CARPLAX_QGMLWB_R3___
|
||||
|
||||
|
||||
#define ___CARPLAX_QGMLWY_L1___ KC_Q, KC_G, KC_M, KC_L, KC_W
|
||||
#define ___CARPLAX_QGMLWY_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||
#define ___CARPLAX_QGMLWY_L3___ KC_Z, KC_X, KC_C, KC_V, KC_J
|
||||
|
||||
#define ___CARPLAX_QGMLWY_R1___ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
|
||||
#define ___CARPLAX_QGMLWY_R2___ KC_I, KC_A, KC_E, KC_O, KC_H
|
||||
#define ___CARPLAX_QGMLWY_R3___ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
|
||||
|
||||
#define ___CARPLAX_QGMLWY___ ___CARPLAX_QGMLWY_L1___, ___CARPLAX_QGMLWY_R1___, \
|
||||
___CARPLAX_QGMLWY_L2___, ___CARPLAX_QGMLWY_R2___, \
|
||||
___CARPLAX_QGMLWY_L3___, ___CARPLAX_QGMLWY_R3___
|
||||
|
||||
|
||||
// BEPO Based Layouts.
|
||||
// Bepo, Dvorak and Beakl on fr-bepo software layer in the OS.
|
||||
// for dvorak and all the other qwerty like keyboards on bepo
|
||||
#define ___DVORAK_FR_L1___ DB_QUOT, DB_COMM, DB_DOT, BP_P, BP_Y
|
||||
#define ___DVORAK_FR_L2___ BP_A, BP_O, BP_E, BP_U, BP_I
|
||||
#define ___DVORAK_FR_L3___ DB_SCOLON, BP_Q, BP_J, BP_K, BP_X
|
||||
|
||||
#define ___DVORAK_FR_R1___ BP_F, BP_G, BP_C, BP_R, BP_L
|
||||
#define ___DVORAK_FR_R2___ BP_D, BP_H, BP_T, BP_N, BP_S
|
||||
#define ___DVORAK_FR_R3___ BP_B, BP_M, BP_W, BP_V, BP_Z
|
||||
|
||||
#define ___DVORAK_FR___ ___DVORAK_FR_L1___, ___DVORAK_FR_R1___, \
|
||||
___DVORAK_FR_L2___, ___DVORAK_FR_R2___, \
|
||||
___DVORAK_FR_L3___, ___DVORAK_FR_R3___
|
||||
|
||||
/* BEAKL 15 (main layer): */
|
||||
|
||||
#define ___DVORAK6_FR_L1___ DB_GRV, ___DVORAK_FR_L1___
|
||||
#define ___DVORAK6_FR_L2___ TAB_BKTAB, ___DVORAK_FR_L2___
|
||||
#define ___DVORAK6_FR_L3___ ___, ___DVORAK_FR_L3___
|
||||
|
||||
#define ___DVORAK6_FR_R1___ ___DVORAK_FR_R1___, BP_MIN
|
||||
#define ___DVORAK6_FR_R2___ ___DVORAK_FR_R2___, BP_SLSH
|
||||
#define ___DVORAK6_FR_R3___ ___DVORAK_FR_R3___, DB_BACKSLASH
|
||||
|
||||
#define ___6DVORAK_FR___ ___6DVORAK_FR_L1___, ___6DVORAK_FR_R1___, \
|
||||
___6DVORAK_FR_L2___, ___6DVORAK_FR_R2___, \
|
||||
___6DVORAK_FR_L3___, ___6DVORAK_FR_R3___
|
||||
|
||||
// dont forget ; and -. the 'a' home row is official placement.
|
||||
#define ___BEAKL15_FR_L1___ BP_Q, BP_H, BP_O, BP_U, BP_X
|
||||
#define ___BEAKL15_FR_L2___ BP_Y, BP_I, BP_E, BP_A, BB_DOT
|
||||
#define ___BEAKL15_FR_L2a___ BP_MIN, BP_Y, BP_I, BP_E, BP_A, BB_DOT
|
||||
#define ___BEAKL15_FR_L3___ BP_J, BP_SLSH, BB_COMM, BP_K, BB_QUOT
|
||||
|
||||
#define ___BEAKL15_FR_R1___ BP_G, BP_C, BP_R, BP_F, BP_Z
|
||||
#define ___BEAKL15_FR_R2___ BP_D, BP_S, BP_T, BP_N, BP_B
|
||||
#define ___BEAKL15_FR_R2a___ BP_D, BP_S, BP_T, BP_N, BP_B, DB_SCLN
|
||||
#define ___BEAKL15_FR_R3___ BP_W, BP_M, BP_L, BP_P, BP_V
|
||||
|
||||
#define ___6BEAKL15_FR___ ___, ___BEAKL15_FR_L1___, ___BEAKL15_FR_R1___, ___, \
|
||||
___BEAKL15_FR_L2a___, ___BEAKL15_FR_R2a___, \
|
||||
___, ___BEAKL15_FR_L3___, ___BEAKL15_FR_R3___, ___
|
||||
|
||||
#define ___BEAKL15_FR___ ___BEAKL15_FR_L1___, ___BEAKL15_FR_R1___, \
|
||||
___BEAKL15_FR_L2___, ___BEAKL15_FR_R2___, \
|
||||
___BEAKL15_FR_L3___, ___BEAKL15_FR_R3___
|
||||
|
||||
#define ___BEPO_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV
|
||||
#define ___BEPO_L2___ BP_A, BP_U, BP_I, BP_E, BP_COMM
|
||||
#define ___BEPO_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K
|
||||
|
||||
#define ___BEPO_R1___ /* BP_DCRC,*/ BP_V, BP_D, BP_L, BP_J, BP_Z
|
||||
#define ___BEPO_R2___ /* BP_C, */ BP_T, BP_S, BP_R, BP_N, BP_M //BP_CCED
|
||||
#define ___BEPO_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
|
||||
|
||||
// Bepo for a 3x6 split. CCED switched hands. :-( 'Altgr-c c' does the same.
|
||||
// W has to drop down to the bottom. Silly unbalanced layout.
|
||||
#define ___BEPO6_L1___ BP_CCED, ___BEPO_L1___
|
||||
#define ___BEPO6_L2___ TAB_BKTAB, ___BEPO_L2___
|
||||
#define ___BEPO6_L3___ BP_ECIR, ___BEPO_L3___
|
||||
|
||||
#define ___BEPO6_R1___ ___BEPO_R1___, BP_PERC
|
||||
#define ___BEPO6_R2___ ___BEPO_R2___, BP_C
|
||||
#define ___BEPO6_R3___ ___BEPO_R3___, BP_W
|
||||
|
||||
#define ___BEPO6___ ___BEPO6_L1___, ___BEPO6_R1___, \
|
||||
___BEPO6_L2___, ___BEPO6_R2___, \
|
||||
___BEPO6_L3___, ___BEPO6_R3___
|
||||
|
||||
#define ___BEPO___ ___BEPO_L1___, ___BEPO_R1___, \
|
||||
___BEPO_L2___, ___BEPO_R2___, \
|
||||
___BEPO_L3___, ___BEPO_R3___
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
/** TOP ROWS Func,Symbols, Numbers you find there. **/
|
||||
/*******************************************************************/
|
||||
// for everything on qwerty.
|
||||
#define ___NUMBER_L___ KC_1, KC_2, KC_3, KC_4, KC_5
|
||||
#define ___NUMBER_R___ KC_6, KC_7, KC_8, KC_9, KC_0
|
||||
|
||||
#define ___NUMBER_BEAKL15_L___ KC_4, KC_0, KC_1, KC_2, KC_3
|
||||
#define ___NUMBER_BEAKL15_R___ KC_7, KC_6, KC_5, KC_9, KC_8
|
||||
|
||||
// a top symbol row if someone wants it.
|
||||
#define ___SYMB_L___ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
|
||||
#define ___SYMB_R___ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
|
||||
|
||||
/// BEPO ////
|
||||
// For numbers on bepo. Bepo has numbers on shifted keys, the
|
||||
// reverse of many layouts.
|
||||
#define ___NUMBER_BEPO_L___ DB_1, DB_2, DB_3, DB_4, DB_5
|
||||
#define ___NUMBER_BEPO_R___ DB_6, DB_7, DB_8, DB_9, DB_0
|
||||
|
||||
// In case you want to try BEAKL 15 Numbers
|
||||
#define ___NUMBER_BEAKL15_BP_L___ DB_4, DB_0, DB_1, DB_2, DB_3
|
||||
#define ___NUMBER_BEAKL15_BP_R___ DB_7, DB_6, DB_5, DB_9, DB_8
|
||||
|
||||
// The top row. Bepo has symbols not numbers. Numbers are the shifted values.
|
||||
// There are actually 13 keys specified for bepo.
|
||||
#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
|
||||
#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
|
||||
|
||||
#define ___6SYMBOL_BEPO_L___ BP_DLR, ___SYMBOL_BEPO_L___
|
||||
#define ___6SYMBOL_BEPO_R___ ___SYMBOL_BEPO_R___, BP_EQL /* BP_PERC */
|
||||
|
||||
// a top qwerty style symbol row if someone wants it.
|
||||
#define ___SYMB_L_FR___ DB_EXLM, BP_AT, BP_HASH, BP_DLR, BP_PERC
|
||||
#define ___SYMB_R_FR___ DB_CIRC, BP_AMPR, BP_ASTR, BP_LPRN, BP_RPRN
|
||||
|
||||
|
||||
// function key rows, works for everyone.
|
||||
#define ___FUNC_L___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
|
||||
#define ___FUNC_R___ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
|
||||
|
||||
#define ___FUNC_1_6___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6
|
||||
#define ___FUNC_7_12___ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12
|
||||
|
||||
#define ___FUNC_BEAKL_L___ KC_F4, KC_F10, KC_F1, KC_F2, KC_F3
|
||||
#define ___FUNC_BEAKL_R___ KC_F7, KC_F6, KC_F5, KC_F9, KC_F8
|
||||
|
||||
#define ___12_FUNC_BEAKL___ KC_F11, ___FUNC_BEAKL_L___, ___FUNC_BEAKL_R___, KC_F12
|
||||
|
||||
// Altogether. Defines all the various top rows that
|
||||
// are present with all these layouts.
|
||||
// All together as blocks of 10
|
||||
#define ___NUMS___ ___NUMBER_L___, ___NUMBER_R___
|
||||
#define ___SYMS___ ___SYMB_L___, ___SYMB_R___
|
||||
#define ___BKLNUMS___ ___NUMBER_BEAKL15_L___, ___NUMBER_BEAKL15_R___
|
||||
#define ___NUMS_BP___ ___NUMBER_BEPO_L___, ___NUMBER_BEPO_R___
|
||||
#define ___SYMS_BEPO___ ___SYMBOL_BEPO_L___, ___SYMBOL_BEPO_L___
|
||||
#define ___BKLNUMS_BP___ ___NUMBER_BEAKL15_BP_L___, ___NUMBER_BEAKL15_BP_R___
|
||||
#define ___FUNCS_1_10___ ___FUNC_L___, ___FUNC_R___
|
101
users/ericgebhart/defs/accented_keys.def
Normal file
101
users/ericgebhart/defs/accented_keys.def
Normal file
|
@ -0,0 +1,101 @@
|
|||
// Accented keys.
|
||||
// add them to the custom keys enum.
|
||||
// List them here, with their keycode and the accent keycode
|
||||
// that are needed to create them.
|
||||
|
||||
|
||||
// Last, most frequent letters in french.
|
||||
// é is further up.
|
||||
// 24 x 3 588 990 0.38%
|
||||
// 25 j 3 276 064 0.34%
|
||||
// 26 è 2 969 466 0.31%
|
||||
// 27 à 2 966 029 0.31%
|
||||
// 28 k 2 747 547 0.29%
|
||||
// 29 w 1 653 435 0.17%
|
||||
// 30 z 1 433 913 0.15%
|
||||
// 31 ê 802 211 0.08%
|
||||
// 32 ç 544 509 0.06%
|
||||
// 33 ô 357 197 0.04%
|
||||
// 34 â 320 837 0.03%
|
||||
// 35 î 280 201 0.03%
|
||||
// 36 û 164 516 0.02%
|
||||
// 37 ù 151 236 0.02%
|
||||
// 38 ï 138 221 0.01%
|
||||
// 39 á 73 751 0.01% - absent.
|
||||
// 79 ü 55 172 0.01%
|
||||
// 82 ë 53 862 0.01%
|
||||
//absent.
|
||||
// 83 ö 51 020 0.01%
|
||||
// 84 í 48 391 0.01%
|
||||
|
||||
// ACCENT
|
||||
// Custom key code, Keycode, altgr accent keycode.
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO)
|
||||
ACCENTED(BP_OCIR, BP_O, BP_DCIR)
|
||||
ACCENTED(BP_ACIR, BP_A, BP_DCIR)
|
||||
ACCENTED(BP_ICIR, BP_I, BP_DCIR)
|
||||
ACCENTED(BP_UCIR, BP_U, BP_DCIR)
|
||||
//ACCENTED(BP_CCIR, BP_C, BP_DCIR)
|
||||
//ACCENTED(BP_GCIR, BP_G, BP_DCIR)
|
||||
//ACCENTED(BP_HCIR, BP_H, BP_DCIR)
|
||||
#endif
|
||||
|
||||
ACCENTED(US_OCIR, US_O, US_DCIR)
|
||||
ACCENTED(US_ACIR, US_A, US_DCIR)
|
||||
ACCENTED(US_ICIR, US_I, US_DCIR)
|
||||
ACCENTED(US_UCIR, US_U, US_DCIR)
|
||||
ACCENTED(US_ECIR, US_E, US_DCIR)
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO)
|
||||
ACCENTED(BP_AACU, BP_A, BP_ACUT)
|
||||
ACCENTED(BP_OACU, BP_O, BP_ACUT)
|
||||
ACCENTED(BP_IACU, BP_I, BP_ACUT)
|
||||
ACCENTED(BP_UACU, BP_U, BP_ACUT)
|
||||
|
||||
//ACCENTED(BP_OGRV, BP_O, BP_DGRV)
|
||||
ACCENTED(BP_IGRV, BP_I, BP_DGRV)
|
||||
#endif
|
||||
|
||||
ACCENTED(US_IGRV, US_I, US_DGRV)
|
||||
ACCENTED(US_UGRV, US_U, US_DGRV)
|
||||
ACCENTED(US_EGRV, US_E, US_DGRV)
|
||||
ACCENTED(US_AGRV, US_A, US_DGRV)
|
||||
|
||||
// ACCENTED(BP_NTIL, BP_N, BP_DTIL)
|
||||
// ACCENTED(BP_ATIL, BP_A, BP_DTIL)
|
||||
// ACCENTED(BP_OTIL, BP_O, BP_DTIL)
|
||||
// ACCENTED(BP_UTIL, BP_U, BP_DTIL)
|
||||
|
||||
ACCENTED(US_IIAE, US_I, US_DIAE)
|
||||
ACCENTED(US_UIAE, US_U, US_DIAE)
|
||||
ACCENTED(US_EIAE, US_E, US_DIAE)
|
||||
ACCENTED(US_OIAE, US_O, US_DIAE)
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO)
|
||||
ACCENTED(BP_IIAE, BP_I, BP_DIAE)
|
||||
ACCENTED(BP_UIAE, BP_U, BP_DIAE)
|
||||
ACCENTED(BP_EIAE, BP_E, BP_DIAE)
|
||||
ACCENTED(BP_OIAE, BP_O, BP_DIAE)
|
||||
// ACCENTED(BP_AIAE, BP_A, BP_DIAE)
|
||||
#endif
|
||||
|
||||
// ACCENTED(E_ACUTE, SK_E, SK_ACUT)
|
||||
// ACCENTED(R_ACUTE, SK_R, SK_ACUT)
|
||||
// ACCENTED(U_ACUTE, SK_U, SK_ACUT)
|
||||
// ACCENTED(I_ACUTE, SK_I, SK_ACUT)
|
||||
// ACCENTED(O_ACUTE, SK_O, SK_ACUT)
|
||||
// ACCENTED(A_ACUTE, SK_A, SK_ACUT)
|
||||
// ACCENTED(L_ACUTE, SK_L, SK_ACUT)
|
||||
// ACCENTED(Y_ACUTE, SK_Z, SK_ACUT)
|
||||
// ACCENTED(T_CARON, SK_T, SK_CARN)
|
||||
// ACCENTED(Z_CARON, SK_Y, SK_CARN)
|
||||
// ACCENTED(O_CARON, SK_O, SK_CARN)
|
||||
// ACCENTED(S_CARON, SK_S, SK_CARN)
|
||||
// ACCENTED(D_CARON, SK_D, SK_CARN)
|
||||
// ACCENTED(L_CARON, SK_L, SK_CARN)
|
||||
// ACCENTED(C_CARON, SK_C, SK_CARN)
|
||||
// ACCENTED(N_CARON, SK_N, SK_CARN)
|
||||
// ACCENTED(U_UMLAU, SK_U, SK_DIAE
|
||||
// ACCENTED(O_UMLAU,SK_O, SK_DIAE)
|
||||
// // napis o s vokanom cez vokan rather than normalne aby sa dalo velke uo
|
||||
// ACCENTED(O_CCIRC, SK_O, SK_CIRC)
|
6
users/ericgebhart/defs/alt_shift.def
Normal file
6
users/ericgebhart/defs/alt_shift.def
Normal file
|
@ -0,0 +1,6 @@
|
|||
// alt shift. Give an existing key code,
|
||||
// and maybe an alternate shift keycode.
|
||||
|
||||
ALT_SHIFT(US_EXLM, US_PERC)
|
||||
SHIFT_FOR_2(US_AT)
|
||||
SHIFT_FOR_3(US_DLR)
|
208
users/ericgebhart/defs/altlocal_keys.def
Normal file
208
users/ericgebhart/defs/altlocal_keys.def
Normal file
|
@ -0,0 +1,208 @@
|
|||
// These are to create keys which don't exist in a locale.
|
||||
// so that we can create alternate maps to qwerty, azerty, or whatever.
|
||||
// Key name,
|
||||
// unshifted key and it's required mods.
|
||||
// the desired shifted keys and it's required mods.
|
||||
|
||||
// for dvorak on bepo
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO)
|
||||
MK_KEY(BP_DV_1, BP_DQUO, MOD_LSFT, BP_DCIR, MOD_LSFT)
|
||||
MK_KEY(BP_DV_2, BP_LDAQ, MOD_LSFT, BP_AT, MOD_NONE)
|
||||
MK_KEY(BP_DV_3, BP_RDAQ, MOD_LSFT, BP_DLR, MOD_LSFT)
|
||||
MK_KEY(BP_DV_4, BP_LPRN, MOD_LSFT, BP_DLR, MOD_NONE)
|
||||
MK_KEY(BP_DV_5, BP_RPRN, MOD_LSFT, BP_PERC, MOD_NONE)
|
||||
MK_KEY(BP_DV_6, BP_AT, MOD_LSFT, BP_AT, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_7, BP_PLUS, MOD_LSFT, BP_P, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_8, BP_MINS, MOD_LSFT, BP_ASTR, MOD_NONE)
|
||||
MK_KEY(BP_DV_9, BP_SLSH, MOD_LSFT, BP_LPRN, MOD_NONE)
|
||||
MK_KEY(BP_DV_0, BP_ASTR, MOD_LSFT, BP_RPRN, MOD_NONE)
|
||||
|
||||
MK_KEY(BP_DV_GRV, BP_PERC, MOD_LSFT, BP_K, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_SCLN, BP_COMM, MOD_LSFT, BP_DOT, MOD_LSFT)
|
||||
MK_KEY(BP_DV_SLSH, BP_SLSH, MOD_NONE, BP_QUOT, MOD_LSFT)
|
||||
//MK_KEY(BP_DV_BSLS, BP_AGRV, MOD_BIT(KC_RALT), BP_B, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_EQL, BP_EQL, MOD_NONE, BP_PLUS, MOD_NONE)
|
||||
MK_KEY(BP_DV_COMM, BP_COMM, MOD_NONE, BP_LDAQ, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_DOT, BP_DOT, MOD_NONE, BP_RDAQ, MOD_BIT(KC_RALT))
|
||||
MK_KEY(BP_DV_QUOT, BP_QUOT, MOD_NONE, BP_DQUO, MOD_NONE)
|
||||
MK_KEY(BP_DV_MINS, BP_MINS, MOD_NONE, KC_SPC, MOD_BIT(KC_RALT))
|
||||
#endif
|
||||
|
||||
#if defined(BEAKL15_LAYER_ENABLE) || defined(BEAKL19_LAYER_ENABLE)
|
||||
// Keys for BEAKL 15, 19 on Qwerty
|
||||
MK_KEY(KC_BK_DOT, KC_DOT, MOD_NONE, KC_2, MOD_LSFT)
|
||||
MK_KEY(KC_BK_COMM, KC_COMM, MOD_NONE, KC_1, MOD_LSFT)
|
||||
MK_KEY(KC_BK_QUOT, KC_QUOT, MOD_NONE, KC_GRV, MOD_NONE)
|
||||
|
||||
MK_KEY(US_BK_DOT, KC_DOT, MOD_NONE, KC_2, MOD_LSFT)
|
||||
MK_KEY(US_BK_COMM, KC_COMM, MOD_NONE, KC_1, MOD_LSFT)
|
||||
MK_KEY(US_BK_QUOT, KC_QUOT, MOD_NONE, KC_GRV, MOD_NONE)
|
||||
|
||||
// Keys for BEAKL WI on Qwerty
|
||||
MK_KEY(KC_BKW_DOT, KC_DOT, MOD_NONE, KC_GRV, MOD_NONE)
|
||||
MK_KEY(KC_BKW_COMM, KC_COMM, MOD_NONE, KC_TILD, MOD_NONE)
|
||||
MK_KEY(KC_BKW_COLN, KC_SCLN, MOD_LSFT, KC_SCLN, MOD_NONE)
|
||||
|
||||
# if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
// Keys for BEAKL on BEPO
|
||||
MK_KEY(BP_BK_DOT, BP_DOT, MOD_NONE, BP_AT, MOD_NONE)
|
||||
MK_KEY(BP_BK_COMM, BP_COMM, MOD_NONE, BP_EXLM, MOD_NONE)
|
||||
MK_KEY(BP_BK_QUOT, BP_QUOT, MOD_NONE, BP_PERC, MOD_LSFT)
|
||||
|
||||
|
||||
# ifdef BEAKLWI_LAYER_ENABLE
|
||||
// Keys for BEAKL WI on BEPO
|
||||
MK_KEY(BP_BKW_DOT, BP_DOT, MOD_NONE, BP_GRV, MOD_NONE)
|
||||
MK_KEY(BP_BKW_COMM, BP_COMM, MOD_NONE, BP_TILD, MOD_NONE)
|
||||
MK_KEY(BP_BKW_COLN, BP_COLN, MOD_LSFT, BP_SCLN, MOD_NONE)
|
||||
# endif
|
||||
|
||||
// Keys for BEAKL 27 on BEPO
|
||||
# ifdef BEAKL27_LAYER_ENABLE
|
||||
MK_KEY(BP_BK2_DOT, BP_DOT, MOD_NONE, BP_GRV, MOD_NONE)
|
||||
MK_KEY(BP_BK2_COMM, BP_COMM, MOD_NONE, BP_QUES, MOD_NONE)
|
||||
MK_KEY(BP_BK2_EXLM, BP_EXLM, MOD_NONE, BP_PERC, MOD_LSFT)
|
||||
MK_KEY(BP_BK2_QUOT, BP_QUOT, MOD_NONE, BP_QUOT, MOD_NONE)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BEAKL27_LAYER_ENABLE
|
||||
// Keys for BEAKL 27 on Qwerty
|
||||
/* // altered shifted pairs: dot = .` comma = ,? dquot = "! */
|
||||
MK_KEY(KC_BK2_DOT, KC_DOT, MOD_NONE, KC_GRV, MOD_NONE)
|
||||
MK_KEY(KC_BK2_COMM, KC_COMM, MOD_NONE, KC_QUES, MOD_NONE)
|
||||
MK_KEY(KC_BK2_EXLM, KC_EXLM, MOD_NONE, KC_DQUO, MOD_NONE)
|
||||
MK_KEY(KC_BK2_QUOT, KC_QUOT, MOD_NONE, KC_QUOT, MOD_NONE)
|
||||
|
||||
MK_KEY(US_BK2_DOT, US_DOT, MOD_NONE, US_GRV, MOD_NONE)
|
||||
MK_KEY(US_BK2_COMM, US_COMM, MOD_NONE, US_QUES, MOD_NONE)
|
||||
MK_KEY(US_BK2_EXLM, US_EXLM, MOD_NONE, US_DQUO, MOD_NONE)
|
||||
MK_KEY(US_BK2_QUOT, US_QUOT, MOD_NONE, US_QUOT, MOD_NONE)
|
||||
#endif
|
||||
|
||||
|
||||
// shifted pairs: dot = .` comma = ,~ colon = :;
|
||||
|
||||
#if defined(HD_NEU_LAYER_ENABLE) || \
|
||||
defined(HD_NEU_NARROW_LAYER_ENABLE) || \
|
||||
defined(HD_GOLD_LAYER_ENABLE) || \
|
||||
defined(HD_SILVER_LAYER_ENABLE) || \
|
||||
defined(HD_BRONZE_LAYER_ENABLE) || \
|
||||
defined(HD_PLATINUM_LAYER_ENABLE) || \
|
||||
defined(HD_REF_LAYER_ENABLE)
|
||||
|
||||
// hands down alterations.
|
||||
/* alt shifts ;: .& /\* '? "! ,| -+ */
|
||||
// for en qwerty
|
||||
MK_KEY(KC_HD_DQUO, KC_QUOT, MOD_LSFT, KC_1, MOD_LSFT) // "!
|
||||
MK_KEY(KC_HD_QUOT, KC_QUOT, MOD_NONE, KC_SLSH, MOD_LSFT) // '?
|
||||
|
||||
MK_KEY(KC_HD_DOT, KC_DOT, MOD_NONE, KC_7, MOD_LSFT) // .&
|
||||
MK_KEY(KC_HD_SCLN, KC_SCLN, MOD_NONE, KC_SCLN, MOD_LSFT) // ;:
|
||||
MK_KEY(KC_HD_COMM, KC_COMM, MOD_NONE, KC_BSLS, MOD_LSFT) // ,|
|
||||
MK_KEY(KC_HD_MINS, KC_MINS, MOD_NONE, KC_EQL, MOD_LSFT) // -+
|
||||
MK_KEY(KC_HD_SLSH, KC_SLSH, MOD_NONE, KC_8, MOD_LSFT) // /*
|
||||
|
||||
// for us international
|
||||
MK_KEY(US_HD_DQUO, US_QUOT, MOD_LSFT, US_1, MOD_LSFT)
|
||||
MK_KEY(US_HD_QUOT, US_QUOT, MOD_NONE, KC_SLSH, MOD_LSFT)
|
||||
|
||||
MK_KEY(US_HD_DOT, US_DOT, MOD_NONE, US_7, MOD_LSFT)
|
||||
MK_KEY(US_HD_SCLN, KC_SCLN, MOD_NONE, KC_SCLN, MOD_LSFT) // ;:
|
||||
MK_KEY(US_HD_COMM, US_COMM, MOD_NONE, US_BSLS, MOD_LSFT)
|
||||
MK_KEY(US_HD_MINS, US_MINS, MOD_NONE, US_EQL, MOD_LSFT)
|
||||
MK_KEY(US_HD_SLSH, US_SLSH, MOD_NONE, US_8, MOD_LSFT)
|
||||
|
||||
// for bepo
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
MK_KEY(BP_HD_DQUO, BP_DQUO, MOD_NONE, BP_QUES, MOD_NONE)
|
||||
MK_KEY(BP_HD_QUOT, BP_QUOT, MOD_NONE, BP_EXLM, MOD_NONE)
|
||||
MK_KEY(BP_HD_SCLN, BP_SCLN, MOD_NONE, BP_COLN, MOD_NONE) // ;:
|
||||
|
||||
MK_KEY(BP_HD_DOT, BP_DOT, MOD_NONE, BP_AMPR, MOD_NONE)
|
||||
MK_KEY(BP_HD_COMM, BP_COMM, MOD_NONE, BP_PIPE, MOD_NONE)
|
||||
MK_KEY(BP_HD_MINS, BP_MINS, MOD_NONE, BP_PLUS, MOD_NONE)
|
||||
MK_KEY(BP_HD_SLSH, BP_SLSH, MOD_NONE, BP_ASTR, MOD_NONE)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* alt shifts ;: .& /\* '? "! ,| -+ */
|
||||
#ifdef HD_DASH_LAYER_ENABLE
|
||||
// DASH and Elan have these reversed from the metals.
|
||||
/* //alt shift keys. "? '! */
|
||||
MK_KEY(KC_HD_D_DQUO, KC_DQUO, MOD_NONE, KC_SLSH, MOD_LSFT) // "?
|
||||
MK_KEY(KC_HD_D_QUOT, KC_QUOT, MOD_NONE, KC_1, MOD_LSFT) // '!
|
||||
|
||||
MK_KEY(KC_HD_D_DOT, KC_DOT, MOD_NONE, KC_7, MOD_LSFT) // .&
|
||||
MK_KEY(KC_HD_D_COMM, KC_COMM, MOD_NONE, KC_BSLS, MOD_LSFT) // ,|
|
||||
MK_KEY(KC_HD_D_MINS, KC_MINS, MOD_NONE, KC_EQL, MOD_LSFT) // -+
|
||||
MK_KEY(KC_HD_D_SLSH, KC_SLSH, MOD_NONE, KC_8, MOD_LSFT) // /*
|
||||
|
||||
// for us international
|
||||
MK_KEY(US_HD_D_DQUO, US_QUOT, MOD_LSFT, KC_SLSH, MOD_LSFT)
|
||||
MK_KEY(US_HD_D_QUOT, US_QUOT, MOD_NONE, US_1, MOD_LSFT)
|
||||
|
||||
MK_KEY(US_HD_D_DOT, US_DOT, MOD_NONE, US_7, MOD_LSFT)
|
||||
MK_KEY(US_HD_D_COMM, US_COMM, MOD_NONE, US_BSLS, MOD_LSFT)
|
||||
MK_KEY(US_HD_D_MINS, US_MINS, MOD_NONE, US_EQL, MOD_LSFT)
|
||||
MK_KEY(US_HD_D_SLSH, US_SLSH, MOD_NONE, US_8, MOD_LSFT)
|
||||
|
||||
// for bepo
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
MK_KEY(BP_HD_D_DQUO, BP_DQUO, MOD_NONE, BP_QUES, MOD_NONE)
|
||||
MK_KEY(BP_HD_D_QUOT, BP_QUOT, MOD_NONE, BP_EXLM, MOD_NONE)
|
||||
|
||||
MK_KEY(BP_HD_D_DOT, BP_DOT, MOD_NONE, BP_AMPR, MOD_NONE)
|
||||
MK_KEY(BP_HD_D_COMM, BP_COMM, MOD_NONE, BP_PIPE, MOD_NONE)
|
||||
MK_KEY(BP_HD_D_MINS, BP_MINS, MOD_NONE, BP_PLUS, MOD_NONE)
|
||||
MK_KEY(BP_HD_D_SLSH, BP_SLSH, MOD_NONE, BP_ASTR, MOD_NONE)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HD_ELAN_LAYER_ENABLE
|
||||
// Elan has alt shift of comma and dot on the thumb.
|
||||
// en
|
||||
MK_KEY(KC_HD_E_DQUO, KC_QUOT, MOD_LSFT, KC_SLSH, MOD_LSFT)
|
||||
MK_KEY(KC_HD_E_QUOT, KC_QUOT, MOD_NONE, KC_1, MOD_LSFT)
|
||||
// the rest is the same
|
||||
MK_KEY(KC_HD_E_MINS, KC_MINS, MOD_NONE, KC_EQL, MOD_LSFT) // -+
|
||||
MK_KEY(KC_HD_E_SLSH, KC_SLSH, MOD_NONE, KC_8, MOD_LSFT) // /*
|
||||
// until .: and ,;
|
||||
MK_KEY(KC_HD_E_DOT, KC_DOT, MOD_NONE, KC_SCLN, MOD_LSFT) // .:
|
||||
MK_SKEY(KC_HD_E_COMM, KC_COMM, KC_SCLN) // ,;
|
||||
/* (< {[ */
|
||||
MK_KEY(KC_HD_E_LPRN, KC_LPRN, MOD_NONE, KC_COMM, MOD_LSFT)
|
||||
MK_KEY(KC_HD_E_LCBR, KC_LCBR, MOD_NONE, KC_LBRC, MOD_NONE )
|
||||
|
||||
// US-intl
|
||||
MK_KEY(US_HD_E_DQUO, US_QUOT, MOD_LSFT, KC_SLSH, MOD_LSFT)
|
||||
MK_KEY(US_HD_E_QUOT, US_QUOT, MOD_NONE, US_1, MOD_LSFT)
|
||||
// the rest is the same
|
||||
MK_KEY(US_HD_E_MINS, US_MINS, MOD_NONE, US_EQL, MOD_LSFT) // -+
|
||||
MK_KEY(US_HD_E_SLSH, US_SLSH, MOD_NONE, US_8, MOD_LSFT) // /*
|
||||
// until .: and ,;
|
||||
MK_KEY(US_HD_E_DOT, KC_DOT, MOD_NONE, US_SCLN, MOD_LSFT) // .:
|
||||
MK_SKEY(US_HD_E_COMM, US_COMM, US_SCLN) // ,;
|
||||
/* (< {[ */
|
||||
MK_KEY(US_HD_E_LPRN, US_LPRN, MOD_NONE, US_COMM, MOD_LSFT)
|
||||
MK_KEY(US_HD_E_LCBR, US_LCBR, MOD_NONE, US_LBRC, MOD_NONE )
|
||||
|
||||
// bepo
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
MK_KEY(BP_HD_E_DQUO, BP_DQUO, MOD_NONE, BP_SLSH, MOD_NONE)
|
||||
MK_KEY(BP_HD_E_QUOT, BP_QUOT, MOD_NONE, BP_EXLM, MOD_NONE)
|
||||
// the rest is the same
|
||||
MK_KEY(BP_HD_E_MINS, BP_MINS, MOD_NONE, BP_EQL, MOD_NONE) // -+
|
||||
MK_KEY(BP_HD_E_SLSH, BP_SLSH, MOD_NONE, BP_ASTR, MOD_NONE) // /*
|
||||
// until .: and ,;
|
||||
MK_KEY(BP_HD_E_DOT, KC_DOT, MOD_NONE, BP_SCLN, MOD_LSFT) // .:
|
||||
MK_SKEY(BP_HD_E_COMM, BP_COMM, BP_SCLN) // ,;
|
||||
/* (< {[ */
|
||||
MK_KEY(BP_HD_E_LPRN, BP_LPRN, MOD_NONE, BP_COMM, MOD_LSFT)
|
||||
MK_KEY(BP_HD_E_LCBR, BP_LCBR, MOD_NONE, BP_LBRC, MOD_NONE )
|
||||
#endif
|
||||
#endif
|
139
users/ericgebhart/defs/combos.def
Normal file
139
users/ericgebhart/defs/combos.def
Normal file
|
@ -0,0 +1,139 @@
|
|||
// Per layer combo reference layers.
|
||||
// Default is current layer, or COMBO_REF_DEFAULT if set.
|
||||
// _COMBO_REF is the default if enabled.
|
||||
|
||||
//COMBO_REF_LAYER(_DVORAK_BP, _COMBO_REF2)
|
||||
COMBO_REF_LAYER(_NAV, _NAV)
|
||||
|
||||
|
||||
// COMBOS
|
||||
// name result chord keys
|
||||
|
||||
// sml nav, sml keypad, zqxj, onshot accents, oneshot symbols
|
||||
// home, end, caps word, accents? -> aeeecio oe, ao,
|
||||
|
||||
|
||||
// reference COMBO_REF
|
||||
COMB(TSCTL, TS_LCTL, CB_1L3, CB_1L4)
|
||||
COMB(SMLNAV1, SML_NAV, CB_1L2, CB_1L3)
|
||||
COMB(OSACCENTMT, SML_KEYPAD, CB_1L2, CB_1R4)
|
||||
|
||||
#ifdef TOPROWS_LAYER_ENABLE
|
||||
COMB(OSTOPROWS, SML_TOPROWS, CB_1L3, CB_1R3)
|
||||
#endif
|
||||
|
||||
//COMB(OSlsftT, OS_LSFT, CB_1L4, CB_1R2)
|
||||
COMB(OSSFT, OS_LSFT, CB_2L4, CB_2R2)
|
||||
COMB(TSCTL2, TS_LCTL, CB_1L4, CB_1R2)
|
||||
|
||||
// COMB(SMLNAV, SML_NAV, CB_2L4, CB_2R2)
|
||||
COMB(OSCTL, OS_LCTL, CB_2L2, CB_2R4)
|
||||
|
||||
COMB(OSACCENTM, OSL_ACCENTS_MORTE, CB_2L3, CB_2R3)
|
||||
|
||||
COMB(capsword, CAPS_WORD, CB_3L4, CB_3R2)
|
||||
COMB(OSRALT, OS_RALT, CB_3L3, CB_3R3)
|
||||
COMB(OSLALT2, OS_LALT, CB_3L2, CB_3R4)
|
||||
|
||||
COMB(OSLAYER, LAYER_OSL, CB_3L1, CB_3R5)
|
||||
COMB(OSLSYMB, OSL_SYMB, CB_TH2, CB_TH5)
|
||||
COMB(LNAV, SML_NAV, CB_TH3, CB_TH4)
|
||||
|
||||
COMB(_Q, KC_Q, CB_3L2, CB_3L3)
|
||||
COMB(_X, KC_X, CB_3L3, CB_3L4)
|
||||
COMB(_Z, KC_Z, CB_3R3, CB_3R4)
|
||||
|
||||
// vertical thumb combos for the kyria
|
||||
//COMB(xxx, xxx, CB_TH2, CB_0TH1)
|
||||
|
||||
#ifdef MEDIA_LAYER_ENABLE
|
||||
COMB(SMLMEDIA, SML_MEDIA, CB_TH3, CB_0TH2)
|
||||
#endif
|
||||
|
||||
COMB(OSLACCENT2, OSL_ACCENTS_MORTE, CB_TH4, CB_0TH3)
|
||||
COMB(KEYPAD, SML_KEYPAD, CB_TH5, CB_0TH4)
|
||||
|
||||
|
||||
|
||||
// reference COMBO_REF2
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO)
|
||||
COMB(TSCTL_BP, TS_LCTL, CB_1L3, CB_1L4)
|
||||
COMB(SMLNAV1_bp, SML_NAV, CB_1L2, CB_1L3)
|
||||
|
||||
#ifdef ACCENTS_MORTE_LAYER_ENABLE
|
||||
COMB(OSLACCENT_bp, OSL(_ACCENTS_MORTE_BP), CB2_2L1, CB2_2L2)
|
||||
#endif
|
||||
|
||||
COMB(SMLNAV_BP, SML_NAV, CB2_2L2, CB2_2L3)
|
||||
COMB(OSCTL_BP, OS_LCTL, CB2_2L3, CB2_2L4)
|
||||
|
||||
COMB(OSSFT_BP, OS_LSFT, CB2_2R2, CB2_2R3)
|
||||
// COMB(SMLKEYPAD_BP, SML_KEYPAD_BP, CB2_2R3, CB2_2R4)
|
||||
|
||||
COMB(capsword_BP, CAPS_WORD_ON, CB2_3L4, CB2_3R2)
|
||||
|
||||
// COMB(OSLSYMBP_BP, OSL(_SYMB_BP), CB2_TH2, CB2_TH5)
|
||||
COMB(LNAV_BP, SML_NAV, CB2_TH3, CB2_TH4)
|
||||
|
||||
COMB(_Qbp, BP_Q, CB2_3L2, CB2_3L3)
|
||||
COMB(_Xbp, BP_X, CB2_3L3, CB2_3L4)
|
||||
COMB(_Zbp, BP_Z, CB2_3R3, CB2_3R4)
|
||||
#endif
|
||||
|
||||
|
||||
// Reference nav layer
|
||||
COMB(END_nav, KC_END, KC_PGUP, KC_PGDN)
|
||||
COMB(HOME_nav, KC_HOME, KC_UP, KC_DOWN)
|
||||
|
||||
|
||||
//COMB(JKL_SPC, KC_SPC, KC_J, KC_X)
|
||||
//SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the given string.
|
||||
|
||||
// from possum vibes to review.
|
||||
/* COMBO NAME | OUTPUT | PARAMS */
|
||||
|
||||
// /*---- TOP ROW ----*/
|
||||
// COMB(turbonav, NAV_TG, KC_W, KC_R) // Nav access
|
||||
// COMB(save, S_SAVE, KC_E, KC_R) // Save
|
||||
// COMB(back_fwd, BCK_FWD, KC_R, KC_T) // Back/Fwd (shifted)
|
||||
|
||||
// COMB(undo_redo, UND_RED, KC_Y, KC_U) // Undo/Redo (shifted)
|
||||
// COMB(esc, KC_ESC, KC_U, KC_O) // Esc
|
||||
|
||||
// #ifdef IS_PINKY_CLUSTER
|
||||
// COMB(delete, KC_DEL, KC_A, KC_SCLN)
|
||||
// COMB(caps, KC_CAPS, KC_Q, KC_P)
|
||||
// #endif
|
||||
|
||||
// /*---- HOME ROW ----*/
|
||||
// COMB(cut, S_CUT, KC_S, KC_F) // Shift+Del (cut)
|
||||
// COMB(copy, S_COPY, KC_S, KC_D) // Ctrl+Ins (copy)
|
||||
// COMB(paste, S_PASTE, KC_D, KC_F) // Shift+Del (paste)
|
||||
// COMB(panic, PANIC, KC_D, KC_K) // panic!
|
||||
|
||||
// COMB(nummode, NUMMODE, KC_J, KC_K) // Nummode toggle
|
||||
// COMB(symmode, SYM_TG, KC_K, KC_L) // Sym layer
|
||||
// COMB(tab, KC_TAB, KC_K, KC_M) // Tab
|
||||
|
||||
|
||||
// /*---- BOTTOM ROW ----*/
|
||||
// COMB(hash, KC_HASH, KC_X, KC_C) // #
|
||||
// COMB(fslash, KC_SLSH, KC_C, KC_V) // /
|
||||
|
||||
// COMB(dash, KC_MINS, KC_M, KC_COMM) // -
|
||||
// COMB(asterisk, KC_ASTR, KC_COMM, KC_DOT) // *
|
||||
// COMB(at, KC_AT, KC_M, KC_DOT) // @
|
||||
|
||||
|
||||
// /*---- THUMBS ----*/
|
||||
// COMB(sys_lthm, SYS_OSL, KC_B, KC_ENT) // Sys OSL
|
||||
|
||||
// COMB(space_shift, SPC_SFT, KC_TAB, KC_SPC) // space and activate oss
|
||||
|
||||
// COMB(underscore_rthm, KC_UNDS, KC_SPC, KC_N) // _
|
||||
|
||||
// /*---- THUMB+ALPHAS ----*/
|
||||
// // COMB(os_fun, FUN_OSL, KC_ENT, KC_C) // OS Func
|
||||
// // COMB(os_num, NUM_OSL, KC_A, KC_F) // OSL num
|
||||
// // COMB(os_sym, SYM_OSL, KC_SPC, KC_M) // OSL sym
|
86
users/ericgebhart/defs/custom_keys.def
Normal file
86
users/ericgebhart/defs/custom_keys.def
Normal file
|
@ -0,0 +1,86 @@
|
|||
// custom key codes.
|
||||
EPRM,
|
||||
//VRSN,
|
||||
CAPS_WORD_ON,
|
||||
|
||||
// LAYERStuff.
|
||||
KC_NEXT_LOCALE,
|
||||
KC_NEXT_BASE_LAYER,
|
||||
KC_SET_BASE,
|
||||
// Misc.
|
||||
KC_MAKE,
|
||||
KC_RESET,
|
||||
KC_RGB_T,
|
||||
RGB_IDL,
|
||||
KC_SECRET_1,
|
||||
KC_SECRET_2,
|
||||
KC_SECRET_3,
|
||||
KC_SECRET_4,
|
||||
KC_SECRET_5,
|
||||
|
||||
KC_SPACETEST,
|
||||
|
||||
/// Need to evaluate which to keep.
|
||||
BCK_FWD, // Alt left and right
|
||||
CLEAR, // Clears all mods, does not change layers.
|
||||
LOCKSCR, // locks screen per is_windows value
|
||||
PANIC, // Clears all One-Shot keys and returns to base layer.
|
||||
UND_RED, // Ctrl Z and Y
|
||||
|
||||
// macros
|
||||
QMKCOMP, // qmk compile
|
||||
QMKFLSH, // qmk flash
|
||||
|
||||
// Swapper keys - just the swapper key, maybe gets reused.
|
||||
SW_REV, // Dead key, reverse direction for swapper
|
||||
|
||||
// for the combo ref layers.
|
||||
CB_0M1, CB_0M2, CB_0M3,
|
||||
CB_1M1, CB_1M2, CB_1M3,
|
||||
CB_2M1, CB_2M2, CB_2M3,
|
||||
CB_3M1, CB_3M2, CB_3M3,
|
||||
CB_4M1, CB_4M2, CB_4M3, CB_4M4, CB_4M5,
|
||||
|
||||
CB_1, CB_2, CB_3, CB_4, CB_5, CB_6, CB_7, CB_8, CB_9, CB_0,
|
||||
|
||||
CB_1R1, CB_1R2, CB_1R3, CB_1R4, CB_1R5,
|
||||
CB_1L1, CB_1L2, CB_1L3, CB_1L4, CB_1L5,
|
||||
CB_2R1, CB_2R2, CB_2R3, CB_2R4, CB_2R5,
|
||||
CB_2L1, CB_2L2, CB_2L3, CB_2L4, CB_2L5,
|
||||
CB_3R1, CB_3R2, CB_3R3, CB_3R4, CB_3R5,
|
||||
CB_3L1, CB_3L2, CB_3L3, CB_3L4, CB_3L5,
|
||||
CB_4L1, CB_4L2, CB_4L3, CB_4L4, CB_4L5,
|
||||
CB_4R1, CB_4R2, CB_4R3, CB_4R4, CB_4R5,
|
||||
|
||||
CB2_0M1, CB2_0M2, CB2_0M3,
|
||||
CB2_1M1, CB2_1M2, CB2_1M3,
|
||||
CB2_2M1, CB2_2M2, CB2_2M3,
|
||||
CB2_3M1, CB2_3M2, CB2_3M3,
|
||||
CB2_4M1, CB2_4M2, CB2_4M3, CB2_4M4, CB2_4M5,
|
||||
|
||||
CB2_1, CB2_2, CB2_3, CB2_4, CB2_5, CB2_6, CB2_7, CB2_8, CB2_9, CB2_0,
|
||||
|
||||
CB2_1R1, CB2_1R2, CB2_1R3, CB2_1R4, CB2_1R5,
|
||||
CB2_1L1, CB2_1L2, CB2_1L3, CB2_1L4, CB2_1L5,
|
||||
CB2_2R1, CB2_2R2, CB2_2R3, CB2_2R4, CB2_2R5,
|
||||
CB2_2L1, CB2_2L2, CB2_2L3, CB2_2L4, CB2_2L5,
|
||||
CB2_3R1, CB2_3R2, CB2_3R3, CB2_3R4, CB2_3R5,
|
||||
CB2_3L1, CB2_3L2, CB2_3L3, CB2_3L4, CB2_3L5,
|
||||
CB2_4L1, CB2_4L2, CB2_4L3, CB2_4L4, CB2_4L5,
|
||||
CB2_4R1, CB2_4R2, CB2_4R3, CB2_4R4, CB2_4R5,
|
||||
|
||||
// core 6 thumb keys for combo reference layer
|
||||
CB_TH1, CB_TH2, CB_TH3, CB_TH4, CB_TH5, CB_TH6,
|
||||
CB2_TH1, CB2_TH2, CB2_TH3, CB2_TH4, CB2_TH5, CB2_TH6,
|
||||
CB_1TH1, CB_1TH2, CB_1TH3, CB_1TH4, CB_1TH5, CB_1TH6,
|
||||
CB2_1TH1, CB2_1TH2, CB2_1TH3, CB2_1TH4, CB2_1TH5, CB2_1TH6,
|
||||
|
||||
// for the extra thumb keys on the kyria
|
||||
CB_0TH1 , CB_0TH2, CB_0TH3, CB_0TH4,
|
||||
CB_THA, CB_THB, CB_THC, CB_THD,
|
||||
|
||||
// edge keys for the combo reference layer
|
||||
L0_CB, L1_CB, L2_CB, L3_CB,
|
||||
R0_CB, R1_CB, R2_CB, R3_CB,
|
||||
L0_CB2, L1_CB2, L2_CB2, L3_CB2,
|
||||
R0_CB2, R1_CB2, R2_CB2, R3_CB2,
|
65
users/ericgebhart/defs/encoders.def
Normal file
65
users/ericgebhart/defs/encoders.def
Normal file
|
@ -0,0 +1,65 @@
|
|||
// Layer/none, encoder index 0/1, CW_KC, CCW_KC, Qualifying mod or none
|
||||
// LAYER_NONE and MOD_NONE for a single use.
|
||||
// LEFT and RIGHT for index. 0 and 1...
|
||||
|
||||
// default encoders, all layers no mods.
|
||||
ENCODER_ACTION(LAYER_NONE, RIGHT, KC_PGDN, KC_PGUP, MOD_NONE)
|
||||
ENCODER_ACTION(LAYER_NONE, LEFT, KC_DOWN, KC_UP, MOD_NONE)
|
||||
ENCODER_ACTION(LAYER_NONE, LEFT, KC_PGDN, KC_PGUP, MOD_LSFT)
|
||||
|
||||
// Symbol layer encoders.
|
||||
// left and right.
|
||||
ENCODER_ACTION(_SYMB_EN, LEFT, KC_LEFT, KC_RIGHT, MOD_NONE)
|
||||
// word left or right.
|
||||
ENCODER_ACTION(_SYMB_EN, LEFT, LCTL(KC_LEFT), LCTL(KC_RIGHT), MOD_NONE)
|
||||
|
||||
// Nav layer encoders.
|
||||
ENCODER_ACTION(_NAV, LEFT, KC_TAB, S(KC_TAB), MOD_NONE)
|
||||
ENCODER_ACTION(_NAV, RIGHT, A(KC_TAB), A(S(KC_TAB)), MOD_NONE)
|
||||
ENCODER_ACTION(_NAV, RIGHT, KC_VOLU, KC_VOLD, MOD_NONE)
|
||||
|
||||
// RGB functions for the RGB layer.
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgb_matrix_increase_speed_noeeprom,
|
||||
rgb_matrix_decrease_speed_noeeprom, MOD_NONE)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, RIGHT,
|
||||
rgb_matrix_increase_hue_noeeprom,
|
||||
rgb_matrix_decrease_hue_noeeprom, MOD_NONE)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgb_matrix_increase_sat_noeeprom,
|
||||
rgb_matrix_decrease_sat_noeeprom, MOD_LSFT)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, RIGHT,
|
||||
rgb_matrix_increase_val_noeeprom,
|
||||
rgb_matrix_decrease_val_noeeprom, MOD_LSFT)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgb_matrix_step_noeeprom;
|
||||
rgb_matrix_step_reverse_noeeprom, MOD_LCTL)
|
||||
|
||||
#elif defined(RGBLIGHT_ENABLE)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgblight_increase_speed_noeeprom,
|
||||
rgblight_decrease_speed_noeeprom, MOD_NONE)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, RIGHT,
|
||||
rgblight_increase_hue_noeeprom,
|
||||
rgblight_decrease_hue_noeeprom, MOD_NONE)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgblight_increase_sat_noeeprom,
|
||||
rgblight_decrease_sat_noeeprom, MOD_LSFT)
|
||||
|
||||
ENCODER_FUNCTION(_RGB, RIGHT,
|
||||
rgblight_increase_val_noeeprom,
|
||||
rgblight_decrease_val_noeeprom, MOD_LSFT)
|
||||
|
||||
|
||||
ENCODER_FUNCTION(_RGB, LEFT,
|
||||
rgblight_step_noeeprom,
|
||||
rgblight_step_reverse_noeeprom, MOD_LCTL)
|
||||
#endif // RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE
|
23
users/ericgebhart/defs/key_overrides.def
Normal file
23
users/ericgebhart/defs/key_overrides.def
Normal file
|
@ -0,0 +1,23 @@
|
|||
//KOL -> name, mod_mask, keycode, sendkeycode, layer to apply.
|
||||
|
||||
// // these are actually handled by alt_local_keys, in a more universal
|
||||
// // and adaptable way.
|
||||
// KOL(slash_pipe, MOD_MASK_SHIFT, KC_SLSH, KC_PIPE, _DVORAK_EN)
|
||||
|
||||
// this one is interesting.
|
||||
KOL(slash_backslash, MOD_MASK_ALT, KC_SLSH, KC_BSLS, _DVORAK_EN)
|
||||
|
||||
// KOL(N2_dot, MOD_MASK_SHIFT, KC_2, KC_DOT, _KEYPAD_EN)
|
||||
// KOL(N3_comma, MOD_MASK_SHIFT, KC_3, KC_COMMA, _KEYPAD_EN)
|
||||
|
||||
// KOL(hash_at, MOD_MASK_SHIFT, KC_HASH, KC_AT, _CDH)
|
||||
// KOL(dot_colon, MOD_MASK_SHIFT, KC_DOT, KC_COLN, _CDH)
|
||||
// KOL(comma_semicolon, MOD_MASK_SHIFT, KC_COMMA, KC_SCLN, _CDH)
|
||||
// KOL(space_unds, MOD_MASK_SHIFT, KC_SPACE, KC_UNDS, _CDH)
|
||||
// KOL(mins_exlm, MOD_MASK_SHIFT, KC_MINS, KC_EXLM, _CDH)
|
||||
|
||||
// KOL(bspc_del, MOD_MASK_SHIFT, KC_BSPC, KC_DEL, _NAV)
|
||||
|
||||
// KOL(zero_degree, MOD_MASK_SHIFT, KC_0, DEGREE, _KEYPAD_EN)
|
||||
|
||||
// KOL(eur_pnd, MOD_MASK_SHIFT, KC_EUR, KC_PND, _SYMB_EN)
|
19
users/ericgebhart/defs/mod_lock.def
Normal file
19
users/ericgebhart/defs/mod_lock.def
Normal file
|
@ -0,0 +1,19 @@
|
|||
// mod lock keys. takes keymods not mods.
|
||||
// keycode should be defined in custom_keys.def.
|
||||
// custom key, modkey to activate
|
||||
MODL(ML_LSFT, KC_LSFT)
|
||||
MODL(ML_LCTL, KC_LCTL)
|
||||
MODL(ML_LALT, KC_LALT)
|
||||
MODL(ML_LGUI, KC_LGUI)
|
||||
|
||||
// Keycodes which will NOT cancel mod lock mode.
|
||||
IGNORE_KC( KC_LEFT)
|
||||
IGNORE_KC( KC_RGHT)
|
||||
IGNORE_KC( KC_UP)
|
||||
IGNORE_KC( KC_DOWN)
|
||||
IGNORE_KC( KC_HOME)
|
||||
IGNORE_KC( KC_END)
|
||||
IGNORE_KC( ML_LALT)
|
||||
IGNORE_KC( ML_LCTL)
|
||||
IGNORE_KC( ML_LGUI)
|
||||
IGNORE_KC( ML_LSFT)
|
19
users/ericgebhart/defs/not_dead.def
Normal file
19
users/ericgebhart/defs/not_dead.def
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Make not dead keys from dead keys.
|
||||
// Not dead keycode, dead key
|
||||
NOT_DEAD(KC_DQUO_ND, KC_DQUO)
|
||||
NOT_DEAD(KC_GRV_ND, KC_GRV)
|
||||
NOT_DEAD(KC_QUOT_ND, KC_QUOT)
|
||||
NOT_DEAD(KC_CIRC_ND, KC_CIRC)
|
||||
NOT_DEAD(KC_TILD_ND, KC_TILD)
|
||||
|
||||
NOT_DEAD(US_DQUO_ND, US_DQUO)
|
||||
NOT_DEAD(US_GRV_ND, US_GRV)
|
||||
NOT_DEAD(US_QUOT_ND, US_QUOT)
|
||||
NOT_DEAD(US_CIRC_ND, US_CIRC)
|
||||
NOT_DEAD(US_TILD_ND, US_TILD)
|
||||
|
||||
NOT_DEAD(BP_DQUO_ND, BP_DQUO)
|
||||
NOT_DEAD(BP_GRV_ND, BP_GRV)
|
||||
NOT_DEAD(BP_QUOT_ND, BP_QUOT)
|
||||
NOT_DEAD(BP_CIRC_ND, BP_CIRC)
|
||||
NOT_DEAD(BP_TILD_ND, BP_TILD)
|
45
users/ericgebhart/defs/nshot.def
Normal file
45
users/ericgebhart/defs/nshot.def
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Define keycodes in custom keys.
|
||||
// KEYCode, mod keycode, to set for n-shot.
|
||||
// ONESHOT is for one.
|
||||
// NSHOT takes a count.
|
||||
|
||||
// oneshots
|
||||
ONESHOT(OS_LSFT, KC_LSFT)
|
||||
ONESHOT(OS_LCTL, KC_LCTL)
|
||||
ONESHOT(OS_LALT, KC_LALT)
|
||||
ONESHOT(OS_LGUI, KC_LGUI)
|
||||
|
||||
ONESHOT(OS_RSFT, KC_RSFT)
|
||||
ONESHOT(OS_RCTL, KC_RCTL)
|
||||
ONESHOT(OS_RALT, KC_RALT)
|
||||
ONESHOT(OS_RGUI, KC_RGUI)
|
||||
|
||||
// N-Shots
|
||||
NSHOT(TS_LCTL, KC_LCTL, 2)
|
||||
NSHOT(TS_RCTL, KC_RCTL, 2)
|
||||
|
||||
// Keys which will cancel the n-shots.
|
||||
CANCEL_KEY( PANIC)
|
||||
CANCEL_KEY( CLEAR)
|
||||
//CANCEL_KEY( THM_LH0)
|
||||
//CANCEL_KEY( THM_LH1)
|
||||
//CANCEL_KEY( THM_RH0)
|
||||
//CANCEL_KEY( THM_RH1)
|
||||
|
||||
// inherited from @possumvibes, keeping for now.
|
||||
// Keys which will be ignored by n-shots.
|
||||
//IGNORE_KEY( THM_LH0)
|
||||
//IGNORE_KEY( THM_LH1)
|
||||
//IGNORE_KEY( THM_RH0)
|
||||
//IGNORE_KEY( THM_RH1)
|
||||
//IGNORE_KEY( SYM_OSL)
|
||||
//IGNORE_KEY( SYM_TG)
|
||||
//IGNORE_KEY( NAV_TG)
|
||||
//IGNORE_KEY( NUM_OSL)
|
||||
//IGNORE_KEY( NUM_TO)
|
||||
//IGNORE_KEY( FUN_OSL)
|
||||
//IGNORE_KEY( ALPHA)
|
||||
IGNORE_KEY( SML_NAV)
|
||||
IGNORE_KEY( SPC_TOPR)
|
||||
// IGNORE_KEY( SML_KEYPAD)
|
||||
//IGNORE_KEY( SML_TOPROWS)
|
17
users/ericgebhart/defs/oneshot.def
Normal file
17
users/ericgebhart/defs/oneshot.def
Normal file
|
@ -0,0 +1,17 @@
|
|||
// custom-key, Oneshot name.
|
||||
ONESHOT( OS_LSFT, ONESHOT_LSFT)
|
||||
ONESHOT( OS_LCTL, ONESHOT_LCTL)
|
||||
ONESHOT( OS_LALT, ONESHOT_LALT)
|
||||
ONESHOT( OS_LGUI, ONESHOT_LGUI)
|
||||
|
||||
// keys to cancel
|
||||
CANCEL_KEY( KC_ESC)
|
||||
|
||||
// CANCEL_KEY( KC_FNAV)
|
||||
// CANCEL_KEY( KC_FNUM)
|
||||
// CANCEL_KEY( KC_FCAPS)
|
||||
|
||||
// keys to ignore.
|
||||
IGNORE_KEY( SPC_NAV)
|
||||
// IGNORE_KEY( KC_FNAV)
|
||||
// IGNORE_KEY( KC_FSYM)
|
7
users/ericgebhart/defs/send_string.def
Normal file
7
users/ericgebhart/defs/send_string.def
Normal file
|
@ -0,0 +1,7 @@
|
|||
// key to be defined and string to send.
|
||||
|
||||
//SEND_STR(MYKEY, "this is a test")
|
||||
//SEND_STR_DELAY(MYKEY4, "this is another test")
|
||||
|
||||
SEND_STR_DELAY(VRSN, QMK_KEYBOARD ":" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE)
|
||||
// SEND_STR_DELAY(VRSN, QMK_KEYBOARD ":" QMK_KEYMAP " # @ " QMK_VERSION)
|
123
users/ericgebhart/defs/smart_lock.def
Normal file
123
users/ericgebhart/defs/smart_lock.def
Normal file
|
@ -0,0 +1,123 @@
|
|||
// Define smart layers here.
|
||||
// SMLL = smart lock layer.
|
||||
// SMLM = smart lock mod.
|
||||
|
||||
// Keycode, layer/mod.
|
||||
// list of keycodes to ignore.
|
||||
|
||||
SMLM(SMLM_LSFT, MOD_LSFT,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_LCTL, MOD_LCTL,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_LALT, MOD_LALT,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_LGUI, MOD_LGUI,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_RSFT, MOD_RSFT,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_RCTL, MOD_RCTL,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_RALT, MOD_RALT,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLM(SMLM_RGUI, MOD_RGUI,
|
||||
___VI_ARROWS___,
|
||||
___HOME_PGDN_PGUP_END___,
|
||||
___TAB_PGDN_PGUP_BKTAB___,
|
||||
___SML_MODS_L___)
|
||||
|
||||
SMLL(SML_NAV, _NAV, ___NAV_3x10___)
|
||||
|
||||
#ifdef MEDIA_LAYER_ENABLE
|
||||
SMLL(SML_MEDIA, _MEDIA, ___MEDIA_3x10___)
|
||||
#endif
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
SMLL(SML_NAVm, _NAVm, ___NAVm_3x10___)
|
||||
#endif
|
||||
|
||||
SMLL(SML_KEYPAD, _KEYPAD_EN,
|
||||
KC_1,
|
||||
KC_2,
|
||||
KC_3,
|
||||
KC_4,
|
||||
KC_5,
|
||||
KC_6,
|
||||
KC_7,
|
||||
KC_8,
|
||||
KC_9,
|
||||
KC_0,
|
||||
KC_PERC,
|
||||
KC_DLR,
|
||||
KC_COMM,
|
||||
KC_DOT,
|
||||
KC_SLSH,
|
||||
KC_MINS,
|
||||
KC_ASTR,
|
||||
KC_PLUS,
|
||||
KC_COLN,
|
||||
KC_SCLN,
|
||||
KC_EQL,
|
||||
// KC_UNDS,
|
||||
KC_BSPC,
|
||||
KC_X,
|
||||
SYM_MO)
|
||||
|
||||
// SMLL(SML_KEYPAD_BP, _KEYPAD_BP,
|
||||
// BP_1,
|
||||
// BP_2,
|
||||
// BP_3,
|
||||
// BP_4,
|
||||
// BP_5,
|
||||
// BP_6,
|
||||
// BP_7,
|
||||
// BP_8,
|
||||
// BP_9,
|
||||
// BP_0,
|
||||
// BP_PERC,
|
||||
// BP_DLR,
|
||||
// BP_COMM,
|
||||
// BP_DOT,
|
||||
// BP_SLSH,
|
||||
// BP_MINS,
|
||||
// BP_ASTR,
|
||||
// BP_PLUS,
|
||||
// BP_COLN,
|
||||
// BP_SCLN,
|
||||
// BP_EQL,
|
||||
// // KC_UNDS,
|
||||
// KC_BSPC,
|
||||
// BP_X,
|
||||
// SYM_MO)
|
||||
|
||||
#ifdef TOPROWS_LAYER_ENABLE
|
||||
SMLL(SML_TOPROWS, _TOPROWS_EN, ___10_SYMBOLS___, ___10_NUMBERS___)
|
||||
#endif
|
||||
//SMLL(SML_SYMB, _SYMB_EN, ___SYMB_BEAKLB_3x10___)
|
3
users/ericgebhart/defs/swapper.def
Normal file
3
users/ericgebhart/defs/swapper.def
Normal file
|
@ -0,0 +1,3 @@
|
|||
// KEYCODE, Reverseit kc, KC to send, KC to send in reverse, MODs to apply.
|
||||
SWAPPER_KEY(SW_WIN, SW_REV, KC_TAB, S(KC_TAB), KC_LALT)
|
||||
SWAPPER_KEY(SW_TAB, SW_REV, KC_TAB, S(KC_TAB), KC_LCTL)
|
68
users/ericgebhart/defs/tap_hold.def
Normal file
68
users/ericgebhart/defs/tap_hold.def
Normal file
|
@ -0,0 +1,68 @@
|
|||
// tap or long tap for different key.
|
||||
|
||||
// One key copy/paste
|
||||
TP_TPL(KC_CCCV, LCTL(KC_C), LCTL(KC_V))
|
||||
// New TaB/Window
|
||||
TP_TPL(KC_CTCN, LCTL(KC_T), LCTL(KC_N))
|
||||
// Close Tab-window/Quit
|
||||
TP_TPL(KC_CWCQ, LCTL(KC_W), LCTL(KC_Q))
|
||||
// Xmonad scratch pads or desktop
|
||||
//TP_TPL(KC_XM_PORD, LGUI(KC_E), LGUI(KC_T))
|
||||
|
||||
//TP_SML(ENTNAV, KC_ENTER, SML_NAV)
|
||||
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
TP_TPL(BP_CCCV, LCTL(BP_C), LCTL(BP_V))
|
||||
TP_TPL(BP_CTCN, LCTL(BP_T), LCTL(BP_N))
|
||||
TP_TPL(BP_CWCQ, LCTL(BP_W), LCTL(BP_Q))
|
||||
TP_TPL(BP_XM_PORD, LGUI(BP_E), LGUI(BP_T))
|
||||
|
||||
TP_TPL(BP_C_CCED, BP_C, BP_CCED)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == US_INT) || (DEFAULT_LANG == US_INT)
|
||||
TP_TPL(US_CCCV, LCTL(US_C), LCTL(US_V))
|
||||
TP_TPL(US_CTCN, LCTL(US_T), LCTL(US_N))
|
||||
TP_TPL(US_CWCQ, LCTL(US_W), LCTL(US_Q))
|
||||
TP_TPL(US_XM_PORD, LGUI(US_E), LGUI(US_T))
|
||||
|
||||
TP_TPL(US_C_CCED, US_C, US_CCED)
|
||||
#endif
|
||||
|
||||
// Open on tap and Open with close and back arrow on hold.
|
||||
// (){}[]""''``<>
|
||||
# if defined(SECOND_LOCALE) && (SECOND_LOCALE == EN) || (DEFAULT_LANG == EN)
|
||||
OPEN_OCL(KC_OCPRN, KC_LPRN, KC_RPRN)
|
||||
OPEN_OCL(KC_OCBRC, KC_LBRC, KC_RBRC)
|
||||
OPEN_OCL(KC_OCCBR, KC_LCBR, KC_RCBR)
|
||||
OPEN_OCL(KC_OCDQUO, KC_DQUO, KC_DQUO)
|
||||
OPEN_OCL(KC_OCQUOT, KC_QUOT, KC_QUOT)
|
||||
OPEN_OCL(KC_OCGRV, KC_GRAVE, KC_GRAVE)
|
||||
OPEN_OCL(KC_OCLTGT, KC_LT, KC_GT)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == BEPO) || (DEFAULT_LANG == BEPO)
|
||||
OPEN_OCL(BP_OCPRN, BP_LPRN, BP_RPRN)
|
||||
OPEN_OCL(BP_OCBRC, BP_LBRC, BP_RBRC)
|
||||
OPEN_OCL(BP_OCCBR, BP_LCBR, BP_RCBR)
|
||||
OPEN_OCL(BP_OCDQUO, BP_DQUO, BP_DQUO)
|
||||
OPEN_OCL_ND(BP_OCQUOT, BP_QUOT, BP_QUOT)
|
||||
OPEN_OCL(BP_OCGRV, BP_GRV, BP_GRV)
|
||||
OPEN_OCL(BP_OCLTGT, BP_LT, BP_GT)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(SECOND_LOCALE) && (SECOND_LOCALE == US_INT) || (DEFAULT_LANG == US_INT)
|
||||
OPEN_OCL(US_OCPRN, US_LPRN, US_RPRN)
|
||||
OPEN_OCL(US_OCBRC, US_LBRC, US_RBRC)
|
||||
OPEN_OCL(US_OCCBR, US_LCBR, US_RCBR)
|
||||
OPEN_OCL(US_OCDQUO, US_DQUO, US_DQUO)
|
||||
|
||||
OPEN_OCL_ND(US_OCQUOT, US_QUOT, US_QUOT)
|
||||
OPEN_OCL(US_OCGRV, US_GRV, US_GRV)
|
||||
OPEN_OCL(US_OCLTGT, US_LT, US_GT)
|
||||
#endif
|
5
users/ericgebhart/defs/unicode.def
Normal file
5
users/ericgebhart/defs/unicode.def
Normal file
|
@ -0,0 +1,5 @@
|
|||
// define keys to send unicode strings.
|
||||
UC_STR(UC_FLIP, "(ノಠ痊ಠ)ノ彡┻━┻")
|
||||
UC_STR(UC_TABL, "┬─┬ノ( º _ ºノ)")
|
||||
UC_STR(UC_SHRG, "¯\\_(ツ)_/¯")
|
||||
UC_STR(UC_DISA, "ಠ_ಠ")
|
|
@ -1,238 +0,0 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "core_keysets.h"
|
||||
|
||||
/******************************************************************/
|
||||
/* This is where I put my Keyboard layouts, Everything on the */
|
||||
/* edges, the functions on keys like LT() and SFT_T() */
|
||||
/* can be applied here. The physical shape of the keyboard is */
|
||||
/* also accounted for here. This makes it very simple to add a */
|
||||
/* new keyboard and reuse all of my layouts and layers */
|
||||
/* */
|
||||
/* The particular pieces we define here (as needed) are: */
|
||||
/* * Edge pinky keys, */
|
||||
/* * Middle section keys */
|
||||
/* * Bottom/5th row */
|
||||
/* * Thumbkeys */
|
||||
/* * Any functional additions to wrap the keys. ie. LT() */
|
||||
/* */
|
||||
/* With all of that in hand, we then create a LAYOUT wrapper */
|
||||
/* macro that takes a list of keys, to create a keyboard matrix */
|
||||
/* that fits the keyboard. Simple. */
|
||||
/* */
|
||||
/* The thumb keys, the bottom rows, etc. */
|
||||
/* */
|
||||
/* An attempt has been made to adapt the kinesis and ergodox */
|
||||
/* Thumb keys to the rectangular shapes of the xd75 and viterbi. */
|
||||
/* which are 15x and 14x matrices respectively. */
|
||||
/* The Corne was a perfect fit */
|
||||
/******************************************************************/
|
||||
|
||||
/******************************************************************/
|
||||
/* * The XD75 is a 5x15 Ortholinear matrix which means it has 3 */
|
||||
/* keys inbetween the usual left and right hand keys */
|
||||
/* * The Viterbi is a split 5x14 Ortholinear with 2 middle keys. */
|
||||
/* * The Ergodox is a split 5x14 Ortholinear with 2 middle keys, */
|
||||
/* thumbkeys. It is missing middle keys on (home) row 3. */
|
||||
/* * The Corne is a split 3x12 with 6 thumb keys. It has no */
|
||||
/* extra middle keys */
|
||||
/* */
|
||||
/******************************************************************/
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
/* In all cases these keyboards are defined in a matrix which is */
|
||||
/* a set of rows. Maybe like so, or not. */
|
||||
/* */
|
||||
/* -------------------------|------------------------ */
|
||||
/* | Left0 | Numbers L | mid|dle0 | numbers R | Right0 | */
|
||||
/* | Left1 | keys0-5 | mid|dle1 | Keys6-10 | Right1 | */
|
||||
/* | Left2 | keys11-15 | mid|dle2 | Keys16-20 | Right2 | */
|
||||
/* | Left3 | keys20-25 | mid|dle3 | Keys25-30 | Right3 | */
|
||||
/* | Row5L | Row5R | */
|
||||
/* | ThumbsL | ThumbsR | */
|
||||
/* -------------------------|------------------------ */
|
||||
|
||||
/* Generally speaking, the keys on the right and left don't change. */
|
||||
/* Neither does the bottom row or the thumbs. Frequently the numbers */
|
||||
/* row is identical across layers. Mostly, we want our Base layers to */
|
||||
/* be predctable. */
|
||||
|
||||
// EDGES
|
||||
// outside pinky keys row 0-3.
|
||||
// Qwerty and Bepo, - Applies
|
||||
// to foreign layouts on bepo. dvorak_bp, beakl_bp.
|
||||
#define LEFT0 KC_GRV
|
||||
#define LEFT1 KC_GRV
|
||||
#define LEFT2 KC_TAB
|
||||
#define LEFT3 KC_BSLASH
|
||||
//#define LEFT3 KC_COLN
|
||||
|
||||
#define LEFT0_BP DB_GRV
|
||||
#define LEFT1_BP DB_GRV
|
||||
#define LEFT2_BP KC_TAB
|
||||
#define LEFT3_BP DB_BACKSLASH
|
||||
//#define LEFT3_BP BP_COLN
|
||||
|
||||
#define RIGHT0 KC_EQL
|
||||
#define RIGHT1 KC_SLASH
|
||||
#define RIGHT2 KC_MINS
|
||||
#define RIGHT3 KC_SCLN
|
||||
|
||||
#define RIGHT0_BP BP_EQL
|
||||
#define RIGHT1_BP BP_SLSH
|
||||
#define RIGHT2_BP BP_MINS
|
||||
#define RIGHT3_BP BP_SCLN
|
||||
|
||||
/******************************************************************/
|
||||
/* Middle Keysets for various keyboards */
|
||||
// MIDDLES
|
||||
/// Middle left and right keys.
|
||||
/******************************************************************/
|
||||
#define ___MIDDLE_LT___ OSL(_LAYERS)
|
||||
#define ___MIDDLE_L1___ KC_CCCV
|
||||
#define ___MIDDLE_L2___ TO(_SYMB)
|
||||
#define ___MIDDLE_L3___ TO(_NAV)
|
||||
|
||||
#define ___MIDDLE_RT___ _X_
|
||||
#define ___MIDDLE_R1___ KC_CCCV
|
||||
#define ___MIDDLE_R2___ TO(_TOPROWS)
|
||||
#define ___MIDDLE_R3___ OSL(_KEYPAD)
|
||||
|
||||
#define ___MIDDLE_L1_BP___ BP_CCCV
|
||||
#define ___MIDDLE_L2_BP___ TO(_SYMB_BP)
|
||||
|
||||
#define ___MIDDLE_R1_BP___ BP_CCCV
|
||||
#define ___MIDDLE_R2_BP___ TO(_KEYPAD_BP)
|
||||
#define ___MIDDLE_R3_BP___ OSL(_KEYPAD_BP)
|
||||
|
||||
// 3 keys in the middle of a 15x matrix
|
||||
#define ___3_MIDDLE_T___ ___MIDDLE_LT___, LCTL(KC_A), ___MIDDLE_RT___
|
||||
#define ___3_MIDDLE_1___ ___MIDDLE_L1___, LCTL(KC_X), ___MIDDLE_R1___
|
||||
#define ___3_MIDDLE_2___ ___MIDDLE_L2___, TO(_RGB), ___MIDDLE_R2___
|
||||
#define ___3_MIDDLE_3___ ___MIDDLE_L3___, TO(_SYMB), ___MIDDLE_R3___
|
||||
|
||||
// The same, for BEPO
|
||||
#define ___3_MIDDLE_T_BP___ ___MIDDLE_LT___, LCTL(BP_A), ___MIDDLE_RT___
|
||||
#define ___3_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, LCTL(BP_X), ___MIDDLE_R1_BP___
|
||||
#define ___3_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, TO(_RGB), ___MIDDLE_R2_BP___
|
||||
#define ___3_MIDDLE_3_BP___ ___MIDDLE_L3___, TO(_SYMB_BP), ___MIDDLE_R3_BP___
|
||||
|
||||
// 2 keys in the middle of a 14x matrix - For viterbi and ergodox.
|
||||
#define ___2_MIDDLE_T___ ___MIDDLE_LT___, ___MIDDLE_RT___
|
||||
#define ___2_MIDDLE_1___ ___MIDDLE_L1___, ___MIDDLE_R1___
|
||||
#define ___2_MIDDLE_2___ ___MIDDLE_L2___, ___MIDDLE_R2___
|
||||
#define ___2_MIDDLE_3___ ___MIDDLE_L3___, ___MIDDLE_R3___
|
||||
|
||||
// The same, for BEPO
|
||||
#define ___2_MIDDLE_T_BP___ ___MIDDLE_LT___, ___MIDDLE_RT___
|
||||
#define ___2_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, ___MIDDLE_R1_BP___
|
||||
#define ___2_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, ___MIDDLE_R2_BP___
|
||||
#define ___2_MIDDLE_3_BP___ ___MIDDLE_L3___, ___MIDDLE_R3_BP___
|
||||
|
||||
/********************************************************************/
|
||||
/* THUMBS */
|
||||
/* Define the thumb clusters for all the keyboards. */
|
||||
/********************************************************************/
|
||||
|
||||
// for xd75 or other layouts with a center column.
|
||||
// #define ___5_MIDDLE_THUMBS___ CTL_BSPC, ALT_DEL, XMONAD_ESC, ALT_ENT, CTL_SPC
|
||||
#define ___5_MIDDLE_THUMBS___ ALT_DEL, BSPC_TOPR, ESC_SYMB, ENT_NAV, SPC_TOPR
|
||||
#define ___5_MIDDLE_THUMBS_BP___ ALT_DEL, BSPC_TOPR_BP, ESC_SYMB_BP, ENT_NAV, SPC_TOPR_BP
|
||||
|
||||
// for a last, 4th thumb row. for rebound.
|
||||
// backtab, home end, ----, pgup, pgdn, tab ?
|
||||
#define ___13_BOTTOM___ \
|
||||
KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB, ESC_TOPR, \
|
||||
OSL(_LAYERS), \
|
||||
ENT_NAV, SPC_TOPR, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT
|
||||
|
||||
#define ___13_BOTTOM_BP___ \
|
||||
KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB_BP, ESC_TOPR_BP, \
|
||||
OSL(_LAYERS), \
|
||||
ENT_NAV, SPC_TOPR_BP, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT
|
||||
|
||||
// becomes the upper thumbs, the real 4th row if we throw away
|
||||
// the number row at the top.
|
||||
// this is the 4th row on the viterbi above the thumbrow if the number
|
||||
// row is not used for numbers.
|
||||
#define ___4_MIDDLE_4___ LSFT(KC_TAB), HOME_END, KC_PGDN, KC_TAB
|
||||
#define ___4_MIDDLE_4b___ TAB_BKTAB, HOME_END, KC_PGDN, KC_PGUP
|
||||
|
||||
/********************************************************************/
|
||||
/** The bottom row and thumbs as needed. **/
|
||||
/********************************************************************/
|
||||
// I do not use those pinky keys. I had useful things there but there
|
||||
// are better more useful ways than those pinkys.
|
||||
#define ___5_BOTTOM_LEFT___ ___X2___, KC_INS, KC_LEFT, KC_RIGHT
|
||||
#define ___5_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, ___X2___
|
||||
|
||||
#define ___4_BOTTOM_LEFT___ LCTL(KC_V), KC_INS, KC_LEFT, KC_RIGHT
|
||||
#define ___4_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, LCTL(KC_C)
|
||||
|
||||
// the bottom rows for keyboards on bepo.
|
||||
// bepo on bepo - not enough space to go around....
|
||||
#define ___5_BOTTOM_LEFT_BP___ _X_, BP_EACU, _X_, KC_LEFT, KC_RIGHT
|
||||
#define ___5_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC
|
||||
|
||||
#define ___4_BOTTOM_LEFT_BP___ LCTL(BP_C), BP_EACU, KC_LEFT, KC_RIGHT
|
||||
#define ___4_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED
|
||||
|
||||
// for dvorak and beakl on bepo
|
||||
#define ___5_BOTTOM_LEFT_FR___ ___X3___, KC_LEFT, KC_RIGHT
|
||||
#define ___5_BOTTOM_RIGHT_FR___ KC_UP, KC_DOWN, DB_BACKSLASH, ___X2___
|
||||
|
||||
// basically a 5th row in a 5x matrix. but maybe a 4th if there isnt a number row.
|
||||
#define ___15_BOTTOM___ ___5_BOTTOM_LEFT___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT___
|
||||
#define ___15_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_FR___
|
||||
#define ___15_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_BP___
|
||||
|
||||
#define ___14_BOTTOM___ ___5_BOTTOM_LEFT___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT___
|
||||
#define ___14_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_FR___
|
||||
#define ___14_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_BP___
|
||||
#define ___14_THUMBS_BOTTOM___ ___X4___, ___6_MIDDLE_THUMBS___, ___X4___
|
||||
|
||||
// bottom row of ergodox thumbs, bottom middle of all layouts.
|
||||
// start with the minimilist thumb row of 6, like the Corne, 2x3.
|
||||
|
||||
#define ___THUMBS_1___ TT(_KEYPAD), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS)
|
||||
#define ___THUMBS_1_BP___ TT(_KEYPAD_BP), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS_BP)
|
||||
#define ___THUMBS_2___ HOME_END, KC_PGUP
|
||||
#define ___THUMBS_3___ ___6_ERGO_THUMBS___
|
||||
|
||||
#define ___4_THUMBS_1_BP___ TT(_KEYPAD_BP), KC_HOME, KC_PGUP, OSL(_TOPROWS_BP)
|
||||
#define ___4_THUMBS_1___ TT(_KEYPAD), KC_HOME, KC_PGUP, OSL(_TOPROWS)
|
||||
#define ___6_THUMBS_2___ KC_LSFT, KC_BKTAB, KC_END, KC_PGDN, KC_TAB, KC_RSFT
|
||||
|
||||
#define ___6_THUMBS_2b___ BSPC_SYMB, ESC_TOPR, KC_END, KC_PGUP, ENT_NAV, SPC_TOPR
|
||||
#define ___6_ERGO_THUMBSb___ TT(_LAYERS), BSPC_SYMB, KC_XM_PORD, KC_PGDN, TT(_NAV), KC_XM_PORD
|
||||
#define ___6_THUMBS_2b_BP___ BSPC_SYMB_BP, ESC_TOPR_BP, KC_END, KC_PGDN, ENT_TOPR_BP, SPC_NAV
|
||||
|
||||
#define ___6_ERGO_THUMBS___ TT(_NAV), BSPC_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, KC_XM_PORD
|
||||
#define ___6_ERGO_THUMBS_BP___ TT(_NAV), BSPC_SYMB_BP, ESC_TOPR, ENT_NAV, SPC_TOPR_BP, BP_XM_PORD
|
||||
|
||||
#define ___6_MIDDLE_THUMBS___ ___6_ERGO_THUMBS___
|
||||
|
||||
#define ___12_DOX_ALL_THUMBS___ ___THUMBS_1___, ___THUMBS_2___, ___THUMBS_3___
|
||||
#define ___12_DOX_ALL_THUMBS_BP___ ___THUMBS_1_BP___, ___THUMBS_2___, ___THUMBS_3___
|
||||
|
||||
#define ___16_ALL_THUMBSb___ ___4_THUMBS_1___, ___6_THUMBS_2b___, ___6_ERGO_THUMBSb___
|
||||
#define ___16_ALL_THUMBS___ ___4_THUMBS_1___, ___6_THUMBS_2___, ___6_ERGO_THUMBS___
|
||||
#define ___16_ALL_THUMBSb_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2b_BP___, ___6_ERGO_THUMBS___
|
||||
#define ___16_ALL_THUMBS_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2_BP___, ___6_ERGO_THUMBS_BP___
|
|
@ -22,12 +22,6 @@
|
|||
#include "action.h"
|
||||
#include "action_layer.h"
|
||||
#include "process_keycode/process_tap_dance.h"
|
||||
#include "keymap_bepo.h"
|
||||
|
||||
float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
|
||||
float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
|
||||
|
||||
userspace_config_t userspace_config;
|
||||
|
||||
// Add reconfigurable functions here, for keymap customization
|
||||
// This allows for a global, userspace functions, and continued
|
||||
|
@ -40,7 +34,7 @@ __attribute__ ((weak))
|
|||
void matrix_scan_keymap(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,54 +19,10 @@
|
|||
#ifndef ericgebhart
|
||||
#define ericgebhart
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "core_keysets.h"
|
||||
#include "layouts.h"
|
||||
#include "layers.h"
|
||||
#if defined(OLED_ENABLE)
|
||||
# include "oled_stuff.h"
|
||||
#include "layer_names.h"
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
#include "print.h"
|
||||
#endif
|
||||
|
||||
|
||||
//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */
|
||||
/* Define layer names */
|
||||
enum userspace_layers {
|
||||
_DVORAK = 0,
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_BEAKL,
|
||||
//_WORKMAN,
|
||||
//_NORMAN,
|
||||
//_MALTRON,
|
||||
//_EUCALYN,
|
||||
//_CARPLAX,
|
||||
_DVORAK_BP, // beginning of Bepo
|
||||
_BEAKL_BP,
|
||||
_BEPO,
|
||||
_LAYERS,
|
||||
_NAV, // transient layers
|
||||
_SYMB,
|
||||
_SYMB_BP,
|
||||
_KEYPAD,
|
||||
_KEYPAD_BP,
|
||||
_TOPROWS,
|
||||
_TOPROWS_BP,
|
||||
_RGB,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool rgb_layer_change :1;
|
||||
bool is_overwatch :1;
|
||||
bool nuke_switch :1;
|
||||
bool swapped_numbers :1;
|
||||
bool rgb_matrix_idle_anim :1;
|
||||
};
|
||||
} userspace_config_t;
|
||||
// clang-format on
|
||||
extern userspace_config_t userspace_config;
|
||||
|
||||
#endif
|
||||
|
|
50
users/ericgebhart/extensions/accented_keys.c
Normal file
50
users/ericgebhart/extensions/accented_keys.c
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include USERSPACE_H
|
||||
#include "accented_keys.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
static inline void tap_accented_letter(uint16_t letter, uint16_t dead_key) {
|
||||
uint8_t mod_state = get_mods();
|
||||
uint8_t oneshot_mod_state = get_oneshot_mods();
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
tap_code16(dead_key);
|
||||
set_mods(mod_state);
|
||||
set_oneshot_mods(oneshot_mod_state);
|
||||
tap_code(letter);
|
||||
}
|
||||
|
||||
#undef ACCENTED
|
||||
#define ACCENTED(KC, K1, DEAD_KEY) \
|
||||
case KC: \
|
||||
if (record->event.pressed) { \
|
||||
tap_accented_letter(K1, DEAD_KEY); \
|
||||
} \
|
||||
return false;
|
||||
|
||||
|
||||
bool process_accent_keys(uint16_t keycode, keyrecord_t* record) {
|
||||
switch(keycode){
|
||||
#ifdef ACCENTED_KEYS_ENABLE
|
||||
#include "accented_keys.def"
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
7
users/ericgebhart/oled_stuff.h → users/ericgebhart/extensions/accented_keys.h
Executable file → Normal file
7
users/ericgebhart/oled_stuff.h → users/ericgebhart/extensions/accented_keys.h
Executable file → Normal file
|
@ -16,9 +16,4 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
#include "oled_driver.h"
|
||||
|
||||
void oled_render_mod_lock_status(void);
|
||||
void oled_driver_render_logo(void);
|
||||
bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_accent_keys(uint16_t keycode, keyrecord_t* record);
|
99
users/ericgebhart/extensions/alt_shift.c
Normal file
99
users/ericgebhart/extensions/alt_shift.c
Normal file
|
@ -0,0 +1,99 @@
|
|||
#include USERSPACE_H
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
bool shift_for_two(uint16_t keycode, keyrecord_t *record){
|
||||
uint16_t mod_state = get_mods();
|
||||
|
||||
bool is_shifted = (get_mods() & MOD_MASK_SHIFT) ||
|
||||
(get_oneshot_mods() & MOD_MASK_SHIFT);
|
||||
|
||||
if(record ->event.pressed) {
|
||||
// If shifted, double these common punctuation marks.
|
||||
if(is_shifted){
|
||||
// clear shift temporarily
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
|
||||
tap_code16(keycode);
|
||||
tap_code16(keycode);
|
||||
|
||||
// restore previous shift state
|
||||
set_mods(mod_state);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool shift_for_three(uint16_t keycode, keyrecord_t *record){
|
||||
uint16_t mod_state = get_mods();
|
||||
|
||||
bool is_shifted = (get_mods() & MOD_MASK_SHIFT) ||
|
||||
(get_oneshot_mods() & MOD_MASK_SHIFT);
|
||||
|
||||
if(record ->event.pressed) {
|
||||
// If shifted, double these common punctuation marks.
|
||||
if(is_shifted){
|
||||
// clear shift temporarily
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
|
||||
tap_code16(keycode);
|
||||
tap_code16(keycode);
|
||||
tap_code16(keycode);
|
||||
|
||||
// restore previous shift state
|
||||
set_mods(mod_state);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool override_shift(uint16_t keycode,
|
||||
uint16_t shift_keycode,
|
||||
keyrecord_t *record
|
||||
) {
|
||||
|
||||
bool is_shifted = (get_mods() & MOD_MASK_SHIFT) ||
|
||||
(get_oneshot_mods() & MOD_MASK_SHIFT);
|
||||
|
||||
if (record->event.pressed) {
|
||||
if (is_shifted) {
|
||||
uint8_t mod_state = get_mods();
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
|
||||
tap_code16(shift_keycode);
|
||||
|
||||
set_mods(mod_state);
|
||||
} else {
|
||||
//tap_code16(keycode);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// macros for use in alt_shift.defs.
|
||||
#define ALT_SHIFT(KCKEY, KC01) \
|
||||
case KCKEY: \
|
||||
return override_shift(KCKEY, KC01, record); \
|
||||
break;
|
||||
|
||||
#define SHIFT_FOR_2(KCKEY) \
|
||||
case KCKEY: \
|
||||
return shift_for_two(KCKEY, record); \
|
||||
break;
|
||||
|
||||
#define SHIFT_FOR_3(KCKEY) \
|
||||
case KCKEY: \
|
||||
return shift_for_three(KCKEY, record); \
|
||||
break;
|
||||
|
||||
bool process_alt_shift_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode){
|
||||
#include "alt_shift.def"
|
||||
}
|
||||
return true;
|
||||
}
|
82
users/ericgebhart/extensions/altlocal_keys.c
Normal file
82
users/ericgebhart/extensions/altlocal_keys.c
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Create custom keycodes with arbitrary shifted and unshifted keys.
|
||||
// originally for dvorak on bepo. But used by beakl on qwerty now too.
|
||||
|
||||
// Why?: Because the keycodes are actually defined on the computer. So
|
||||
// if you are trying to have dvorak, or beakl on bepo-fr, the shifted keys
|
||||
// are wrong. But, I want my dvorak, so this allows the pairing of keys into
|
||||
// a keycode that has shifted and non shifted behavior, outside of what the
|
||||
// locale map says on the computer.
|
||||
//
|
||||
// These are the keys for dvorak on bepo. column one is the keycode and mods for
|
||||
// the unshifted key, the second column is the keycode and mods for the shifted key.
|
||||
// GR is Good Range. It subtracts SAFE_RANGE from the keycode so we can make a
|
||||
// reasonably sized array without difficulties. The macro is for the constant declarations
|
||||
// the function is for when we use it.
|
||||
|
||||
//make an alt_local_keys.def - see the example.
|
||||
// Include this file where you have your process_record_user function,
|
||||
// call process_alt_local_key inside your process_record_user.
|
||||
|
||||
#include USERSPACE_H
|
||||
#include "altlocal_keys.h"
|
||||
|
||||
const uint16_t key_translations[][2][2] = {
|
||||
#include "altlocal_keys.def"
|
||||
};
|
||||
|
||||
uint8_t gr(uint16_t kc){
|
||||
return (kc - SAFE_RANGE);
|
||||
}
|
||||
|
||||
// send the right keycode for the right mod.
|
||||
// remove the mods we are taking care of,
|
||||
// send our keycodes then restore them.
|
||||
// all so we can make dvorak keys from bepo keycodes.
|
||||
void send_keycode(uint16_t kc){
|
||||
uint8_t tmp_mods = get_mods();
|
||||
bool is_shifted = ( tmp_mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
|
||||
|
||||
// need to turn of the shift if it is on.
|
||||
unregister_mods((MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)));
|
||||
if(is_shifted){
|
||||
register_mods(SHIFTED_MODS(kc));
|
||||
register_code16(SHIFTED_KEY(kc));
|
||||
unregister_code16(SHIFTED_KEY(kc));
|
||||
unregister_mods(SHIFTED_MODS(kc));
|
||||
} else{
|
||||
register_mods(UNSHIFTED_MODS(kc));
|
||||
register_code16(UNSHIFTED_KEY(kc));
|
||||
unregister_code16(UNSHIFTED_KEY(kc));
|
||||
unregister_mods(UNSHIFTED_MODS(kc));
|
||||
}
|
||||
clear_mods();
|
||||
register_mods(tmp_mods);
|
||||
}
|
||||
|
||||
bool process_alt_local_key(uint16_t keycode, keyrecord_t* record) {
|
||||
switch(keycode){
|
||||
case ALT_LOCAL_KEYS_START ... ALT_LOCAL_KEYS_END:
|
||||
if(record->event.pressed)
|
||||
send_keycode(keycode);
|
||||
unregister_code(keycode);
|
||||
break;
|
||||
}
|
||||
return (true);
|
||||
}
|
56
users/ericgebhart/extensions/altlocal_keys.h
Normal file
56
users/ericgebhart/extensions/altlocal_keys.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Create custom keycodes with arbitrary shifted and unshifted keys.
|
||||
// originally for dvorak on bepo. But used by beakl on qwerty now too.
|
||||
|
||||
// Why?: Because the keycodes are actually defined on the computer. So
|
||||
// if you are trying to have dvorak, or beakl on bepo-fr, the shifted keys
|
||||
// are wrong. But, I want my dvorak, so this allows the pairing of keys into
|
||||
// a keycode that has shifted and non shifted behavior, outside of what the
|
||||
// locale map says on the computer.
|
||||
//
|
||||
// These are the keys for dvorak on bepo. column one is the keycode and mods for
|
||||
// the unshifted key, the second column is the keycode and mods for the shifted key.
|
||||
// GR is Good Range. It subtracts SAFE_RANGE from the keycode so we can make a
|
||||
// reasonably sized array without difficulties. The macro is for the constant declarations
|
||||
// the function is for when we use it.
|
||||
|
||||
//make an alt_local_keys.def - see the example.
|
||||
// Include this file where you have your process_record_user function,
|
||||
// call process_alt_local_key inside your process_record_user.
|
||||
|
||||
uint8_t gr(uint16_t);
|
||||
void send_keycode(uint16_t);
|
||||
bool process_alt_local_key(uint16_t keycode, keyrecord_t* record);
|
||||
|
||||
#define MOD_NONE 0x00
|
||||
|
||||
#define GR(x) (x-SAFE_RANGE)
|
||||
// indexs for the keycode translation table.
|
||||
|
||||
#define MK_KEY(KCNAME, KC1, MOD1, KC2, MOD2) \
|
||||
[GR(KCNAME)] = {{KC1, MOD1}, {KC2, MOD2}},
|
||||
|
||||
#define MK_SKEY(KCNAME, KC1, KC2) \
|
||||
[GR(KCNAME)] = {{KC1, MOD_NONE}, {KC2, MOD_NONE}},
|
||||
|
||||
#define UNSHIFTED_KEY(key) key_translations[gr(key)][0][0]
|
||||
#define UNSHIFTED_MODS(key) key_translations[gr(key)][0][1]
|
||||
#define SHIFTED_KEY(key) key_translations[gr(key)][1][0]
|
||||
#define SHIFTED_MODS(key) key_translations[gr(key)][1][1]
|
38
users/ericgebhart/extensions/console_key_logger.c
Normal file
38
users/ericgebhart/extensions/console_key_logger.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined( CONSOLE_ENABLE) && defined(CONSOLE_KEY_LOGGER_ENABLE)
|
||||
|
||||
#include USERSPACE_H
|
||||
#include "print.h"
|
||||
#include "console_key_logger.h"
|
||||
|
||||
void process_console_key_logger(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
uprintf("0x%04X,%u,%u,%u,%b,0x%02X,0x%02X,%u\n",
|
||||
keycode,
|
||||
record->event.key.row,
|
||||
record->event.key.col,
|
||||
get_highest_layer(layer_state),
|
||||
record->event.pressed,
|
||||
get_mods(),
|
||||
get_oneshot_mods(),
|
||||
record->tap.count
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
19
users/ericgebhart/extensions/console_key_logger.h
Normal file
19
users/ericgebhart/extensions/console_key_logger.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
void process_console_key_logger(uint16_t keycode, keyrecord_t *record);
|
83
users/ericgebhart/extensions/encoders.c
Normal file
83
users/ericgebhart/extensions/encoders.c
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef ENCODER_ENABLE
|
||||
#include "encoders.h"
|
||||
#include USERSPACE_H
|
||||
|
||||
encoder_action_t encoder_actions[] = {
|
||||
#include "encoders.def"
|
||||
};
|
||||
uint8_t NUM_ENCODER_ACTIONS = sizeof(encoder_actions) / sizeof(encoder_action_t);
|
||||
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// do it twice, once for layer actions, once for non layer specific actions.
|
||||
if (!do_encoder_action(index, clockwise, true)){
|
||||
do_encoder_action(index, clockwise, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool do_encoder_action(uint8_t index, bool clockwise, bool layer_actions) {
|
||||
uint8_t mods = get_mods();
|
||||
encoder_action_t *action;
|
||||
|
||||
// look for a match.
|
||||
// on the layer, not on any layer.
|
||||
// with the mods, or no mods.
|
||||
for (int i = 0; i < NUM_ENCODER_ACTIONS; ++i) {
|
||||
action = &encoder_actions[i];
|
||||
|
||||
// this encoder, or another.
|
||||
if (action->index != index)
|
||||
continue;
|
||||
|
||||
// skip non layer specific actions and visa versa
|
||||
// two pass system, once for layers, again for
|
||||
// actions without layers.
|
||||
if (layer_actions){
|
||||
if (action->layer == LAYER_NONE ||
|
||||
action->layer != biton32(layer_state)){
|
||||
continue;
|
||||
}
|
||||
}else if (action->layer != LAYER_NONE)
|
||||
continue;
|
||||
|
||||
// no mods, or these mods.
|
||||
if ((mods && (action->mods == MOD_NONE)) ||
|
||||
(mods && (mods != action->mods)))
|
||||
continue;
|
||||
|
||||
// found one.
|
||||
if (clockwise) {
|
||||
if (action->clockwise != 0) {
|
||||
tap_code16(action->clockwise);
|
||||
} else if (action->cw_func != NULL) {
|
||||
action->cw_func();
|
||||
}
|
||||
} else {
|
||||
if (action->counter_clockwise != 0) {
|
||||
tap_code16(action->counter_clockwise);
|
||||
} else if (action->ccw_func != NULL) {
|
||||
action->ccw_func();
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
46
users/ericgebhart/extensions/encoders.h
Normal file
46
users/ericgebhart/extensions/encoders.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
typedef struct {
|
||||
uint16_t layer;
|
||||
uint16_t index; // 0 or 1, left/right.
|
||||
uint16_t clockwise;
|
||||
uint16_t counter_clockwise;
|
||||
uint16_t mods;
|
||||
void (*cw_func)(void);
|
||||
void (*ccw_func)(void);
|
||||
} encoder_action_t;
|
||||
extern encoder_action_t encoder_actions[];
|
||||
extern uint8_t NUM_ENCODER_ACTIONS;
|
||||
|
||||
// haven't looked at the real values for index, but I know
|
||||
// 0 and 1 are left and right on my kyria.
|
||||
#define LEFT 0
|
||||
#define RIGHT 1
|
||||
#define LAYER_NONE -1
|
||||
#define MOD_NONE 0x00
|
||||
|
||||
#define ENCODER_ACTION(LAYER, INDEX, CW_KC, CCW_KC, MOD) \
|
||||
{LAYER, INDEX, CW_KC, CCW_KC, MOD, NULL, NULL},
|
||||
|
||||
#define ENCODER_FUNCTION(LAYER, INDEX, CW_FUNC, CCW_FUNC, MOD) \
|
||||
{LAYER, INDEX, 0, 0, MOD, CW_FUNC, CCW_FUNC},
|
||||
|
||||
bool do_encoder_action(uint8_t index, bool clockwise, bool layer_actions);
|
91
users/ericgebhart/extensions/extensions.c
Normal file
91
users/ericgebhart/extensions/extensions.c
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include USERSPACE_H
|
||||
|
||||
#include "extensions.h"
|
||||
#include "keymap_combo.h"
|
||||
#include "altlocal_keys.h"
|
||||
#include "tap_hold.h"
|
||||
#include "accented_keys.h"
|
||||
#include "process_smart_lock.h"
|
||||
#include "mod_lock.h"
|
||||
#include "oneshot.h"
|
||||
#include "process_nshot.h"
|
||||
#include "process_locales.h"
|
||||
#include "unicode.h"
|
||||
#include "key_overrides.h"
|
||||
#include "console_key_logger.h"
|
||||
|
||||
// should make header files maybe. being lazy.
|
||||
void process_not_dead(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_alt_shift_user(uint16_t keycode, keyrecord_t *record);
|
||||
void process_send_strs(uint16_t keycode, keyrecord_t *record);
|
||||
//bool process_alt_local_key(uint16_t keycode, keyrecord_t* record);
|
||||
bool process_global_quick_tap(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
// call this from the top of process records before the switch.
|
||||
|
||||
bool process_extensions(uint16_t keycode, keyrecord_t *record){
|
||||
if (!process_locales(keycode, record)) { return false; }
|
||||
|
||||
#ifdef GLOBAL_QUICK_TAP_ENABLE
|
||||
if (!process_global_quick_tap(keycode, record)) {return false; }
|
||||
#endif
|
||||
#ifdef CAPS_WORD_ENABLE
|
||||
if (!process_caps_word(keycode, record)) { return false; }
|
||||
#endif
|
||||
#ifdef ALT_LOCAL_ENABLE
|
||||
if (!process_alt_local_key(keycode, record)) { return false; }
|
||||
#endif
|
||||
#ifdef ACCENTED_KEYS_ENABLE
|
||||
if (!process_accent_keys(keycode, record)) { return false; }
|
||||
#endif
|
||||
#ifdef TAP_HOLD_ENABLE
|
||||
process_tap_hold_user(keycode, record);
|
||||
#endif
|
||||
#ifdef SMART_LOCK_ENABLE
|
||||
process_smart_lock(keycode, record);
|
||||
#endif
|
||||
#ifdef MOD_LOCK_ENABLE
|
||||
process_mod_lock(keycode, record);
|
||||
#endif
|
||||
#ifdef NSHOT_ENABLE
|
||||
if(!process_nshot_state(keycode, record)) {return false;}
|
||||
#endif
|
||||
#ifdef SEND_UNICODE_ENABLE
|
||||
process_unicode_strs(keycode, record);
|
||||
#endif
|
||||
#ifdef SEND_STRING_ENABLE
|
||||
process_send_strs(keycode, record);
|
||||
#endif
|
||||
#ifdef NOT_DEAD_ENABLE
|
||||
process_not_dead(keycode, record);
|
||||
#endif
|
||||
#ifdef ALT_SHIFT_ENABLE
|
||||
if(!process_alt_shift_user(keycode, record)) {return false;}
|
||||
#endif
|
||||
#if defined( CONSOLE_ENABLE) && defined(CONSOLE_KEY_LOGGER_ENABLE)
|
||||
process_console_key_logger(keycode, record);
|
||||
#endif
|
||||
#ifdef ONESHOT_MOD_ENABLE
|
||||
int8_t keycode_consumed = 0;
|
||||
keycode_consumed += update_oneshot_modifiers(keycode, record, keycode_consumed);
|
||||
#endif
|
||||
return true;
|
||||
|
||||
}
|
22
users/ericgebhart/extensions/extensions.h
Normal file
22
users/ericgebhart/extensions/extensions.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
bool process_extensions(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#define PROCESS_EXTENSIONS \
|
||||
if (!process_extensions(keycode, record)) {return false;}
|
53
users/ericgebhart/extensions/key_overrides.h
Normal file
53
users/ericgebhart/extensions/key_overrides.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef KEY_OVERRIDE_ENABLE
|
||||
|
||||
#define KO_NAME(name, ...) &name,
|
||||
#define KO_T(name) const key_override_t name
|
||||
|
||||
#undef KOL
|
||||
#define KOL(name, mods, modded_key, replacement, layer) \
|
||||
KO_T(name) = ko_make_with_layers(mods, modded_key, replacement, (1 << layer));
|
||||
|
||||
#define KO(name, mods, key, replacement) \
|
||||
KO_T(name) = ko_make_basic(mods, key, replacement)
|
||||
|
||||
#define KOLN(name, mods, key, replacement, layers, neg_mods) \
|
||||
KO_T(name) = ko_make_with_layers_and_negmods(mods, key, replacement, layers, neg_mods)
|
||||
|
||||
#define KOLNO(name, mods, key, replacement, layers, neg_mods, options) \
|
||||
KO_T(name) = ko_make_with_layers_negmods_and_options \
|
||||
(mods, key, replacement, layers, neg_mods, options)
|
||||
|
||||
#include "key_overrides.def"
|
||||
|
||||
#undef KO
|
||||
#undef KOL
|
||||
#undef KOLN
|
||||
#undef KOLNO
|
||||
#define KO KO_NAME
|
||||
#define KOL KO_NAME
|
||||
#define KOLN KO_NAME
|
||||
#define KOLNO KO_NAME
|
||||
|
||||
// This globally defines all key overrides to be used
|
||||
const key_override_t **key_overrides = (const key_override_t *[]){
|
||||
#include "key_overrides.def"
|
||||
NULL // Null terminate the array of overrides!
|
||||
};
|
||||
#endif
|
523
users/ericgebhart/extensions/keycodes.h
Executable file
523
users/ericgebhart/extensions/keycodes.h
Executable file
|
@ -0,0 +1,523 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
#include "process_keycode/process_tap_dance.h"
|
||||
#include "eeconfig.h"
|
||||
#include "keymap_bepo.h"
|
||||
//#include "keymap_us_international.h"
|
||||
#include "keymap_us_international_linux.h"
|
||||
#include "lang.h"
|
||||
#include "ericgebhart.h"
|
||||
|
||||
//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */
|
||||
|
||||
// #define DEFAULT_LANG EN // US_INT // EN, BEPO, US_INT, EURkey
|
||||
|
||||
#define KEY_NAME(NAME, ...) NAME,
|
||||
#define BLANK(...)
|
||||
|
||||
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
enum userspace_custom_keycodes {
|
||||
// Get all the custom keys from the defs if we can.
|
||||
ALT_LOCAL_KEYS_START = SAFE_RANGE,
|
||||
#ifdef ALT_LOCAL_ENABLE
|
||||
#undef MK_KEY
|
||||
#define MK_KEY KEY_NAME
|
||||
#undef MK_SKEY
|
||||
#define MK_SKEY KEY_NAME
|
||||
#include "altlocal_keys.def"
|
||||
#undef MK_KEY
|
||||
#undef MK_SKEY
|
||||
#endif
|
||||
ALT_LOCAL_KEYS_END,
|
||||
|
||||
#ifdef ACCENTED_KEYS_ENABLE
|
||||
#undef ACCENTED
|
||||
#define ACCENTED KEY_NAME
|
||||
#include "accented_keys.def"
|
||||
#undef ACCENTED
|
||||
#endif
|
||||
|
||||
#ifdef TAP_HOLD_ENABLE
|
||||
#undef TP_TPL
|
||||
#define TP_TPL KEY_NAME
|
||||
#undef TP_SML
|
||||
#define TP_SML KEY_NAME
|
||||
#undef OPEN_OCL
|
||||
#define OPEN_OCL KEY_NAME
|
||||
#undef OPEN_OCL_ND
|
||||
#define OPEN_OCL_ND KEY_NAME
|
||||
#include "tap_hold.def"
|
||||
#undef OPEN_OCL
|
||||
#undef OPEN_OCL_ND
|
||||
#undef TP_TPL
|
||||
#undef TP_SML
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE_ENABLE
|
||||
#undef UC_STR
|
||||
#define UC_STR KEY_NAME
|
||||
#include "unicode.def"
|
||||
#undef UC_STR
|
||||
#endif
|
||||
|
||||
#ifdef SEND_STRING_ENABLE
|
||||
#undef SEND_STR
|
||||
#define SEND_STR KEY_NAME
|
||||
#undef SEND_STR_DELAY
|
||||
#define SEND_STR_DELAY KEY_NAME
|
||||
#include "send_string.def"
|
||||
#undef SEND_STR
|
||||
#undef SEND_STR_DELAY
|
||||
#endif
|
||||
|
||||
#ifdef SMART_LOCK_ENABLE
|
||||
#undef SMLM
|
||||
#define SMLM KEY_NAME
|
||||
#undef SMLL
|
||||
#define SMLL KEY_NAME
|
||||
#include "smart_lock.def"
|
||||
#undef SMLM
|
||||
#undef SMLL
|
||||
#endif
|
||||
|
||||
#ifdef MOD_LOCK_ENABLE
|
||||
#undef IGNORE_KC
|
||||
#define IGNORE_KC BLANK
|
||||
#undef MODL
|
||||
#define MODL KEY_NAME
|
||||
#include "mod_lock.def"
|
||||
#undef IGNORE_KC
|
||||
#undef MODL
|
||||
#endif
|
||||
|
||||
|
||||
#undef IGNORE_KEY
|
||||
#define IGNORE_KEY BLANK
|
||||
#undef CANCEL_KEY
|
||||
#define CANCEL_KEY BLANK
|
||||
#undef ONESHOT
|
||||
#undef NSHOT
|
||||
#define ONESHOT KEY_NAME
|
||||
#define NSHOT KEY_NAME
|
||||
|
||||
#ifdef NSHOT_ENABLE
|
||||
#include "nshot.def"
|
||||
#else
|
||||
TS_RCTL,
|
||||
TS_LCTL,
|
||||
#endif
|
||||
|
||||
#ifdef ONESHOT_MOD_ENABLE
|
||||
#include "oneshot.def"
|
||||
#endif
|
||||
|
||||
#undef IGNORE_KEY
|
||||
#undef CANCEL_KEY
|
||||
#undef ONESHOT
|
||||
#undef NSHOT
|
||||
|
||||
#ifdef SWAPPER_ENABLE
|
||||
#undef SWAPPER_KEY
|
||||
#define SWAPPER_KEY KEY_NAME
|
||||
#include "swapper.def"
|
||||
#undef SWAPPER_KEY
|
||||
#endif
|
||||
|
||||
#ifdef NOT_DEAD_ENABLE
|
||||
#undef NOT_DEAD
|
||||
#define NOT_DEAD KEY_NAME
|
||||
#include "not_dead.def"
|
||||
#undef NOT_DEAD
|
||||
#endif
|
||||
|
||||
#include "custom_keys.def"
|
||||
NEW_SAFE_RANGE
|
||||
};
|
||||
|
||||
#define FIRST_LAYER (BEGINNING_OF_BASE_LAYERS + 1)
|
||||
|
||||
#define TL_DQUO TLKC(_DQUO)
|
||||
#define TL_QUOT TLKC(_QUOT)
|
||||
#define TL_COMM TLKC(_COMM)
|
||||
#define TL_DOT TLKC(_DOT)
|
||||
#define TL_SCLN TLKC(_SCLN)
|
||||
#define TL_SLSH TLKC(_SLSH)
|
||||
#define TL_EXLM TLKC(_EXLM)
|
||||
#define TL_MINS TLKC(_MINS)
|
||||
#define TL_LPRN TLKC(_LPRN)
|
||||
#define TL_LCBR TLKC(_LCBR)
|
||||
#ifdef SYMBOL_LAYER_ENABLE
|
||||
#define TL_DOT_SYMB LT(LN_SYMB, LANG_KC(TL_DOT))
|
||||
#endif
|
||||
|
||||
|
||||
#define BP_LT BP_LABK
|
||||
#define BP_GT BP_RABK
|
||||
#define BP_TAB KC_TAB
|
||||
#define US_GT US_RABK
|
||||
#define US_LT US_LABK
|
||||
#define US_TAB KC_TAB
|
||||
#define US_DCMM KC_COMM // us doesn't have this dead key.
|
||||
|
||||
// this is odd, there is interplay between this and
|
||||
// the not-dead extension. - and tap-hold not-dead.
|
||||
#undef US_TILD
|
||||
#define US_TILD KC_TILD
|
||||
// redefine us_circ so we actually get a circ.
|
||||
#undef US_CIRC
|
||||
#define US_CIRC KC_CIRC
|
||||
#define US_EQUAL KC_EQUAL
|
||||
// redefine us_quote so we actually get a quote.
|
||||
#undef US_QUOT
|
||||
#define US_QUOT KC_QUOT
|
||||
|
||||
#define US_PRINT_SCREEN KC_PRINT_SCREEN
|
||||
#define US_SCROLL_LOCK KC_SCROLL_LOCK
|
||||
#define US_PAUSE KC_PAUSE
|
||||
#define BP_PRINT_SCREEN KC_PRINT_SCREEN
|
||||
#define BP_SCROLL_LOCK KC_SCROLL_LOCK
|
||||
#define BP_PAUSE KC_PAUSE
|
||||
|
||||
#define BP_F1 KC_F1
|
||||
#define BP_F2 KC_F2
|
||||
#define BP_F3 KC_F3
|
||||
#define BP_F4 KC_F4
|
||||
#define BP_F5 KC_F5
|
||||
#define BP_F6 KC_F6
|
||||
#define BP_F7 KC_F7
|
||||
#define BP_F8 KC_F8
|
||||
#define BP_F9 KC_F9
|
||||
#define BP_F10 KC_F10
|
||||
#define BP_F11 KC_F11
|
||||
#define BP_F12 KC_F12
|
||||
#define BP_TRNS KC_TRNS
|
||||
|
||||
#define US_F1 KC_F1
|
||||
#define US_F2 KC_F2
|
||||
#define US_F3 KC_F3
|
||||
#define US_F4 KC_F4
|
||||
#define US_F5 KC_F5
|
||||
#define US_F6 KC_F6
|
||||
#define US_F7 KC_F7
|
||||
#define US_F8 KC_F8
|
||||
#define US_F9 KC_F9
|
||||
#define US_F10 KC_F10
|
||||
#define US_F11 KC_F11
|
||||
#define US_F12 KC_F12
|
||||
#define US_TRNS KC_TRNS
|
||||
|
||||
#ifdef KEYPAD_LAYER_ENABLE
|
||||
#define TT_KEYPAD TT(LANG_N(_KEYPAD))
|
||||
#define MO_KEYPAD MO(LANG_N(_KEYPAD))
|
||||
#else
|
||||
#define TT_KEYPAD ___
|
||||
#define MO_KEYPAD ___
|
||||
#endif
|
||||
|
||||
#ifdef SYMBOL_LAYER_ENABLE
|
||||
#define TT_SYMB TT(LANG_N(_SYMB))
|
||||
#define MO_SYMB MO(LANG_N(_SYMB))
|
||||
#define OSL_SYMB OSL(LANG_N(_SYMB))
|
||||
#else
|
||||
#define TT_SYMB ___
|
||||
#define MO_SYMB ___
|
||||
#define OSL_SYMB ___
|
||||
#endif
|
||||
|
||||
#ifdef TOPROWS_LAYER_ENABLE
|
||||
#define TT_TOPROWS TT(LANG_N(_TOPROWS))
|
||||
#define MO_TOPROWS MO(LANG_N(_TOPROWS))
|
||||
#else
|
||||
#define TT_TOPROWS ___
|
||||
#define MO_TOPROWS ___
|
||||
#endif
|
||||
|
||||
#ifdef RGB_LAYER_ENABLE
|
||||
#define MO_RGB MO(_RGB)
|
||||
#else
|
||||
#define MO_RGB ___
|
||||
#endif
|
||||
|
||||
#ifdef ADJUST_LAYER_ENABLE
|
||||
#define MO_ADJUST MO(_ADJUST)
|
||||
#else
|
||||
#define MO_ADJUST ___
|
||||
#endif
|
||||
|
||||
#ifdef ACCENTS_MORTE_LAYER_ENABLE
|
||||
//#define LN_ACCENTS_MORTE LANG_N(_ACCENTS_MORTE)
|
||||
#define OSL_ACCENTS_MORTE OSL(LANG_N(_ACCENTS_MORTE))
|
||||
#else
|
||||
#define OSL_ACCENTS_MORTE ___
|
||||
#endif
|
||||
|
||||
#ifdef ACCENTS_LAYER_ENABLE
|
||||
#define LN_ACCENTS LANG_N(_ACCENTS)
|
||||
#define OSL_ACCENTS OSL(LN_ACCENTS)
|
||||
#else
|
||||
#define OSL_ACCENTS ___
|
||||
#endif
|
||||
|
||||
#ifdef MORTE_LAYER_ENABLE
|
||||
#define LN_MORTE LANG_N(_MORTE)
|
||||
#define OSL_MORTE OSL(LN_MORTE)
|
||||
#else
|
||||
#define OSL_MORTE ___
|
||||
#endif
|
||||
|
||||
#define CTLGUI_T(kc) MT(MOD_LGUI | MOD_LCTL, kc)
|
||||
#define SFTGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc)
|
||||
#define ALTGUI_T(kc) MT(MOD_LGUI | MOD_LALT, kc)
|
||||
|
||||
#define ALT_ENT ALGR_T(KC_ENT) // Alt oor nter
|
||||
#define CTL_ENT CTL_T(KC_ENT) // ctrl or space
|
||||
#define CTL_SPC CTL_T(KC_SPC) // ctrl or space
|
||||
#define CTL_BSPC CTL_T(KC_BSPC) // ctrl or backspace
|
||||
#define ALT_DEL ALT_T(KC_DEL) // Alt or delete
|
||||
#define GUI_ESC GUI_T(KC_ESC) // Gui or escape
|
||||
#define ALGR_SYMB ALGR_T(TG(LANG_N(_SYMB))) // Alt gre or toggle symbol layer
|
||||
|
||||
// one shot on tap, or hold like usual
|
||||
#define OSLCTL_CTL CTL_T(OS_LCTL)
|
||||
#define OSLSFT_SFT SFT_T(OS_LSFT)
|
||||
#define OSLALT_ALT ALT_T(OS_LALT)
|
||||
#define OSLGUI_GUI GUI_T(OS_LGUI)
|
||||
|
||||
/* miryoku */
|
||||
/* esc_media, space_navnm, tab_navm, ENT_SYM, BSPC_TOPR, del_fun */
|
||||
/* hands down */
|
||||
/* TL_COMM, TL_DOT_SYMB, GUI_ESC, ALT_ENT, SPC_TOPR, BSPC */
|
||||
|
||||
// Lots of LT options. My thumb keys.
|
||||
#ifdef TOPROWS_LAYER_ENABLE
|
||||
#define LN_TOPROWS LANG_N(_TOPROWS)
|
||||
#else
|
||||
#define LN_TOPROWS KC_NO
|
||||
#endif
|
||||
|
||||
#ifdef SYMBOL_LAYER_ENABLE
|
||||
# define LN_SYMB LANG_N(_SYMB)
|
||||
# define TH_LTR_SYM LT(LN_SYMB, THUMB_LETTER)
|
||||
#else
|
||||
# define TH_LTR_SYM THUMB_LETTER
|
||||
#endif
|
||||
|
||||
#define TH_LTR_NAV LT(_NAV, THUMB_LETTER)
|
||||
|
||||
#define LN_KEYPAD LANG_N(_KEYPAD)
|
||||
|
||||
#define ACCENTS_RALT MT(MOD_RALT, OSL_ACCENTS)
|
||||
#define ACCENTS_CTL MT(MOD_LCTL, OSL_ACCENTS)
|
||||
#define ENT_SYM LT(LN_SYMB, KC_ENT)
|
||||
#define ENT_NAV LT(_NAV, KC_ENT)
|
||||
#define ENT_TOPR LT(LN_TOPROWS, KC_ENT)
|
||||
|
||||
#define ESC_TOPR LT(LN_TOPROWS, KC_ESC)
|
||||
#define ESC_SYMB LT(LN_SYMB, KC_ESC)
|
||||
#define ESC_NUM LT(LN_KEYPAD, KC_ESC)
|
||||
#define ESC_MEDIA LT(_MEDIA, KC_ESC)
|
||||
|
||||
#define DEL_FUN LT(_FUN, KC_DEL)
|
||||
#define TAB_NAVM LT(_NAVm, KC_TAB)
|
||||
#define TAB_NUM LT(LN_KEYPAD, KC_TAB)
|
||||
#define I_SYMB LT(LN_SYMB, KC_I)
|
||||
|
||||
#define SPC_NAVm LT(_NAVm, KC_SPC)
|
||||
#define SPC_NAVnm LT(_NAVnm, KC_SPC)
|
||||
#define SPC_NAV LT(_NAV, KC_SPC)
|
||||
#define SPC_SYMB LT(LN_SYMB, KC_SPC)
|
||||
#define SPC_TOPR LT(LN_TOPROWS, KC_SPC)
|
||||
#define SPC_LAYR LT(_LAYERS, KC_SPC)
|
||||
#define SPC_ADJ LT(_ADJUST, KC_SPC)
|
||||
#define SPC_NUM LT(LN_KEYPAD, KC_SPC)
|
||||
|
||||
#define BSPC_NAVm LT(_NAVm, KC_BSPC)
|
||||
#define BSPC_NAV LT(_NAV, KC_BSPC)
|
||||
#ifdef SYMBOL_LAYER_ENABLE
|
||||
#define BSPC_SYMB LT(LN_SYMB, KC_BSPC)
|
||||
#else
|
||||
#define BSPC_SYMB KC_BSPC
|
||||
#endif
|
||||
#define BSPC_TOPR LT(LN_TOPROWS, KC_BSPC)
|
||||
#define BSPC_NUM LT(LN_KEYPAD, KC_BSPC)
|
||||
#define BSPC_ALT MT(MOD_LALT, KC_BSPC)
|
||||
#define BSPC_MEDIA LT(_MEDIA, KC_BSPC)
|
||||
|
||||
#define KC_BKTAB LSFT(KC_TAB)
|
||||
|
||||
// layer toggles
|
||||
#define LAYER_OSL OSL(_LAYERS)
|
||||
#define SYM_OSL OSL(LN_SYMB)
|
||||
#define SYM_TG TG(LN_SYMB)
|
||||
#define SYM_MO MO(LN_SYMB)
|
||||
#define NAV_TG TG(_NAV)
|
||||
#define COMBO_REF_TG_EN TG(_COMBO_REF)
|
||||
#define NUM_OSL OSL(LN_KEYPAD)
|
||||
#define NUM_TO TO(LN_KEYPAD)
|
||||
#define FUN_OSL OSL(LN_FUNC)
|
||||
#define SYS_OSL OSL(LN_SYSTEM)
|
||||
#define SYS_TG TG(LN_SYSTEM)
|
||||
|
||||
// Shortcuts
|
||||
#define S_CUT S(KC_DEL)
|
||||
#define S_COPY C(KC_INS)
|
||||
#define S_PASTE S(KC_INS)
|
||||
#define S_UNDO C(KC_Z)
|
||||
#define S_REDO C(KC_Y)
|
||||
#define S_SAVE C(KC_S)
|
||||
#define S_ALL C(KC_A)
|
||||
#define S_BACK A(KC_LEFT)
|
||||
#define S_FWD A(KC_RIGHT)
|
||||
#define C_BSPC C(KC_BSPC)
|
||||
#define SCREEN S(C(KC_PSCR))
|
||||
|
||||
// One Shot Mods keycodes,
|
||||
#define KC_MLSF OSM(MOD_LSFT)
|
||||
#define KC_MRSF OSM(MOD_RSFT)
|
||||
#define OS_LGUI OSM(MOD_LGUI)
|
||||
#define OS_RGUI OSM(MOD_RGUI)
|
||||
#define OS_LSFT OSM(MOD_LSFT)
|
||||
#define OS_RSFT OSM(MOD_RSFT)
|
||||
#define OS_LCTL OSM(MOD_LCTL)
|
||||
#define OS_RCTL OSM(MOD_RCTL)
|
||||
#define OS_LALT OSM(MOD_LALT)
|
||||
#define OS_RALT OSM(MOD_RALT)
|
||||
#define ALT_APP ALT_T(KC_APP)
|
||||
|
||||
#define MG_NKRO MAGIC_TOGGLE_NKRO
|
||||
|
||||
#define UC_IRNY UC(0x2E2E)
|
||||
#define UC_CLUE UC(0x203D)
|
||||
|
||||
|
||||
//// TAP DANCE
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tdtap;
|
||||
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_HOLD = 4,
|
||||
DOUBLE_SINGLE_TAP = 5, //send two single taps
|
||||
TRIPLE_TAP = 6,
|
||||
TRIPLE_HOLD = 7
|
||||
};
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_ESC_CAPS = 0,
|
||||
TD_TAB_BKTAB = 1,
|
||||
TD_MDIA_SYMB = 2,
|
||||
TD_HOME_END = 3,
|
||||
TD_XMONAD_ESC = 4,
|
||||
TD_DEF_LAYER_SW = 5,
|
||||
TD_DEF_OS_LAYER_SW = 6,
|
||||
TD_MOUSE_BTNS = 7,
|
||||
TD_DVORAK_BEPO = 8,
|
||||
TD_UP_HOME = 9,
|
||||
TD_DOWN_END = 10,
|
||||
TD_RIGHT_TAB = 11,
|
||||
TD_LEFT_BACKTAB = 12
|
||||
};
|
||||
|
||||
|
||||
// Tap dance
|
||||
#define TAB_BKTAB TD(TD_TAB_BKTAB) // Tab or backtab tapdance.
|
||||
#define MDIA_SYMB_KP_LAYERS TD(TD_MDIA_SYMB) // MDIA, symb, keypad, layouts layer tapdance toggle.
|
||||
#define DEF_LAYER_SW TD(TD_DEF_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer
|
||||
#define DEF_OS_LAYER_SW TD(TD_DEF_OS_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer
|
||||
#define HOME_END TD(TD_HOME_END) // home or end tapdance.
|
||||
#define XMONAD_ESC TD(TD_XMONAD_ESC) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
|
||||
#define DVORAK_ET_BEPO TD(TD_DVORAK_BEPO) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
|
||||
#define TDMOUSE_BTNS TD(TD_MOUSE_BTNS) // hmmm. 1-5
|
||||
#define RIGHT_TAB TD(TD_RIGHT_TAB) // Bad idea these 4. Maybe with good timing...
|
||||
#define LEFT_BACKTAB TD(TD_LEFT_BACKTAB)
|
||||
#define UP_HOME TD(TD_UP_HOME)
|
||||
#define DOWN_END TD(TD_DOWN_END) // No! Down Down Not End....
|
||||
|
||||
// HOME ROW LAYER TOGGLE (LT) and Shift.
|
||||
// both sides of the home row have "shift, ___, media , symb, ___" and "___, symb, media, ___, shift".
|
||||
// so pinky fingers are shift when held and the index and second fingers are symbol and
|
||||
// media layers when held.
|
||||
|
||||
// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators).
|
||||
// The KC_CCCV key takes care of the last two...
|
||||
#define MK_CUT LSFT(KC_DEL) // shift + delete
|
||||
#define MK_COPY LCTL(KC_INS) // ctrl + insert
|
||||
#define MK_PASTE LSFT(KC_INS) // shift + insert
|
||||
#define EOT LCTL(KC_D)
|
||||
#define NAK LCTL(KC_U)
|
||||
#define XPASTE LCTL(LSFT(KC_V))
|
||||
#define UNDO LCTL(KC_Z)
|
||||
#define XCOPY LCTL(LSFT(KC_C))
|
||||
|
||||
#undef ___ //kint defines it as KC_NO
|
||||
#define ___ KC_TRNS
|
||||
#define XXX KC_NO
|
||||
#define ____ _TRNS
|
||||
|
||||
// Blocking keys
|
||||
#define _X_ XXX
|
||||
#define ___X___ XXX
|
||||
#define ___X2___ XXX, XXX
|
||||
#define ___X3___ ___X2___, XXX
|
||||
#define ___X4___ ___X3___, XXX
|
||||
#define ___X5___ ___X4___, XXX
|
||||
#define ___X6___ ___X5___, XXX
|
||||
#define ___X12___ ___X6___, ___X6___
|
||||
#define ___X15___ ___X5___, ___X5___, ___X5___
|
||||
|
||||
// Transparent keys
|
||||
#define ___2___ ___, ___
|
||||
#define ___3___ ___2___, ___
|
||||
#define ___4___ ___3___, ___
|
||||
#define ___5___ ___4___, ___
|
||||
#define ___6___ ___5___, ___
|
||||
#define ___10___ ___6___, ___4___
|
||||
#define ___12___ ___6___, ___6___
|
||||
#define ___14___ ___5___, ___4___, ___5___
|
||||
#define ___15___ ___5___, ___5___, ___5___
|
||||
#define ___16___ ___15___, ___
|
||||
|
||||
#define ____2_ ____, ____
|
||||
#define ____3_ ____2_, ____
|
||||
#define ____4_ ____3_, ____
|
||||
#define ____5_ ____4_, ____
|
||||
#define ____6_ ____5_, ____
|
||||
#define ____10_ ____6_, ____4_
|
||||
#define ____12_ ____6_, ____6_
|
||||
#define ____14_ ____5_, ____4_, ____5_
|
||||
#define ____15_ ____5_, ____5_, ____5_
|
||||
#define ____16_ ____15_, ____
|
||||
|
||||
int on_qwerty(void);
|
||||
|
||||
#ifdef TAP_DANCES_ENABLE
|
||||
int cur_dance (qk_tap_dance_state_t *state);
|
||||
|
||||
//for the x tap dance. Put it here so it can be used in any keymap
|
||||
void x_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||
void x_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
#endif
|
139
users/ericgebhart/extensions/keymap_combo.h
Normal file
139
users/ericgebhart/extensions/keymap_combo.h
Normal file
|
@ -0,0 +1,139 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Keymap helpers
|
||||
void process_combo_event(uint16_t combo_index, bool pressed);
|
||||
|
||||
|
||||
// define reference layers per layer.
|
||||
#define REF_LAYER(LAYER, REF_LAYER) \
|
||||
case LAYER: return REF_LAYER;
|
||||
|
||||
#define K_ENUM(name, key, ...) name,
|
||||
#define K_DATA(name, key, ...) const uint16_t PROGMEM cmb_##name[] = {__VA_ARGS__, COMBO_END};
|
||||
#define K_COMB(name, key, ...) [name] = COMBO(cmb_##name, key),
|
||||
|
||||
#define A_ENUM(name, string, ...) name,
|
||||
#define A_DATA(name, string, ...) const uint16_t PROGMEM cmb_##name[] = {__VA_ARGS__, COMBO_END};
|
||||
#define A_COMB(name, string, ...) [name] = COMBO_ACTION(cmb_##name),
|
||||
#define A_ACTI(name, string, ...) \
|
||||
case name: \
|
||||
if (pressed) SEND_STRING(string); \
|
||||
break;
|
||||
|
||||
#define A_TOGG(name, layer, ...) \
|
||||
case name: \
|
||||
if (pressed) layer_invert(layer); \
|
||||
break;
|
||||
|
||||
#define BLANK(...)
|
||||
// Generate data needed for combos/actions
|
||||
// Create Enum
|
||||
#define COMBO_REF_LAYER BLANK
|
||||
#undef COMB
|
||||
#undef SUBS
|
||||
#undef TOGG
|
||||
#define COMB K_ENUM
|
||||
#define SUBS A_ENUM
|
||||
#define TOGG A_ENUM
|
||||
enum combos {
|
||||
#include "combos.def"
|
||||
COMBO_LENGTH
|
||||
};
|
||||
// Export length to combo module
|
||||
uint16_t COMBO_LEN = COMBO_LENGTH;
|
||||
|
||||
// Bake combos into mem
|
||||
#undef COMB
|
||||
#undef SUBS
|
||||
#undef TOGG
|
||||
#define COMB K_DATA
|
||||
#define SUBS A_DATA
|
||||
#define TOGG A_DATA
|
||||
#include "combos.def"
|
||||
#undef COMB
|
||||
#undef SUBS
|
||||
#undef TOGG
|
||||
|
||||
// Fill combo array
|
||||
#define COMB K_COMB
|
||||
#define SUBS A_COMB
|
||||
#define TOGG A_COMB
|
||||
combo_t key_combos[] = {
|
||||
#include "combos.def"
|
||||
};
|
||||
#undef COMB
|
||||
#undef SUBS
|
||||
#undef TOGG
|
||||
|
||||
// Fill QMK hook
|
||||
#define COMB BLANK
|
||||
#define SUBS A_ACTI
|
||||
#define TOGG A_TOGG
|
||||
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
#if defined( CONSOLE_ENABLE) && defined(CONSOLE_KEY_LOGGER_ENABLE)
|
||||
if (pressed) {
|
||||
combo_t *combo = &key_combos[combo_index];
|
||||
uint8_t idx = 0;
|
||||
uint16_t combo_keycode;
|
||||
while ((combo_keycode = pgm_read_word(&combo->keys[idx])) != COMBO_END) {
|
||||
uprintf("0x%04X,NA,NA,%u,%u,0x%02X,0x%02X,0\n",
|
||||
combo_keycode,
|
||||
/* <missing row information> */
|
||||
/* <missing column information> */
|
||||
get_highest_layer(layer_state),
|
||||
pressed,
|
||||
get_mods(),
|
||||
get_oneshot_mods()
|
||||
);
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
switch (combo_index) {
|
||||
#include "combos.def"
|
||||
}
|
||||
|
||||
// Allow user overrides per keymap
|
||||
#if __has_include("inject.h")
|
||||
# include "inject.h"
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef COMB
|
||||
#undef SUBS
|
||||
#undef TOGG
|
||||
|
||||
#define COMB BLANK
|
||||
#define SUBS BLANK
|
||||
#define TOGG BLANK
|
||||
|
||||
#undef COMBO_REF_LAYER
|
||||
#define COMBO_REF_LAYER REF_LAYER
|
||||
|
||||
uint16_t combo_ref_from_layer(uint16_t layer){
|
||||
switch (biton32(layer_state)){
|
||||
#include "combos.def"
|
||||
|
||||
#ifdef COMBO_REF_DEFAULT
|
||||
default: return COMBO_REF_DEFAULT;
|
||||
#else
|
||||
default: return layer;
|
||||
#endif
|
||||
}
|
||||
}
|
81
users/ericgebhart/extensions/mod_lock.c
Normal file
81
users/ericgebhart/extensions/mod_lock.c
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>, @possumvibes
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Derived from mod_lock by @possumvibes.
|
||||
|
||||
#include "mod_lock.h"
|
||||
|
||||
#undef MODL
|
||||
#define MODL(KEYCODE, MODKC) \
|
||||
{false, MODKC, KEYCODE},
|
||||
|
||||
#define A_KEY(KEYCODE) case KEYCODE:
|
||||
#define BLANK(...)
|
||||
|
||||
#undef IGNORE_KC
|
||||
#define IGNORE_KC BLANK
|
||||
|
||||
mod_lock_state_t modlock_states[] = {
|
||||
#ifdef MOD_LOCK_ENABLE
|
||||
#include "mod_lock.def"
|
||||
#endif
|
||||
};
|
||||
uint8_t NUM_MODLOCK_STATES = sizeof(modlock_states) / sizeof(mod_lock_state_t);
|
||||
|
||||
void process_mod_lock(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef MOD_LOCK_ENABLE
|
||||
mod_lock_state_t *curr_state = NULL;
|
||||
|
||||
for (int i = 0; i < NUM_MODLOCK_STATES; ++i) {
|
||||
curr_state = &modlock_states[i];
|
||||
|
||||
if (keycode == curr_state->trigger) {
|
||||
if (record->event.pressed) {
|
||||
if (curr_state->locking) {
|
||||
unregister_code(curr_state->mod);
|
||||
} else {
|
||||
register_code(curr_state->mod);
|
||||
}
|
||||
|
||||
curr_state->locking = !curr_state->locking;
|
||||
}
|
||||
} else {
|
||||
// check for cancel condition on keydown and keyup
|
||||
if (curr_state->locking && is_mod_lock_cancel_key(keycode)) {
|
||||
unregister_code(curr_state->mod);
|
||||
curr_state->locking = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef MODL
|
||||
#undef IGNORE_KC
|
||||
#define MODL BLANK
|
||||
#define IGNORE_KC A_KEY
|
||||
bool is_mod_lock_cancel_key(uint16_t keycode) {
|
||||
// Mod locks are exclusively used on the nav layer.
|
||||
// any key besides nav keys should cancel the lock.
|
||||
switch (keycode) {
|
||||
#ifdef MOD_LOCK_ENABLE
|
||||
#include "mod_lock.def"
|
||||
#endif
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
39
users/ericgebhart/extensions/mod_lock.h
Normal file
39
users/ericgebhart/extensions/mod_lock.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include USERSPACE_H
|
||||
|
||||
typedef struct {
|
||||
bool locking;
|
||||
uint16_t mod;
|
||||
uint16_t trigger;
|
||||
} mod_lock_state_t;
|
||||
|
||||
extern mod_lock_state_t mod_lock_states[];
|
||||
extern uint8_t NUM_MODLOCK_STATES;
|
||||
|
||||
// Custom mod-locking functionality that registers the mod and
|
||||
// keeps it registered until the trigger key is tapped again
|
||||
// or until a specified cancel key is tapped.
|
||||
void process_mod_lock(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
bool is_mod_lock_cancel_key(uint16_t keycode);
|
||||
|
||||
#undef IGNORE_KC
|
||||
#define IGNORE_KC(KC) \
|
||||
case KC:
|
36
users/ericgebhart/extensions/not_dead.c
Normal file
36
users/ericgebhart/extensions/not_dead.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include USERSPACE_H
|
||||
|
||||
inline void not_dead(uint16_t kc1, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
}
|
||||
}
|
||||
|
||||
#define NOT_DEAD(KCKEY, KC01) \
|
||||
case KCKEY: \
|
||||
not_dead(KC01, record); \
|
||||
break; \
|
||||
|
||||
void process_not_dead(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode){
|
||||
#include "not_dead.def"
|
||||
}
|
||||
}
|
154
users/ericgebhart/extensions/nshot_mod.c
Normal file
154
users/ericgebhart/extensions/nshot_mod.c
Normal file
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>, @possumvibes
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Derived from nshot_mod by @possumvibes.
|
||||
// Derived from one shot_mod by @Callum.
|
||||
|
||||
#include "nshot_mod.h"
|
||||
#include USERSPACE_H
|
||||
|
||||
#undef NSHOT
|
||||
#define NSHOT(KEYCODE, MOD, COUNT) \
|
||||
{KEYCODE, MOD, COUNT, os_up_unqueued, 0},
|
||||
|
||||
#undef ONESHOT
|
||||
#define ONESHOT(KEYCODE, MOD) NSHOT(KEYCODE, MOD, 1)
|
||||
#define A_KEY(KEYCODE) case KEYCODE:
|
||||
#define BLANK(...)
|
||||
|
||||
#define CANCEL_KEY BLANK
|
||||
#define IGNORE_KEY BLANK
|
||||
nshot_state_t nshot_states[] = {
|
||||
#include "nshot.def"
|
||||
};
|
||||
uint8_t NUM_NSHOT_STATES = sizeof(nshot_states) / sizeof(nshot_state_t);
|
||||
|
||||
bool process_nshot_state(uint16_t keycode, keyrecord_t *record) {
|
||||
nshot_state_t *curr_state = NULL;
|
||||
|
||||
switch(keycode){
|
||||
case CLEAR: {
|
||||
clear_oneshot_mods();
|
||||
clear_mods();
|
||||
return false;
|
||||
}
|
||||
case PANIC: {
|
||||
clear_oneshot_mods();
|
||||
clear_mods();
|
||||
if (get_oneshot_layer() != 0) {
|
||||
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
|
||||
}
|
||||
layer_move(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < NUM_NSHOT_STATES; ++i) {
|
||||
curr_state = &nshot_states[i];
|
||||
|
||||
if (keycode == curr_state->trigger) {
|
||||
if (record->event.pressed) {
|
||||
// Trigger keydown
|
||||
if (curr_state->state == os_up_unqueued) {
|
||||
register_code(curr_state->mod);
|
||||
}
|
||||
curr_state->state = os_down_unused;
|
||||
curr_state->count = 0;
|
||||
} else {
|
||||
// Trigger keyup
|
||||
switch (curr_state->state) {
|
||||
case os_down_unused:
|
||||
// If we didn't use the mod while trigger was held, queue it.
|
||||
curr_state->state = os_up_queued;
|
||||
break;
|
||||
case os_down_used:
|
||||
// If we did use the mod while trigger was held, unregister it.
|
||||
curr_state->state = os_up_unqueued;
|
||||
unregister_code(curr_state->mod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (record->event.pressed) {
|
||||
if (is_nshot_cancel_key(keycode) && curr_state->state != os_up_unqueued) {
|
||||
// Cancel oneshot on designated cancel keydown.
|
||||
curr_state->state = os_up_unqueued;
|
||||
curr_state->count = 0;
|
||||
unregister_code(curr_state->mod);
|
||||
}
|
||||
} else {
|
||||
if (!is_nshot_ignored_key(keycode)) {
|
||||
// On non-ignored keyup, consider the oneshot used.
|
||||
switch (curr_state->state) {
|
||||
case os_down_unused:
|
||||
// The mod key is being held as a normal mod.
|
||||
curr_state->state = os_down_used;
|
||||
break;
|
||||
case os_up_queued:
|
||||
// The mod key is being used as an n-shot.
|
||||
// Increment the keys-used count.
|
||||
curr_state->count = curr_state->count + 1;
|
||||
|
||||
// If the n-shot max has been reached, complete the n-shot.
|
||||
if (curr_state->count == curr_state->max_count) {
|
||||
curr_state->state = os_up_unqueued;
|
||||
curr_state->count = 0;
|
||||
unregister_code(curr_state->mod);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// turn off the nshot/oneshot macros
|
||||
#undef ONESHOT
|
||||
#undef NSHOT
|
||||
#define ONESHOT BLANK
|
||||
#define NSHOT BLANK
|
||||
|
||||
#undef CANCEL_KEY
|
||||
#undef IGNORE_KEY
|
||||
#define IGNORE_KEY BLANK
|
||||
#define CANCEL_KEY A_KEY
|
||||
bool is_nshot_cancel_key(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
#include "nshot.def"
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#undef CANCEL_KEY
|
||||
#undef IGNORE_KEY
|
||||
#define CANCEL_KEY BLANK
|
||||
#define IGNORE_KEY A_KEY
|
||||
bool is_nshot_ignored_key(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
#include "nshot.def"
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
45
users/ericgebhart/extensions/nshot_mod.h
Normal file
45
users/ericgebhart/extensions/nshot_mod.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Represents the four states an n-shot key can be in (from users/callum)
|
||||
typedef enum {
|
||||
os_up_unqueued,
|
||||
os_up_queued,
|
||||
os_down_unused,
|
||||
os_down_used,
|
||||
} oneshot_state;
|
||||
|
||||
typedef struct {
|
||||
uint16_t trigger;
|
||||
uint16_t mod;
|
||||
uint8_t max_count;
|
||||
oneshot_state state;
|
||||
uint8_t count;
|
||||
} nshot_state_t;
|
||||
|
||||
extern nshot_state_t nshot_states[];
|
||||
extern uint8_t NUM_NSHOT_STATES;
|
||||
|
||||
|
||||
// Keys that should cancel the n-shot mod if tapped
|
||||
bool is_nshot_cancel_key(uint16_t keycode);
|
||||
|
||||
// Keys that should not count towards n-shot usage (e.g., layer toggles)
|
||||
bool is_nshot_ignored_key(uint16_t keycode);
|
217
users/ericgebhart/extensions/oneshot.c
Normal file
217
users/ericgebhart/extensions/oneshot.c
Normal file
|
@ -0,0 +1,217 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include USERSPACE_H
|
||||
#include "oneshot.h"
|
||||
|
||||
#ifdef ONESHOT_MOD_ENABLE
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Add to process_record_user.
|
||||
/* int8_t keycode_consumed = 0; */
|
||||
|
||||
/* #ifdef ONESHOT_ENABLE */
|
||||
/* keycode_consumed += update_oneshot_modifiers(keycode, record, keycode_consumed); */
|
||||
/* #endif */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
#define ONESHOT(KEYCODE, MOD) case KEYCODE: return MOD;
|
||||
|
||||
#define A_KEY(KEYCODE) case KEYCODE:
|
||||
#define BLANK(...)
|
||||
|
||||
#define CANCEL_KEY BLANK
|
||||
#define IGNORE_KEY BLANK
|
||||
|
||||
// the basic states a oneshot modifier can be in
|
||||
typedef enum {
|
||||
ONESHOT_STATE_OFF = 0,
|
||||
ONESHOT_STATE_PRESSED = 1,
|
||||
ONESHOT_STATE_QUEUED = 2,
|
||||
ONESHOT_STATE_CAPSWORD = 3,
|
||||
ONESHOT_STATE_LOCK = 4,
|
||||
ONESHOT_STATE_END_PRESSED = 5,
|
||||
} oneshot_state;
|
||||
|
||||
oneshot_state modifiers_state_transitions_normal[5] = {ONESHOT_STATE_PRESSED, ONESHOT_STATE_QUEUED, ONESHOT_STATE_LOCK, ONESHOT_STATE_END_PRESSED, ONESHOT_STATE_END_PRESSED};
|
||||
|
||||
static oneshot_state modifiers_with_state[ONESHOT_MOD_COUNT] = {
|
||||
ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF, ONESHOT_STATE_OFF,
|
||||
};
|
||||
|
||||
// oneshot mods always get registered immediately to the operating system, but we also
|
||||
// need to keep track if the mod(s) got combined with a normal key (applied)
|
||||
static bool unapplied_mods_present = false;
|
||||
|
||||
// keycode of the last pressed 'normal' key which haven't been released yet
|
||||
static uint16_t repeating_normal_key = 0;
|
||||
|
||||
// utility functions (implemented at the bottom of this file)
|
||||
static void set_modifier_state(oneshot_mod osmod, oneshot_state new_state);
|
||||
static int8_t set_modifier_state_all(oneshot_state new_state);
|
||||
static void set_modifier_state_all_from_to(oneshot_state oneshot_state_from, oneshot_state oneshot_state_to);
|
||||
static bool all_modifiers_are_off(void);
|
||||
|
||||
int8_t turnoff_oneshot_modifiers() {
|
||||
return set_modifier_state_all(ONESHOT_STATE_OFF);
|
||||
}
|
||||
|
||||
// see comment in corresponding headerfile
|
||||
int8_t update_oneshot_modifiers(uint16_t keycode, keyrecord_t *record, int8_t keycode_consumed) {
|
||||
|
||||
// cancel keys
|
||||
if (is_oneshot_modifier_cancel_key(keycode) && record->event.pressed) {
|
||||
if (keycode_consumed == 0) {
|
||||
unapplied_mods_present = false;
|
||||
keycode_consumed += set_modifier_state_all(ONESHOT_STATE_OFF);
|
||||
} else {
|
||||
keycode_consumed = 0;
|
||||
}
|
||||
return keycode_consumed;
|
||||
}
|
||||
|
||||
// ignored keys
|
||||
if (is_oneshot_modifier_ignored_key(keycode)) {
|
||||
return keycode_consumed;
|
||||
}
|
||||
|
||||
oneshot_mod osmod = get_modifier_for_trigger_key(keycode);
|
||||
|
||||
// trigger keys
|
||||
if (osmod != ONESHOT_NONE) {
|
||||
oneshot_state state = modifiers_with_state[osmod];
|
||||
if (record->event.pressed) {
|
||||
if (state == ONESHOT_STATE_OFF) {
|
||||
unapplied_mods_present = (repeating_normal_key == 0);
|
||||
}
|
||||
oneshot_state tostate = modifiers_state_transitions_normal[state];
|
||||
set_modifier_state(osmod, tostate);
|
||||
} else {
|
||||
if (state == ONESHOT_STATE_PRESSED) {
|
||||
if (!unapplied_mods_present) {
|
||||
set_modifier_state(osmod, ONESHOT_STATE_OFF);
|
||||
} else {
|
||||
set_modifier_state(osmod, ONESHOT_STATE_QUEUED);
|
||||
}
|
||||
} else if (state == ONESHOT_STATE_END_PRESSED) {
|
||||
set_modifier_state(osmod, ONESHOT_STATE_OFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
// normal keys
|
||||
else {
|
||||
if (record->event.pressed) {
|
||||
if (!all_modifiers_are_off()) {
|
||||
if (unapplied_mods_present) {
|
||||
unapplied_mods_present = false;
|
||||
} else {
|
||||
unregister_code(repeating_normal_key);
|
||||
set_modifier_state_all_from_to(ONESHOT_STATE_QUEUED, ONESHOT_STATE_OFF);
|
||||
}
|
||||
}
|
||||
repeating_normal_key = keycode;
|
||||
} else {
|
||||
if (!all_modifiers_are_off()) {
|
||||
unregister_code(keycode);
|
||||
set_modifier_state_all_from_to(ONESHOT_STATE_QUEUED, ONESHOT_STATE_OFF);
|
||||
}
|
||||
repeating_normal_key = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// implementation of utility functions
|
||||
|
||||
// registers/unregisters a mod to the operating system on state change if necessary
|
||||
void update_modifier(oneshot_mod osmod, oneshot_state previous_state, oneshot_state current_state) {
|
||||
if (previous_state == ONESHOT_STATE_OFF) {
|
||||
register_code(KC_LCTRL + osmod);
|
||||
} else {
|
||||
if (current_state == ONESHOT_STATE_OFF) {
|
||||
unregister_code(KC_LCTRL + osmod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_modifier_state(oneshot_mod osmod, oneshot_state new_state) {
|
||||
oneshot_state previous_state = modifiers_with_state[osmod];
|
||||
if (previous_state != new_state) {
|
||||
modifiers_with_state[osmod] = new_state;
|
||||
update_modifier(osmod, previous_state, new_state);
|
||||
}
|
||||
}
|
||||
|
||||
int8_t set_modifier_state_all(oneshot_state new_state) {
|
||||
int8_t c = 0;
|
||||
for (int8_t i = 0; i < ONESHOT_MOD_COUNT; i++) {
|
||||
oneshot_state previous_state = modifiers_with_state[i];
|
||||
if (previous_state != new_state) {
|
||||
modifiers_with_state[i] = new_state;
|
||||
update_modifier(i, previous_state, new_state);
|
||||
c += 1;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
void set_modifier_state_all_from_to(oneshot_state oneshot_state_from, oneshot_state oneshot_state_to) {
|
||||
for (int8_t i = 0; i < ONESHOT_MOD_COUNT; i++) {
|
||||
if (modifiers_with_state[i] == oneshot_state_from) {
|
||||
modifiers_with_state[i] = oneshot_state_to;
|
||||
update_modifier(i, oneshot_state_from, oneshot_state_to);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool all_modifiers_are_off() {
|
||||
for (int8_t i = 0; i < ONESHOT_MOD_COUNT; i++) {
|
||||
if (modifiers_with_state[i] != ONESHOT_STATE_OFF) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
oneshot_mod get_modifier_for_trigger_key(uint16_t keycode)
|
||||
{
|
||||
switch (keycode)
|
||||
{
|
||||
#include "oneshot.def"
|
||||
return true;
|
||||
default:
|
||||
return ONESHOT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
// turn off the oneshot macros
|
||||
#undef ONESHOT
|
||||
#define ONESHOT BLANK
|
||||
#define NSHOT BLANK
|
||||
|
||||
#undef CANCEL_KEY
|
||||
#undef IGNORE_KEY
|
||||
#define CANCEL_KEY A_KEY
|
||||
#define IGNORE_KEY BLANK
|
||||
bool is_oneshot_modifier_cancel_key(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
#include "oneshot.def"
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#undef CANCEL_KEY
|
||||
#undef IGNORE_KEY
|
||||
#define CANCEL_KEY BLANK
|
||||
#define IGNORE_KEY A_KEY
|
||||
bool is_oneshot_modifier_ignored_key(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
#include "oneshot.def"
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
37
users/ericgebhart/extensions/oneshot.h
Normal file
37
users/ericgebhart/extensions/oneshot.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#define ENABLE_ONESHOT
|
||||
#ifdef ENABLE_ONESHOT
|
||||
#pragma once
|
||||
|
||||
typedef enum {
|
||||
ONESHOT_LCTL = 0,
|
||||
ONESHOT_LSFT = 1,
|
||||
ONESHOT_LALT = 2,
|
||||
ONESHOT_LGUI = 3,
|
||||
ONESHOT_RCTL = 4,
|
||||
ONESHOT_RSFT = 5,
|
||||
ONESHOT_RALT = 6,
|
||||
ONESHOT_RGUI = 7,
|
||||
ONESHOT_NONE = 8,
|
||||
ONESHOT_MOD_COUNT = 8,
|
||||
} oneshot_mod;
|
||||
|
||||
|
||||
// This function should be called inside proces_record_user and does everything needed to get one shot modifiers working.
|
||||
// Returns true if the keycode needs further handling, false otherwise.
|
||||
int8_t update_oneshot_modifiers(uint16_t keycode, keyrecord_t *record, int8_t keycode_consumed);
|
||||
int8_t turnoff_oneshot_modifiers(void);
|
||||
|
||||
// TO BE IMPLEMENTED BY THE USER
|
||||
// This function should return one of the oneshot_mod enumerations (see keymap.c implementation)
|
||||
oneshot_mod get_modifier_for_trigger_key(uint16_t keycode);
|
||||
|
||||
// TO BE IMPLEMENTED BY THE USER
|
||||
// This function should return true for keycodes that must be ignored in the oneshot modifier behaviour.
|
||||
// You probably want to ignore layer keys. Trigger keys don't need to be specified here.
|
||||
bool is_oneshot_modifier_ignored_key(uint16_t keycode);
|
||||
|
||||
// TO BE IMPLEMENTED BY THE USER
|
||||
// This function should return true for keycodes that should reset all oneshot modifiers.
|
||||
bool is_oneshot_modifier_cancel_key(uint16_t keycode);
|
||||
|
||||
#endif
|
29
users/ericgebhart/extensions/process_locales.h
Normal file
29
users/ericgebhart/extensions/process_locales.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include USERSPACE_H
|
||||
|
||||
// Stuff we need for locale and layer switching
|
||||
// there can be more but we need to know where they start and end.
|
||||
// remember there's limitations on layers.
|
||||
// Our locales. so it's easy to switch between them.
|
||||
|
||||
bool process_locales(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#define PROCESS_LOCALES \
|
||||
if (!process_locales(keycode, record)) { return false; }
|
21
users/ericgebhart/extensions/process_nshot.h
Normal file
21
users/ericgebhart/extensions/process_nshot.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Custom one-or-more-shot implementation that does not rely on timers
|
||||
// and persists across layer changes. Based on the users/callum implementation
|
||||
// at https://github.com/callum-oakley/qmk_firmware/tree/master/users/callum
|
||||
bool process_nshot_state(uint16_t keycode, keyrecord_t *record);
|
19
users/ericgebhart/extensions/process_smart_lock.h
Normal file
19
users/ericgebhart/extensions/process_smart_lock.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
///* -------- Process Record -------- */
|
||||
void process_smart_lock(uint16_t keycode, keyrecord_t *record);
|
37
users/ericgebhart/extensions/quick_tap.c
Normal file
37
users/ericgebhart/extensions/quick_tap.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>, @possumvibes
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// written by @dnaq.
|
||||
#if defined( global_quick_tap) && defined(CONSOLE_KEY_LOGGER_ENABLE)
|
||||
bool process_global_quick_tap(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint16_t global_quick_tap_timer = 0;
|
||||
if (keycode < QK_MOD_TAP || keycode > QK_MOD_TAP_MAX) {
|
||||
global_quick_tap_timer = timer_read();
|
||||
return true;
|
||||
}
|
||||
if (timer_elapsed(global_quick_tap_timer) > TAPPING_TERM) {
|
||||
return true;
|
||||
}
|
||||
if (record->event.pressed) {
|
||||
keycode = keycode & 0xFF;
|
||||
global_quick_tap_timer = timer_read();
|
||||
tap_code(keycode);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
40
users/ericgebhart/extensions/send_string.c
Normal file
40
users/ericgebhart/extensions/send_string.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include USERSPACE_H
|
||||
#include "version.h"
|
||||
|
||||
#define SEND_STR(KEYC, STRING) \
|
||||
case KEYC: \
|
||||
if (record->event.pressed) { \
|
||||
SEND_STRING(STRING); \
|
||||
} \
|
||||
break;
|
||||
|
||||
#define SEND_STR_DELAY(KEYC, STRING) \
|
||||
case KEYC: \
|
||||
if (record->event.pressed) { \
|
||||
SEND_STRING_DELAY(STRING, TAP_CODE_DELAY); \
|
||||
} \
|
||||
break;
|
||||
|
||||
void process_send_strs(uint16_t keycode, keyrecord_t *record){
|
||||
#ifdef SEND_STRING_ENABLE
|
||||
switch (keycode) {
|
||||
#include "send_string.def"
|
||||
}
|
||||
#endif
|
||||
}
|
117
users/ericgebhart/extensions/smart_lock.c
Normal file
117
users/ericgebhart/extensions/smart_lock.c
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Derived from smart_layers by @Possumvibes
|
||||
// Derived from one shot_mod by @Callum.
|
||||
|
||||
#include "smart_lock.h"
|
||||
#include USERSPACE_H
|
||||
|
||||
/* print("string"): Print a simple string. */
|
||||
/* uprintf("%s string", var) */
|
||||
|
||||
bool ignore_key(uint16_t keycode,
|
||||
const uint16_t *cond_keys){
|
||||
|
||||
// look for non-cancel condition.
|
||||
// look for keys to ignore, if we match, we do nothing.
|
||||
for (; pgm_read_word(cond_keys) != COND_KEYS_END ; ++cond_keys){
|
||||
if (pgm_read_word(cond_keys) == keycode){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void deactivate_sml_layer(smart_lock_t *sml){
|
||||
layer_off(sml->thing);
|
||||
sml->active = false;
|
||||
}
|
||||
void deactivate_sml_mod(smart_lock_t *sml){
|
||||
unregister_mods(sml->thing);
|
||||
sml->active = false;
|
||||
}
|
||||
|
||||
void deactivate_sml(smart_lock_t *sml){
|
||||
switch(sml->type){
|
||||
case sml_layer:
|
||||
deactivate_sml_layer(sml);
|
||||
case sml_mod:
|
||||
deactivate_sml_mod(sml);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sml_activate_layer(smart_lock_t *sml){
|
||||
sml->active = true;
|
||||
layer_on(sml->thing);
|
||||
}
|
||||
|
||||
void sml_maybe_activate_mod(smart_lock_t *sml ){
|
||||
if (sml->active) {
|
||||
unregister_mods(sml->thing);
|
||||
} else {
|
||||
register_mods(sml->thing);
|
||||
}
|
||||
sml->active = !sml->active;
|
||||
}
|
||||
|
||||
void sml_activate(smart_lock_t *sml){
|
||||
switch(sml->type){
|
||||
case sml_layer:
|
||||
sml_activate_layer(sml);
|
||||
break;
|
||||
case sml_mod:
|
||||
sml_maybe_activate_mod(sml);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void update_smart_lock(uint16_t keycode) {
|
||||
|
||||
#ifdef SMART_LOCK_ENABLE
|
||||
bool deactivate = false;
|
||||
smart_lock_t *sml;
|
||||
|
||||
for (int i = 0; i < SML_LEN; ++i){
|
||||
sml = &smart_locks[i];
|
||||
|
||||
// if it's a match,
|
||||
// maybe activate/deactivate it if we got it's keycode.
|
||||
if (sml->keycode == keycode){
|
||||
sml_activate(sml);
|
||||
return;
|
||||
}
|
||||
|
||||
// deactivate what we need to.
|
||||
if(sml->active){
|
||||
deactivate = !ignore_key(keycode, &sml->keys[0]);
|
||||
if (deactivate){
|
||||
deactivate_sml(sml);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
void process_smart_lock(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
update_smart_lock(keycode);
|
||||
}
|
||||
}
|
103
users/ericgebhart/extensions/smart_lock.h
Normal file
103
users/ericgebhart/extensions/smart_lock.h
Normal file
|
@ -0,0 +1,103 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include USERSPACE_H
|
||||
|
||||
#ifdef SMART_LOCK_ENABLE
|
||||
typedef enum {
|
||||
sml_layer,
|
||||
sml_mod
|
||||
} smart_lock_type;
|
||||
|
||||
typedef struct {
|
||||
bool active;
|
||||
const uint16_t *keys;
|
||||
uint16_t keycode;
|
||||
uint16_t thing;
|
||||
smart_lock_type type;
|
||||
} smart_lock_t;
|
||||
|
||||
|
||||
// smart layer, smart mods
|
||||
#undef SMLL
|
||||
#undef SMLM
|
||||
#define SMLL(key, layer, ...)
|
||||
#define SMLM(key, mod, ...) // to replace mod_lock..
|
||||
#define COND_KEYS_END 0
|
||||
|
||||
#define CONCATENATE_SA(a, ...) a ## __VA_ARGS__
|
||||
#define CONCATENATE_S(a, ...) a ## __VA_ARGS__
|
||||
#define CAT_S(a, ...) CONCATENATE_S(a, __VA_ARGS__)
|
||||
#define MK_SKEY(KC) CONCATENATE_S(sml_, KC)
|
||||
#define MK_ARRAY(KC) \
|
||||
const uint16_t PROGMEM CONCATENATE_SA(sml_, KC)[]
|
||||
|
||||
// to create an enum and find how many...
|
||||
#define S_ENUM(kc, layer, ...) CAT_S(sml__, kc),
|
||||
// create a const array of the condkeys for each SML
|
||||
#define S_DATA(kc, thing, ...) MK_ARRAY(kc) = {__VA_ARGS__, COND_KEYS_END};
|
||||
|
||||
// create a list of smart_lock structs. Two names, one for mod one for layer to be concise.
|
||||
#define S_SMART_LOCK(kc, layer, ...) {false, MK_SKEY(kc), kc, layer, sml_layer},
|
||||
#define M_SMART_LOCK(kc, mod, ...) {false, MK_SKEY(kc), kc, mod, sml_mod},
|
||||
|
||||
#define SML(sk, sa, st, stype) \
|
||||
{ .keys = &(sk)[0], .keycode = (sa), .thing = (st), .smart_lock_type = stype}
|
||||
#define K_SMLM(key, mod...) [MK_SKEY(key)] = SML(MK_SKEY(key), key, mod, sml_mod),
|
||||
#define K_SMLL(key, layer...) [MK_SKEY(key)] = SML(MK_SKEY(key), key, layer, sml_layer),
|
||||
|
||||
// Set everything up
|
||||
// - Create enum of names, (sml_keycode). Used as indexes in the arrays.
|
||||
// avoids using the keycodes which would create a sparse/large array.
|
||||
// - Create array of conditional locks..
|
||||
// - Create array of the conditional keys for the locks, by name.
|
||||
|
||||
// Create Enum
|
||||
#undef SMLL
|
||||
#undef SMLM
|
||||
#define SMLL S_ENUM
|
||||
#define SMLM S_ENUM
|
||||
|
||||
// find how many
|
||||
enum smart_locks {
|
||||
#include "smart_lock.def"
|
||||
SML_LENGTH
|
||||
};
|
||||
uint16_t SML_LEN = SML_LENGTH;
|
||||
|
||||
// Bake locks into mem, name, ignore/cancel keys
|
||||
#undef SMLL
|
||||
#undef SMLM
|
||||
#undef TOGG
|
||||
#define SMLL S_DATA
|
||||
#define SMLM S_DATA
|
||||
#include "smart_lock.def"
|
||||
#undef SMLL
|
||||
#undef SMLM
|
||||
|
||||
// Fill array of locks by name, kc, layer/mod.
|
||||
#define SMLL S_SMART_LOCK
|
||||
#define SMLM M_SMART_LOCK
|
||||
|
||||
smart_lock_t smart_locks[] = {
|
||||
#include "smart_lock.def"
|
||||
};
|
||||
#undef SMLL
|
||||
#undef SMLM
|
||||
|
||||
#endif
|
58
users/ericgebhart/extensions/swapper.c
Normal file
58
users/ericgebhart/extensions/swapper.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com, @possumvibes,@Callum.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Derived from swapper by @Possumvibes and @Callum
|
||||
|
||||
#include "swapper.h"
|
||||
|
||||
swapper_state_t swapper_states[] = {
|
||||
#ifdef SWAPPER_ENABLE
|
||||
#include "swapper.def"
|
||||
#endif
|
||||
};
|
||||
uint8_t NUM_SWAPPER_STATES = sizeof(swapper_states) / sizeof(swapper_state_t);
|
||||
|
||||
// Based on https://github.com/callum-oakley/qmk_firmware/tree/master/users/callum
|
||||
void process_swappers(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef SWAPPER_ENABLE
|
||||
swapper_state_t *curr_state = NULL;
|
||||
for (int i = 0; i < NUM_SWAPPER_STATES; ++i) {
|
||||
curr_state = &swapper_states[i];
|
||||
|
||||
if (keycode == curr_state->forward_trigger) {
|
||||
if (record->event.pressed) {
|
||||
if (!curr_state->active) {
|
||||
curr_state->active = true;
|
||||
register_code16(curr_state->mod);
|
||||
}
|
||||
register_code16(curr_state->forward);
|
||||
} else {
|
||||
unregister_code16(curr_state->forward);
|
||||
// Don't unregister curr_state->mod until some other key is hit or released.
|
||||
}
|
||||
} else if (curr_state->active && keycode == curr_state->reverse_trigger) {
|
||||
if (record->event.pressed) {
|
||||
register_code16(curr_state->reverse);
|
||||
} else {
|
||||
unregister_code16(curr_state->reverse);
|
||||
}
|
||||
} else if (curr_state->active) {
|
||||
unregister_code16(curr_state->mod);
|
||||
curr_state->active = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
37
users/ericgebhart/extensions/swapper.h
Normal file
37
users/ericgebhart/extensions/swapper.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include USERSPACE_H
|
||||
|
||||
typedef struct {
|
||||
bool active;
|
||||
uint16_t mod;
|
||||
uint16_t forward;
|
||||
uint16_t reverse;
|
||||
uint16_t forward_trigger;
|
||||
uint16_t reverse_trigger;
|
||||
} swapper_state_t;
|
||||
extern swapper_state_t swapper_states[];
|
||||
extern uint8_t NUM_SWAPPER_STATES;
|
||||
|
||||
#undef SWAPPER_KEY
|
||||
#define SWAPPER_KEY(KC, REVERSE_IT_KC, FWD_KC, REV_KC, MOD) \
|
||||
{false, MOD, FWD_KC, REV_KC, KC, REVERSE_IT_KC},
|
||||
|
||||
void process_swappers(uint16_t keycode, keyrecord_t *record);
|
|
@ -47,8 +47,16 @@ void tap_dance_mouse_btns (qk_tap_dance_state_t *state, void *user_data) {
|
|||
|
||||
// counting on all the qwerty layers to be less than dvorak_on_bepo
|
||||
int on_qwerty(){
|
||||
uint8_t deflayer = (get_highest_layer(default_layer_state));
|
||||
return (deflayer < _DVORAK_BP);
|
||||
uint8_t deflayer = (biton32(default_layer_state));
|
||||
switch(deflayer){
|
||||
case _DVORAK_BP:
|
||||
case _BEAKL_BP:
|
||||
case _BEPO:
|
||||
return (false);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
static void switch_default_layer(uint8_t layer) {
|
||||
|
@ -58,7 +66,7 @@ static void switch_default_layer(uint8_t layer) {
|
|||
|
||||
// so the keyboard remembers which layer it's in after power disconnect.
|
||||
/*
|
||||
layer_state_t default_layer_state_set_kb(layer_state_t state) {
|
||||
uint32_t default_layer_state_set_kb(uint32_t state) {
|
||||
eeconfig_update_default_layer(state);
|
||||
return state;
|
||||
}
|
|
@ -16,4 +16,4 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ericgebhart.h"
|
||||
#include USERSPACE_H
|
165
users/ericgebhart/extensions/tap_hold.c
Normal file
165
users/ericgebhart/extensions/tap_hold.c
Normal file
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is variations on custom tap hold functionality. It makes it easy */
|
||||
/* to maintain tap_hold keys and combinations. These combinations go into */
|
||||
/* the file "tap_hold.def". Here are two examples. */
|
||||
/* */
|
||||
/* This example is tap or tap for TAP_HOLD_TERM, It defines a key */
|
||||
/* KC_CCCV, which sends Control-c on tap, and Control-v on hold. */
|
||||
/* */
|
||||
/* TP_TPL(KC_CCCV, LCTL(KC_C), LCTL(KC_V)) */
|
||||
/* */
|
||||
/* This is an example of Open - Open and Close. */
|
||||
/* It defines a key, KC_OCPRN which when tapped gives an '(' and */
|
||||
/* when held gives '()' followed by a backarrow. */
|
||||
/* Which places the cursor between them.*/
|
||||
/* */
|
||||
/* OPEN_OCL(KC_OCPRN, KC_LPRN, KC_RPRN) */
|
||||
/* */
|
||||
/* To use this, add it to your src in rules.mk, and include */
|
||||
/* tap_hold.h in your code above process_record_user. */
|
||||
/* */
|
||||
/* Add a call like this to use it. */
|
||||
/* process_tap_hold_user(keycode, record); */
|
||||
/* */
|
||||
/* Note: You must add any custom keycodes to your keycodes enum */
|
||||
/* otherwise they will not exist. */
|
||||
|
||||
|
||||
#include USERSPACE_H
|
||||
#include "stdint.h"
|
||||
#include "tap_hold.h"
|
||||
void update_smart_lock(uint16_t keycode);
|
||||
|
||||
|
||||
void tap_taplong(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tap_taplong_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(tap_taplong_timer) > TAP_HOLD_TERM) {
|
||||
tap_code16(kc2);
|
||||
} else {
|
||||
tap_code16(kc1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tap_sml(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tap_taplong_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(tap_taplong_timer) > TAP_HOLD_TERM) {
|
||||
update_smart_lock(kc2);
|
||||
} else {
|
||||
tap_code16(kc1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* for (){}[]""''<>``. tap for open. Hold for open and close, ending inbetween. */
|
||||
/* Assumes a one character length. */
|
||||
void open_openclose(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tap_taplong_timer = timer_read();
|
||||
}else{
|
||||
if (timer_elapsed(tap_taplong_timer) > TAP_HOLD_TERM) {
|
||||
tap_code16(kc1);
|
||||
tap_code16(kc2);
|
||||
tap_code16(KC_LEFT);
|
||||
|
||||
} else {
|
||||
// is shifted
|
||||
uint16_t mod_state = get_mods();
|
||||
if ((mod_state & MOD_MASK_SHIFT) ||
|
||||
(get_oneshot_mods() & MOD_MASK_SHIFT)){
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
|
||||
tap_code16(kc1);
|
||||
tap_code16(kc1);
|
||||
tap_code16(kc1);
|
||||
|
||||
set_mods(mod_state);
|
||||
}else{
|
||||
tap_code16(kc1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// open and open close for dead keys.
|
||||
void open_openclose_not_dead(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tap_taplong_timer = timer_read();
|
||||
}else{
|
||||
if (timer_elapsed(tap_taplong_timer) > TAP_HOLD_TERM) {
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
tap_code16(kc2);
|
||||
tap_code16(KC_SPACE);
|
||||
tap_code16(KC_LEFT);
|
||||
} else {
|
||||
// is shifted - give a triple
|
||||
uint16_t mod_state = get_mods();
|
||||
if ((mod_state & MOD_MASK_SHIFT) ||
|
||||
(get_oneshot_mods() & MOD_MASK_SHIFT)){
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
|
||||
set_mods(mod_state);
|
||||
}else{
|
||||
tap_code16(kc1);
|
||||
tap_code16(KC_SPACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// macros for use in tap_hold.defs.
|
||||
#define TP_TPL(KCKEY, KC01, KC02) \
|
||||
case KCKEY: \
|
||||
tap_taplong(KC01, KC02, record); \
|
||||
break;
|
||||
|
||||
#define TP_SML(KCKEY, KC01, KC02) \
|
||||
case KCKEY: \
|
||||
tap_sml(KC01, KC02, record); \
|
||||
break;
|
||||
|
||||
#define OPEN_OCL(KCKEY, KC01, KC02) \
|
||||
case KCKEY: \
|
||||
open_openclose(KC01, KC02, record); \
|
||||
break;
|
||||
|
||||
#define OPEN_OCL_ND(KCKEY, KC01, KC02) \
|
||||
case KCKEY: \
|
||||
open_openclose_not_dead(KC01, KC02, record); \
|
||||
break;
|
||||
|
||||
void process_tap_hold_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode){
|
||||
#include "tap_hold.def"
|
||||
}
|
||||
}
|
20
users/ericgebhart/extensions/tap_hold.h
Normal file
20
users/ericgebhart/extensions/tap_hold.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
void process_tap_hold_user(uint16_t keycode, keyrecord_t* record);
|
||||
uint16_t tap_taplong_timer;
|
|
@ -1,4 +1,3 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
|
@ -15,22 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include USERSPACE_H
|
||||
#include "process_unicode_common.h"
|
||||
|
||||
// for the creation of dvorak keys on an Bepo keyboard at the OS layer.
|
||||
// so we can create an array of reasonable size
|
||||
// for our translation keys. We have to create a
|
||||
// good range of numbers
|
||||
#define GR(x) (x-SAFE_RANGE)
|
||||
#undef UC_STR
|
||||
#define UC_STR(KEYC, STRING) \
|
||||
case KEYC: \
|
||||
if (record->event.pressed) { \
|
||||
send_unicode_string(STRING); \
|
||||
} \
|
||||
break;
|
||||
|
||||
// void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
|
||||
|
||||
uint8_t gr(uint16_t);
|
||||
void send_keycode(uint16_t);
|
||||
|
||||
#define MOD_NONE 0x00
|
||||
|
||||
// indexs for the keycode translation table.
|
||||
#define UNSHIFTED_KEY(key) key_translations[gr(key)][0][0]
|
||||
#define UNSHIFTED_MODS(key) key_translations[gr(key)][0][1]
|
||||
#define SHIFTED_KEY(key) key_translations[gr(key)][1][0]
|
||||
#define SHIFTED_MODS(key) key_translations[gr(key)][1][1]
|
||||
void process_unicode_strs(uint16_t keycode, keyrecord_t *record){
|
||||
#if defined(UNICODE_ENABLE) && defined(SEND_UNICODE_ENABLE)
|
||||
switch (keycode) {
|
||||
#include "unicode.def"
|
||||
}
|
||||
#endif
|
||||
}
|
24
users/ericgebhart/extensions/unicode.h
Normal file
24
users/ericgebhart/extensions/unicode.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Custom one-or-more-shot implementation that does not rely on timers
|
||||
// and persists across layer changes. Based on the users/callum implementation
|
||||
// at https://github.com/callum-oakley/qmk_firmware/tree/master/users/callum
|
||||
// make it easy to put unicode keys into process_record
|
||||
|
||||
|
||||
void process_unicode_strs(uint16_t keycode, keyrecord_t *record);
|
|
@ -1 +0,0 @@
|
|||
teensy-loader-cli -mmcu=atmega32u4 -w $1
|
115
users/ericgebhart/keyboards/keyboards.h
Normal file
115
users/ericgebhart/keyboards/keyboards.h
Normal file
|
@ -0,0 +1,115 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Kyria
|
||||
#ifdef KEYBOARD_splitkb_kyria
|
||||
#define BASE Base_2x6_8_5
|
||||
#define BASEt6 Base_2x6_8_5t6
|
||||
#define TRANS Transient_2x6_8_5
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
#endif
|
||||
|
||||
// Corne
|
||||
#ifdef KEYBOARD_crkbd
|
||||
#define BASE Base_3x6_3
|
||||
#define BASEt6 Base_3x6_3t6
|
||||
#define TRANS Transient_3x6_3
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
#endif
|
||||
|
||||
// Ergodox ez.
|
||||
#ifdef KEYBOARD_ergodox_ez
|
||||
#define BASE Base_dox
|
||||
#define BASEt6 Base_doxt6
|
||||
#define TRANS Transient_dox
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
// tell the keymap we want to specify number rows.
|
||||
// 4x10 input instead 3x10.
|
||||
#define BASE_NUMBER_ROW // turn on 4 row base templates.
|
||||
#endif
|
||||
|
||||
// XD75
|
||||
#ifdef KEYBOARD_xiudi_xd75
|
||||
#define BASE Base_5x15
|
||||
#define BASEt6 Base_5x15t6
|
||||
#define TRANS Transient_5x15
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
|
||||
// tell the keymap we want to specify number rows.
|
||||
// 4x10 input instead 3x10.
|
||||
#define BASE_NUMBER_ROW // turn on 4 row base templates.
|
||||
#endif
|
||||
|
||||
// Viterbi
|
||||
#ifdef KEYBOARD_keebio_viterbi
|
||||
#define BASE Base_5x14
|
||||
#define BASEt6 Base_5x14t6
|
||||
#define TRANS Transient_5x14
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
|
||||
// tell the keymap we want to specify number rows.
|
||||
// 4x10 input instead 3x10.
|
||||
#define BASE_NUMBER_ROW // turn on 4 row base templates.
|
||||
#endif
|
||||
|
||||
// Rebound
|
||||
#ifdef KEYBOARD_montsinger_rebound
|
||||
#define BASE Base_rebound
|
||||
#define BASEt6 Base_reboundt6
|
||||
#define TRANS Rebound_transient
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
#endif
|
||||
|
||||
// Kinesis
|
||||
#if defined(KEYBOARD_kinesis_alvicstep) \
|
||||
|| defined(KEYBOARD_kinesis_stapelberg) \
|
||||
|| defined(KEYBOARD_kinesis_kint2pp) \
|
||||
|| defined(KEYBOARD_kinesis_nguyenvietyen) \
|
||||
|| defined(KEYBOARD_kinesis_kint36) \
|
||||
|| defined(KEYBOARD_kinesis_kint41) \
|
||||
|| defined(KEYBOARD_kinesis_kintlc)
|
||||
|
||||
#undef LAYOUT_PVARG
|
||||
#define LAYOUT_PVARG(...) LAYOUT_pretty(__VA_ARGS__)
|
||||
// Base layers 4x10, so numbers are enabled, and a 3x10 for the keymap.
|
||||
// Transient function layers are all 3x10.
|
||||
#define BASE Base_4x6_4_6
|
||||
#define BASEt6 Base_4x6_4_6t6
|
||||
#define TRANS Transient_4x6_4_6
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
|
||||
// tell the keymap we want to specify number rows.
|
||||
// 4x10 input instead 3x10.
|
||||
#define BASE_NUMBER_ROW // turn on 4 row base templates.
|
||||
#endif
|
||||
|
||||
// My Morpho Dactyl
|
||||
#ifdef KEYBOARD_gebhart_morpho
|
||||
#undef LAYOUT_PVARG
|
||||
#define LAYOUT_PVARG(...) LAYOUT_split_4x6_5_8(__VA_ARGS__)
|
||||
|
||||
#define BASE Base_4x6_5_8
|
||||
#define BASEt6 Base_4x6_5_8t6
|
||||
#define TRANS Transient_4x6_5_8
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
||||
|
||||
// tell the keymap we want to specify number rows.
|
||||
// 4x10 input instead 3x10.
|
||||
#define BASE_NUMBER_ROW // turn on 4 row base templates.
|
||||
#endif
|
771
users/ericgebhart/keyboards/layouts.h
Normal file
771
users/ericgebhart/keyboards/layouts.h
Normal file
|
@ -0,0 +1,771 @@
|
|||
#pragma once
|
||||
/*
|
||||
Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "base_layers.h"
|
||||
#include "mod_layer.h"
|
||||
#include "edge_keys.h"
|
||||
#include "thumbs.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/******************************************************************/
|
||||
/* This is where I put my Keyboard layouts. */
|
||||
/* The mod layer can be modified in mod_layer.h */
|
||||
/* can be applied here. The physical shape of the keyboard is */
|
||||
/* also accounted for here. This makes it very simple to add a */
|
||||
/* new keyboard and reuse all of my layouts and layers */
|
||||
/* */
|
||||
/* With all of that in hand, we then create a LAYOUT wrapper */
|
||||
/* macro that takes a list of keys, to create a keyboard matrix */
|
||||
/* that fits the keyboard. Simple. */
|
||||
/* */
|
||||
/* The thumb keys, the bottom rows, etc. */
|
||||
/* */
|
||||
/* An attempt has been made to adapt the kinesis and ergodox */
|
||||
/* Thumb keys to the rectangular shapes of the xd75, viterbi, */
|
||||
/* and rebound. */
|
||||
/******************************************************************/
|
||||
|
||||
/******************************************************************/
|
||||
/* * The XD75 is a 5x15 Ortholinear matrix which means it has 3 */
|
||||
/* keys inbetween the usual left and right hand keys */
|
||||
/* * The Viterbi is a split 5x14 Ortholinear with 2 middle keys. */
|
||||
/* * The Ergodox is a split 5x14 Ortholinear with 2 middle keys, */
|
||||
/* thumbkeys. It is missing middle keys on (home) row 3. */
|
||||
/* * The Corne is a split 3x12 with 6 thumb keys. It has no */
|
||||
/* extra middle keys */
|
||||
/* * The Kinesis is 4x6 + 4 and 6 thumb keys. */
|
||||
/* * My Dactyl is 4x6 + 5 and 8 thumb keys. */
|
||||
/******************************************************************/
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
/* In all cases these keyboards are defined in a matrix which is */
|
||||
/* a set of rows. Maybe like so, or not. */
|
||||
/* */
|
||||
/* -------------------------|------------------------ */
|
||||
/* | Left0 | Numbers L | mid|dle0 | numbers R | Right0 | */
|
||||
/* | Left1 | keys0-5 | mid|dle1 | Keys6-10 | Right1 | */
|
||||
/* | Left2 | keys11-15 | mid|dle2 | Keys16-20 | Right2 | */
|
||||
/* | Left3 | keys20-25 | mid|dle3 | Keys25-30 | Right3 | */
|
||||
/* | Row5L | Row5R | */
|
||||
/* | ThumbsL | ThumbsR | */
|
||||
/* -------------------------|------------------------ */
|
||||
|
||||
/* Generally speaking, the keys on the right and left don't change. */
|
||||
/* Neither does the bottom row or the thumbs. Frequently the numbers */
|
||||
/* row is identical across layers. Mostly, we want our Base layers to */
|
||||
/* be predctable. */
|
||||
|
||||
|
||||
// Since our quirky block definitions are basically a list of comma separated
|
||||
// arguments, we need a wrapper in order for these definitions to be
|
||||
// expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||
#if (!defined(LAYOUT) && defined(KEYMAP))
|
||||
#define LAYOUT KEYMAP
|
||||
#endif
|
||||
|
||||
// every keyboard has it's Layout. We start there and make a var args
|
||||
// out of it.
|
||||
|
||||
#define LVARG_ergodox(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define LVARG_edox(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
|
||||
#define LAYOUT_VARG(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_PVARG(...) LAYOUT_pretty(__VA_ARGS__)
|
||||
|
||||
#define LVARG_4x12(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||
#define LVARG_5x12(...) LAYOUT_ortho_5x12(__VA_ARGS__)
|
||||
#define LVARG_5x14(...) LAYOUT_ortho_5x14(__VA_ARGS__)
|
||||
#define LVARG_5x15(...) LAYOUT_ortho_5x15(__VA_ARGS__)
|
||||
|
||||
/*
|
||||
| Left | Numbers L | middle | numbers R | Right |
|
||||
| Left | keys0-5 | middle | Keys6-10 | Right |
|
||||
| Left | keys11-15 | middle | Keys16-20 | Right |
|
||||
| Left | keys20-25 | middle | Keys25-30 | Right |
|
||||
|Row5L Row5R |
|
||||
|ThumbsL ThumbsR |
|
||||
*/
|
||||
|
||||
/* Assuming that left, midddle, right, row5, and thumbs stay the same, */
|
||||
/* numbers, no numbers, numbers never change, whatever. */
|
||||
/* we can have a layout macro that takes a nice rectangle of keys. */
|
||||
|
||||
|
||||
/*Some keyboards need number rows, some don't. there is a setting for that */
|
||||
/* the keymap will give number rows if BASE_NUMBER_ROW is defined.*/
|
||||
/* in that case, the layout should take 4 rows of 10. */
|
||||
/* If all the layouts you might ever want would have the same top row,*/
|
||||
/* Then it could be defined like that here, and it could take 3x10.*/
|
||||
/* All layouts are relatively simple to make. */
|
||||
/* The ROW macros add a universal mod layer so that mods can be defined once */
|
||||
/* and used everywhere. No matter the keymap or layer. this allows actual maps */
|
||||
/* like dvorak, qwerty, colemak, beakl, etc., to be defined simply. */
|
||||
|
||||
|
||||
/* Additional, usage examples can be found in keyboards.*/
|
||||
/* crkbd/keymaps/ericgebhart */
|
||||
/* kinesis/keymaps/ericgebhart */
|
||||
/* ergodox_ez/keymaps/ericgebhart */
|
||||
/* keebio/viterbi/keymaps/ericgebhart */
|
||||
/* xiudi/xd75/keymaps/ericgebhart */
|
||||
/* montsinger/rebound/rev4/keymaps/ericgebhart */
|
||||
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
/* xiudi/xd75 - Ortholinear 5x15 */
|
||||
/********************************************************************/
|
||||
/// These first two base layout templates take sets of 5 keys, left and right.
|
||||
// Using 4 sets allows for changing the number row if you have one.
|
||||
// if you never change the number row, then use 3 sets of left and right.
|
||||
// and define the number row here.
|
||||
#define Base_5x15( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A) \
|
||||
LVARG_5x15( \
|
||||
MOD_ROW(ROW0L)(K01, K02, K03, K04, K05), \
|
||||
MAP_CHUNK(___3_MIDDLE_T), \
|
||||
MOD_ROW(ROW0R)(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15), \
|
||||
MAP_CHUNK(___3_MIDDLE_1), \
|
||||
MOD_ROW(ROW1R)(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25), \
|
||||
MAP_CHUNK(___3_MIDDLE_2), \
|
||||
MOD_ROW(ROW2R)(K26, K27, K28, K29, K2A), \
|
||||
\
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35), \
|
||||
MAP_CHUNK(___3_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K36, K37, K38, K39, K3A), \
|
||||
MAP_CHUNK(___15_BOTTOM) \
|
||||
)
|
||||
|
||||
#define Base_5x15t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C) \
|
||||
LVARG_5x15( \
|
||||
MOD_ROW(ROW0L)(K01, K02, K03, K04, K05, K06), \
|
||||
MAP_CHUNK(___3_MIDDLE_T), \
|
||||
MOD_ROW(ROW0R)(K07, K08, K09, K0A, K0B, K0C), \
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15, K16), \
|
||||
MAP_CHUNK(___3_MIDDLE_1), \
|
||||
MOD_ROW(ROW1R)(K17, K18, K19, K1A, K1B, K1C), \
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25, K26), \
|
||||
MAP_CHUNK(___3_MIDDLE_2), \
|
||||
MOD_ROW(ROW2R)(K27, K28, K29, K2A, K2B, K2C), \
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35, K36), \
|
||||
MAP_CHUNK(___3_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K37, K38, K39, K3A, K3B, K3C), \
|
||||
MAP_CHUNK(___15_BOTTOM) \
|
||||
)
|
||||
|
||||
// 4 rows of 12. 3 columns transparent in the middle.
|
||||
#define Transient_5x15( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LVARG_5x15( \
|
||||
___15___, \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
___3___, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
___3___, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
___3___, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
MAP_CHUNK(___15_BOTTOM) \
|
||||
) \
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
/* viterbi - Ortholinear 5x14 */
|
||||
/********************************************************************/
|
||||
#define Base_5x14( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A) \
|
||||
LVARG_5x14( \
|
||||
MOD_ROW(ROW0L)(K01, K02, K03, K04, K05), \
|
||||
MAP_CHUNK(___2_MIDDLE_T), \
|
||||
MOD_ROW(ROW0R)(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15), \
|
||||
MAP_CHUNK(___2_MIDDLE_1), \
|
||||
MOD_ROW(ROW1R)(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25), \
|
||||
MAP_CHUNK(___2_MIDDLE_2), \
|
||||
MOD_ROW(ROW2R)(K26, K27, K28, K29, K2A), \
|
||||
\
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35), \
|
||||
MAP_CHUNK(___2_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K36, K37, K38, K39, K3A), \
|
||||
MAP_CHUNK(___14_BOTTOM) \
|
||||
)
|
||||
#define Base_5x14t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C) \
|
||||
LVARG_5x15( \
|
||||
MOD_ROW(ROW0L)(K01, K02, K03, K04, K05, K06), \
|
||||
MAP_CHUNK(___2_MIDDLE_T), \
|
||||
MOD_ROW(ROW0R)(K07, K08, K09, K0A, K0B, K0C), \
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15, K16), \
|
||||
MAP_CHUNK(___2_MIDDLE_1), \
|
||||
MOD_ROW(ROW1R)(K17, K18, K19, K1A, K1B, K1C), \
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25, K26), \
|
||||
MAP_CHUNK(___2_MIDDLE_2), \
|
||||
MOD_ROW(ROW2R)(K27, K28, K29, K2A, K2B, K2C), \
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35, K36), \
|
||||
MAP_CHUNK(___2_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K37, K38, K39, K3A, K3B, K3C), \
|
||||
MAP_CHUNK(___14_BOTTOM) \
|
||||
)
|
||||
|
||||
// 4 rows of 12. 2 columns transparent in the middle.
|
||||
#define Transient_5x14( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LVARG_5x14( \
|
||||
___14___, \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
___2___, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
\
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
___2___, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
\
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
___2___, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
MAP_CHUNK(___14_BOTTOM) \
|
||||
) \
|
||||
|
||||
/********************************************************************/
|
||||
/* Ortholinear 4x12 */
|
||||
/********************************************************************/
|
||||
#define LAYOUT_4x12_base( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LVARG_4x12( \
|
||||
MOD_CORE_3x5(K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A), \
|
||||
___12_BOTTOM___ \
|
||||
)
|
||||
|
||||
// Just for bepo because it's a 3x6 matrix on each side.
|
||||
// So 3 pairs of 6 keys, left and right.
|
||||
|
||||
// takes 3 makes 4 rows of 12.
|
||||
#define LAYOUT_4x12_transient( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C \
|
||||
) \
|
||||
LVARG_4x12( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
___12_BOTTOM___ \
|
||||
) \
|
||||
|
||||
/********************************************************************/
|
||||
/* CRKBD Corne or any other 3x5/6 with 3 thumbs on each side. */
|
||||
/* The Corne has 3x6 matrix on both sides with 6 thumbs total */
|
||||
/* This Macro takes 2x3x5 and gives it pinkies, and thumbs. */
|
||||
/* Arg chunks are in the middle with the passthrough modifiers as */
|
||||
/* needed. Sama Sama apres cette fois. */
|
||||
/********************************************************************/
|
||||
|
||||
#define Base_3x6_3( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A) \
|
||||
LAYOUT_VARG( \
|
||||
MOD_CORE_3x5(K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A), \
|
||||
___6_ERGO_THUMBS___ \
|
||||
)
|
||||
|
||||
#define Base_3x6_3t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C) \
|
||||
LAYOUT_VARG( \
|
||||
MOD_CORE_3x6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C), \
|
||||
___6_ERGO_THUMBS___ \
|
||||
)
|
||||
|
||||
// All we really need is to add the see through thumbs to the end.
|
||||
#define Transient_3x6_3( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LAYOUT_VARG( \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
___6_ERGO_THUMBS___ \
|
||||
)
|
||||
|
||||
//___6_ERGO_THUMBS___
|
||||
|
||||
/********************************************************************/
|
||||
/* Kinesis*/
|
||||
/********************************************************************/
|
||||
// A 4x6 on each side, with a 4 column fifth row, and 6 thumbs on
|
||||
// each side. - 4x6_4_6.
|
||||
// Then a giant row up top, 9 keys on each side, for function keys.
|
||||
#define Base_4x6_4_6( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
) \
|
||||
LAYOUT_PVARG( \
|
||||
___KINTFUNC_L___, ___KINTFUNC_R___, \
|
||||
MOD_CORE_4x5(K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A), \
|
||||
MAP_CHUNK(___4_BOTTOM_LEFT), \
|
||||
MAP_CHUNK(___4_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS) \
|
||||
)
|
||||
|
||||
|
||||
#define Base_4x6_4_6t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C) \
|
||||
LAYOUT_PVARG( \
|
||||
MOD_CORE_4x6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C), \
|
||||
MAP_CHUNK(___4_BOTTOM_LEFT), \
|
||||
MAP_CHUNK(___4_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS) \
|
||||
)
|
||||
|
||||
#define Transient_4x6_4_6( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LAYOUT_PVARG( \
|
||||
___12___, ___6___, \
|
||||
___12___, \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
___4___, ___4___, \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS) \
|
||||
)
|
||||
|
||||
/* ___KINTFUNC_L___, ___KINTFUNC_R___, \ */
|
||||
|
||||
/* This keyboard is a split, 4x6 + a row of 5 and a thumb cluster of 8. */
|
||||
/* So We need Base_4x6_5_8 As a layout template to add mods, and fill */
|
||||
/* out the perimeter keys of the keyboard. Perimeter keys being the */
|
||||
/* number row, outside pinky keys, the 5th row, and thumbs. */
|
||||
|
||||
/********************************************************************/
|
||||
/* Dactyl with 8 thumb keys*/
|
||||
/********************************************************************/
|
||||
// Basically an ergodox ez without the 3 pairs of middle keys.
|
||||
// electrically 7 columns in the 5th row. 6 in the rest.
|
||||
// Left, right, bottom, and thumbs all stay the same.
|
||||
|
||||
#define Base_4x6_5_8( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
) \
|
||||
LAYOUT_PVARG( \
|
||||
MOD_CORE_4x5(K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
), \
|
||||
MAP_CHUNK(___5_BOTTOM_LEFT), MAP_CHUNK(___5_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___16_ALL_THUMBSa) \
|
||||
)
|
||||
|
||||
#define Base_4x6_5_8t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C) \
|
||||
LAYOUT_PVARG( \
|
||||
MOD_CORE_4x6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C), \
|
||||
MAP_CHUNK(___5_BOTTOM_LEFT), MAP_CHUNK(___5_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___16_ALL_THUMBSa) \
|
||||
)
|
||||
|
||||
|
||||
// so far no need for mods on the transient layers.
|
||||
// switching to 3x5 transients. 10 column defines.
|
||||
// I like 3x10 maps even on big keyboards.
|
||||
# define Transient_4x6_5_8( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_PVARG( \
|
||||
___6___, ___6___, \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, ___, \
|
||||
___5___, ___5___, \
|
||||
MAP_CHUNK(___16_ALL_THUMBSa) \
|
||||
)
|
||||
|
||||
/********************************************************************/
|
||||
/* Ergodox EZ */
|
||||
/********************************************************************/
|
||||
// This one is is set up to pass in the number row.
|
||||
// Beakl and bepo both change the number row.
|
||||
// Left, middle, right, bottom, and thumbs all stay the same.
|
||||
#define Base_dox( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, \
|
||||
K36, K37, K38, K39, K3A \
|
||||
) \
|
||||
LVARG_edox( \
|
||||
MOD_ROW(ROW0L)(K01, K02, K03, K04, K05), \
|
||||
MAP_CHUNK(___2_MIDDLE_1), \
|
||||
MOD_ROW(ROW0R)(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15), \
|
||||
MAP_CHUNK(___2_MIDDLE_2), \
|
||||
MOD_ROW(ROW1R)(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25), \
|
||||
MOD_ROW(ROW2R)(K26, K27, K28, K29, K2A), \
|
||||
\
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35), \
|
||||
MAP_CHUNK(___2_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K36, K37, K38, K39, K3A), \
|
||||
MAP_CHUNK(___5_BOTTOM_LEFT), MAP_CHUNK(___5_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS) \
|
||||
)
|
||||
|
||||
#define Base_doxt6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C, \
|
||||
K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K3A, K3B, K3C) \
|
||||
LVARG_edox(MOD_ROW(ROW0L)(K01, K02, K03, K04, K05, K06), \
|
||||
MAP_CHUNK(___2_MIDDLE_1), \
|
||||
MOD_ROW(ROW0R)(K07, K08, K09, K0A, K0B, K0C), \
|
||||
MOD_ROW(ROW1L)(K11, K12, K13, K14, K15, K16), \
|
||||
MAP_CHUNK(___2_MIDDLE_2), \
|
||||
MOD_ROW(ROW1R)(K17, K18, K19, K1A, K1B, K1C), \
|
||||
MOD_ROW(ROW2L)(K21, K22, K23, K24, K25, K26), \
|
||||
MOD_ROW(ROW2R)(K27, K28, K29, K2A, K2B, K2C), \
|
||||
MOD_ROW(ROW3L)(K31, K32, K33, K34, K35, K36), \
|
||||
MAP_CHUNK(___2_MIDDLE_3), \
|
||||
MOD_ROW(ROW3R)(K37, K38, K39, K3A, K3B, K3C), \
|
||||
MAP_CHUNK(___5_BOTTOM_LEFT), \
|
||||
MAP_CHUNK(___5_BOTTOM_RIGHT), \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS))
|
||||
|
||||
#define Transient_dox( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B) \
|
||||
LVARG_edox( \
|
||||
___14___, \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
___2___, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
___2___, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
___5___, ___5___, \
|
||||
MAP_CHUNK(___12_DOX_ALL_THUMBS) \
|
||||
)
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
/* Rebound 4 rows, 1x12, 3x13 */
|
||||
/********************************************************************/
|
||||
#define LVARG_rebound(...) LAYOUT_all(__VA_ARGS__)
|
||||
#define Base_rebound( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
MOD_ROW(ROW1L)(K01, K02, K03, K04, K05), \
|
||||
MOD_ROW(ROW1R)(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
MOD_ROW(ROW2L)(K11, K12, K13, K14, K15), \
|
||||
KC_CCCV, \
|
||||
MOD_ROW(ROW2R)(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
MOD_ROW(ROW3L)(K21, K22, K23, K24, K25), \
|
||||
MO_ADJUST, \
|
||||
MOD_ROW(ROW3R)(K26, K27, K28, K29, K2A), \
|
||||
MAP_CHUNK(___13_BOTTOM) \
|
||||
)
|
||||
#define Base_reboundt6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
MOD_ROW(ROW1L)(K01, K02, K03, K04, K05, K06), \
|
||||
MOD_ROW(ROW1R)(K07, K08, K09, K0A, K0B, K0C), \
|
||||
MOD_ROW(ROW2L)(K11, K12, K13, K14, K15, K16), \
|
||||
KC_CCCV, \
|
||||
MOD_ROW(ROW2R)(K17, K18, K19, K1A, K1B, K1C), \
|
||||
MOD_ROW(ROW3L)(K21, K22, K23, K24, K25, K26), \
|
||||
MO_ADJUST, \
|
||||
MOD_ROW(ROW3R)(K27, K28, K29, K2A, K2B, K2C), \
|
||||
MAP_CHUNK(___13_BOTTOM) \
|
||||
)
|
||||
|
||||
#define Rebound_transient( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LVARG_rebound( \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
___, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
___, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
MAP_CHUNK(___13_BOTTOM) \
|
||||
)
|
||||
|
||||
/********************************************************************/
|
||||
/* Kyria or any other 3x5/6 with 4 keys in the middle of the last */
|
||||
/* Row. Followed by 5 thumb keys on each side. 7 thumb keys total. */
|
||||
/********************************************************************/
|
||||
#define Base_2x6_8_5( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K26, K27, K28, K29, K2A) \
|
||||
LAYOUT_VARG( \
|
||||
MOD_ROW(ROW1L)(K01, K02, K03, K04, K05), \
|
||||
MOD_ROW(ROW1R)(K06, K07, K08, K09, K0A), \
|
||||
\
|
||||
MOD_ROW(ROW2L)(K11, K12, K13, K14, K15), \
|
||||
MOD_ROW(ROW2R)(K16, K17, K18, K19, K1A), \
|
||||
\
|
||||
MOD_ROW(ROW3L)(K21, K22, K23, K24, K25), \
|
||||
MAP_CHUNK(___4_THUMBS), \
|
||||
MOD_ROW(ROW3R)(K26, K27, K28, K29, K2A), \
|
||||
MAP_CHUNK(___10_ERGO_THUMBS) \
|
||||
)
|
||||
|
||||
#define Base_2x6_8_5t6( \
|
||||
K01, K02, K03, K04, K05, K06, \
|
||||
K07, K08, K09, K0A, K0B, K0C, \
|
||||
K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K1A, K1B, K1C, \
|
||||
K21, K22, K23, K24, K25, K26, \
|
||||
K27, K28, K29, K2A, K2B, K2C) \
|
||||
LAYOUT_VARG( \
|
||||
MOD_ROW(ROW1L)(K01, K02, K03, K04, K05, K06), \
|
||||
MOD_ROW(ROW1R)(K07, K08, K09, K0A, K0B, K0C), \
|
||||
MOD_ROW(ROW2L)(K11, K12, K13, K14, K15, K16), \
|
||||
MOD_ROW(ROW2R)(K17, K18, K19, K1A, K1B, K1C), \
|
||||
MOD_ROW(ROW3L)(K21, K22, K23, K24, K25, K26), \
|
||||
MAP_CHUNK(___4_THUMBS), \
|
||||
MOD_ROW(ROW3R)(K27, K28, K29, K2A, K2B, K2C), \
|
||||
MAP_CHUNK(___10_ERGO_THUMBS) \
|
||||
)
|
||||
|
||||
// All we really need is to add the see through thumbs to the end.
|
||||
#define Transient_2x6_8_5( \
|
||||
K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, \
|
||||
K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, \
|
||||
K27, K28, K29, K2A, K2B \
|
||||
) \
|
||||
LAYOUT_VARG( \
|
||||
___, K01, K02, K03, K04, K05, \
|
||||
K07, K08, K09, K0A, K0B, ___, \
|
||||
___, K11, K12, K13, K14, K15, \
|
||||
K17, K18, K19, K1A, K1B, ___, \
|
||||
___, K21, K22, K23, K24, K25, \
|
||||
___4___, \
|
||||
K27, K28, K29, K2A, K2B, ___, \
|
||||
MAP_CHUNK(___10_ERGO_THUMBS) \
|
||||
)
|
142
users/ericgebhart/keymap/keymap.c
Normal file
142
users/ericgebhart/keymap/keymap.c
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is my keymap. Enable the layers you want in config.h. */
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "ericgebhart.h"
|
||||
#include "layouts.h"
|
||||
|
||||
#include "keyboards.h"
|
||||
|
||||
// set up the wrapper macros.
|
||||
#define BASE_LAYER(NAME, ...) [NAME] = BASE(__VA_ARGS__)
|
||||
#define BASE_LAYERt6(NAME, ...) [NAME] = BASEt6(__VA_ARGS__)
|
||||
#define T_LAYER(LNAME, ...) [LNAME] = TRANS(__VA_ARGS__)
|
||||
|
||||
|
||||
// One that takes 5 and one that takes 6 for bepo and other big maps
|
||||
// that need 3x12 instead of 3x10.
|
||||
#ifdef BASE_NUMBER_ROW
|
||||
#define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, NUMS, LAYOUT)
|
||||
#define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, NUMS, LAYOUT)
|
||||
#else
|
||||
// if there is no number row, don't give it one.
|
||||
#define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, LAYOUT)
|
||||
#define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, LAYOUT)
|
||||
#endif
|
||||
|
||||
// Find alt local key definitions.
|
||||
// DV for dvorak/qwerty maps on bepo.
|
||||
// BK, BKW for beakl maps on en-qwerty and bepo.
|
||||
// BKW is automatic in map_beakl.h
|
||||
#define ALT_TARGET_IS NONE // NONE, DV=dvorak, BK=Beakl, BK2, BKW=Beaklwi.
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Default lang, Base layers
|
||||
#include "map_dvorak.h"
|
||||
#include "map_maks.h"
|
||||
#include "map_qwerty.h"
|
||||
#include "map_beakl.h"
|
||||
#include "map_alt.h"
|
||||
#include "map_gap.h"
|
||||
#include "map_carpalx.h"
|
||||
#include "map_hd.h"
|
||||
#include "map_bepo.h"
|
||||
|
||||
// create a set of layers for a second locale.
|
||||
#ifdef SECOND_LOCALE
|
||||
#undef LANG_IS
|
||||
#define LANG_IS SECOND_LOCALE
|
||||
|
||||
// changes alt target for us, because both en-qwerty and fr-bepo
|
||||
// need a beakl alt target.
|
||||
#include "map_beakl.h"
|
||||
|
||||
// Qwerty based layers. Need a DV alt target to get the right shifted keys.
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS DV // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
||||
|
||||
#include "map_dvorak.h"
|
||||
#include "map_maks.h"
|
||||
#include "map_qwerty.h"
|
||||
#include "map_alt.h"
|
||||
#include "map_gap.h"
|
||||
#include "map_carpalx.h"
|
||||
#include "map_hd.h"
|
||||
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS NONE // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
||||
|
||||
#include "map_bepo.h"
|
||||
|
||||
#undef LANG_IS
|
||||
#define LANG_IS DEFAULT_LANG
|
||||
#endif // bepo
|
||||
|
||||
|
||||
// SYMBOL LAYER
|
||||
#include "map_symbols.h"
|
||||
|
||||
#ifdef SECOND_LOCALE
|
||||
#undef LANG_IS
|
||||
#define LANG_IS SECOND_LOCALE
|
||||
|
||||
#include "map_symbols.h"
|
||||
|
||||
#undef LANG_IS
|
||||
#define LANG_IS DEFAULT_LANG
|
||||
#endif
|
||||
|
||||
|
||||
// KEYPAD LAYER
|
||||
#include "map_keypads.h"
|
||||
|
||||
#ifdef SECOND_LOCALE
|
||||
#undef LANG_IS
|
||||
#define LANG_IS SECOND_LOCALE
|
||||
|
||||
#include "map_keypads.h"
|
||||
|
||||
#undef LANG_IS
|
||||
#define LANG_IS DEFAULT_LANG
|
||||
#endif
|
||||
|
||||
|
||||
// TOPROWS LAYER
|
||||
#include "map_toprows.h"
|
||||
|
||||
#include "map_accented.h"
|
||||
|
||||
#ifdef SECOND_LOCALE
|
||||
#undef LANG_IS
|
||||
#define LANG_IS SECOND_LOCALE
|
||||
|
||||
#include "map_toprows.h"
|
||||
|
||||
#include "map_accented.h"
|
||||
|
||||
#undef LANG_IS
|
||||
#define LANG_IS EN
|
||||
#endif
|
||||
|
||||
// functional non language based layers.
|
||||
#include "map_funcs.h"
|
||||
|
||||
};
|
26
users/ericgebhart/keymap/map_accented.h
Normal file
26
users/ericgebhart/keymap/map_accented.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Accented character and dead key layers.
|
||||
#ifdef ACCENTS_LAYER_ENABLE
|
||||
T_LAYER(LANG_N(_ACCENTS), ___ACCENTS___),
|
||||
#endif
|
||||
#ifdef MORTE_LAYER_ENABLE
|
||||
T_LAYER(LANG_N(_MORTE), ___MORTE___),
|
||||
#endif
|
||||
#ifdef ACCENTS_MORTE_LAYER_ENABLE
|
||||
T_LAYER(LANG_N(_ACCENTS_MORTE), ___ACCENTS_MORTE___),
|
||||
#endif
|
69
users/ericgebhart/keymap/map_alt.h
Normal file
69
users/ericgebhart/keymap/map_alt.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef MALTRON_LAYER_ENABLE
|
||||
#undef THUMBS_ARE
|
||||
#define THUMBS_ARE MALTRON_LTR_THUMBS_ARE
|
||||
#undef THUMB_LETTER
|
||||
#define THUMB_LETTER LANG_KC(_E)
|
||||
B_LAYER(LANG_N(_MALTRON), ___10_NUMBERS___, ___MALTRON___),
|
||||
#undef THUMBS_ARE
|
||||
#define THUMBS_ARE DEFAULT_THUMBS
|
||||
#undef THUMB_LETTER
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef RSTHD_LAYER_ENABLE
|
||||
#undef THUMBS_ARE
|
||||
#define THUMBS_ARE RSTHD_LTR_THUMBS_ARE
|
||||
#undef THUMB_LETTER
|
||||
#define THUMB_LETTER LANG_KC(_E)
|
||||
B_LAYER(LANG_N(_RSTHD), ___10_NUMBERS___, ___RSTHD___),
|
||||
#undef THUMBS_ARE
|
||||
#define THUMBS_ARE DEFAULT_THUMBS
|
||||
#undef THUMB_LETTER
|
||||
#endif
|
||||
|
||||
#ifdef EUCALYN_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_EUCALYN), ___10_NUMBERS___, ___EUCALYN___),
|
||||
#endif
|
||||
|
||||
#ifdef HANDS_UP_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_HANDS_UP), ___10_NUMBERS___, ___HANDS_UP___),
|
||||
#endif
|
||||
#ifdef WHITE_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_WHITE), ___10_NUMBERS___, ___WHITE___),
|
||||
#endif
|
||||
#ifdef ISRT_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_ISRT), ___10_NUMBERS___, ___ISRT___),
|
||||
#endif
|
||||
#ifdef SOUL_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_SOUL), ___10_NUMBERS___, ___SOUL___),
|
||||
#endif
|
||||
#ifdef NIRO_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_NIRO), ___10_NUMBERS___, ___NIRO___),
|
||||
#endif
|
||||
#ifdef ASSET_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_ASSET), ___10_NUMBERS___, ___ASSET___),
|
||||
#endif
|
||||
#ifdef WHORF_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_WHORF), ___10_NUMBERS___, ___WHORF___),
|
||||
#endif
|
||||
#ifdef WHORF6_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_WHORF6), ___10_NUMBERS___, ___WHORF6___),
|
||||
#endif
|
48
users/ericgebhart/keymap/map_beakl.h
Normal file
48
users/ericgebhart/keymap/map_beakl.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// choose your beakl,
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS BK // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
||||
|
||||
#ifdef BEAKL15_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_BEAKL15), ___10_NUMBERS_BEAKL15___, ___BEAKL15___),
|
||||
#endif
|
||||
|
||||
#ifdef BEAKL19_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_BEAKL19), ___10_NUMBERS_BEAKL19___, ___BEAKL19___),
|
||||
#endif
|
||||
|
||||
#ifdef BEAKL27_LAYER_ENABLE
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS BK2 // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
||||
|
||||
B_LAYER(LANG_N(_BEAKL27), ___10_NUMBERS_BEAKL19___, ___BEAKL27___),
|
||||
#endif
|
||||
|
||||
#ifdef BEAKLWI_LAYER_ENABLE
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS BKW // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
||||
|
||||
#undef THUMBS_ARE // change the default thumbs to WI.
|
||||
#define THUMBS_ARE WIa
|
||||
B_LAYER(LANG_N(_BEAKLWI), ___10_NUMBERS_BEAKL19___, ___BEAKLWI___),
|
||||
#undef THUMBS_ARE
|
||||
#define THUMBS_ARE DEFAULT_THUMBS
|
||||
#endif
|
||||
|
||||
#undef ALT_TARGET_IS
|
||||
#define ALT_TARGET_IS NONE // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
|
40
users/ericgebhart/keymap/map_bepo.h
Normal file
40
users/ericgebhart/keymap/map_bepo.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// beginning of 3x12 base layers.
|
||||
|
||||
#undef BASE_COLS_IN_OUT
|
||||
#define BASE_COLS_IN_OUT 6 // 5, 5_6, 6
|
||||
|
||||
#ifdef BEPO_LAYER_ENABLE
|
||||
B_LAYERt6(LANG_N(_BEPO), ___12_SYMBOLS_BEPO___, ___BEPO_3x12___),
|
||||
#endif
|
||||
|
||||
#ifdef OPTIMOT_LAYER_ENABLE
|
||||
B_LAYERt6(LANG_N(_OPTIMOT), ___12_SYMBOLS_BEPO___, ___OPTIMOT_3x12___),
|
||||
#endif
|
||||
|
||||
#ifdef OPTIMOT_COMPACT_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_OPTIMOT), ___10_SYMBOLS_BEPO___, ___OPTIMOT_3x10___),
|
||||
#endif
|
||||
|
||||
#ifdef BEAKL19bis_LAYER_ENABLE
|
||||
B_LAYERt6(LANG_N(_BEAKL19bis), ___12_SYMBOLS_BEPO___, ___BEAKL19bis_3x12___),
|
||||
#endif
|
||||
|
||||
// end of 3x12 base layers.
|
||||
#undef BASE_COLS_IN_OUT
|
||||
#define BASE_COLS_IN_OUT 5_6 // 5, 5_6, 6
|
25
users/ericgebhart/keymap/map_carpalx.h
Normal file
25
users/ericgebhart/keymap/map_carpalx.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef CARPALX_QFMLWY_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_CARPALX_QFMLWY), ___10_NUMBERS___, ___CARPALX_QFMLWY___),
|
||||
#endif
|
||||
#ifdef CARPALX_QGMLWB_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_CARPALX_QGMLWB), ___10_NUMBERS___, ___CARPALX_QGMLWB___),
|
||||
#endif
|
||||
#ifdef CARPALX_QGMLWY_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_CARPALX_QGMLWY), ___10_NUMBERS___, ___CARPALX_QGMLWY___),
|
||||
#endif
|
31
users/ericgebhart/keymap/map_dvorak.h
Normal file
31
users/ericgebhart/keymap/map_dvorak.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef DVORAK_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_DVORAK), ___10_NUMBERS___, ___DVORAK___),
|
||||
#endif
|
||||
#ifdef DVORAK_RLC_IU_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_DVORAK_RLC_IU), ___10_NUMBERS___, ___DVORAK_RLC_IU___),
|
||||
#endif
|
||||
#ifdef BOO_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_BOO), ___10_NUMBERS___, ___BOO___),
|
||||
#endif
|
||||
#ifdef CAPEWELL_DVORAK_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_CAPEWELL_DVORAK), ___10_NUMBERS___, ___CAPEWELL_DVORAK___),
|
||||
#endif
|
||||
#ifdef AHEI_LAYER_ENABLE
|
||||
B_LAYER(LANG_N(_AHEI), ___10_NUMBERS___, ___AHEI___),
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue