Stop a keyboard key input

Reply

Join Date: Jan 2008
Posts: 1
Reputation: wolfman800 is an unknown quantity at this point 
Solved Threads: 0
wolfman800 wolfman800 is offline Offline
Newbie Poster

Stop a keyboard key input

 
0
  #1
Jan 15th, 2008
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.

[code] [/Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As
Integer]

[code] [/Private Const VK_OEM_4 = &HDB]

[code] [/Private Sub Timer1_Timer()]
[code] [/Dim A As String]
[code] [/A = "Ä"]

[code] [/If GetAsyncKeyState(VK_OEM_4) Then
SendKeys (A)
End If]
[code] [/End Sub]
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 71
Reputation: venkatramasamy is an unknown quantity at this point 
Solved Threads: 12
venkatramasamy's Avatar
venkatramasamy venkatramasamy is offline Offline
Junior Poster in Training

Re: Stop a keyboard key input

 
0
  #2
Jan 18th, 2008
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
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. and ends with

with regard s
Venkatramasamy SN
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: Stop a keyboard key input

 
0
  #3
Jan 21st, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC