Comments (4)
Your question isn't badly formatted :-)
On a stylistic note real quick: it'd be more consistent to say P(m_alttab)
, if you're going to say R(m_alttab)
below it -- or alternately to use keys__press__m_alttab
and keys__release__m_alttab
. R(...)
and P(...)
are macros that expand out to the longer form during preprocessing.
To answer one question, you probably should keep all your layout specific stuff in qwerty_zorglups.c
-- though, since it's your own fork of the repo, you're quite welcome to modify keys.part.h
(if you're doing things the same way I did them in qwerty--ben.c
it won't matter at all to the compiler, since #include
is the preprocessor version of cut and paste).
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 lib/timer.h
) and have KEYBOARD__LeftAlt
released after a specified amount of time. Or maybe, since you've thought about it more than I have, you have other ideas.
from ergodox-firmware.
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.
I would like to avoid the timer too because the reason to switch programs using Alt-Tab is to be really quick.
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.
from ergodox-firmware.
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 keys.part.h
. For example, if your control layer was layer 1, you currently have void P(lpo1l1) (void) { layer_stack__pop_id(1); kb__led__off(1); }
changed to #define keys__press__lpo1l1 R(lpupo1l1)
but you could change it to void P(lpo1l1) (void) { layer_stack__pop_id(1); usb__kb__set_key(false, KEYBOARD__LeftAlt); }
instead (untested).
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 bool lpupo1l1__alt_pressed;
, and then inside your layer push function, add something like lpupo1l1__alt_pressed = usb__kb__read_key(KEYBOARD__LeftAlt);
, and inside your layer pop function, instead of just releasing it, put something like usb__kb__set_key(!lpupo1l1__alt_pressed, KEYBOARD__LeftAlt);
.
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 :-)
from ergodox-firmware.
Sorry Ben. Not had time to try it yet but I'll do and report my results.
from ergodox-firmware.
Related Issues (20)
- Will a non-soldered teensy be recognized as a keyboard? HOT 2
- Any way to give Ergodox the full control over layout? HOT 8
- PROBLEMS FOR UK KEYBOARD USERS HOT 1
- Is 80 key version of ergodox supported in your code ? HOT 9
- Compose key not registered HOT 1
- Latch Keys Not Working HOT 3
- changing key from `1` to `_grave` causes unexpected behavior
- "Simple macros" don't work on Mac OS Sierra HOT 4
- Updating the USB stack HOT 1
- How to use layers? HOT 1
- Readme still links to the defunct .org site in the title HOT 1
- Set what is sent on shift HOT 1
- Random sticky/unresponsive HOT 11
- Always switched to layer 2 on the first system startup HOT 3
- Hold letter key for another key entirely HOT 1
- About the drop page cannot download .HEX files HOT 1
- Keyboard doesnt boots after tried to flashing with another firmware HOT 4
- Using ancient frozen customized fork of your firmware (didn't set it up, kinda inherited it, don't really understand it). If I get a new ergodox, could I just flash my current firmware on to it? (Paranoid the old microcontroller in my current one *might* be starting to fail...) HOT 11
- default Make target (dist) fails running gen-ui-info.py with KeyError: '_kb_layout' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ergodox-firmware.