Using Director > Navigation and User Interaction > Identifying keys on different keyboards

 

Identifying keys on different keyboards

Characters can vary on different keyboards. Avoid possible confusion by identifying a character by its ASCII value.

To obtain a character's ASCII value, use the charToNum() function. See charToNum().

For example, this statement finds the ASCII value for the letter A and displays it in the Message window:

put charToNum("A")
-- 65

To find out which character corresponds to an ASCII value, use the numToChar() function. See numToChar().

For example, this statement finds the character that corresponds to the ASCII value 65. The result is the letter A:

put numToChar(65)
-- A