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

Windows: co-existence with kMonad? #283

Open
bogorad opened this issue Feb 14, 2024 · 2 comments
Open

Windows: co-existence with kMonad? #283

bogorad opened this issue Feb 14, 2024 · 2 comments

Comments

@bogorad
Copy link

bogorad commented Feb 14, 2024

I use kMonad for windows. It doesn't look like Warpd is receiving the keys emitted by kMonad/win. Is it even possible?

@rvaiya
Copy link
Owner

rvaiya commented Feb 18, 2024

I believe kmonad uses the same hook used by warpd, so I would not expect them to place nicely. The windows port was done in a weekend and should be considered experimental. I am currently in the process of porting most of warpd's useful features to https://github.com/rvaiya/keyd and doing a proper port to other platforms, which should ultimately provide comparable functionality to kmonad.

@petoncle
Copy link

petoncle commented Mar 7, 2024

Both KMonad and warpd use the same keyboard hook (SetWindowsHookEx(WH_KEYBOARD_LL)), but I think that should not necessarily mean they can't work together.

I believe the order in which the keyboard hooks are installed is what matters: if you run warpd first, then KMonad second, then KMonad will get the keyboard events from Windows, drop them or generate new events or forward untouched events to the next hook (warpd).
However, you may need to remove the LLKHF_INJECTED check which is going to be evaluated to true when KMonad generates new keyboard events that are passed down to warpd:

if (ev->flags & LLKHF_INJECTED)
goto passthrough;

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