-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adding an ADB mouse's buttons to keycap_<variant>.c #225
Comments
You can't change mouse button behaviours in keymap file. Mousekey can be assigned only to keys on keyboard. And currently ADB converter supports only one button. If you are going to work on developping these supports let me know. I'll be able to explain the detail more. |
I think I can do some development on multiple/programmable mouse buttons. I don't know C too well, but I can figure it out as I go along. |
Nice. First, you have to support mouse buttons of ADB mice. I think you can find information of ADB mouse protocol among these resources. Currently the first mouse botton is handled here, probably you can add other buttons code there. ADB mouse support was added recently by @mek-apelsin, he may know more about these things. |
I've tried adding support for the secondary mouse button which according to what little I understood of the protocol should use the 8th bit. It seems that all the mouse buttons on the Kensington Turbo are sending the signal for the 16th bit (mouse button one.) Would it be possible to hard wire each button to the teensy pin outs directly and set them to mousekey events? |
I think I have the code right, but I have no idea how to implement it on the hardware. I'm using a teensy 2.0. I know I have to wire each switch on the mouse to the teensy, but I don't know which pins or how to code that part in. The mouse buttons will be bottom left = btn1, bottom right = btn2, top left = wh_u, top right = wh_d. My code (so far): in keymap_common.h:
keymap_mouse.c:
|
Hardwiring buttons to controller is certainly possible and one of options. Another option is: |
@tmk I get that hardwiring is possible, I just don't know how to do it. How do I add the ports in the code, how do I wire it, etc. |
You will have to check those buttons in matrix_scan() in matrix.c and store state of the buttons in some where part of matrix[] array. As a result, you will be able to remap the buttons in your keymap.c. You have to know how adb_usb convert works to do this, no document unfortunately and I cannot explain it further here. You have to read my messy codes closely. It'll take time quite a bit. |
If you use you time to implement Extended Apple Mouse Protocol instead of hardwire solution I'd appriciate you greatly. Because it allows people to use their multiple-button mouse/trackball easily. I'd try it if I have Kensington ADB trackball but I cannot get it at reasonable price in Japan anymore. |
I am very happy to help with testing, but as this is the first time I have ever worked with C my coding support will be quite limited. |
I have an ADB Kensington Turbo Mouse. I was able to make left click and cursor movement work with the ADB/USB converter firmware, but I am unsure of how I would add other Mousekeys for the Mouse's buttons to the keymap. Any Ideas?
The text was updated successfully, but these errors were encountered: