Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danielo515/redox #8232

Merged
merged 27 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c620f79
feat(build): added script for compiling with docker easily
danielo515 Oct 31, 2018
5a3e76f
chore: bring my own build with docker to master
danielo515 Jan 25, 2020
b502334
chore: delete a file that does not make sense anymore
danielo515 Jan 30, 2020
31e9c35
feat: first redox for danielo
danielo515 Jan 30, 2020
db17b26
chore: basic compatibility between redox and my space
danielo515 Jan 31, 2020
ac18543
refactor: removed some old stuff
danielo515 Feb 14, 2020
6350561
feat: added go coding symbols
danielo515 Feb 14, 2020
fe30547
feat: name control_k and alt_j
danielo515 Feb 16, 2020
b15612f
chore: reduce combo term
danielo515 Feb 16, 2020
ecd4279
feat: improved first layer of redox
danielo515 Feb 19, 2020
1c82379
feat: add configurations to the redox
danielo515 Feb 19, 2020
4d4c803
feat: make alt tab more portable
danielo515 Feb 19, 2020
2d290cc
feat: small improvements to redox layout
danielo515 Feb 19, 2020
ef45684
feat: added leader
danielo515 Feb 20, 2020
046a917
refactor: move leader defs to my userspace config
danielo515 Feb 20, 2020
1e8e37c
chore: movement modified
danielo515 Feb 20, 2020
5f47f5c
feat: more predefined keys and a a new combo
danielo515 Feb 20, 2020
ce5be7b
feat: redox alt tab functionality
danielo515 Feb 23, 2020
467e05b
refactor: move alt_tab processing to a separate file
danielo515 Feb 23, 2020
fa7ee91
refactor: early return
danielo515 Feb 23, 2020
7abe631
refactor: move process record to a separate file
danielo515 Feb 23, 2020
2e527c8
format leader function
danielo515 Feb 23, 2020
ed56032
chore: backspace on digits layer
danielo515 Feb 24, 2020
f4dd142
feat: add extra combo
danielo515 Feb 24, 2020
17fc04c
feat: added more combos
danielo515 Feb 26, 2020
6fb646c
implement guard proposed by @drashna
danielo515 Mar 6, 2020
6db354a
chore: include @drashna placeholder suggestion
danielo515 Mar 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: make alt tab more portable
  • Loading branch information
danielo515 committed Feb 19, 2020
commit 4d4c803a65e3c96d7ccb818d105d25f9e8d95408
8 changes: 8 additions & 0 deletions keyboards/ergodox_ez/keymaps/danielo515/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,11 @@ void oneshot_mods_changed_user(uint8_t mods) {
void oneshot_locked_mods_changed_user(uint8_t mods) {
oneshot_mods_changed_user(mods);
}

//=============== alt_tab callbacks
void alt_tab_activated(void){
layer_on(7); // activate motion layer
}
void alt_tab_deactivated(void){
layer_off(7); // activate motion layer
}
8 changes: 6 additions & 2 deletions users/danielo515/danielo515.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ bool CMD(uint16_t kc) {

//**************** Handle keys function *********************//
bool altPressed = false;
__attribute__ ((weak)) void alt_tab_activated(void){};
__attribute__ ((weak)) void alt_tab_deactivated(void){};

bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
Expand Down Expand Up @@ -122,6 +124,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
break;
//First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt
#endif
// =============== ALT_TAB single key handling
case ALT_TAB:
if (record->event.pressed)
{
Expand All @@ -132,9 +135,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
else
{
altPressed = true;
layer_on(7); // go to movement layer
onMac ? register_code(KC_LGUI) : register_code(KC_LALT);
tap_code(KC_TAB);
alt_tab_activated();
}
}
return false;
Expand All @@ -150,9 +153,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT);
altPressed = false;
layer_off(7);
alt_tab_deactivated();
return false;
}
// =============== ALT_TAB single key handling end
return true;
};

Expand Down
2 changes: 2 additions & 0 deletions users/danielo515/danielo515.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ bool handle_macro(uint16_t kc);
bool is_macro (uint16_t kc);
bool process_incremental_macro (uint16_t);
void refresh_incremental_macros (uint16_t);


//**************** KEYCODES *********************//

enum custom_keycodes
Expand Down