On Sep 2, 2006, at 2:37 PM, Sven E Olsson wrote:


On 2006-09-02, at 11:00 PM, Aubrey Todd wrote:

Hi,

I have a simple program that lets you press a key and it displays the ASCII number for the key plus the Control key, Option key, Command key, or Shift key if one of them is also pressed. I would like to use the command Keyboard.keyname(keycode) to give the special names some keys have, but I cannot get it to work.

For eample: if I press $, the $ is displayed in the input field, 36 is the ASCII code, Shift key is displayed, but the field for keyname displays 'Return' when keycode is the ASCII value of the key pressed.

Obviously I am doing something wrong, but I have no clue what that is. Could someone please give me a hint?

Thanks,


Aubrey
PB G4 OS 10.4.7
RB 2006 Release 3



KeyCode and Ascii value is not the same (I think)

Correct. Keyname requires the Keycode which is read by the Keyboard Object or Module usually by reading the Keyboard.AsyncKeyDown Property
Keyboard.Keyname Method

Returns a String. The string is the name of the keycode passed.

, If I remember correct the Keycodes is available in the User Guide page 387...

That's the picture of the keyboards used in some locations. It's a bit dated as well.

Terry

_______________________________________________
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>

Reply via email to