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

Auto-Shifted Macros #8551

Closed
ThePreviousOne opened this issue Mar 24, 2020 · 3 comments
Closed

Auto-Shifted Macros #8551

ThePreviousOne opened this issue Mar 24, 2020 · 3 comments
Labels
help wanted question stale Issues or pull requests that have become inactive without resolution.

Comments

@ThePreviousOne
Copy link
Contributor

ThePreviousOne commented Mar 24, 2020

I followed the instructions on #7840 to get custom shift keys, but how could I get it to work with Auto Shift?

switch (keycode) {
		case C_1 ... C_X:
			if (record->event.pressed) {
        uint8_t mod_state = get_mods() & MOD_MASK_SHIFT;
				//uint16_t shifting_timer = timer_read();
        clear_mods();
        if(mod_state) {
					tap_code16(alt_keymap[1][keycode - C_1]);
        } else {
					tap_code16(alt_keymap[0][keycode - C_1]);
        }
        set_mods(mod_state);
      }
      break;

I tried changing the if to
if (modstate | timer_elapsed(shifting_timer) > AUTO_SHIFT_TIMEOUT)

but that didn't work. I also tried adding

if (timer_elapsed(shifting_timer) > AUTO_SHIFT_TIMEOUT) {
    tap_code16(alt_keymap[1][keycode - C_1]);
}

to the else statement, which also didn't work.

I'm still a beginner with QMK and don't know what else to try

@IsaacElenbaas
Copy link
Contributor

You can clone from here if #8127 still isn't merged. See here for usage.

@stale
Copy link

stale bot commented Aug 6, 2020

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.
For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

@stale stale bot added the stale Issues or pull requests that have become inactive without resolution. label Aug 6, 2020
@stale
Copy link

stale bot commented Sep 5, 2020

This issue has been automatically closed because it has not had activity in the last 30 days. If this issue is still valid, re-open the issue and let us know.

@stale stale bot closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted question stale Issues or pull requests that have become inactive without resolution.
Projects
None yet
Development

No branches or pull requests

2 participants