🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15761

Re: Asignar teclas con bash

#15761
From: Esteban
Date: Fri, 02 Jun 2000 00:00
42 lines
1830 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

J.A. Gutierrez <spd@daphne.cps.unizar.es> escribi�:

>: �C�mo hacer para que en vez de darle al 1 y enter, en este ejemplo
>: chorra, se ejecute directamente al apretar 1? Sin tener que darle al
>: "enter".

>===========================================================================
>#!/bin/sh
>
>ReadKey()
>{
>	Oldstty=`stty -g`
>	stty -icanon -echo min 1 time 0
>	dd bs=1 count=1 2>/dev/null
>	stty $Oldstty
>}
>
>key=`ReadKey`
>
>echo $key
>===========================================================================

Como te dije una vez, es que alucino.

Muchas gracias.

- -- 
Esteban Navarro (User Linux 132409)
Fondos Escritorio: http://www.ctv.es/USERS/scandisk
Clave P�blica E-Mail asunto: PGPKEY

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5OBOPa3aqF90Ua+oRArx8AJ9IiTItvWIDiFKzTKbDgkCkhwF/SgCgpp1Z
bsMSbNr4dZlCg3XWesZc0LQ=
=mUXs
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn8jg4sg.r1.scandisk@localhost.localdomain>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8jdos1.74g.scandisk@localhost.localdomain> <8h8esr$sps$2@news.unizar.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,d471714db8bf4620
X-Google-Attributes: gidf86c8,public
From: scandisk@ctv.es (Esteban)
Subject: Re: Asignar teclas con bash
Date: 2000/06/02
Message-ID: <slrn8jg4sg.r1.scandisk@localhost.localdomain>
X-Deja-AN: 630379968
Content-Transfer-Encoding: 8bit
References: <slrn8jdos1.74g.scandisk@localhost.localdomain> <8h8esr$sps$2@news.unizar.es>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@news.wanadoo.es
X-Trace: m2newsread.uni2.es 959981086 212.25.144.148 (Fri, 02 Jun 2000 23:24:46 MET DST)
Organization: CTV-JET@Uni2
Mime-Version: 1.0
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: scandisk@ctv.es
NNTP-Posting-Date: Fri, 02 Jun 2000 23:24:46 MET DST
Newsgroups: es.comp.os.linux.programacion