0

I'm trying to make a prog, that should listen global to the keyboard and to work with the imput. Is it possible when the key "d" was pressed, to block the current input(don't output the "d") and do the follow: SendKeys.Send("δ")

δ = greek d (delta)

My solution at the moment is the follow:

    If GetAsyncKeyState(Keys.D) And GetAsyncKeyState(Keys.ShiftKey) = False And delay = False Then
        delay = True
        SendKeys.Send("{BACKSPACE}")
        SendKeys.Send("{δ}")
        GoTo endFunction
    End If

I try to work with few timers to delay the SendKeys function and to delay the GetAsyncKeyState Function. It works, but not perfect. If i hold down the button "d", I get text like this one: δdδδddδdδddδδdδdδδd I just want to keep pressed "d" and want to get a clean output: δδδδδδδδδδδ

Who could advise me to do it better? I'm not a power programmer, but i know the basics like functions and loops and so on...

A working example would be perfect.

Thanks in advance

Alex
  • 1
  • 1
  • Have a look at my library called [InputHelper](https://github.com/Visual-Vincent/InputHelper) (compiled download [here](https://github.com/Visual-Vincent/InputHelper/releases)). It features a keyboard hook as well as a mouse hook, each which can be used to block certain input. See the instructions here: https://github.com/Visual-Vincent/InputHelper/wiki/Low-level-keyboard-hook – Visual Vincent Aug 11 '18 at 11:22
  • Wow, perfect library. It does what it should. Perfect for my targets. Thank you very much!!!!!!!!! – Alex Aug 11 '18 at 14:50

0 Answers0