On Thu, Apr 19, 2007 at 03:24:58PM +1000, Colin Newell wrote:
> I am new to using DirectFB. I have been able to get basic programs working
> doing output. However I can't get mouse and keyboard input working.
> 
> - My PC has a PS2 mouse. Do I need an entry /dev/mouse to point to the 
> device
>     file for this? (The device file is /dev/input/mice)
>     (The FAQ says I need /dev/mouse if I'm using a serial mouse. What about
>     a PS2 mouse?)

The ps2mouse driver should attempt to use /dev/psaux, /dev/misc/psaux
or /dev/input/mice.

However I recommend you try the linuxinput driver instead of ps2mouse.
It will use the /dev/input/eventX device.

>     If I need to specify the protocol in ~/.directfbrc, what protocol 
> should I
>     use? The X11 config has:
> 
>         Option "Protocol" "IMPS/2"
>    
>     What is the corresponding DirectFB mouse protocol?

The ps2mouse driver accepts "PS/2" and "IMPS/2" as protocol.

> - I can't get keyboard input working, and have no idea what i'm doing wrong.
> Can someone explain how directfb reads the keyboard? Does it use a 
> /dev/ttyx file?

Yes, the keyboard driver uses /dev/ttyX. If you use the linuxinput
driver /dev/ttyX is used only to get the keyboard map and
/dev/input/eventX is used for the actual input events.

Again, I recommend linuxinput.

> I do dfb->GetInputDevice (dfb, DIDID_KEYBOARD, &keyboard), and then
> keyboard->GetKeyState (keyboard, DIKI_XXXX, &state) - but don't get any
> keys pressed. (This is the technique shown in tutorial example "Moving a 
> sprite with the cursory keys")

Run dfbinfo and see what input devices it finds. If that looks decent
you can run df_input from DirectFB-examples to see what kind of events
you get.

> - what do I have to do to get a mouse cursor on the screen? If the mouse is
> correctly configured, will the mouse cursor show up automagically? A 
> mouse X11 style 'X' shaped
> cursor does display - I presume that when I get the mouse input working, 
> it will control this
> cursor.

What program you're running that has this X cursor (XDirectFB maybe?).
The default DirectFB cursor looks a bit like a water droplet.

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to