Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
try to fix #209, fix #204, fix #227.
Pardon the naming, I can't think of a better one, same goes for the
|
token.This works by sending the synthetic event with a user data0x12345
(feel free to suggest a different one) and If we see the key press with this user data, we ignore it, hence achieve forwarding (hence the naming as we're just forwarding one key press to another).Update:: This now works my modifying the original event and return it directly. This won't trigger another event loop thus preventing skhd from capturing the key press again.
Update: also merged the service updates from upstream into
jackielii/tap/skhd
. You can install and start via:Just in case this is not merged, you can try this by compiling locally:
make && ./bin/skhd -V -P
Or install using my tap:
Config can be simply:
You should see in the log:
The alternative presented in #204 has data races :
When you press
ctrl - 1
&ctrl - 2
too quickly, you may end up in thetabmode
.This PR solves this problem.