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

Used as input as single key presses (avoid spamming) #8

Open
Utopiah opened this issue May 7, 2024 · 5 comments
Open

Used as input as single key presses (avoid spamming) #8

Utopiah opened this issue May 7, 2024 · 5 comments

Comments

@Utopiah
Copy link

Utopiah commented May 7, 2024

Currently while plugging to my desktop I get repetitive keypresses, i.e

fabien@fabien-CORSAIR-ONE-i160:~$ xinput 
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ STMicroelectronics STM32 Custom Human interface   id=15   [slave  keyboard (3)]

fabien@fabien-CORSAIR-ONE-i160:~$ xev 

KeyRelease event, serial 50, synthetic NO, window 0x7c00001,
    root 0x1e7, subw 0x0, time 59085715, (1159,1162), root:(2990,2138),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 50, synthetic NO, window 0x7c00001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 50, synthetic NO, window 0x7c00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 50, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   4   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 41, synthetic NO, window 0x7c00001,
    root 0x1e7, subw 0x0, time 59240705, (146,128), root:(1977,1104),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 41, synthetic NO, window 0x7c00001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 41, synthetic NO, window 0x7c00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 41, synthetic NO, window 0x7c00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 41, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   8   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

which is nice except it get repeated, namely spamming XF86AudioLowerVolume or XF86AudioRaiseVolume even without turning the encoder.

Is this the expected behavior? If not how do I fix it? If it is expected, how can I change it so that when released there is no more keypress?

@MitkoDyakov
Copy link
Owner

Can you share the project which runs on the RoEnDi? Is it some of the examples ?

@Utopiah
Copy link
Author

Utopiah commented May 7, 2024

Yes, I didn't change anything, it's the central R with yellow on top/blue on the right/red on the bottom/purple on the left

@MitkoDyakov
Copy link
Owner

MitkoDyakov commented May 19, 2024

Note that the demos were tested only on windows machine. The knob should operate as volume control. At one point there was a bug when turning in either direction would make the volume go to max or zero. This was due to the report of the pressed keys not being cleared when the know stopped turning. I will make sure to find the volume control demo and uploaded to the repo for reference

@Utopiah
Copy link
Author

Utopiah commented May 19, 2024

there was a bug when turning in either direction would make the volume go to max or zero

that's what I'm encountering

@MitkoDyakov
Copy link
Owner

Please take a look at RotaryEncoderWithDispla example. This should fix the issue.

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

No branches or pull requests

2 participants