LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2007, 09:09 AM   #1
louisJ
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
how to know keyseq (bind)


Hi

I am trying to customize the use of keyboard in my bash shell.
SO I use "bind".
But I don't know to find the "key sequences" corresponding to some keys like CTRL+INS or SHIFT+DEL or SHIFT+INS or UP or LEFT....
I know that DOWN corresponds to "\M-[B" but how can I found all the others??

Thank you
 
Old 06-19-2007, 01:32 PM   #2
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
Run

tail

it will read from stdin, since tail doesn't do any input processing, it just prints the raw character sequence.

Last edited by dawkcid; 06-19-2007 at 01:33 PM.
 
Old 06-19-2007, 01:54 PM   #3
louisJ
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Original Poster
Rep: Reputation: 0
hi

sorry but I don't see how can I use "tail" to find out about the keysequence corresponding to my keyboard's keys.
Can you be a bit more explicit.

Thank you
 
Old 06-19-2007, 02:22 PM   #4
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
You run tail and type some keys, it should print the key sequence(s).
 
Old 06-20-2007, 03:32 AM   #5
louisJ
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Original Poster
Rep: Reputation: 0
actually no
it does not work...

when I type
tail d
tail "d"
tail 'd'

there is an error:
"can't open 'd' for reading: no such file or directory"
 
Old 06-21-2007, 11:57 AM   #6
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
Well obviously, if you have no file called 'd'. Presumably you haven't got any files called '^[A' either.

Run tail with no arguments, it reads from stdin, type some keys...
 
Old 06-22-2007, 02:43 AM   #7
louisJ
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Original Poster
Rep: Reputation: 0
ok I got it.
Thank you.

It is strange.
On an other machine it works well.
But on the one I use,
I type
tail then enter
then whatever key ans it displays nothing...that's why I was trying invain....do you know what it could come from?
Thanks.
 
Old 06-24-2007, 04:04 PM   #8
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
Hmm, that's strange, it sounds like maybe echoing was turned off.

For example, on the box where it works, if you try

Code:
stty -echo; tail
it should disable echoing (tail won't print anything until you exit (Control-D)).

That's unusual though, normally echoing should be enabled.

Code:
stty -a
will show you the current terminal settings. On the last line, you should see various echo options, (echo, echoe, echok etc). A preceding '-' indicates that the option is turned off.

Last edited by dawkcid; 06-24-2007 at 04:07 PM.
 
Old 06-25-2007, 11:25 AM   #9
louisJ
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Echo option is "on" when doing stty -a.
by the way it is a cygwin distribution on windows.

Last edited by louisJ; 06-25-2007 at 11:32 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bind 9.4.0 bind other ports ? kaixa Linux - Server 2 02-28-2007 01:33 PM
How do I import bind ".hosts" files into another BIND server chantman Linux - Software 0 06-30-2006 12:51 PM
LXer: DNS: The Bind Leading the Bind LXer Syndicated Linux News 0 06-15-2006 11:33 PM
How to update BIND ./etc/bind/db.coaxcables AndeAnderson Debian 0 03-03-2006 10:35 AM
How do I revert to Bind 8 from Bind 9? digging4roots Linux - Newbie 3 06-08-2002 05:40 PM


All times are GMT -5. The time now is 10:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration