[Linux-bruxelles] daemon console and tty

Carlos Betancourt carlos.betancourt at chello.be
Ven 9 Aou 23:16:00 CEST 2002


Bash's key binding mecanism and the readline library (.inputrc file) are
designed to do exactly what you want.

First, in order to display your current key bindings type the command
'bind -p' (output in inputrc format) or 'bind -P' (output in
human-readable format). Read it and you'll discover new key bindings you
didn't know.

Now, to answer your real question: you can bind a key sequence to a
command with 'bind -x keyseq:shell-command'.
Thus, you can try:
bind -x '"\C-x\C-m":"mutt"'  --> Control-x + Control-m == mutt
bind -x '"\C-x\C-e":"emacs"' -->  	idem           == emacs

You should read the section "Readline Key Bindings" in the bash man
page.
Also "bind --help" can be usefull.

If you want to reasign all your key bindings do a "bind -p > .inputrc"
and then edit the .inputrc to custumize it to your taste.
"bind -l" will give you the names of readline functions you can use.

If you are in the console I don't recommend you to use "ALT+Fn" as it's
the sequence for virtual console change.

I hope it helps!

Carlos

On Fri, 2002-08-09 at 20:01, Stephane Wirtel wrote:
> absolument pas,
> 
> c'est essayer d'avoir un daemon, qui à l'aide de raccourcis, permet
> d'activer certaines commandes, par ex : ALT+F1 = emacs : ALT+F2 = mutt,
> etc... 
> mais uniquement en console
> 
> cordialement,
> stephane
> 
> On ven, 09 aoû 2002, phbobo wrote:
> > On Fri, Aug 09, 2002 at 07:01:12PM +0200, Stephane Wirtel wrote:
> > > Je cherche après un daemon qui permet de lire les touches, et selon les
> > > touches permet d'activer des programmes.
> > > 
> > > ce daemon doit fonctionnr quand je me trouve en console, et uniquement en
> > > console, pensez-vous que cela soit possible ?
> > > 
> > > merci beaucoup
> > > 
> > > stephane
> > 
> > N'est-ce pas vouloir recréer les liens symboliques ?
> > 
> > -- 
> > Cordialement,
> > Philippe.
> >  
> >  
> > ___________________________________________________________________
> >  
> > GPG Fingerprint : BFB8 D253 DC89 D1D7 6826 2ED7 62AA 99AE 1B15 39C3
> > Emails :          <phbobofr at yahoo.fr>
> >                   <phbobo at hotmail.com>
> 
> 
> 
> -- 
> Stephane Wirtel <stephane.wirtel at belgacom.net>
> Web : www.linux-mons.be	 "Linux Is Not UniX !!!"
> Address :
>     Rue de cartier, 53
>     6030 Marchienne-au-Pont
>     Belgium
> Phone :	+32 474 768 072
> 
> _______________________________________________
> Linux-bruxelles mailing list
> Linux-bruxelles at lists.bxlug.be
> http://www.bxlug.be/mailman/listinfo/linux-bruxelles







Plus d'informations sur la liste de diffusion Linux-bruxelles