Add abs-rel mode and BTN_TOUCH notification.#6
Open
geeksville wants to merge 4 commits intopetejohanson:mainfrom
Open
Add abs-rel mode and BTN_TOUCH notification.#6geeksville wants to merge 4 commits intopetejohanson:mainfrom
geeksville wants to merge 4 commits intopetejohanson:mainfrom
Conversation
This mode operates the chip in absolute mode (with all of the existing absolute options). But reports events as RELATIVE. This allows use as a relative touchpad but the addition of EVENT_BTN_TOUCH notifications when a finger is either on or off of the touchpad. Such notifications are especially useful to automate instantly switching to/from a layer that has keys bounds as 'mouse buttons'. (with none of the lag/delays of 'temporary layers' or the cost of constantly sending bluetooth packets between two halves of a split keybaord)
Author
|
for example usage of this mode see: beekeeb/zmk-keyboard-toucan#7 |
…rupts Now that we are counting ZIDLEs it would be very bad to miss one. But in my testing I see that happen (rarely - once every couple of days of usage). The fact that the current irq system is edge triggered probably isn't great for this reason. But for now just have the touch controller emit NUM_ZIDLE_PAD extra idles
Edge triggered interrupts are not sufficiently robust, if unlucky on scheduling of the worker cb irqs can be missed. (Seen in actual testing on my board). Change to level triggered interrupts which guarantee that missed transitions still get handled. Also, no need for the in-int flag (even without the level triggering).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Thanks for making this slick driver. I just used it on my recently purchased Beekeeb Toucan. One issue I noticed is that I wanted a way to get touch notifications. With touch notification I was able to add a layer that instantly turns on/off anytime a finger is touching the trackpad. This allows adding an input processor to switch layers to a layer that remaps some keys to be mouse buttons.
As I'm sure you know - to get touch data (z height) from the pinnacle part the chip needs to be in abs mode. So when this mode is enabled via the device-tree I use the @halfdane existing abs work (included as a dependency for my change) to configure the part. But I do my own math to convert the abs coords into relative moves before forwarding up the stack.
I don't know if you want this as a PR, but if you do here it is. If you have interest I'm happily willing to update the PR to match whatever requirements your project has.
Rock on.