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

tapping CTRL not working in macros (Ergodox) #136

Closed
kaimi opened this issue Sep 25, 2014 · 4 comments
Closed

tapping CTRL not working in macros (Ergodox) #136

kaimi opened this issue Sep 25, 2014 · 4 comments

Comments

@kaimi
Copy link

kaimi commented Sep 25, 2014

I’m using @cub-uanic’s Ergodox code, but apparently it’s most likely a general issue: cub-uanic#6.

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.

@tmk
Copy link
Owner

tmk commented Sep 25, 2014

Yes, you can't register modifier only. In macro modifiers get valid only when other key is pressed. This is intentional design.

To tap a mondifier we'll need to add some new notation. I'll look into this for next revision.

@tmk
Copy link
Owner

tmk commented Sep 25, 2014

WORKAROUND: You can use function instead of macro.

@kaimi
Copy link
Author

kaimi commented Sep 25, 2014

Oh, that’s too bad. Thanks for the quick reply.

How do I simulate the key presses in a function, if I might ask?

@tmk
Copy link
Owner

tmk commented Oct 22, 2015

This commit e852582 probably fixed this problem.

seancaffery pushed a commit to seancaffery/tmk_keyboard that referenced this issue Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants