code for control+...?
Jorge Almeida
jalmeida
Mon May 17 11:55:45 PDT 2004
On Sat, 15 Nov 2003, Chris Kassopulo wrote:
> > Jorge Almeida <jalmeida at math.ist.utl.pt> wrote:
> > Sorry for the probably stupid question, but it's killing me...
> > I need to write a expect script where the pressing of the control key+
> > something needs to be detected. The man page has an example
> > set CTRLZ \032
> > where the code \032 corresponds to Control-Z. Now, how can I know the
> > codes corresponding to other combinations (e.g. Control-space)?
> > TIA,
> >
>
> Greetings,
>
> Get yourself an ascii table. Here's a pretty one but you can google
> for others if you like.
>
> http://www.mindspring.com/~joeja/programs.html#PHP
>
> The first column shows the control codes produced by the alpha keys
> in the third column. The keys in the second column don't produce
> control codes. The lowercase keys either don't produce control codes
> or produce the same codes as the uppercase key. I'm not sure which.
>
> For example, the Z key (132 octal) produces the SUB control character
> (032 octal).
Thank you for the tip. I didn't know what kind of code I was looking
for. The link above doesn't tell me how to get Control-A (for example),
but I found it here:
http://www.hyperdictionary.com/computing/ascii+character+table
Regards,
Jorge Almeida
More information about the Linux-users
mailing list