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

qmk disables trackpad on OS X in some circumstances #510

Closed
exiva opened this issue Jul 11, 2016 · 7 comments
Closed

qmk disables trackpad on OS X in some circumstances #510

exiva opened this issue Jul 11, 2016 · 7 comments

Comments

@exiva
Copy link
Contributor

exiva commented Jul 11, 2016

I've noticed that when I have my Planck plugged into my MacBook which has the "Ignore built-in trackpad when mouse or wireless trackpad is present" option enabled in Accessibility settings, I cannot use the built in trackpad. Changing MOUSEKEY_ENABLE in the makefile has no effect on it.

@exiva exiva changed the title disabling mousekeys disables trackpad on OS X in some circumstances qmk disables trackpad on OS X in some circumstances Jul 11, 2016
@jackhumbert
Copy link
Member

Are you setting MOUSEKEY_ENABLE = no? As long as you're doing make, that should clean things correctly.

It might help to change the device/product id in the config.h - OSX may be holding on to the lufa configuration.

@exiva
Copy link
Contributor Author

exiva commented Jul 11, 2016

Just tried changing the device/productid, set mousekey_enable to no, make clean, make keyboard=planck dfu same behavior.

@fredizzimo
Copy link
Contributor

Which keymap are you using? Are you sure you disable the MOUSEKEY_ENABLE by setting it as

MOUSEKEY_ENABLE = no

and not by

MOUSEKEY_ENABLE ?= no

The latter might get overridden by the default, and the effective value could be set to yes.

You could also confirm that the mouse support really gets disabled by adding the following line

#error Mouse support is enabled

inside one of the MOUSE_ENABLE ifdefs, in the tmk_core/protocol/lufa/descriptor.c file. If the mouse support is properly disabled you should then get no compiler error, but if it's still enabled you will get an error. If no error is generated when compiling you can do a sanity check, by adding this, outside any other ifdef checks

#ifndef MOUSE_ENABLE
#error This is a sanity check error, if you get this the mouse support is properly disabled

After doing all those tests, remember to revert all your changes, for example by git checkout tmk_core/protocol/lufa/descriptor.c

If the mouse support indeed gets disabled, the next thing to check, is that the descriptor.c file in question reports the right thing to the OS.

@exiva
Copy link
Contributor Author

exiva commented Jul 12, 2016

I'm writing my own keymap for it. yes, I'm using MOUSEKEY_ENABLE = no. I added the sanity check and it built fine. I'll do some more research into looking at what is being reported to the OS, when I have a little more time. I've noticed also the Ink system preference also appears, indicating it thinks there's a drawing tablet connected. I will report back more findings as I come across them.

@exiva
Copy link
Contributor Author

exiva commented Jul 13, 2016

Okay, I did some more investigating, and edited the lufa descriptor for the mediakeys. on tmk_core/protocol/lufa/descriptor.c#L143 I changed the logical minimum from 0x01 (Pointer) to 0x04 (Joystick) and now my Planck is no longer recognized as a mouse and/or a drawing tablet on my Mac, and the media keys still work. I can't verify the keys work on Windows however.

Looking at the USB spec it may be possible to change the minimum to 0x80 (System Control) and retain media keys. But I haven't tested this. (0x80 works fine.) Joystick seems to work fine and not interfere with my Mac.

Not 100% sure who to submit the patch to (tmk or here to qmk) and it does need more testing.

@ezuk
Copy link
Contributor

ezuk commented Jul 27, 2016

@jackhumbert Do we want the patch here? or should we close and merge from upstream sometime in the future?

@jackhumbert
Copy link
Member

I think #522 addressed this - @exiva, please reopen this if I'm mistaken!

BlueTufa pushed a commit to BlueTufa/qmk_firmware that referenced this issue Aug 6, 2021
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

4 participants