tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Detecting keypress on console



On Thu, Mar 28, 2019 at 13:54:21 +0000, Emmanuel Dreyfus wrote:

> On Sat, Mar 23, 2019 at 02:23:19PM -0000, Valery Ushakov wrote:
> > Alternatively you should also be able re-inject wsevents you are not
> > interested in back into the wsmux (instead of doing that at tty(4)
> > level as tls@ suggested).
> 
> I tried reading wscons_event from /dev/wskbd0 and it works like
> a charm, but reinjecting the event with WSMUXIO_INJECTEVENT in
> /dev/wsmux0 while /dev/wskbd is still open will not do the job: 
> the process running on the console does not see the input.

Ah, right, when you open wskbd, it stops translating events to wscons
input...

From a quick look you probably can abuse wskbd_hotkey_register() with
a small modloadable driver.

-uwe


Home | Main Index | Thread Index | Old Index