-
Hello,
if i translate the keycode from the keydown event, using:
myLetter= chr(keycode)
then I get always a capitalized letter.
How can i translate this letter to a normal one?
eg. the user presses 'b', but if i use 'debug.print chr(keycode)' i get a 'B'
-
This is because the KeyCode is connected to the key on the keyboard itself. The user pressed the "B" button. If you want to check if it's actually a lower case b then you have to check the Shift argument to see if the shift key is down and you also have to make an API call to check the Caps Lock status.
If you use the KeyPress event instead of the KeyDown you get the KeyAscii instead of the KeyValue.
-
I found it myself:
if I use the following, it is ok
LCase(Chr(keycode))
[Edited by c@lle on 09-13-2000 at 04:24 AM]
-
Yes but that will always return the lower case of the character. Even if do you type a CAPITAL character.
-
that was exactly what I needed. I know that I have to check the SHIFT state for knowing that it IS a capital or not.
Thanks anyway;
calle