"There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)"
I NEED TO KNOW JACK IT'S KILLING ME PLEASE
Haha, this was a joke between @ezuk and me, but I can't remember what the context was :)
I think you can just tap an OSM key more than once to lock it? Isn't that related to TAPPING_TERM? This is a portion of the code I'm not super familiar with!
Haha, this is something I just explained to someone, over on reddit. Here's the trick: make your modifiers F(n) keys, and set up fn_actions, so the action for them is ACTION_MODS_ONESHOT, something like this.
You will also need to add #define ONESHOT_LAYER_TOGGLE 2 to your config.h, if you want your OSL()s to work the same way.
This feature should only work on moonlit winter nights.
(assigning self so I can document it a little more fully)
This feature should only work on moonlit winter nights.
If I ever build a custom keyboard, I'll add some thermal sensors, a camera and a clock, and one of the features WILL require a moonlit winter night. Mind you, I can get halfway there even with an ErgoDox EZ... hmm.
_algernon adds it to his crazy-things bucketlist_
Just tested ACTION_MODS_ONESHOT and that in itself works fine, but these don't change a thing:
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 1
I can set the timeout to whatever I want, the key never times out, and tap toggling doesn't work either. Guess I'll have to put Capslock on a function layer for now, but it would be a nice feature to have working.
I have an ergodox and an atreus 62 and this feature works fine on the ergodox but not on atreus. fn_actions clearly is being called but when I double tap I don't get Shift locked
Any idea what could be the difference?
try:
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 500
Works for me. The default number of taps is five which I think is confusing.
i tried that already and it doesn't change it. My timeout is longer though at 3000. I'll enable debug to learn a bit more
If this is still an issue, try using OSM(MOD_*) for the keycode, rather than a function.
Most helpful comment
Haha, this is something I just explained to someone, over on reddit. Here's the trick: make your modifiers
F(n)keys, and set upfn_actions, so the action for them isACTION_MODS_ONESHOT, something like this.You will also need to add
#define ONESHOT_LAYER_TOGGLE 2to yourconfig.h, if you want yourOSL()s to work the same way.