Menu

#2 Use a timeout on release to defeat autorepeat

open
nobody
None
5
2017-10-15
2009-10-10
No

I was getting key release and press events when a key autorepeats. Instead of figuring out a way to turn those off I added a short timeout between the key release event and jack-keyboard emitting a note-off event. If the key is pressed again within this timeout the release and press event are ignored (the timeout is canceled and no new note-on event is emitted).

This patch should be pretty safe, although the timeout value used might need more tweaking or even be made configurable (I just picked the lowest value that consistently kills the autorepeat on my system).

The patch should apply to svn head (revno 13), but I extracted it from a different modification and it's possible I messed that up. Let me know if it doesn't apply or work.

Discussion

  • Marien Zwart

    Marien Zwart - 2009-10-10

    defeat autorepeat (applies to svn r13)

     
  • HPS

    HPS - 2016-09-05

    I cannot reproduce this issue with FreeBSD. What system are you using?

     
  • Marien Zwart

    Marien Zwart - 2017-10-15

    I was on Linux, but haven't used jack-keyboard in ages. Just close this if the problem's not reproducable by others.

     

Log in to post a comment.