Re:Why Is It So Hard to Detect Keyup Event on Linux?
by pengaru on Monday May 17, 2021 @12:44PM
(#27185460)
I suspect the author may have some experience implementing ad-hoc buttons via GPIO polling from userspace, and maybe used getch() in doing so.
[ Parent
| on HN ]
Re:Why Is It So Hard to Detect Keyup Event on Linux?
by klodolph on Monday May 17, 2021 @12:58PM
(#27185598)
The thing about getch() is that there's not really one standard getch(). There's a Windows version of getch() which is compatible with, notably, Borland's version for DOS (I think), and then various people have reimplemented getch() for other systems.
Re:Why Is It So Hard to Detect Keyup Event on Linux?
by pengaru on Monday May 17, 2021 @01:05PM
(#27185669)
They might have meant to write getc() or getchar()...
Re:Why Is It So Hard to Detect Keyup Event on Linux?
by klodolph on Monday May 17, 2021 @01:09PM
(#27185708)
That would make no sense at all. I think the comparison to getch() is the natural one here.
Re:Why Is It So Hard to Detect Keyup Event on Linux?
by pengaru on Monday May 17, 2021 @01:29PM
(#27185903)
I suppose, from the linux perspective going through curses for this use case, in the same sentence mentioning "debouncing" seems awkward, but it does at least provide a polling api. Honestly I have no idea what they're talking about there.