Hi Joe,
If Keyboard.AsyncControlKey then EditField3.Text="Control key"
If Keyboard.AsyncOSKey then EditField3.Text="Command key"
If Keyboard.AsyncAltKey then EditField3.Text="Option key"
If Keyboard.AsyncShiftKey then EditField3.Text="Shift key"
These tell if a modifier key IS pressed, right now, when the event code
is firing -- not whether it was pressed when the event was generated.
Please use the non-Async versions instead for correct (reliable)
behavior.
Ok, did not fully understand the function of these keys.
EditField2.Text=Str(Asc(Key)) //Gives the ASCII code for the key
pressed
Keycode=?????(Key) //This is where I need help!
EditField4.Text = Keyboard.Keyname( Keycode ) //Gives the names of
special keys
What is it you're trying to do here? Get the name of the special key
that was pressed? You can't do that; many special keys generate the
same character, if they generate any character at all. You can test
for them using Keyboard.AsyncKeyDown, but it wouldn't be proper to do
this in a KeyDown event; do it in a Timer or some such instead. For
the list of key codes, see the printed language reference (under
Keyboard).
If that's not what you're trying to do, then please explain what it is
you want. Which key do you intend to display the name of, and
therefore need the code for?
This is a simple utility program that is a result of me being lazy
and trying to learn something at the same time. There are times when
I need to know the ASCII code for a key - like right arrow - etc.
Being too lazy to go look it up in a table I wrote this program so I
could run it and get the code. While checking the Keyboard commands
I saw the Async commands and threw them in also, then I saw the
Keyname command and I thought that would be neat to include and I
could learn how to use more commands at the same time. From your
comments, it does not sound like this will work, but, you learn from
the things that don't work also, right?
Thanks
Aubrey
PB G4 OS 10.4.7
RB 2006 Release 3
PS. If this gets through, sorry about format change. Everytime I try
to reply to the list with the quoted levels showing, a program called
GWAVA "Content protection for Novell GroupWise" keeps sending it back
to me as spam.
_______________________________________________
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>