Hi misc,

I am writing some code. My program will need detailed keyboard input,
like key press and key release.
I know I can get this setup with X (SDL too, which depends on X), but since I 
don't necessarily need a GUI, it wouldn't be cool opening a window just to 
get the keyboard.

I read on the internet that ncurses also don't detect key release, so it is
also out of the list.

So, since the only alternative I found was X. I started to look about 
getting raw keyboard input, dismembering input from the graphics stack 
(maybe create a lib), and search if there is any other program 
that already did this. I read wskbd(4), but It basically talks only about
devices.

Playing with "/dev/wskbd*" I didn't saw a light on it, since for example once 
the X is using the keyboard, this file stay "idle";

The only piece of example was the propper X code, on xf86-input-keyboard, but 
it is a hard code, wih lots of #ifdefs. Hard to get into without much
information, and not being not that good on C programming.

So I decided before getting into it, ask here on the ml, if anyone already 
faced this problem, knows any fix, workaround, or else can point me better
documentation about the OpenBSD keyboard driver. I think that having a
_default_ way of getting input (if there isn't one yet) 
enough detailed, would be great, and then turn into the 
way that all applications get input on OpenBSD, from ncurses to X, would
improve a lot the system. Or even turn that into a independent lib, which one 
could use in any type of application, dismembering it from graphics libs, or 
any other dependency.

Do you guys think there is a way of doing that?

Thanks for the attention,
correct me any mistake;

--
Regards,

Henrique N. Lengler

Reply via email to