qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

sensors: cirque: add dpad-mode

Open JohSchneider opened this issue 1 year ago • 0 comments

Inspired by game controllers that use a circular touchpad instead of an analog joystick or a directional pad. This adds the later, which does the following: splitting the touchpad area into quadrants = "virtual keys", that emit a key press event when a touch-down event in that segment is registered. A key release event is emitted when a "touch up" happens, or the touch event leaves the respective segment.

There is also a software switchable "blend mode" that, unlike the discrete mode, allows two adjacent keys to be pressed - to for example enable diagonal movement, when the four cursor keys are mapped to the virtual dpad.

The key-codes for the four virtual buttons are taken from an additional row in the keymap; the row number put into a define and then used by the dpad feature to trigger the key.

Description

Types of Changes

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

Issues Fixed or Closed by This PR

Checklist

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

JohSchneider avatar Dec 27 '23 18:12 JohSchneider