Skip to content
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

Simple key mapping doesn't work #361

Open
Soromeister opened this issue Jul 14, 2024 · 4 comments
Open

Simple key mapping doesn't work #361

Soromeister opened this issue Jul 14, 2024 · 4 comments

Comments

@Soromeister
Copy link

Soromeister commented Jul 14, 2024

I am trying to do a very simple key remapping, basically remap § to ` (tick) and get the buttons inverted.

I tried the below configs:

0x0A : 0x32
0x0A = 0x32
0x0A -> 0x32

Nothing works so I'm opening an issue here to ask if this is even possible and if so, please provide examples as the current documentation is very ambiguous and completely lacks examples.

Permissions have been given and I've restarted the service for each change to make sure it's loaded.

@tjex
Copy link

tjex commented Aug 23, 2024

I think you may need to be looking at skhd -k, to simulate a keypress of another key, when pressing a certain key:

a : skhd -k "f"
f <- I typed this by pressing 'a'

@Tenshikun
Copy link

I try to setup all my keyboard related config only using skhd, but when I try to swap two keys (lets say "a" and "b" for example) by doing :
a : skhd -k "b"; b : skhd -k "a"
It doesn't work, it seems like it producing a endless loop or something like when I press "a" it sends "b" but then "b" is interpreted as an actual key pressing (which I know is the normal behaviour according to the help) but then the mapping "b -> a" triggers and the loop is back to the initial state, so nothing append when I press any of these two keys.

Does somebody knows how to bypass this please ?
Thanks a lot !

@tjex
Copy link

tjex commented Nov 7, 2024

but... it's impossible for this to be any other way or? If a = b and b = a, then ... pressing a will execute b, which will execute a, which will execute b. This is a loop by nature. Or am I missing something?

@Tenshikun
Copy link

Tenshikun commented Nov 8, 2024

Yes but I mean I am looking for an alternative to produce the swapping keys but in a non-recursive way (the output of one mapping is not considered by the input or the other one).

In many apps when it comes to key mapping you have the choice to specify wich behavior you chose between recursive and non recursive.

Probably there is a tricky way to do this with skhd but I just didn't find it so I wanted to know if someone did it in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants