Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Aug 1999 18:46:23 +0900
From:      Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To:        Jay Kuri <jay@oneway.com>
Cc:        freebsd-small@freebsd.org, freebsd-hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject:   Re: Access to keyboard without video. 
Message-ID:  <199908070946.SAA14288@zodiac.mech.utsunomiya-u.ac.jp>
In-Reply-To: Your message of "Fri, 06 Aug 1999 17:10:15 -0400." <Pine.BSF.4.05.9908061706210.15225-100000@daedal.oneway.com> 
References:  <Pine.BSF.4.05.9908061706210.15225-100000@daedal.oneway.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

>	I am working on an embedded server, and have run into some
>difficulty.  I need to access the keyboard (to read keys) on a machine
>that has no video.  (no video card, that is)   
>	I wrote a program that works fine when run from the shell prompt
>(working with stdin)... but this is probably going to have to be a daemon
>of some sort, and I can't figure out how to access the keyboard directly.
>
>Can someone point me in the right direction?  

In FreeBSD version 3.1 or later, the keyboard controller atkbdc(4) and
AT keyboard driver atkbd(4) will give you access to the keyboard even
when there is no video card.

Make sure you have both atkbdc and atkbd in your kernel configuration
file (see man pages for atkbdc(4) and atkbd(4)).  You also need to
have the following option line.

	options KBD_INSTALL_CDEV

Create the kbd device node in /dev as follows.

	cd /dev
	./MAKEDEV kbd0

Then, your program can access the keyboard by opening /dev/kbd0.

Note that the keyboard is usually exclusively claimed by the console
driver sc (or vt) in the ordinary system with a video card and cannot
be accessed by opening /dev/kbd0.  The above technique works only when
there is no console driver configured in the kernel, or when a console
driver is configured in the kernel but is not attached because there
is no video card in the system.

Kazu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908070946.SAA14288>