Action on layer becoming inactive - is it possible? #167
Answered
by
chodorowicz
chodorowicz
asked this question in
Q&A
-
|
Hey there 👋 🙂 I'm thinking of having a layer, let's say modifierLayer("right_command", "s").manipulators([
map("i").to(toApp("Signal")),
map("k").to(toApp("Skype")),
])
// launch `toApp("Slack")` if only `"right_command", "s"` was pressed and released, without any other keyis it possible? |
Beta Was this translation helpful? Give feedback.
Answered by
chodorowicz
Mar 28, 2025
Replies: 1 comment
-
|
OK, I got it working 🥳 rule("apps").manipulators([
withModifier("right_command")([
map("s")
.toVar("app_layer", "s")
.toAfterKeyUp(toSetVar("app_layer", 0))
.toIfAlone(toApp("Slack")),
map("p")
.toVar("app_layer", "p")
.toAfterKeyUp(toSetVar("app_layer", 0))
.toIfAlone(toApp("1Password")),
withCondition(ifVar("app_layer", "s"))([map("i").to(toApp("Signal"))]),
withCondition(ifVar("app_layer", "p"))([map("o").to(toApp("Postman"))]),
]),
]) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chodorowicz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, I got it working 🥳