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

Feature: Encoder support #48

Closed
petejohanson opened this issue Jul 3, 2020 · 9 comments
Closed

Feature: Encoder support #48

petejohanson opened this issue Jul 3, 2020 · 9 comments
Assignees
Labels
core Core functionality/behavior of ZMK enhancement New feature or request

Comments

@petejohanson
Copy link
Contributor

Need to add encoder support that is nicely integrated into ZMK. There are already a couple rotary encoder drivers in Zephyr via the sensor API, but there does not appear to be one for standard "EC11" type ALPS (or clone) encoders.

@petejohanson petejohanson added enhancement New feature or request core Core functionality/behavior of ZMK labels Jul 3, 2020
@petejohanson petejohanson self-assigned this Jul 21, 2020
@petejohanson
Copy link
Contributor Author

I have implemented the low level EC11 driver in #59, which I intend to build on for the general encoder/sensor functionality.

@petejohanson
Copy link
Contributor Author

Just merged #61 which fully implements this for non-split keyboards. Some remaining work to do for split sensor events going over to the central hub for handling.

@jhelvy
Copy link

jhelvy commented Jul 1, 2021

Hi, I noticed on the documentation here that right side sensors aren't yet supported - is that still the case?

Note that support for peripheral (right) side sensors over BLE is still in progress.

@karnadii
Copy link

karnadii commented Jul 1, 2021

Hi, I noticed on the documentation here that right side sensors aren't yet supported - is that still the case?

Note that support for peripheral (right) side sensors over BLE is still in progress.

there is a working PR here #728 , you can try it. it is tested work on some split keyboard

@jhelvy
Copy link

jhelvy commented Jul 1, 2021

Fantastic, PR #728 worked like a charm!

@pvinis
Copy link
Contributor

pvinis commented Jul 7, 2021

I don't know if this is the place to report this, but I think sensitivity of encoders would be nice to have. Basically to let us configure every how many "clicks" or every how much "rotation" it should do the action/keypress.

@joelspadin
Copy link
Collaborator

I don't know if this is the place to report this, but I think sensitivity of encoders would be nice to have. Basically to let us configure every how many "clicks" or every how much "rotation" it should do the action/keypress.

I think you're looking for the resolution property. (Looks like it's missing from the documentation, though #722 would add it.)

@jhelvy
Copy link

jhelvy commented Jul 8, 2021

Just noting another solution here for anyone who has an encoder on only the right-side. In that case, you can make the right half central and left half peripheral and your encoder should work. I've done this in my corne config and it works. The main changed needed are to adjust your Kconfig.defconfig file like this:

if SHIELD_JCORNE_LEFT

config ZMK_KEYBOARD_NAME
	default "jCorne"

endif

if SHIELD_JCORNE_RIGHT

config ZMK_KEYBOARD_NAME
	default "jCorne Right"
	
config ZMK_SPLIT_BLE_ROLE_CENTRAL
	default y

endif

And in your keyboard_right.conf file explicitly note that the right half is central:

CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

@lesshonor
Copy link
Contributor

Arguably, resolved in #1841 (though further refined afterward).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionality/behavior of ZMK enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants