473,545 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stupid dumb idiotic simple question about keystrokes

5 New Member
Sorry to bore everyone with this question, which I'm sure is the equivalent of "Please help! What letter comes between C and E in the alphabet?" but seriously, if you really didn't know that, I don't know if there's a single google search in the world that would actually help you...

Anyway, here it is: I'm writing a Perl script that uses the Expect module to open Firefox, and then I want to send Firefox a "CTRL+RightArro w" command, like so:
Expand|Select|Wrap|Line Numbers
  1. use Expect;
  2. my $command = 'firefox';
  3. my $URL = 'http://some_url';
  4. my $key = 'i have no earthly idea';
  5.  
  6. my $exp = Expect->spawn($command, $URL) or die "Cannot spawn command: $!\n";
  7. # do some stuff here, and then...
  8. $exp->send($key);
  9.  
where $key is CTRL+RightArrow .

Dumb, right? Sorry. Just pretend I'm in nursery school. : )

P.S. just reading the answers to other people's questions on this site has helped me a lot -- this is the first time I've ever had to post!
Jan 25 '07 #1
4 1700
KevinADC
4,059 Recognized Expert Specialist
search for "IBM scan codes" on google, I think that is what you want.
Jan 25 '07 #2
theapeman
5 New Member
Holy smokes, thanks! Knowing what to google really helps! I even found this site that has a keyboard emulator. You just enter the keystrokes you want and it returns the codes.

So what I got for CTRL+RightArrow was essentially 4 keystrokes:
Expand|Select|Wrap|Line Numbers
  1. 14               # CTRL key down.
  2. E074             # Right arrow key down
  3. E0F074           # Right arrow key up
  4. F014             # CTRL key up.
So my question now is, what is the syntax for assigning those codes to my $key variable?

Thanks again.
Jan 25 '07 #3
KevinADC
4,059 Recognized Expert Specialist
I'm just guessing:

Expand|Select|Wrap|Line Numbers
  1. my $keystroke = '14-E074';
give it a ty
Jan 25 '07 #4
KevinADC
4,059 Recognized Expert Specialist
or maybe its:

E012E074

that what the emulator shows for both keys down
Jan 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
1622
by: sebb | last post by:
I'm kind of newbie to programming, but I thought of something and I want some opinions on that. It's about a new instruction block to do some cycles. I thought about that because it's not very easy to program a cycle. Here is a simple example : b=0
2
1425
by: Jonas Galvez | last post by:
I'm feeling dumb: str = "<tag>text<innertag>moretext</innertag></tag><tag>text</tag>" How can I get a list like using regexes? I'm starting to believe it's not possible. Yeah, I know about the terror stories about using regexes to parse HTML, but in this particular case, using a SAX parser would be an horrendous overhead (I mean, it's...
119
4515
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see, http://www.alistapart.com/articles/betterliving/ I read on...
3
1154
by: rroman | last post by:
I have a very simple form, takes information from the user, updates a SQL database, now I just want to redirect to a "Thank You For Your Time" web page within the same bowser. ASP. NET VB
16
1637
by: CMM | last post by:
Is it me or has anyone noticed that F1 is really dumb in VS2005. Since VB3 I have been able to click F1 on an ambiguous method in code and the IDE automatically determines the type based on the code itself and shows the right help topic. This even worked more or less in VS2003. But in VS2005, if I highlight the "Host" method below and hit F1...
3
1214
by: News | last post by:
I have two functions both work in Firefox and Netscape but only one works in IE. Both are working on different <DIV> tags. My CSS is an external file, I linked it to the html file. CSS div.a { width: 1%; background-color: #9900FF; height: 5%;
2
1389
by: Ben Finney | last post by:
Howdy all, I'm trying to implement some new functionality for an existing PHP web application. Rather than writing a whole lot of stuff in PHP, and looking toward a future when more of the application can be rewritten more sanely, I'd like to write a Python program that generates the content and serves it up to the existing application via...
3
5035
by: Gunnar Syren | last post by:
I'm trying to implement a macro feature in my application by recording and playing back keystrokes. At first I thought it would be enough to catch KeyDown in my main form, but I soon realized that I needed to catch keystrokes in menues and other forms in my app as well. I realize I can implement a keyboard hook that catches keystrokes...
331
14691
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and most versatile text editor. And, besides text editing, it also serves as a
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.