-
Notifications
You must be signed in to change notification settings - Fork 182
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
Allow for normal key overload. #919
Comments
You can do:
```
[ids]
*
[main]
esc = overload(print, grave)
[print]
a = print+a
b= print+b
```
... etcetera. There are issues in the backlog to make this sort of thing easier and less verbose in the future - I can look them up later.
…On January 22, 2025 4:24:46 PM GMT+01:00, "Dmitry 🌊" ***@***.***> wrote:
The scenario I have is that when I tap `esc` key it is used as a `grave` symbol, but when held I use it as a `print` key for Sway combos like `print+a` or `print+b`. Basically I want it to behave like a character input on tap and held `print` key when held. Currently I have to use `timeout(grave, 150, print)` because `overload(print, grave)` doesn't work, which is sub-optimal. Thanks!
--
Reply to this email directly or view it on GitHub:
#919
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
That will work I guess. Thanks! Should I close the issue or keep it to track the progress? |
Got it working! For NixOS users it's somewhat easy to generate: let
mkAllLetterKeysSet =
mkValue:
"abcdefghijklmnopqrstuvwxyz"
|> lib.strings.stringToCharacters
|> map (key: {
name = key;
value = mkValue key;
})
|> lib.listToAttrs;
in
{
services.keyd.keyboards.default.settings = {
main.esc = "overload(layer_print, grave)";
layer_print = mkAllLetterKeysSet (key: "macro(print+${key})");
};
} This will generate
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The scenario I have is that when I tap
esc
key it is used as agrave
symbol, but when held I use it as aprint
key for Sway combos likeprint+a
orprint+b
. Basically I want it to behave like a character input on tap and heldprint
key when held. Currently I have to usetimeout(grave, 150, print)
becauseoverload(print, grave)
doesn't work, which is sub-optimal. Thanks!The text was updated successfully, but these errors were encountered: