Hi Mark,
while I was reading your message (see below) I was thinking that we are not
talking about the same thing. So I will make a definition and we will start back
the discussion after that.
What is a KeyCode ?
A KeyCode is the hardware location of a key (every key) on a key board. That
value - I repeat: the hardware location of a key - is the same / invariable (its
a constant if you prefer).
As an example, take a keyboard, connect it to a Macintosh and get some key
codes. Add code in your REALbasic project, run it and it works fine.
OK. Now, put that project on a Memory Stick and copy it on a Windows machine.
Load the project with REALbasic, run it and you see that it works fine. Now,
boot a Linux (the flavor you like), load the project, run it and you see that it
works fine. Now, do the same with RedHat / Novell Desktop / whatever (if
REALbasic runs there) and you certainly will get the same results.
Now, I think that you understand "what really is a key code".
At this stage, I am asking (myself) what is your trouble.
To take an example:
<quote>
The following example tests whether the key for the letter "A" was pressed:
If Keyboard.AsynckeyDown( &h00) then
//do somthing with this key here
end if
</quote>
If you put a beep in the if / end if part, it will beep when you press the 'A'
letter on your keyboard. [tested on a Windows laptop]
NOW, I understand what kind of troubles you can get... The above code produce a
different behavior under Mac OS X: when I press the 'Q' letter, I get the Beep
where on the Windows laptop I have to press the 'A' letter.
Note that I have an AZERTY keyboard on both platforms...
After taking a look on the keyboard drawing of the pdf Language Reference, I can
say that there is a bug somewhere in the Windows version because that is the
Macintosh who is correct: &h00 = 'Q' letter on a French AZERTY keyboard; to get
the 'A' key on a French AZERTY keyboard I have to use &h0C.
REALbasic 2005r4 Standard
Windows XP SP2 Home Edition - French
Fujitsu-Siemens Amilo D7850
REALbasic 2005r4 Pro
Mac OS X 10.3.9
PowerBook G4 15" Alu, 1.5 GHz.
If I was wrong (read the top of this messsage), I want to say that I am sorry.
RS People, what happens ?
Cheers,
Emile
PS: to test what I wrote above, just use the example (between <quote> / </quote>
above).
[EMAIL PROTECTED] wrote:
Subject: Re: Windows KeyCodes
From: Mark Turner <[EMAIL PROTECTED]>
Date: Tue, 31 Jan 2006 23:19:09 -0800
I cannot get the key codes for the F1 key to work with code provided on
the mac key map.
I have found that if I use Keyboard.AsyncDown(200) or key(200) then it
responds to a press of the F1 key.
I found the (200) code from browsing the forums at realbasic.com, I was
wondering how the person knew that but they never responded.
Is there a key map available for the Windows keyboard? I was also hoping
to make this app cross platform on windows and Linux.
Are the key codes different on RedHat or Novell Desktop?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>