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

Fix osx modifier keys after restart #190

Closed

Conversation

danybmx
Copy link
Contributor

@danybmx danybmx commented May 13, 2017

First try to fix the #29.

The issue appears to was solved on a previous PR but the problems appears again after restart. The problem was that CGEventTapCreate needs that the windows server are running to create the event.

I don't know nothing about C but I added a while loop until the mouse_event_tap was created and added to the run_loop and it works for me.

Regards!

@danybmx danybmx changed the base branch from master to testing May 13, 2017 16:59
@afk013
Copy link

afk013 commented May 14, 2017

I tried this PR today with the latest master commit (5a34841) and I can confirmed it fixed the issue with my K95 RGB.

Mac Specs:
OS: 10.12.4
Hackintosh using Model Identifier: iMac17,1
Processor: Intel Core i7 4.01 GHz
Memory: 64 GB

Please let me know if you require any addition information that would help complete this PR.

@tatokis
Copy link
Collaborator

tatokis commented May 15, 2017

Does this survive logout events/system suspend?

@smachi
Copy link

smachi commented May 15, 2017

Working perfectly for me on Sierra 10.12.4 if I restart the iMac but stops working after closing the session and logging in again

@danybmx
Copy link
Contributor Author

danybmx commented May 16, 2017

@tatokis, @smachi the daemons launched by root appears to doesn't stop when the user logout on macOS, just stay running. I didn't found an easy way to check if the user logged out and logged in again.

I've found a workaround, create a /tmp/ckb file with the PID of the ckb.app (from the ckb.app that stops when the user logs out)

From the daemon I've created a timer that check if the PID has been changed every 5s and if changed, the daemon invalidate the mouse_event_tap and create a new one.

As I said I have no idea of C, so maybe someone can found a better solution.

@ghost
Copy link

ghost commented May 23, 2017

My Hackintosh has self-annihilated, so I cannot test this in the nearest month or two, sorry, so I cannot leave a direct approvement. Nevertheless, this will be merged sooner or later as soon as someone else shares his experience. Thank you for the contribution!

@alex-hempel
Copy link

As someone who is affected by this issue, I would like to see this fix in a release fairly soon.

I have the following setup:

Macbook Pro 15" (mid 2015)
Mac OS Sierra 10.12.5
Corsair K65 RGB
Logitech Anywhere MX 2

With the current release version (0.28), using Shift to select multiple files in Mac OS Finder does not work.

With the build from this PR, it works, and continues to work after both a ckb restart and a system restart.

I hope this helps somewhat.

@tatokis tatokis removed their request for review July 20, 2017 12:04
@michaeloey
Copy link

Restarting the daemon fixes the issue for Cmd and Shift, but the Option button as modifier still doesn't work.

@tatokis
Copy link
Collaborator

tatokis commented Aug 2, 2017

Merged to master

@tatokis tatokis closed this Aug 2, 2017
@AlfaceVerde
Copy link

How i do this? "restart the daemon" ? can someone explain me? tnks

@michaeloey
Copy link

Hey @AlfaceVerde do the following:

  • Open Activity Monitor
  • Sort by process name
  • Find ckb-daemon
  • Force kill on this process

It will auto respawn and you modifier keys should start working as expected again.

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

Successfully merging this pull request may close these issues.

7 participants