pressing  ALT+<key> / CTRL+<Key> from a script

Posted on 1999-11-06
Medium Priority
Last Modified: 2013-12-26
How can I emulate an ALT/CTRL + <Some key>
In a shell script,
I need this for a PPP dialer which needs pressing the alr+C at the end.
Question by:finkelg
  • 3
  • 2

Accepted Solution

bedot earned 200 total points
ID: 2193558
echo '\007' send the bell character: so you can send the character you want (ASCII coded), using \ and 3 octal digits

echo '\0101' will echo the "A" character

octal digits used in shell always begin with \0

you must know the characters you want to send: combinations of alt & ctrl genarate ASCII characters

Author Comment

ID: 2193932
Ok Thats what i want to know:
What is the ascii for the combination of
Alt and C ? and where do you know it from ?

Expert Comment

ID: 2202600
since9 Nov, i can post more than 3 lines: i got INTERNAL SERVER ERROR
I will try monday
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Expert Comment

ID: 2227952
1° scancodes are generated by the keyboard, then interpreted by the software of your modem, traducing scan codes received in ascii codes , sending them to the modem.
2° ALT/CTRL/SH ... are not traduced by the system;
you must found ascii sequences to tend to your modem : check the documentation of it, or connect on the server of trader, or if unsuccessfull, during using modem thru normal software: pick up sended characters with a terminal connected in electrical parallel on COM
3° finally, if this is not successfull, your question become
" what are the ascii sequences to send commands at the dialer"

I suppose commands are HAYE compatibles: you can try to send some HAYE commands to verify compatibility.

Author Comment

ID: 2230423
I think the ALT+c is sent by localy, to may dialer.
There is no need for it to be sent via modem to the server, since the server has started allready the ppp connection.

All I need to do is tell may dialer to start using the ppp localy too, that is done by Pressing ALT+c.
If i want to emulate this key in script i would need to know its esc seq,
I am quit sure this is a common quastion since this is the case for any kppp dialer user, who tries connecting to his Internet Provider by script.

Expert Comment

ID: 6826239
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  Or if you are an EE Pro user, click the link below to select open items for your Member ID using Power Search:

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

Thank you,
Moderator @ Experts Exchange

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question