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

[Keymap] Crkbd with pimoroni trackball support #14531

Closed

Conversation

whitehatmiddleman
Copy link

@whitehatmiddleman whitehatmiddleman commented Sep 20, 2021

Added support for crkbd keyboard with pimoroni trackball.

Description

This request is to provide an initial support for the pimoroni trackball with the crkbd keyboard.

The keymap has two specific folders, similar to vlukash approach to the trackpad. The greyhatmiddleman_trackball_[left|right] keymaps reference the core pimoroni code in the drivers/sensors path. The current config is to have the pimoroni trackball connected to the right hand and is only enabled on that hand.

The greyhatmiddleman userspace holds the old pimoroni source code for reference.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

  • NA

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

whitehatmiddleman and others added 28 commits August 5, 2021 14:39
@whitehatmiddleman whitehatmiddleman marked this pull request as ready for review September 20, 2021 05:16
@drashna
Copy link
Member

drashna commented Sep 20, 2021

The corne does support EE_HANDS. Not sure what you mean by that comment.

Also, there is pimoroni code in drivers/sensors but it may be better to use your code, for now.

@whitehatmiddleman
Copy link
Author

The corne does support EE_HANDS. Not sure what you mean by that comment.

Also, there is pimoroni code in drivers/sensors but it may be better to use your code, for now.

My mistake, you are right. I'll edit that out. Basically I updated my firmware to use the drivers/sensors code.

@drashna
Copy link
Member

drashna commented Sep 20, 2021

No worries!

Also, I do have a big PR targeting develop to overhaul the pointing device stuff. You don't need to do anything about it, but just wanted to give you a heads up about it. May require changes if/when it lands (which will be after this does, for sure)

@whitehatmiddleman
Copy link
Author

No worries!

Also, I do have a big PR targeting develop to overhaul the pointing device stuff. You don't need to do anything about it, but just wanted to give you a heads up about it. May require changes if/when it lands (which will be after this does, for sure)

Cool good to know.

@daskygit
Copy link
Member

I've had a quick look over the code and it seems that the only difference between the 2 keymaps is if the trackball is enabled or not. I had thought maybe that you wanted a different rotation per side.

Anyway, did you try flashing both sides with the same firmware? The pimoroni code in core should timeout and stop checking for the trackball if it doesn't exist/can't communicate and the keyboard function normally. I'm interested in if you ran into an issue with this. Thanks.

@whitehatmiddleman
Copy link
Author

I haven't tested the same firmware with the post core changes, but when referencing keyboards/draculad/keymaps/pimoroni/rules.mk I assumed that the firmware still needs to be explicit as to which side has the trackball.

According to the draculad pimoroni keymap, the comment states "uncomment on the side you have your trackball on".

When I have time I'll try to test the same firmware on both hands.

@daskygit
Copy link
Member

I believe the pimoroni draculad keymap was added before the core pimoroni trackball code was updated. The timeout is a relatively new feature which you can see here #13823.

But there’s currently no code to share mouse reports between sides, so you need to plug usb in to the side with the pimoroni trackball for it to work.

@drashna
Copy link
Member

drashna commented Sep 21, 2021

But there’s currently no code to share mouse reports between sides, so you need to plug usb in to the side with the pimoroni trackball for it to work.

That or enable i2c for the communication (and have one or no oleds).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants