Re: GetAsyncKeyState and [Alt Gr]
- From: "Harvey Triana" <harveytriana@xxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 11:49:32 -0500
Thanks for you help Thorsten. I have finished the application!
If IsKey(vbKeyMenu) And IsKey(vbKeyControl) Then Debug.Print "Alt Gr"
' works!
' partial code...
Private Const ISKEYBOOL As Integer = -32767
....
Private Function IsKey(pKey As Long) As Boolean
IsKey = (GetAsyncKeyState(pKey) = ISKEYBOOL)
End Function
<Harvey Triana />
"Thorsten Albers" <albersRE@xxxxxxxxxxxxxxxxxxx> escribió en el mensaje
news:01c8158c$9a117820$6401a8c0@xxxxxx
Harvey Triana <harveytriana@xxxxxxxxxxx> schrieb im Beitrag
<OmVpPzXFIHA.4956@xxxxxxxxxxxxxxxxxxxx>...
I am using GetAsyncKeyState to read keyboard. Shift is easy to detect.
For example, key [1] has three characters:
[1]: "1"
[Shift][1]: "!"
[Alt Gr][1]: "|"
My question is how to detect that [Alt Gr] is down -?-
[Alt Gr] is the same as [Alt] + [Shift] + [Ctrl], i.e. pressing [Alt Gr]
is
the same as pressing [Alt], [Shift], and [Ctrl] at the same time.
--
----------------------------------------------------------------------
THORSTEN ALBERS Universität Freiburg
albers@
uni-freiburg.de
----------------------------------------------------------------------
.
- References:
- GetAsyncKeyState and [Alt Gr]
- From: Harvey Triana
- Re: GetAsyncKeyState and [Alt Gr]
- From: Thorsten Albers
- GetAsyncKeyState and [Alt Gr]
- Prev by Date: Re: GetAsyncKeyState and [Alt Gr]
- Next by Date: Re: GetAsyncKeyState and [Alt Gr]
- Previous by thread: Re: GetAsyncKeyState and [Alt Gr]
- Next by thread: Iterating folders/files of a drive/directory
- Index(es):