This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Solved.
Crosspost from /r/qmk, as that sub has all of 200 members while this one has... a tad more. Also, sorry for the bad title - I tried to make it as descriptive as possible.
I basically want one of my keys to act as follows:
- If the qwerty layer is active, just send space
- If the qwerty layer is not active, move to the qwerty layer
- If the key is held, momentarily enable the nav layer - regardless of what layer I'm on
- If the key is released, disable the nav layer
The nav layer works just fine. Regardless of what layer is active, I can activate and use it by holding down KC_NAV. But I am neither able to type space on the qwerty layer, nor can I switch back to it if I'm on another layer (num or symbol). All my layers except the nav layer are intended to be toggled, not held, as that's more comfortable to me.
The code is as follows. Any ideas as to why it doesn't work are appreciated. :)
case KC_NAV:
if (record->tap.count && record->event.pressed) {
// on tap
if (IS_LAYER_ON(LYR_QWR)) {
tap_code(KC_SPC);
} else {
layer_move(LYR_QWR);
}
} else if (record->event.pressed) {
// on hold
if (IS_LAYER_OFF(LYR_NAV)) {
layer_on(LYR_NAV);
}
} else {
// on release
if (IS_LAYER_ON(LYR_NAV)) {
layer_off(LYR_NAV);
}
}
return false;
Edit:
Solved as per my other thread, thanks to a comment from /u/Mental_General_5445.
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/olkb/commen...