cub-uanic / tmk_keyboard

keyboard controller firmware for Atmel AVR USB family
158 stars 157 forks source link

tapping CTRL not working in macros #6

Closed kaimi closed 9 years ago

kaimi commented 10 years ago

I guess it’s an upstream problem but I’ll open an issue here first given I’ve forked from you and use your ErgoDox code :)

In this macro

MACRO( I(50), T(LCTRL), T(LCTRL), W(255), W(255), T(ENTER), END)

https://github.com/kaimi/tmk_keyboard/blob/1.0.1/keyboard/ergodox/keymap_neo.h#L402

only the ENTER is registered, both LTCTRL are silently omitted. XEV output:

KeyPress event, serial 32, synthetic NO, window 0x3a00001,
    root 0xa2, subw 0x0, time 27317479, (-128,418), root:(559,457),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x3a00001,
    root 0xa2, subw 0x0, time 27317535, (-128,418), root:(559,457),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

I tried seperate D(LCTRL), U(LCTRL) and even reducing the macro to just T(LTCRL), T(ENTER). Don’t work either.

cub-uanic commented 10 years ago

This is definitely upstream bug. If you want to simulate Ctrl+Enter, then I think you could try to workaround it by:

MACRO( I(50), D(LCTRL), T(ENTER), U(LCTRL), END)
kaimi commented 9 years ago

Ok, I’ll forward it to hasu then.

I need the macro to tap CTRL, CTRL, ENTER in sequence. As i wrote, that does not work even when doing separate D and U for CTRL.

cub-uanic commented 9 years ago

Closed as duplicate of https://github.com/tmk/tmk_keyboard/issues/136