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

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.
finkelgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bedotCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
finkelgAuthor Commented:
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 ?
0
bedotCommented:
since9 Nov, i can post more than 3 lines: i got INTERNAL SERVER ERROR
I will try monday
0
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

bedotCommented:
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.
0
finkelgAuthor Commented:
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.
0
MoondancerCommented:
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:
http://www.experts-exchange.com/jsp/qPowerSearch.jsp.

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

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.