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

Bug: No keys are sending on Mac #1317

Closed
1 task done
CampAsAChamp opened this issue Nov 1, 2024 · 54 comments
Closed
1 task done

Bug: No keys are sending on Mac #1317

CampAsAChamp opened this issue Nov 1, 2024 · 54 comments
Assignees
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for this OS.

Comments

@CampAsAChamp
Copy link

CampAsAChamp commented Nov 1, 2024

Requirements

Describe the bug

Keys are not being sent, but are being seen/heard by Kanata

Relevant kanata config

Using the minimal.kbd

(defcfg
  process-unmapped-keys yes
)

(defsrc
  caps grv         i
              j    k    l
  lsft rsft
)

(deflayer default
  @cap @grv        _ 
              _    _    _ 
  _    _   
)

(deflayer arrows
  _    _           up 
              left down rght 
  _    _   
)

(defalias
  cap (tap-hold-press 200 200 caps lctl)
  grv (tap-hold-press 200 200 grv (layer-toggle arrows))
)

To Reproduce

  1. Run kanata with minimal.kbd (with sudo)
  2. Press back tick
  3. See the keys being picked up in the terminal
  4. Key presses not being seen in the text editor (back tick, or arrows moving the cursor)

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

@CampAsAChamp CampAsAChamp added the bug Something isn't working label Nov 1, 2024
@jtroo jtroo added the macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for this OS. label Nov 1, 2024
@jtroo
Copy link
Owner

jtroo commented Nov 1, 2024

Maybe this can help:
#1211

@andreicorpo
Copy link

I am also encoutering this issue. #1211 doesn't seem to help with this.

@CampAsAChamp
Copy link
Author

CampAsAChamp commented Nov 1, 2024

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

defaults read /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/Info.plist CFBundleVersion
> 5.0.0

@tissak
Copy link

tissak commented Nov 3, 2024

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.

@CampAsAChamp
Copy link
Author

@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 5.0.0 is because that's what Karabiner is shipping with currently.

@jtroo
Copy link
Owner

jtroo commented Nov 5, 2024

We can leave this open until we bump the dependency version in Kanata.

@fearlessgeekmedia
Copy link

fearlessgeekmedia commented Nov 5, 2024

I'm having trouble even with 5.0.0. On MacOS Sonoma 14.7. When I run kanata, my whole keyboard is unusable.

@jtroo
Copy link
Owner

jtroo commented Nov 5, 2024

@fearlessgeekmedia my understanding is that, having 5.0.0 is the problem (on kanata side) and kanata needs an updated dependency to work correctly.

@fearlessgeekmedia
Copy link

Oh, ok. So I just need to wait?

@jtroo
Copy link
Owner

jtroo commented Nov 5, 2024

You could:

  • wait
  • get an older karabiner driver version
  • compile Kanata yourself with modified dependencies
  • ask for a binary build from someone else doing the above

@mattdw
Copy link

mattdw commented Nov 5, 2024

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.)

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

@fearlessgeekmedia
Copy link

fearlessgeekmedia commented Nov 5, 2024 via email

@jcger
Copy link

jcger commented Nov 5, 2024

We can leave this open until we bump the dependency version in Kanata.

When do you expect this to happen?

@fearlessgeekmedia
Copy link

I didn't specify earlier. I'm using one of the Intel Macs.

@jtroo
Copy link
Owner

jtroo commented Nov 5, 2024

We can leave this open until we bump the dependency version in Kanata.

When do you expect this to happen?

You're asking for a time estimate from a free, donations-not-accepted, open source project 😂. Within [0, ∞) seconds.

@jcger
Copy link

jcger commented Nov 6, 2024

We can leave this open until we bump the dependency version in Kanata.

When do you expect this to happen?

You're asking for a time estimate from a free, donations-not-accepted, open source project 😂. Within [0, ∞) seconds.

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 🙏

@jtroo
Copy link
Owner

jtroo commented Nov 6, 2024

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.

@psych3r
Copy link
Contributor

psych3r commented Nov 6, 2024

I've been quite busy for the last month.
I'll work on merging the PR and uploading a new version of the crate by this weekend if not sooner.

@newsve
Copy link

newsve commented Nov 12, 2024

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 get continuous connect_failed asio.system:2
I am on macOS 14.6.1 (updating now, maybe it is related...)

@fearlessgeekmedia
Copy link

fearlessgeekmedia commented Nov 12, 2024 via email

@Lawrence-of-AnKing
Copy link

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...

@fearlessgeekmedia
Copy link

fearlessgeekmedia commented Nov 13, 2024 via email

@jtroo
Copy link
Owner

jtroo commented Nov 13, 2024

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

@Lawrence-of-AnKing
Copy link

Is there a hero write a applescript to run all of them? I try to run kanata by applescript, faild.

@newsve
Copy link

newsve commented Nov 19, 2024

start up the daemon

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.

@thomastthai
Copy link
Contributor

I experienced the issue with the keyboard not working when using the Kanata v1.7.0 release. I can confirm the fix:

  • Compiling from source (as of two days ago at commit fc1b95d)
  • Installing Karabiner-DriverKit-VirtualHIDDevice v5.0.5
    • Running Karabiner-VirtualHIDDevice-Manager with the command:

      /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
      
    • Running Karabiner-VirtualHIDDevice-Daemon: with the command:

      sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'
      

@newsve
Copy link

newsve commented Nov 23, 2024

I asked ChatGPT to write a shell script kanata.sh (advantage is that you have to run and terminate only one thing):

#!/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 git clone of the kanata repo in your home folder ~.

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).

@jussapaavo
Copy link

jussapaavo commented Nov 27, 2024

I experienced the issue with the keyboard not working when using the Kanata v1.7.0 release. I can confirm the fix: (...)

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)

@CampAsAChamp
Copy link
Author

Also confirming that building locally (I did cargo install) has fixed the issue for me (the OP).

@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

@MaskRay
Copy link

MaskRay commented Dec 26, 2024

I asked ChatGPT to write a shell script kanata.sh (advantage is that you have to run and terminate only one thing):

#!/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 git clone of the kanata repo in your home folder ~.

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).

Thanks. This works with a cargo build --release built kanata.

https://github.com/jtroo/kanata/releases/tag/v1.8.0-prerelease-1 needs to mention Run Karabiner-VirtualHIDDevice-Daemon.

@isometricmax
Copy link

Is this fixed? or should we still keep running the daemon in another terminal?

Is this something broken that needs to be "fixed" in the first place? I would guess running the daemon is the intended use case for working with the new karabiner. Seems there might be some improvements here though.

  • Any further updates required to docs?

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.

Run Karabiner-VirtualHIDDevice-Daemon:

sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'

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 launchctl load.

@0xSalman
Copy link

0xSalman commented Dec 30, 2024

I ran into some issues as well but got it to work after fixing driver kit extensions permissions and rebooting the system

@ayyjohn
Copy link

ayyjohn commented Jan 8, 2025

I experienced the issue with the keyboard not working when using the Kanata v1.7.0 release. I can confirm the fix:

  • Compiling from source (as of two days ago at commit fc1b95d)

  • Installing Karabiner-DriverKit-VirtualHIDDevice v5.0.5

    • Running Karabiner-VirtualHIDDevice-Manager with the command:
      /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
      
    • Running Karabiner-VirtualHIDDevice-Daemon: with the command:
      sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'
      

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 😭

@mayurankv
Copy link

mayurankv commented Jan 9, 2025

@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 sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon' in one terminal tab, and sudo kanata -c $MYKANATACONFIG in another (in that order) and it doesn't work.

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.

@jtroo
Copy link
Owner

jtroo commented Jan 9, 2025

Does the pre release build not have the dependency changes? I thought it did but don't remember well.

@mayurankv
Copy link

Hmmm, let me take a look sorry, I was just looking at the main release.

@mayurankv
Copy link

mayurankv commented Jan 9, 2025

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 kanata-tray and thus pointing the kanata-tray config at a different path temporarily until the next stable release is out!

EDIT: Feel I didn't thank you enough @jtroo so once agian, thank you very much :))

@ayyjohn
Copy link

ayyjohn commented Jan 14, 2025

@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 sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon' in one terminal tab, and sudo kanata -c $MYKANATACONFIG in another (in that order) and it doesn't work.

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.

Sorry for not seeing this sooner: correct, self compiled was the only one working, at least for me!

@jrop
Copy link

jrop commented Jan 17, 2025

I finally found an automated way to get kanata to run smoothly on bootup. In my case, I have it setup so that I still have to run one command to get it running, but I prefer that for something that takes over the keyboard. That way, if something goes awry, I can force-reboot and have the stock behavior running by default.

  1. Install the Karabiner VirutalHiDDevice Driver (I'm running an updated mac) and make sure it is enabled in the security settings. This is covered elsewhere.

For macOS version 11 and newer: Install the Karabiner VirtualHiDDevice Driver.

  1. Create supporting system-level config:
├── /Library
│   └── LaunchDaemons
│       ├── com.github.jtroo-kanata.plist
│       ├── com.github.pqrs-org-Karabiner-DriverKit-VirtualHIDDevice.plist
│       └── com.github.pqrs-org-Karabiner-VirtualHIDDevice-Manager.plist
└── /etc
    └── kanata.kbd
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: <your personal config here>

  1. Build and install kanata from source. This is covered elsewhere. The commit I am running is 0b25d28fd2e06d82e9e2060f88d57cd3f005c981 (kanata 1.8.0-prerelease-1)
  • I installed the built binary to /usr/local/bin/kanata
  • Add this built binary to the Privacy & Security => Input Monitoring list of privileged apps/binaries

Once all this is setup, reboot, and then a single command will start kanata:

sudo launchctl start com.github.jtroo-kanata

@benvallack
Copy link

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?

@thomastthai
Copy link
Contributor

It was a while ago, but I compiled latest and it worked.

@jtroo
Copy link
Owner

jtroo commented Jan 29, 2025

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.

1.7.0 should support v3 of the driver. There may also be extra permissions needed.
#1211

@benvallack
Copy link

benvallack commented Feb 5, 2025

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.

❯ kanata --version kanata 1.7.0

/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate activation of org.pqrs.Karabiner-DriverKit-VirtualHIDDevice is requested request of org.pqrs.Karabiner-DriverKit-VirtualHIDDevice is finished request of org.pqrs.Karabiner-DriverKit-VirtualHIDDevice is completed

❯ defaults read /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/Info.plist CFBundleVersion 3.1.0

08:21:25.5271 [DEBUG] (1) kanata_state_machine::oskbd::macos: Attempting to write InputEvent { value: 41, page: 7, code: 4294967295 } DKEvent { value: 41, page: 7, code: 4294967295 } 08:21:25.5271 [DEBUG] (1) kanata_state_machine::kanata::macos: InputEvent { value: 0, page: 7, code: 1 } is unrecognized! 08:21:25.5271 [DEBUG] (1) kanata_state_machine::oskbd::macos: Attempting to write InputEvent { value: 0, page: 7, code: 1 } DKEvent { value: 0, page: 7, code: 1 }

MacOS 12.7.6 Monterey.

What am I missing?!

@nightscape
Copy link
Contributor

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.

@benvallack
Copy link

Karabiner 14 works fine on Monterey - that's what I'm using now. I've tried uninstalling it too.

@mettavi
Copy link

mettavi commented Feb 8, 2025

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.

@benvallack
Copy link

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!

@CampAsAChamp
Copy link
Author

Alright, now that 1.8.0 is officially released I'm going to close this issue/thread.
Thank you guys for all the comments and fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for this OS.
Projects
None yet
Development

No branches or pull requests