|
-
Sep 13th, 2000, 02:58 AM
#1
Thread Starter
Addicted Member
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'
-
Sep 13th, 2000, 03:06 AM
#2
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.
-
Sep 13th, 2000, 03:21 AM
#3
Thread Starter
Addicted Member
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]
-
Sep 13th, 2000, 07:15 AM
#4
Yes but that will always return the lower case of the character. Even if do you type a CAPITAL character.
-
Sep 14th, 2000, 01:30 AM
#5
Thread Starter
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|