From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 15:59:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5096F1065674 for ; Wed, 7 May 2008 15:59:20 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id DD24F8FC0C for ; Wed, 7 May 2008 15:59:19 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from smtp7-g19.free.fr (smtp7-g19.free.fr [212.27.42.64]) by postfix2-g20.free.fr (Postfix) with ESMTP id 9E31825F415D for ; Wed, 7 May 2008 15:38:39 +0200 (CEST) Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id 5FA2A32285B for ; Wed, 7 May 2008 17:39:03 +0200 (CEST) Received: from free.fr (evr27-1-88-172-40-194.fbx.proxad.net [88.172.40.194]) by smtp7-g19.free.fr (Postfix) with ESMTP id 41F6C322858 for ; Wed, 7 May 2008 17:39:03 +0200 (CEST) From: rmgls@free.fr To: freebsd-hackers@freebsd.org Date: Wed, 07 May 2008 17:39:00 +0200 Sender: rmgls@free.fr Message-Id: <20080507153903.41F6C322858@smtp7-g19.free.fr> Subject: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 15:59:20 -0000 Hi all, Sorry if its a FAQ but i don't find any answer for this topic. i need to test (NOWAIT), the presence of keypressed/depressed on a terminal and then read the scan code, like for a piano pc keyboard. my questions are as follows: 1. is it a general C function which may scan a terminal without waiting? 2. how to get the scancodes? of course i can poll tje (0x64) keyboard port on a i386 architecture, but this is not a general method, and it is suited for a distant terminal for instance. Any hint would be appreciated. thanks in advance. rmgls