From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: How to know if a key is pressed without getting it? Date: Mon, 27 Sep 2010 00:46:49 +0200 Message-ID: References: <4C9F609A.8010303@ig.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285541223 17316 80.91.229.12 (26 Sep 2010 22:47:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Sep 2010 22:47:03 +0000 (UTC) Cc: "GNU Emacs \(devel\)" To: Vinicius Jose Latorre Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 27 00:47:01 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ozzzo-0000N4-IT for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 00:47:00 +0200 Original-Received: from localhost ([127.0.0.1]:42495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ozzzn-0004xw-UI for ged-emacs-devel@m.gmane.org; Sun, 26 Sep 2010 18:46:59 -0400 Original-Received: from [140.186.70.92] (port=40876 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ozzzi-0004wU-6z for emacs-devel@gnu.org; Sun, 26 Sep 2010 18:46:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ozzzg-0001AO-LV for emacs-devel@gnu.org; Sun, 26 Sep 2010 18:46:53 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:56839) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ozzzg-0001AG-EG for emacs-devel@gnu.org; Sun, 26 Sep 2010 18:46:52 -0400 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 228BC1C1575C; Mon, 27 Sep 2010 00:46:50 +0200 (CEST) Original-Received: from igel.home (ppp-88-217-107-228.dynamic.mnet-online.de [88.217.107.228]) by mail.mnet-online.de (Postfix) with ESMTP id 102671C00186; Mon, 27 Sep 2010 00:46:50 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 501) id DF6EDCA2A3; Mon, 27 Sep 2010 00:46:49 +0200 (CEST) X-Yow: If this was a SWEDISH MOVIE, I'd take off your GO-GO BOOTS!! In-Reply-To: <4C9F609A.8010303@ig.com.br> (Vinicius Jose Latorre's message of "Sun, 26 Sep 2010 12:02:50 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130956 Archived-At: Vinicius Jose Latorre writes: > Does anyone know how to know if a key is pressed without getting it in > Emacs (like kbhit like function)? input-pending-p is a built-in function in `C source code'. (input-pending-p) Return t if command input is currently available with no wait. Actually, the value is nil only if we can be sure that no input is available; if there is a doubt, the value is t. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."