Hi, im trying to create a program so that when i hit certian keys on my keyboard it will input the special letters used in the German language. eg "Ä", "Ö" etc...
I have managed to do this with the GetAsyncKeyState and the SendKeys statments, however when i press my key, it displays the original character then the german letter.

Example: one of my selected keys is the "[{" key. when i press it the output displays "[Ä"

How can i stop the original character from inputing? here is an example of my code.

Thanks.

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Private Const VK_OEM_4 = &HDB

Private Sub Timer1_Timer()
    Dim A As String
    A = "Ä"

    If GetAsyncKeyState(VK_OEM_4) Then
        SendKeys (A)
    End If
End Sub

HI,
to acheive your task
try the keycode concept

and while posting your code, no need to prefix the code tag in each line,
your code should starts with

and ends with

with regard s
Venkatramasamy SN

I know this is a long way coding but if you want you can try it...

1. first is you have to assign all values that corresponds to the key in keyboard
2. get all the keyAscii value of eah key in the keyboard.
3. make a procedure that will get the keyascii value and then put the corresponding german letter.

that's all!

enjoy coding.

regards,

jireh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.