-
Notifications
You must be signed in to change notification settings - Fork 157
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
Bug: No keys are sending on Mac #1317
Comments
Maybe this can help: |
I am also encoutering this issue. #1211 doesn't seem to help with this. |
I'll give #1211 a try and also get some more debug logs to see where it might be going wrong EDIT: Already had both Kanata and iTerm in the input monitoring, so don't think it's that. EDIT 2: I do see this PR for the driverkit to bump it to version 5.0.0, which is what I have when I run the below command. So hoping that is just my issue and when that gets merged this hopefully will resolve
|
Confirming the last comment by @CampAsAChamp. I had this issue on MacOS 15.0.1 of key presses being detected but not being written. I repointed my local cargo.toml to the driverkit git repo mentioned in PR and rebuilt locally. Now works. |
@jtroo how should I resolve this? Close it and mention that this issue should be fixed when that above PR gets merged? Or how would you like? The only reason why I have version |
We can leave this open until we bump the dependency version in Kanata. |
I'm having trouble even with 5.0.0. On MacOS Sonoma 14.7. When I run kanata, my whole keyboard is unusable. |
@fearlessgeekmedia my understanding is that, having 5.0.0 is the problem (on kanata side) and kanata needs an updated dependency to work correctly. |
Oh, ok. So I just need to wait? |
You could:
|
Here's my build with updated driverkit dependency - it worked for me on 15.1, M1 Apple Silicon. (With the 5.0.0 Karabiner driver .pkg installed.) Took me a while to figure out I also needed to run the Karabiner daemon separately, e.g.
|
I tried an older Karabiner driver and compiled Kanata myself already.
Neither of those solved my problem. I ended up using claude.ai to convert
my Kanata config to a Karabiner Elements mod. It works. :)
…On Tue, Nov 5, 2024, 1:15 AM Matt Wilson ***@***.***> wrote:
Here's my build with updated driverkit dependenciy - it worked for me on
15.1, M1 Apple Silicon.
https://www.dropbox.com/scl/fi/4bsz4a2qih35ui9gp1fhe/kanata_w_kdk_5.0.0.zip?rlkey=g6139xiug7zcr1b9ccie15xwd&dl=0
Took me a while to figure out I also needed to run the Karabiner daemon
separately, e.g.
# in one tab
sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'
# in another tab
sudo ./kanata --cfg ~/.config/kanata.kb
—
Reply to this email directly, view it on GitHub
<#1317 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HGA5VEYY4MZAKMVKVEVP3Z7B5C5AVCNFSM6AAAAABQ7W2HBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJWGUYDMMRRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When do you expect this to happen? |
I didn't specify earlier. I'm using one of the Intel Macs. |
You're asking for a time estimate from a free, donations-not-accepted, open source project 😂. Within |
Sorry, my intention wasn't to create any pressure or push. Just wanted to check if this is something you're planning to implement soon, so I can wait for it, or if not, I will try to do so locally. My bad for not taking enough time to write this properly 🙏 |
There's not much work to do in the Kanata repo. The blocker is having the updated dependency consumable via crates.io for use with cargo install. I'm not sure how active @psych3r is so it might be a while to get the pr merged and crate published. It may be desirable to: have a new maintainer for the dependency or vendor and maintain the dependency within the Kanata repo. |
I've been quite busy for the last month. |
I must have missed something but I couldn't get it to work. I git pulled and cargo build the latest kanata, installed Karabiner-DriverKit-VirtualHIDDevice-5.0.0.pkg, activated latter and still have given Terminal permission for Input Monitoring. But it is still not working, before my installation worked. Edit: |
I don't think you missed anything. We're essentially waiting.Or you could
do what I did and use Karabiner Elements.
…On Tue, Nov 12, 2024, 12:33 PM newsve ***@***.***> wrote:
I must have missed something but I couldn't get it to work. I git pulled
and cargo build the latest kanata, installed
Karabiner-DriverKit-VirtualHIDDevice-5.0.0.pkg, activated latter and still
have given Terminal permission for Input Monitoring. But it is still not
working, before my installation worked.
—
Reply to this email directly, view it on GitHub
<#1317 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HGA5WSOJZVNA5HX5ZKLPL2AJJXZAVCNFSM6AAAAABQ7W2HBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRGQYDAMJRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
While I run kanata, my keyboard and mouse not work anymore, I can only exit by |
Yeah, pretty much what was happening to me too. Granted I am only using it
for keyboard shortcuts and not anything with the mouse. So I didn't have
the mouse issues.
…On Tue, Nov 12, 2024 at 7:59 PM Lawrence Liu ***@***.***> wrote:
While I run kanata, my keyboard and mouse not work anymore, I can only
exit by Ctrl + Space + Esc. I tried Karabiner-VirtualHIDDevice-Manager
3.1 and 5.0, nothing changed. I do real not want turn back to karabiner,
the terrible config...
—
Reply to this email directly, view it on GitHub
<#1317 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HGA5QF74V2EGARDCD36KL2AK6BZAVCNFSM6AAAAABQ7W2HBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZSGI3DQMJUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
If you're compiling the latest main then the assumption is it should work now. The dependency bump was merged. But something else might be broken; perhaps something specific to intel mac |
Is there a hero write a applescript to run all of them? I try to run kanata by applescript, faild. |
This options would be actually pretty nice and would remove some friction in the UX. Edit: Or display an error if the daemon isn't installed. |
I experienced the issue with the keyboard not working when using the Kanata v1.7.0 release. I can confirm the fix:
|
I asked ChatGPT to write a shell script #!/bin/zsh
# Quick help/full install process:
# - Install Rust from rustup.rs
# - `git clone https://github.com/jtroo/kanata.git` in home (`~/`), then `cd kanata` and `cargo build`
# - Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice version: ^5.0.0
# - Allow Input Monitoring for latter somewhere in macOS' settings
# - `chmod +x kanata.sh` this file after creation!
# Checking if a parameter was provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path_to_kbd_file>"
exit 1
fi
# Activate Karabiner-VirtualHIDDevice-Manager (actually needs to be done only once but yeah)
sudo /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
# Run Karabiner-VirtualHIDDevice-Daemon
sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon' &
# Execute kanata with the provided parameter
sudo ~/kanata/target/debug/kanata -nc "$1" Then, once... chmod +x kanata.sh ...and execute with... ./kanata.sh <path_to_kbd_file> Edit: Check ofc if your kanata install folder is the same as in the script! It is just the one when you do a Edit2, Alternative: You could also just cram the last two lines into one, have a hard-coded kbd-file and run that super long line every time (and since in the shell history you can easily access it with the arrow up or ctrl-r too, actually not much worse solution but this script is a bit cleaner and in case the history is not accessible nor available also much easier to remember). |
I can also confirm this worked for me. I was previously running kanata (more specifically kanata-tray) via a MacOS LaunchDaemon that runs automatically on login in the background. I modified my install script to create a similar LaunchDaemon for the Karabiner-VirtualHIDDevice-Daemon as well. Now both of them run at login and things work as intended. You can see my installation script here: https://github.com/jussapaavo/kanata-service/blob/main/daemon-service (feel free to fork or contribute) |
Also confirming that building locally (I did @jtroo any plans for generating a new release/tag or other things in the pipeline for Kanata? (latest I see is 1.7.0 from October) We can close this issue after a new version is published I think, but I'll let you make that call if you want to close it now |
Thanks. This works with a https://github.com/jtroo/kanata/releases/tag/v1.8.0-prerelease-1 needs to mention |
I think adding a step to the installation instructions (right after the step on activating the driver) on future releases would 100% help. This is taken from https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice. Copying this verbatim would work fine in my opinion.
This was the missing step for me, it solved the issue entirely of kanata not detecting/sending keys on Mac (I'm on an M4). It's the same solution that @mattdw gave. You can optionally add a short note about having the Daemon launch on startup by creating a new LaunchDaemon plist file, and loading it using |
I ran into some issues as well but got it to work after fixing driver kit extensions permissions and rebooting the system |
hell yeah, this did it! I had to re-install xcode tools to get kanata to build locally but once i did, this got it working. can't wait to try kanata out now! edit: oh my god it's so good I could cry. even just the example from https://github.com/jtroo/kanata/blob/8ba531d0740f8e690f7d82d7611b28cf3643ef84/cfg_samples/home-row-mod-advanced.kbd works exactly how I want it to 😭 |
@thomastthai and @ayyjohn Did you find that the public release of kanata was not working but the self-compiled version did? EDIT: I ask because I am running I have karabiner elements installed and fully working (all permissions satisfied) but all karabiner startup items are turned off and verified that after login only the karabiner driverkit is running (so no other karabiner processes). Then when I run the first command, that daemon appears as a process but still no keystrokes pass through. EDIT 2: Silly me, I now realise that there hasn't been a new release since the dependency was updated. @jtroo looking at the commit history, I understand that a number of features are currently works in progress. Having said that, would it be possible to create a new minor version release with just the corresponding dependency updated so that those with macs can use this in the meantime without having to self-compile? Or would that actually be less simple than it sounds. |
Does the pre release build not have the dependency changes? I thought it did but don't remember well. |
Hmmm, let me take a look sorry, I was just looking at the main release. |
IT WORKS. Thanks so much, really looking forward to playing around with this! Hopefully this will point others to the pre-release as I was just looking at the most recent release via homebrew and its date from github. Thanks so much. If anyone is interested, I'm using EDIT: Feel I didn't thank you enough @jtroo so once agian, thank you very much :)) |
Sorry for not seeing this sooner: correct, self compiled was the only one working, at least for me! |
I finally found an automated way to get
com.github.pqrs-org-Karabiner-VirtualHIDDevice-Manager.plist<!-- See https://launchd.info/ for more info -->
<!-- https://github.com/jtroo/kanata/issues/1317 -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.pqrs-org-Karabiner-VirtualHIDDevice-Manager</string>
<key>RunAtLoad</key>
<true />
<key>ProgramArguments</key>
<array>
<string>/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager</string>
<string>activate</string>
</array>
<key>OtherJobEnabled</key>
<dict>
<key>com.github.pqrs-org-Karabiner-DriverKit-VirtualHIDDevice</key>
<true />
</dict>
</dict>
</plist> com.github.pqrs-org-Karabiner-DriverKit-VirtualHIDDevice.plist<!-- See https://launchd.info/ for more info -->
<!-- https://github.com/jtroo/kanata/issues/1317 -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.pqrs-org-Karabiner-DriverKit-VirtualHIDDevice</string>
<key>RunAtLoad</key>
<true />
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon</string>
</array>
</dict>
</plist> com.github.jtroo-kanata.plist<!-- See https://launchd.info/ for more info -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.jtroo-kanata</string>
<key>RunAtLoad</key>
<false />
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/kanata</string>
<string>--cfg</string>
<string>/etc/kanata.kbd</string>
</array>
<key>StandardOutPath</key>
<string>/var/log/kanata.log</string>
<key>StandardErrorPath</key>
<string>/var/log/kanata.log</string>
<key>OtherJobEnabled</key>
<dict>
<key>com.github.pqrs-org-Karabiner-VirtualHIDDevice-Manager</key>
<true />
</dict>
</dict>
</plist> /etc/kanata.kbd:
Once all this is setup, reboot, and then a single command will start kanata: sudo launchctl start com.github.jtroo-kanata |
I'm trying to get this working on Monterey. I notice that VirtualHIDDevice v4.0.0 says macOS 12 is no longer supported. I have Karabiner Elements working fine (which seems to us 3.1.0) but I can't get Kanata to work. Running it in debug mode shows the config is correct and it says it's trying to send keys correctly - but no key gets seen by the Mac. I assume I need to manually build a version of Kanata that expects to see version 3.x of Karabiner-DriverKit-VirtualHIDDeviceClient.app (it was renamed to the Daemon name in v4 by the looks of it). Does anyone know which version of Kanata I need to use on Monterey? |
It was a while ago, but I compiled latest and it worked. |
1.7.0 should support v3 of the driver. There may also be extra permissions needed. |
This is baffling - tried building 1.7.0 - still no joy. I get the keys detected in the debug output but the system doesn't receive anything.
MacOS 12.7.6 Monterey. What am I missing?! |
You might have to upgrade your MacOS. Afaiu, kanata was upgraded to the newest version of Karabiner, which itself might not be compatible with Monterey. |
Karabiner 14 works fine on Monterey - that's what I'm using now. I've tried uninstalling it too. |
I found I had to completely uninstall Karabiner Elements (including all files that might be left behind) to get Karabiner-DriverKit-VirtualHIDDevice working. Kanata 1.7.0 is compatible with the older versions of Karabiner-DriverKit-VirtualHIDDevice. |
Thanks - this got me in the right direction. For some reason I wasn't looking at the instructions on the 1.7 release page. https://github.com/jtroo/kanata/releases/tag/v1.7.0 It all makes sense now and is working! |
Alright, now that 1.8.0 is officially released I'm going to close this issue/thread. |
Requirements
Describe the bug
Keys are not being sent, but are being seen/heard by Kanata
Relevant kanata config
Using the
minimal.kbd
To Reproduce
minimal.kbd
(with sudo)Video:
Screen.Recording.2024-10-31.at.10.57.58.PM.1.mov
Expected behavior
Keys would be sent. Pressing any other keys (A-Z) with
process-unmapped-keys yes
I expected them to also send, but I got neither.Kanata version
kanata 1.70
Debug logs
No response
Operating system
MacOS 14.7
Additional context
No response
The text was updated successfully, but these errors were encountered: