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

Add touchpad feature #24939

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Michal-Szczepaniak
Copy link

This PR adds support for Framework's touchpad.

Description

I wanted to add support for framework's touchpad but since qmk doesn't currently have system for that, it needed to be added. Now, I understand that the changes I've made won't be merged as-is, but instead I hope to establish conversation, so that I can refine them into what is acceptable. The changes I've made are framework-specific, and to add touchpad support that should be more generic.

Now issue with making generic system for touchpads is that each touchpad has its own descriptor, and easiest way of implementing touchpad is adding its own descriptor and just forwarding data we get from i2c, without parsing, without modifying anything since each touchpad has its own quirks that are handled on the OS side.

From what I've seen currently qmk generates descriptor depending on device configuration, and for touchpad, we would have to allow drivers to declare their descriptor, which is not impossible just something to be aware of.

Most touchpads are using i2c but if they're using something else that would also have to be taken into account.

So the simplest implementation of i2c touchpad driver is really just the descriptor, and in the core we can do entire communication over i2c which is just pass-through of data.

Also in tmk_core/protocol/usb_descriptor.c:1261 I didn't know what the code does as I don't have much experience with USB so i piggy-backed on digitizer and it seems to work fine.

I also haven't added any documentation because the code will surely change.

So please advise so that I can refine the code into something acceptable.

Types of Changes

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

Issues Fixed or Closed by This PR

Checklist

  • [I hope] 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).

@github-actions github-actions bot added the core label Feb 22, 2025
@zvecr zvecr added the no-ci Signals to the CI runners not to build. label Feb 22, 2025
@tzarc
Copy link
Member

tzarc commented Feb 22, 2025

Some pretty big encapsulation and abstraction issues here; we’re in release prep so further discussion will have to wait.

@Michal-Szczepaniak
Copy link
Author

No issues here, I can use the code as it is now so it can wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core no-ci Signals to the CI runners not to build.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants