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

[Bug] set_oneshot_mods(MOD_RSFT) sets MOD_RCTL #10901

Closed
j-zero opened this issue Nov 9, 2020 · 4 comments
Closed

[Bug] set_oneshot_mods(MOD_RSFT) sets MOD_RCTL #10901

j-zero opened this issue Nov 9, 2020 · 4 comments

Comments

@j-zero
Copy link
Contributor

j-zero commented Nov 9, 2020

When trying to set MOD_RSFT with set_oneshot_mod, MOD_RCTL is set.

Describe the Bug

While set_oneshot_mods(MOD_LSFT) works fine, set_oneshot_mods(MOD_RSFT) sets MOD_RCTL instead.

Code

void super_RSHIFT_finished (qk_tap_dance_state_t *state, void *user_data) {
  tap_state.state = get_dance_state(state);
  switch (tap_state.state) {
    case SINGLE_TAP:
        if(one_shot_shift_enabled){
            if(!one_shot_shift_on){
                set_oneshot_mods(MOD_RSFT);
            }
            else{
                clear_oneshot_mods();
            }
        }
       break;
    default:
        if(one_shot_shift_enabled)
            clear_oneshot_mods();
        break;
  }
}

System Information

  • Keyboard: kbdfans kbd75
    • Revision (if applicable): rev2
  • Operating system: Windows 10 1909
  • AVR GCC version: avr-gcc.exe (GCC) 8.4.0
  • ARM GCC version: 8.3.1 20190703
  • QMK Firmware version: 0.10.22
  • Any keyboard related software installed?
    No
@kosorin
Copy link
Contributor

kosorin commented Nov 10, 2020

MOD_RSFT is not what you're looking for, Try MOD_BIT(KC_RSFT)

@j-zero
Copy link
Contributor Author

j-zero commented Nov 11, 2020

Well, that works. Thank you.
https://beta.docs.qmk.fm/using-qmk/software-features/one_shot_keys says MOD_RSFT.

MOD_RSFT is not what you're looking for, Try MOD_BIT(KC_RSFT)

j-zero added a commit to j-zero/qmk_firmware that referenced this issue Nov 11, 2020
MOD_RSFT doesn't work. See: qmk#10901
@j-zero j-zero mentioned this issue Nov 11, 2020
14 tasks
@kosorin
Copy link
Contributor

kosorin commented Nov 11, 2020

MOD_* is for OSM(mod) macro.
I know it because I had same problem. Documentation wasn't very clear in this case so I checked source code...

zvecr pushed a commit that referenced this issue Nov 18, 2020
MOD_RSFT doesn't work. See: #10901
xgnxs pushed a commit to xgnxs/qmk_firmware that referenced this issue Jan 9, 2021
@zvecr
Copy link
Member

zvecr commented Aug 28, 2022

##10917

@zvecr zvecr closed this as completed Aug 28, 2022
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this issue May 23, 2024
MOD_RSFT doesn't work. See: qmk#10901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants