-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
Export of Mouse Button Raw Value Mapping for hidutil? #2795
Comments
If the values you posted are in correct order, then what I am saying is wrong. From https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-315.7.16/IOHIDFamily/IOHIDUsageTables.h:
In case this works, you can find Apple-specific codes in https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-700/IOHIDFamily/AppleHIDUsageTables.h.auto.html. |
@MuhammedZakir Thank you very much! Yes, the codes seem to be correct but I'm likely wrong about mapping Mouse Button Events - those are not sent the same way as Keyboard Events are. Looks like I need to write a small utility using CGEvent.tapCreate. I'll keep this thread updated. |
Closing this for now, seems like it's not worth the work to reinvent the wheel Karabiner provides |
If you are going to use |
@MuhammedZakir Thanks for the suggestion! In the meantime I wrote my own daemon: https://github.com/winkelsdorf/MouseEnhancer/blob/main/MouseEnhancer/main.swift. |
Found the correct way to get the key code from dnicolson/Bluetooth-Keyboard-Enhancer#5:
|
Excellent find @MuhammedZakir, many thanks!
Which fits https://developer.apple.com/documentation/iokit/1592162-anonymous/khidusage_csmr_volumedecrement, and https://developer.apple.com/documentation/iokit/1592162-anonymous/khidusage_csmr_volumeincrement. But this still leaves the problem: A mouse sidebutton has no standard code. Should be UsagePage 1 as reported by hidutil, but the event is Even if I can reach otherMouseDown which is defined by Apple as It might be |
Have you tried |
@MuhammedZakir I think Button Page 0x09 is for Buttons of Game Controllers and others. Mouse should be 0x01. |
This makes me think otherwise (above Button Page enum):
|
Sounds reasonable, I'll give it a try. I am just wondering if that doesn't depend on the device itself reporting to use a Usage Page of
Devices:
VendorID ProductID LocationID UsagePage Usage RegistryID Transport Class Product UserClass Built-In
0x46d 0xb025 0xaa3c803e 1 2 0x10000341a Bluetooth Low Energy IOHIDResource MX Anywhere 3 (null) (null) |
@winkelsdorf where you able to find id codes for mouse buttons that work with |
@lcmen Not beside the side buttons, which I used here https://github.com/winkelsdorf/MouseEnhancer/blob/08751491a5c4a9380ac372bb0a93ebc39530f757/MouseEnhancer/main.swift#L42. But as this was enough for me (control volume from side buttons), I stopped searching for more. |
Hello,
I have a simple modification mapping and want to use this without Karabiner (as it's so simple). Is anybody aware of the raw values for
hidutil
?See my post at AskDifferent here: https://apple.stackexchange.com/questions/425911/map-mouse-buttons-using-hidutil-how-to-find-keycodes?noredirect=1#comment605229_425911.
I identified the correct device:
My idea was to map using hidutil e.g. using https://hidutil-generator.netlify.app.
I am seeking for the correct key codes for HIDKeyboardModifierMappingSrc for Button 4 and 5 to Volume Inc/Dec for days, is anybody aware of them?
Is there a way to export them from Karabiner-Elements?
Edit: Volume Increment and Decrement apparently are 0xC000000EA and 0xC000000E9. Now searching for the scan code of Button 4 and 5.
The text was updated successfully, but these errors were encountered: