Skip to content

Commit

Permalink
Improve v2 pycharm layer
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisTestov committed Jul 5, 2024
1 parent 09c2df8 commit 3f81fc2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions keyboards/drop/alt/keymaps/fylch_alt/key_codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ enum alt_keycodes {
PYCHARM_FIND_USAGES,
PYCHARM_SETTINGS,
PYCHARM_GO_TO_DECLARATION,
PYCHARM_TRANSPOSE
};
5 changes: 5 additions & 0 deletions keyboards/drop/alt/keymaps/fylch_alt/key_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
SEND_STRING(SS_LCTL(SS_TAP(X_B)));
}
return false;
case PYCHARM_TRANSPOSE:
if (record->event.pressed) {
SEND_STRING(SS_LCTL(SS_LALT(SS_TAP(X_T))));
}
return false;
default:
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion keyboards/drop/alt/keymaps/fylch_alt/layers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[2] = LAYOUT_65_ansi_blocker(
_______, TD(TD_BOOKMARK_1), TD(TD_BOOKMARK_2), TD(TD_BOOKMARK_3), TD(TD_BOOKMARK_4), TD(TD_BOOKMARK_5), TD(TD_BOOKMARK_6), TD(TD_BOOKMARK_7), TD(TD_BOOKMARK_8), TD(TD_BOOKMARK_9), TD(TD_BOOKMARK_REMOVE), _______, _______, TD(TD_STOP), _______,
_______, _______, _______, _______, TD(TD_REPLACE), _______, PYCHARM_FIND_USAGES, PYCHARM_TOGGLE_CASE, _______, _______, _______, PYCHARM_PREV_TAB, PYCHARM_NEXT_TAB, _______, _______,
_______, _______, _______, _______, TD(TD_REPLACE), PYCHARM_TRANSPOSE, PYCHARM_FIND_USAGES, PYCHARM_TOGGLE_CASE, _______, _______, _______, PYCHARM_PREV_TAB, PYCHARM_NEXT_TAB, _______, _______,
_______, _______, PYCHARM_SETTINGS, PYCHARM_GO_TO_DECLARATION, TD(TD_FIND), _______, TD(TD_HIDE), _______, _______, PYCHARM_REFORMAT, _______, _______, TD(TD_RUN), _______,
_______, _______, _______, _______, _______, TD(TD_BREAKPOINT), TD(TD_BREAKPOINT_NAVIGATION), _______, PYCHARM_PREV_CHANGE, PYCHARM_NEXT_CHANGE, PYCHARM_COMMENT, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
Expand Down
5 changes: 4 additions & 1 deletion keyboards/drop/alt/keymaps/fylch_alt/tapdance.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ void td_layer_mod_finished(tap_dance_state_t *state, void *user_data) {

void td_layer_mod_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
change_effect_color(alt_config.layer_hue[alt_config.current_layer]);
layer_off(1);
if (alt_config.current_layer == 2) {
layer_invert(2);
}
change_layer(0);
}
}

Expand Down

0 comments on commit 3f81fc2

Please sign in to comment.