david mancel wrote (in a message from Thursday 23)
> Hello all,
>
> i have a question about Xfree internals.
>
> i would like to know how xfree "capture" the keyboard and mouse events. Is
> it with a simple "read" ? And does it rely on the OS?
Yes, it's basically a read from the proper driver from the
OS.
>
> i know that in text mode, the characters comes from read(), which comes from
> somewhere in the tty driver...
>
> any direct answer, (accurate) source code pointers, or urls are welcome :)
>
The code path for input devices is rather complicated, because there
are many levels of interpretation.
All server-side code is in xc/programs/Xserver
The lowest level is the OS-dependent level, found in
hw/xfree86/os-support/<system>/*_{io,kbd,mouse}.c
Then you have either the XInput level (code in hw/xfree86/input/*) or
the legacy keyboard driver in hw/xfree86/common/xf86Kbd.c and
hw/xfree86/common/xf86KbdBSD.c
These functions may use hw/xfree86/os-support/shared/posix-tty.c and
hw/xfree86/os-support/shared/sigio.c to do asynchronous (non blocking)
I/O.
The level just about this is in hw/xfree86/common/xf86Events.c.
It then goes to the XKB level whose lower level is implemented in
hw/xfree86/common/xf86XKB.c. The upper level (device-independant) is
in directly in the xkb directory.
Matthieu
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel