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

Re: X's "default console input source" = /dev/what? [Solved]



On Fri, Jul 11, 2003 at 09:27:46PM +0100, Pigeon wrote:
> On Fri, Jul 11, 2003 at 12:23:15PM -0400, Mark L. Kahnt wrote:
> > My own
> > suspicion is that it *could* be looking for the virtual console on which
> > X11 is running, particularly if the virtual consoles are broken into
> > multiple input and output file descriptors.
> 
> Unfortunately neither /dev/tty7 nor /dev/tty-I-started-X-from appear
> to be valid choices.
> 
> Since my original post I've been poking through the source (a daunting
> task; it's quite clearly written as source goes, but there's so f**g
> much of it :-) ) I'm getting somewhere... if Option "Device" isn't
> set, it uses the already-opened xf86Info.consoleFd, so an obvious next
> possible step is to find where it opens that.

Which I have now done... it looks first in /dev/vc/* and then in
/dev/tty* for the VT it's running on. So the answer is:

"In a standard Debian installation, X's "default console keyboard
input source" referred to in 'man 4 kbd' is /dev/tty7."

> If Option "Device" is set, it takes the string as a filename and tries
> to open it (in mode O_RDONLY | O_NONBLOCK | O_EXCL). The problem now
> is to find out exactly what it expects to be reading from that... I
> found some example code for a keyboard driver kernel module on the net
> (apparently part of a programming course) and hacked it to buffer the
> raw scancodes and present them on /dev/kbd. It's doing that OK, but if
> I give it to X to read, I get *nothing*... Garbage, I could understand.

And this turns out to be because I had Option "XKBDisable" "yes" set
in the ServerFlags section of my XF86Config. If I enable XKB I can
feed it raw scancodes from /dev/kbd and it works fine. So:

"When using the Option "Device" "string" option of X's "kbd" driver to
define a keyboard input device for X, make sure that XKB is enabled."

Thanks for your time, Mark.

-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F

Attachment: pgpU_fxAZWPKu.pgp
Description: PGP signature


Reply to: