qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.23k stars 39.26k forks source link

Cannot map 'CTL_T' with 'RCTL' #443

Closed potatogim closed 7 years ago

potatogim commented 8 years ago

Hi, I tried to map CTL_T to RCTL with my ergodox ez.

so I changed quantum/keymap.h like below that.

302 // Additional keycode for mapping LXXX_T/RXXX_T
303 #define LCTL_T(kc) MT(MOD_LCTL, kc)
304 #define RCTL_T(kc) MT(MOD_RCTL, kc)
305 #define LSFT_T(kc) MT(MOD_LSFT, kc)
306 #define RSFT_T(kc) MT(MOD_RSFT, kc)
307 #define LALT_T(kc) MT(MOD_LALT, kc)
308 #define RALT_T(kc) MT(MOD_RALT, kc)
309 #define LGUI_T(kc) MT(MOD_LGUI, kc)
310 #define RGUI_T(kc) MT(MOD_RGUI, kc)

and then I have tried to change my right hand 'CTL_T' key mapping with 'RCTL_T' on my keymap.c but it still input LCTL.

Does anybody know how can I map right-ctrl with CTL_T?

jackhumbert commented 8 years ago

Unfortunately only the mod type (not handedness) gets passed into that function right now - we'd need another bit to do that. This will likely change in the future, though!

If you don't mind me asking, how does the left control not work here? Do you have something binded to right control specifically?

You can set up an older-style mod-tap with FN0/fn_actions like this in your keymap.c:

const uint16_t PROGMEM fn_actions[] = {
  [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, <kc>);
}
potatogim commented 8 years ago

I'm using right-ctrl key as HOST key in remmina :-)

On your advice, I will try to older-style mod-tap like that.

Thanks for your answer!

skullydazed commented 7 years ago

I'm closing this to clean up our open issues, but if you still have questions @potatogim please reopen this or open a new issue.