Sendkeys.Sendwait() is not working in a particular application

Asked

Viewed 202 times

0

I have a software for my tcc, in which I am emulating the pressing of a key using the SendKeys.SendWait("{F12}").

I created the methods and everything right and went to test, however in the application I need it to work, it is not working... I tested in the browser, in word and the command works, but in this software.

I’ll leave my code and the software I’m trying to use.

The language I’m using is VB.Net

Private Sub EmulaPressionamentoTecla()
    SendKeys.SendWait("{F12}")
End Sub

The software I need to work is ACAT, the same software that Stephen Hawking used to communicate with...

https://github.com/intel/acat

  • Can you further detail your scenario? How is the communication with this other software and where is your method being called? The problem is only with the F12 or any command?

  • I’m doing the communication by socket, I have an app on android that is client that keeps sending 0 and 1 to the server, when it arrives 1, the server understand that must be emulated pressing the key. I believe that the problem should be just something delay due to this software that I need to work, because the tests in other software have worked...

  • I’m doing this project, because it’s for a woman who lost her moves because of an accident, and the only thing that he can move in her body is her thumb, so I’m doing it this way.

1 answer

0

Try placing the following function in the constructor (New) or in the event (Load):

Me.KeyPreview = True

In this case it will detect the pressing of some key and you need to develop the routine that will seal which key or key combination you want some routine trigger.

Private Sub GUI_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown

    If e.KeyCode = Keys.Escape Then

        'Faz alguma coisa

    End If

End Sub

Browser other questions tagged

You are not signed in. Login or sign up in order to post.