From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 18:14:02 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 85EB3106566C for ; Wed, 7 May 2008 18:14:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9848FC1D for ; Wed, 7 May 2008 18:14:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so645511rvf.43 for ; Wed, 07 May 2008 11:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=fHWeTDENj50JOEJ1e3YnwgmzfP/FMdKF26WrNPbbtYQ=; b=RY5YPM0uT3VC7RCcjWJas4lSuuLBLv7jhvJroVhf5LnwPsy6czyq2OhyJ6Oi9UHifKf344q9XfMqAyIAX5fQRrfbnkClu8Nbg10mLJnIo4nO+YZVoGZYF5jmWXiPVTuYgPwnoLnwj57yZ4ztxvndmdwJ/KFjzVQ8EKsiuAnKCew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=qL50BhG9OoWh29cWUluox7uTbpjND7adYXsup4P6XDu6/s8r2yRTJ7p6ELLO+/cGsrAmfuRQkGKtR9PcN/r+rU33YXv4S9JgyhWaG4hay6RognTtyXs4oog0rK7oNTrOvSinR7WrhvCi+17bTfV2N18usS4VBkWx+zfTh94+cvw= Received: by 10.141.203.7 with SMTP id f7mr1095240rvq.7.1210182497960; Wed, 07 May 2008 10:48:17 -0700 (PDT) Received: from ?192.168.10.42? ( [99.155.199.64]) by mx.google.com with ESMTPS id g22sm2999928rvb.7.2008.05.07.10.48.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 May 2008 10:48:16 -0700 (PDT) Message-Id: From: Garrett Cooper To: rmgls@free.fr In-Reply-To: <20080507153903.41F6C322858@smtp7-g19.free.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 7 May 2008 10:49:17 -0700 References: <20080507153903.41F6C322858@smtp7-g19.free.fr> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org Subject: Re: 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 18:14:02 -0000 On May 7, 2008, at 8:39 AM, rmgls@free.fr wrote: > > 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 getc(3), or were you looking for something a bit more specific? -Garret