[Solved] Keyboard advice
Posted
#1
(In Topic #583)
Enthusiast

I was hoping someone could help me with this
I have a question how do I detect the differance between the Key a being pressed and then then Key A being pressed?
Basically I have need to have different actions happen when the Key a is pressed and another function happen when Key A is pressed
any advice would be most welcomed as I have no idea and I can not even detect the differance in VB.net and no one seems to be able to tell me there either.
Posted
Enthusiast

Posted
Guru

Posted
Guru

If Key.Text Then
Select Key.Text
Case "a"
Case "A"
End Select
Endif
Not at home to test it.
Bruce
Posted
Enthusiast

Posted
Enthusiast

BruceSteers said
Does Key.Text not show a or A ?
If Key.Text Then
Select Key.Text
Case "a"
Case "A"
End Select
Endif
Not at home to test it.
Bruce
Thanks Bruce this worked perfectly I can now detect the difference between the keys and not relaying on key scan codes etc
so it is quicker
Posted
Guru

AndyGable said
BruceSteers said
Does Key.Text not show a or A ?
If Key.Text Then
Select Key.Text
Case "a"
Case "A"
End Select
Endif
Not at home to test it.
Bruce
Thanks Bruce this worked perfectly I can now detect the difference between the keys and not relaying on key scan codes etc
so it is quicker
You are welcome
The other suggestions will still help if you want to check for non alphabetical keys like F3, TAB, etc with shift differences but for any alphabetical text key Key.Text would do it.
Bruce
1 guest and 0 members have just viewed this.



