-
Notifications
You must be signed in to change notification settings - Fork 294
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
How to release the 'RightAlt' upon leaving a layer. #82
Comments
Your question isn't badly formatted :-) On a stylistic note real quick: it'd be more consistent to say To answer one question, you probably should keep all your layout specific stuff in Your other question is a bit harder. It depends on what you want to happen. It sounds like you'd like to press a single key to switch programs, and press the same key multiple times to switch to a less recent program. What's missing is what you want to do to signal that you're done selecting a program. You could put the release on another key if you wanted. You could use one of the timers (I don't think I have any examples of using the functionality (I don't think I was done designing it either, but I haven't touched it in a while), but see |
Thank you for your reply (fast, as usual). Lazy, I don't want to use another key to signal that I'm done selecting a program. Same as with the Alt-Tab, when we release the Alt, it's done. Would there be a way to release the KEYBOARD__LeftAlt released when I leave my layer even if it is not within the qwerty_zorglups.c? Have a nice day. |
You happened to catch me with a relatively straightforward question, at a time when I had time. Yes, you can. You can write your own layer pop function, or you can change the one in Or, if there will ever be a time when you're holding alt, then pressing your layer key, then pressing your alt+tab key, you may also want a variable to store the previous state of the alt key so that you can restore that state when the layer key is released rather than always releasing the alt key. In that case, you might make a variable above wherever you're defining the layer push and pop functions, called maybe Though under certain conditions that logic might be wrong too... It might be easier to just use left alt for this purpose, and right alt for all other purposes, so that they don't conflict. Or there are probably other workarounds. Didn't check all this very carefully, but I hope it's a good start :-) |
Sorry Ben. Not had time to try it yet but I'll do and report my results. |
Hello,
Using your firmware on my Ergodox for the last years, I came up with something really useful on:
I only miss an important thing (under Windows) : Easy and comfortable access to the 'Alt-Tab' combo.
I wanted to implement it on my 'control' layer and added this macro to ma qwerty_zorglups.c layout:
I then used 'm_alttab' onto the "R" key of my control layer.
The problem is that the "alt-tab" window will only flash and we only toggle between the 2 last applications.
I then changed it to:
That way, the 'LeftAlt' remain down and the Alt-Tab will stay and I can press it several time to select an application in the list.
The missing piece is : Where should I insert/call the "usb__kb__set_key(false, KEYBOARD__LeftAlt);" so that it is called when I leave my control layer?
Is that in keys.part.h ?
I changed it a bit because I do not need the LED for the layers but rather use them for power and num lock. For now, it looks like:
I'm really sorry for that badly formulated question but I'm not a C programmer and your help will be greatly appreciated.
Best regards,
Pierre
The text was updated successfully, but these errors were encountered: