the-via / firmware

DO NOT DOWNLOAD FIRMWARE FROM HERE..... GO TO https://caniusevia.com/docs/download_firmware
GNU General Public License v3.0
110 stars 37 forks source link

MT(MOD_RALT,KC_SPC) is saved wrong #54

Open propri opened 1 year ago

propri commented 1 year ago

When you program a key with MT(MOD_RALT,KC_SPC), it is saved as MT(MOD_LALT | MOD_RALT,KC_SPC). Both with the app and the website.

lesca commented 1 year ago

this is the issue of the QMK not VIA.

Currently, the kc argument of MT() is limited to the Basic Keycode set, meaning you can’t use keycodes like LCTL(), KC_TILD, or anything greater than 0xFF. This is because QMK uses 16-bit keycodes, of which 3 bits are used for the function identifier, 1 bit for selecting right or left mods, and 4 bits to tell which mods are used, leaving only 8 bits for the keycode. Additionally, if at least one right-handed modifier is specified in a Mod-Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two - for example, Left Control and Right Shift would become Right Control and Right Shift.

source: https://docs.qmk.fm/#/mod_tap

propri commented 1 year ago

I don't quite understand how that relates to my problem? The keycode part works as expected, but the modifier doesn't. I am also not mixing any right/left modifiers.

I want to have a key that acts as space when tapped, but as RALT when held. If I try to program it with the any function of via as described above, the key acts as both RALT and LALT at the same time when held.
If I program it with LALT instead, it is saved as MT(MOD_LALT,KC_V) as expected. Non QWERTY layouts often need to use RALT to reach certain symbols, and activating both RALT and LALT at the same time leads to unexpected and wrong inputs.

When I programmed my keyboard with QMK directly, I could achieve this by using RALT_T(KC_SPC), but VIA doesn't seem to support the RALT_T().