mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-07-25 11:05:57 -04:00
CHARYBDIS 세부조정정
This commit is contained in:
parent
899798f7f1
commit
266d92a24c
7 changed files with 168 additions and 165 deletions
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"makefile.configureOnOpen": true
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
#define CHARYBDIS_CONFIG_SYNC
|
#define CHARYBDIS_CONFIG_SYNC
|
||||||
// #define POINTING_DEVICE_AUTO_MOUSE_ENABLE
|
#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
|
||||||
// #define AUTO_MOUSE_DEFAULT_LAYER 10
|
#define AUTO_MOUSE_DEFAULT_LAYER 10
|
||||||
// #define AUTO_MOUSE_TIME 400
|
#define AUTO_MOUSE_TIME 400
|
||||||
// #define AUTO_MOUSE_DELAY TAPPING_TERM
|
#define AUTO_MOUSE_DELAY TAPPING_TERM
|
||||||
#define CHARYBDIS_DRAGSCROLL_REVERSE_Y
|
#define CHARYBDIS_DRAGSCROLL_REVERSE_Y
|
||||||
#define TAPPING_TOGGLE 1
|
#define TAPPING_TOGGLE 1
|
||||||
|
|
||||||
|
#undef POINTING_DEVICE_TASK_THROTTLE_MS
|
||||||
|
#define POINTING_DEVICE_TASK_THROTTLE_MS 5
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,24 +43,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_ESC, __________________NUMROW_L_________________, __________________NUMROW_R_________________, KC_MINS,
|
KC_ESC, __________________NUMROW_L_________________, __________________NUMROW_R_________________, KC_MINS,
|
||||||
KC_TAB, __________________QWERTY_L1________________, __________________QWERTY_R1________________, KC_EQL,
|
KC_TAB, __________________QWERTY_L1________________, __________________QWERTY_R1________________, KC_EQL,
|
||||||
SFT_CAPS,__________________QWERTY_SACS_L2___________, __________________QWERTY_R2________________, KC_QUOT,
|
SFT_CAPS,__________________QWERTY_SACS_L2___________, __________________QWERTY_R2________________, KC_QUOT,
|
||||||
KC_LGUI, KC_Z, KC_X, LT(_ONEHAND,KC_C),KC_V, KC_B, __________________QWERTY_HOME_R3___________, KC_BSLS,
|
KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, __________________QWERTY_HOME_R3___________, KC_BSLS,
|
||||||
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
||||||
THUMB_L1,THUMB_L2, THUMB_L3,/* */THUMB_R3,THUMB_R2,
|
THUMB_L1,THUMB_L2, USR_LNG,/* */THUMB_R3,THUMB_R2,
|
||||||
USR_LNG, TT(_ONEHAND),/* */THUMB_R1
|
THUMB_L3, TT(_ONEHAND), THUMB_R1
|
||||||
// ╰───────────────────────────╯ ╰──────────────────╯qmk
|
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||||
),
|
),
|
||||||
|
|
||||||
[_IPC] = LAYOUT_charybdis_wrapper(
|
[_IPC] = LAYOUT_charybdis_wrapper(
|
||||||
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
||||||
ALT_F4, C(KC_F1),KC_P, KC_X, INV_DSP, TO(_ONEHAND), KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, XXXXXXX, _______,
|
ALT_F4, C(KC_F1),KC_P, KC_X, INV_DSP, IME_CHG, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, XXXXXXX, _______,
|
||||||
ALT_TAB, INV_DSP, KC_LEFT, KC_RGHT, CLASS_A, HWP_MACRO, KC_GRV, _________NUM_789_________, XXXXXXX, _______,
|
ALT_TAB, INV_DSP, XXXXXXX, CLASS_A, SNIPING, KC_BTN2, KC_GRV, _________NUM_789_________, XXXXXXX, _______,
|
||||||
_______, IPC(A), IPC(S), IPC_MIN, IPC(F), KC_DOT, AT_IPC, _________NUM_456_________, KC_COLN, KC_DQUO,
|
_______, IPC(A), IPC(S), IPC_D_, IPC(F), KC_BTN1, AT_IPC, _________NUM_456_________, KC_COLN, KC_DQUO,
|
||||||
KC_LGUI, SNIPING, HWP_CITE,KC_BTN2, KC_BTN1, DRGSCRL, IME_CHG, _________NUM_123_________, _______, KC_PIPE,
|
KC_LGUI, IPC(Z), HWP_CITE, IPC(C), XXXXXXX, DRGSCRL, HWP_MACRO,_________NUM_123_________, _______, KC_PIPE,
|
||||||
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
||||||
_______, _______, _______,/* */HWP_MACRO, LT(_NAV, KC_0),
|
_______, _______, _______,/* */_______, LT(_NAV, KC_0),
|
||||||
QK_BOOT, _______,/* */IME_CHG
|
QK_BOOT, _______,/* */IME_CHG
|
||||||
// ╰───────────────────────────╯ ╰──────────────────╯
|
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||||
),
|
),
|
||||||
|
// [_NUM] = LAYOUT_charybdis_wrapper(
|
||||||
|
// // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
||||||
|
// XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX,
|
||||||
|
// XXXXXXX, XXXXXXX, KC_BTN2, NUM(D), KC_BTN1, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX,
|
||||||
|
// XXXXXXX, XXXXXXX, HWP_CITE,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX,
|
||||||
|
// // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
||||||
|
// _______, _______, _______,/* */_______, LT(_NUM, KC_0),
|
||||||
|
// _______, _______,/* */IME_CHG
|
||||||
|
// // ╰───────────────────────────╯ ╰──────────────────╯
|
||||||
|
// ),
|
||||||
[_NAV] = LAYOUT_charybdis_wrapper(
|
[_NAV] = LAYOUT_charybdis_wrapper(
|
||||||
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
||||||
_______, CTRL_F1, KC_F2, KC_F3, ALT_F4, KC_F5, XXXXXXX, A(KC_7), A(KC_5), A(KC_9), A(KC_0), XXXXXXX,
|
_______, CTRL_F1, KC_F2, KC_F3, ALT_F4, KC_F5, XXXXXXX, A(KC_7), A(KC_5), A(KC_9), A(KC_0), XXXXXXX,
|
||||||
|
|
@ -98,74 +109,78 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_ONEHAND] = LAYOUT_charybdis_wrapper(
|
[_ONEHAND] = LAYOUT_charybdis_wrapper(
|
||||||
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
// ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮
|
||||||
ALT_F4, CTRL_F1, KC_LEFT, XXXXXXX, KC_RGHT, KC_F5, S_D_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,
|
_______, CTRL_F1, KC_LEFT, XXXXXXX, KC_RGHT, KC_F5, S_D_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,
|
||||||
XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, KC_WH_U, XXXXXXX, S_D_RMOD,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_MAKE,
|
XXXXXXX, XXXXXXX, KC_WH_D, DRG_TOG, KC_WH_U, KC_F6, \S_D_RMOD,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_MAKE,
|
||||||
XXXXXXX, KC_LCTL, KC_BTN2, KC_LSFT, KC_BTN1, DPI_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, KC_LCTL, KC_BTN2, DRGSCRL, KC_BTN1, KC_F7, DPI_MOD, XXXXXXX, XXXXXXX, G(KC_6), XXXXXXX, XXXXXXX,
|
||||||
DRG_TOG, DRGSCRL, KC_BTN2, _______, KC_BTN1, DPI_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, DPI_RMOD,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
|
||||||
THUMB_L1, SNIPING, TO(_BASE),/* */_______, _______,
|
DRGSCRL, SNIPING, TO(_BASE),/* */_______, _______,
|
||||||
_______, _______,/* */_______
|
_______, _______,/* */_______
|
||||||
// ╰───────────────────────────╯ ╰──────────────────╯
|
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// in keymap.c:
|
|
||||||
// void pointing_device_init_user(void) {
|
|
||||||
// set_auto_mouse_layer(_ONEHAND); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
|
|
||||||
// set_auto_mouse_enable(true); // always required before the auto mouse feature will work
|
|
||||||
// }
|
|
||||||
|
|
||||||
// layer_state_t layer_state_set_user(layer_state_t state) {
|
#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
|
||||||
// // checks highest layer other than target layer
|
void pointing_device_init_user(void) {
|
||||||
// switch(get_highest_layer(remove_auto_mouse_layer(state, true))) {
|
set_auto_mouse_layer(_ONEHAND); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
|
||||||
// case _MOUSE:
|
set_auto_mouse_enable(true); // always required before the auto mouse feature will work
|
||||||
// case _NAV:
|
}
|
||||||
// case _IPC:
|
|
||||||
// // remove_auto_mouse_target must be called to adjust state *before* setting enable
|
|
||||||
// state = remove_auto_mouse_layer(state, false);
|
|
||||||
// set_auto_mouse_enable(false);
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// default:
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
// set_auto_mouse_enable(true);
|
// checks highest layer other than target layer
|
||||||
// break;
|
switch(get_highest_layer(remove_auto_mouse_layer(state, true))) {
|
||||||
// }
|
case _MOUSE:
|
||||||
// // recommend that any code that makes adjustment based on auto mouse layer state would go here
|
case _NAV:
|
||||||
|
case _IPC:
|
||||||
|
// remove_auto_mouse_target must be called to adjust state *before* setting enable
|
||||||
|
state = remove_auto_mouse_layer(state, false);
|
||||||
|
set_auto_mouse_enable(false);
|
||||||
|
break;
|
||||||
|
|
||||||
// static bool mouse_layer_on = false;
|
default:
|
||||||
// bool now_on = layer_state_cmp(state, _ONEHAND);
|
set_auto_mouse_enable(true);
|
||||||
// //if (now_on && !mouse_layer_on) {
|
break;
|
||||||
// // 마우스 레이어 진입 시
|
}
|
||||||
// // tap_code(KC_LCTL); // 예: 음소거 키 입력
|
// recommend that any code that makes adjustment based on auto mouse layer state would go here
|
||||||
// //} else
|
|
||||||
// if (!now_on && mouse_layer_on) {
|
|
||||||
// // 마우스 레이어 탈출 시
|
|
||||||
// tap_code(KC_LCTL);
|
|
||||||
// }
|
|
||||||
// mouse_layer_on = now_on;
|
|
||||||
// return state;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) {
|
static bool mouse_layer_on = false;
|
||||||
// switch(keycode) {
|
bool now_on = layer_state_cmp(state, _ONEHAND);
|
||||||
// case DRGSCRL:
|
if (now_on && !mouse_layer_on) {
|
||||||
// case SNIPING:
|
// 마우스 레이어 진입 시
|
||||||
// case KC_LCTL:
|
register_code(KC_F13); // 예: 음소거 키 입력
|
||||||
// case KC_LALT:
|
} else
|
||||||
// case KC_LSFT:
|
if (!now_on && mouse_layer_on) {
|
||||||
// return true;
|
// 마우스 레이어 탈출 시
|
||||||
// default:
|
unregister_code(KC_F13);
|
||||||
// return false;
|
}
|
||||||
// }
|
mouse_layer_on = now_on;
|
||||||
// return is_mouse_record_user(keycode, record);
|
return state;
|
||||||
// }
|
}
|
||||||
|
|
||||||
char chordal_hold_handedness(keypos_t key) {
|
bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||||
if (key.col == 0 || key.col == MATRIX_COLS - 1) {
|
switch(keycode) {
|
||||||
return '*'; // Exempt the outer columns.
|
case DRGSCRL:
|
||||||
}
|
case SNIPING:
|
||||||
// On split keyboards, typically, the first half of the rows are on the
|
case KC_LCTL:
|
||||||
// left, and the other half are on the right.
|
case KC_LALT:
|
||||||
return key.row < MATRIX_ROWS / 2 ? 'L' : 'R';
|
case KC_LSFT:
|
||||||
}
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return is_mouse_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CHORDAL_HOLD
|
||||||
|
char chordal_hold_handedness(keypos_t key) {
|
||||||
|
if (key.col == 0 || key.col == MATRIX_COLS - 1) {
|
||||||
|
return '*'; // Exempt the outer columns.
|
||||||
|
}
|
||||||
|
// On split keyboards, typically, the first half of the rows are on the
|
||||||
|
// left, and the other half are on the right.
|
||||||
|
return key.row < MATRIX_ROWS / 2 ? 'L' : 'R';
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
),
|
),
|
||||||
[_IPC] = LAYOUT_crkbd_wrapper(
|
[_IPC] = LAYOUT_crkbd_wrapper(
|
||||||
// |--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
|
// |--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
|
||||||
A(KC_F4), C(KC_F1), SCRNSHOT, G(KC_E), CLASS_A, HWP_MACRO, KC_GRV, _________NUM_789_________, _______, KC_PLUS,
|
A(KC_F4), C(KC_F1), SCRNSHOT, G(KC_E), CLASS_A, HWP_MACRO, KC_GRV, _________NUM_789_________, _______, KC_PLUS,
|
||||||
TO(_DOOM), IPC(A), IPC(S), IPC_MIN, IPC(F), KC_DOT, AT_IPC, _________NUM_456_________, KC_COLN, KC_DQUO,
|
TO(_DOOM), IPC(A), IPC(S), _IPC_MIN, IPC(F), KC_DOT, AT_IPC, _________NUM_456_________, KC_COLN, KC_DQUO,
|
||||||
TO(_BASE_NOMOD), IPC(Z), HWP_CITE, IPC(C), KC_EQL, KC_BSLS, XXXXXXX, _________NUM_123_________, _______, KC_PIPE,
|
XXXXXXX, IPC(Z), HWP_CITE, IPC(C), KC_EQL, KC_BSLS, XXXXXXX, _________NUM_123_________, _______, KC_PIPE,
|
||||||
TO(_BASE_NOMOD), _______, TO(_BASE), KC_LPRN, KC_RPRN, LT(_NAV,KC_0)
|
TO(_BASE_SWAP), _______, TO(_BASE), KC_LPRN, KC_RPRN, LT(_NAV,KC_0)
|
||||||
),
|
),
|
||||||
[_NUM] = LAYOUT_crkbd_wrapper(
|
[_NUM] = LAYOUT_crkbd_wrapper(
|
||||||
// |--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
|
// |--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
/* Handedness. */
|
/* Handedness. */
|
||||||
// #define MASTER_LEFT
|
// #define MASTER_LEFT
|
||||||
// #undef MASTER_RIGHT
|
// #undef MASTER_RIGHT
|
||||||
#define MASTER_RIGHT
|
// #define MASTER_LEFT
|
||||||
|
|
||||||
// TAP-HOLD OPTIONS
|
// TAP-HOLD OPTIONS
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
#define QUICK_TAP_TERM 0
|
#define QUICK_TAP_TERM 0
|
||||||
//#define PERMISSIVE_HOLD_PER_KEY
|
//#define PERMISSIVE_HOLD_PER_KEY
|
||||||
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||||
#define CHORDAL_HOLD
|
// #define CHORDAL_HOLD
|
||||||
|
|
||||||
// AUTO SHIFT OPTIONS
|
// AUTO SHIFT OPTIONS
|
||||||
#define NO_AUTO_SHIFT_ALPHA
|
#define NO_AUTO_SHIFT_ALPHA
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
cite_done = false;
|
cite_done = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
//
|
||||||
|
#ifdef CHARYBDIS_CONFIG_SYNC
|
||||||
|
case DRG_TOG:
|
||||||
|
if (__PRESSED__) {
|
||||||
|
register_code(KC_F15);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_F15);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// appcmd function
|
// appcmd function
|
||||||
case JOINTBL:
|
case JOINTBL:
|
||||||
|
|
@ -478,8 +490,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
@ -507,37 +519,32 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Get hold on other key press
|
// Get hold on other key press
|
||||||
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record){
|
// bool get_permissive_hold(uint16_t keycode, keyrecord_t *record){
|
||||||
switch (keycode) {
|
// switch (keycode) {
|
||||||
case SFTT_A:
|
// case SFTT_A:
|
||||||
return true;
|
// return true;
|
||||||
default:
|
// default:
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
// case LSFT_T(KC_W):
|
// case LSFT_T(KC_W):
|
||||||
case IPC(Z):
|
|
||||||
case THUMB_L1:
|
case THUMB_L1:
|
||||||
case THUMB_L2:
|
case THUMB_L2:
|
||||||
case THUMB_L3:
|
case THUMB_L3:
|
||||||
case THUMB_R1:
|
case THUMB_R1:
|
||||||
case THUMB_R3:
|
case THUMB_R3:
|
||||||
case SFT_CAPS:
|
case SFT_CAPS:
|
||||||
case SFTT_A:
|
|
||||||
// case SFTT_Z:
|
// case THUMB_R2:
|
||||||
// case GUIT_Z:
|
// case SFTT_A:
|
||||||
case SFTT_F:
|
// case SFTT_F:
|
||||||
// case SFTT_J:
|
case IPC(A):
|
||||||
// case ALTT_S:
|
case IPC(S):
|
||||||
// case CTLT_D:
|
case IPC_D_:
|
||||||
// case GUIT_SCL:
|
case IPC(F):
|
||||||
// case ALTT_L:
|
case IPC(Z):
|
||||||
// case CTLT_K:
|
|
||||||
// case GUIT_A:
|
|
||||||
// case LT(_NAV, KC_0):
|
|
||||||
// case IPC_COMM:
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -553,13 +560,13 @@ void matrix_scan_user(void) { // The very important timer.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef CHORDAL_HOLD
|
||||||
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
|
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
|
||||||
uint16_t other_keycode, keyrecord_t* other_record) {
|
uint16_t other_keycode, keyrecord_t* other_record) {
|
||||||
// Exceptionally allow some one-handed chords for hotkeys.
|
// Exceptionally allow some one-handed chords for hotkeys.
|
||||||
switch (tap_hold_keycode) {
|
switch (tap_hold_keycode) {
|
||||||
case LSFT_T(KC_A):
|
case LSFT_T(KC_A):
|
||||||
if (other_keycode == KC_W || other_keycode == KC_E || other_keycode == KC_R || other_keycode == KC_T) {
|
if (other_keycode == KC_Q ||other_keycode == KC_W || other_keycode == KC_E || other_keycode == KC_R || other_keycode == KC_T) {
|
||||||
return true;
|
return true;
|
||||||
} else {return false;}
|
} else {return false;}
|
||||||
break;
|
break;
|
||||||
|
|
@ -583,70 +590,46 @@ case TT(_ONEHAND):
|
||||||
case THUMB_R1:
|
case THUMB_R1:
|
||||||
case THUMB_R2:
|
case THUMB_R2:
|
||||||
case THUMB_R3:
|
case THUMB_R3:
|
||||||
case IPC(A):
|
|
||||||
case IPC(S):
|
|
||||||
case IPC_MIN:
|
|
||||||
case IPC(F):
|
|
||||||
case IPC(Z):
|
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case IPC(A):
|
||||||
|
case IPC(S):
|
||||||
|
case IPC_D_:
|
||||||
|
case IPC(F):
|
||||||
|
case IPC(Z):
|
||||||
|
if (other_keycode == IPC(A)||other_keycode == IPC(S)||other_keycode == IPC_D_||other_keycode == IPC(F)||other_keycode == IPC(Z)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// Otherwise defer to the opposite hands rule.
|
// Otherwise defer to the opposite hands rule.
|
||||||
return get_chordal_hold_default(tap_hold_record, other_record);
|
return get_chordal_hold_default(tap_hold_record, other_record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// charybdis trackball angular alignment calibration
|
|
||||||
// This code rotates the mouse report by 15 degrees counter-clockwise.
|
|
||||||
|
|
||||||
// #include "math.h"
|
|
||||||
|
|
||||||
// #define FIXED_POINT 256
|
|
||||||
// #define COS_15 ((int16_t)(cosf(15.0 * M_PI / 180.0) * FIXED_POINT)) // 0.9659
|
|
||||||
// #define SIN_15 ((int16_t)(sinf(15.0 * M_PI / 180.0) * FIXED_POINT)) // 0.2588
|
|
||||||
|
|
||||||
// report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
|
||||||
// report_mouse_t new_report = mouse_report;
|
|
||||||
|
|
||||||
// int16_t x = mouse_report.x;
|
|
||||||
// int16_t y = mouse_report.y;
|
|
||||||
|
|
||||||
// int16_t new_x = (COS_15 * x - SIN_15 * y) / FIXED_POINT;
|
|
||||||
// int16_t new_y = (SIN_15 * x + COS_15 * y) / FIXED_POINT;
|
|
||||||
|
|
||||||
// new_report.x = (int8_t)new_x;
|
|
||||||
// new_report.y = (int8_t)new_y;
|
|
||||||
|
|
||||||
// return new_report;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// charybdis trackball angular alignment calibration(floating point)
|
// charybdis trackball angular alignment calibration(floating point)
|
||||||
// This code rotates the mouse report by 15 degrees counter-clockwise.
|
// This code rotates the mouse report by 15 degrees counter-clockwise.
|
||||||
|
|
||||||
|
|
||||||
#include "math.h"
|
// #include "math.h"
|
||||||
|
|
||||||
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
// report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
||||||
report_mouse_t new_report = mouse_report;
|
// report_mouse_t new_report = mouse_report;
|
||||||
|
|
||||||
// 15도 회전 변환 공식 (반시계 방향)
|
// // 15도 회전 변환 공식 (반시계 방향)
|
||||||
// x' = cos(15°) * x - sin(15°) * y
|
// // x' = cos(15°) * x - sin(15°) * y
|
||||||
// y' = sin(15°) * x + cos(15°) * y
|
// // y' = sin(15°) * x + cos(15°) * y
|
||||||
|
|
||||||
float angle = 15.0 * M_PI / 180.0; // 라디안 변환
|
// float old_x = (float)mouse_report.x;
|
||||||
float cos_a = cosf(angle); // 약 0.9659
|
// float old_y = (float)mouse_report.y;
|
||||||
float sin_a = sinf(angle); // 약 0.2588
|
|
||||||
|
|
||||||
float old_x = (float)mouse_report.x;
|
// float new_x = COS15 * old_x - SIN15 * old_y;
|
||||||
float old_y = (float)mouse_report.y;
|
// float new_y = SIN15 * old_x + COS15 * old_y;
|
||||||
|
|
||||||
float new_x = cos_a * old_x - sin_a * old_y;
|
// new_report.x = (int8_t)roundf(new_x);
|
||||||
float new_y = sin_a * old_x + cos_a * old_y;
|
// new_report.y = (int8_t)roundf(new_y);
|
||||||
|
|
||||||
new_report.x = (int8_t)roundf(new_x);
|
// return new_report;
|
||||||
new_report.y = (int8_t)roundf(new_y);
|
// }
|
||||||
|
|
||||||
return new_report;
|
|
||||||
}
|
|
||||||
|
|
@ -110,18 +110,14 @@ Z X C V B N M , . /
|
||||||
#define _IPC_MIN LCTL_T(KC_MINS)
|
#define _IPC_MIN LCTL_T(KC_MINS)
|
||||||
|
|
||||||
#define IPC(x) LT(_IPC, KC_##x)
|
#define IPC(x) LT(_IPC, KC_##x)
|
||||||
#define NAV(x) LT(_NAV, KC_##x)
|
#define IPC_D_ _IPC_MIN
|
||||||
#define IPC_MIN _IPC_MIN
|
|
||||||
#define IPC_COMM LSFT_T(KC_COMM)
|
#define IPC_COMM LSFT_T(KC_COMM)
|
||||||
#define _NUM_A LT(_NUM, KC_A)
|
#define NAV(x) LT(_NAV, KC_##x)
|
||||||
#define _NUM_S LT(_NUM, KC_S)
|
#define NUM(x) LT(_NUM, KC_##x)
|
||||||
#define _NUM_D LT(_NUM, KC_D)
|
|
||||||
#define _NUM_F LT(_NUM, KC_F)
|
|
||||||
#define _NUM_MIN LCTL_T(KC_MINS)
|
#define _NUM_MIN LCTL_T(KC_MINS)
|
||||||
#define IME_CHG G(C(KC_SPC))
|
#define IME_CHG G(C(KC_SPC))
|
||||||
#define INV_DSP G(C(KC_C))
|
#define INV_DSP G(C(KC_C))
|
||||||
#define USR_LNG LT(_BASE, KC_LNG1)
|
#define USR_LNG LT(_BASE, KC_LNG1)
|
||||||
#define NUM(x) LT(_NUM, KC_##x)
|
|
||||||
//#define DRGMT LT(_ONEHAND, KC_F22)
|
//#define DRGMT LT(_ONEHAND, KC_F22)
|
||||||
#define BULLET_U C(S(KC_LBRC))
|
#define BULLET_U C(S(KC_LBRC))
|
||||||
#define BULLET_D C(S(KC_RBRC))
|
#define BULLET_D C(S(KC_RBRC))
|
||||||
|
|
@ -339,3 +335,7 @@ enum layer_index {
|
||||||
_ONEHAND, //
|
_ONEHAND, //
|
||||||
_SETTINGS,
|
_SETTINGS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//트랙볼 좔표계 보정용 상수
|
||||||
|
static const float COS15 = 0.965925826f; // cos(15°)
|
||||||
|
static const float SIN15 = 0.258819045f; // sin(15°)
|
||||||
Loading…
Reference in a new issue