Please test it, I do appreciate your feedback. I think this may be very interesting for our apps!
listen.prg
#include "FiveWin.ch"
function Main()
聽 聽local oDlg, oGet, cText := Space( 30 )
聽 聽DEFINE DIALOG oDlg
聽 聽@ 1, 1 GET oGet VAR cText
聽 聽oGet:bGotFocus = { || Listen() }
聽 聽ACTIVATE DIALOG oDlg CENTERED
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( LISTEN )
{
聽 聽 INPUT inputs[4];
聽 聽 // Pulsaci贸n de tecla Windows
聽 聽 inputs[0].type = INPUT_KEYBOARD;
聽 聽 inputs[0].ki.wVk = VK_LWIN;
聽 聽 // Pulsaci贸n de tecla H
聽 聽 inputs[1].type = INPUT_KEYBOARD;
聽 聽 inputs[1].ki.wVk = 'H';
聽 聽 // Liberaci贸n de tecla H
聽 聽 inputs[2].type = INPUT_KEYBOARD;
聽 聽 inputs[2].ki.wVk = 'H';
聽 聽 inputs[2].ki.dwFlags = KEYEVENTF_KEYUP;
聽 聽 // Liberaci贸n de tecla Windows
聽 聽 inputs[3].type = INPUT_KEYBOARD;
聽 聽 inputs[3].ki.wVk = VK_LWIN;
聽 聽 inputs[3].ki.dwFlags = KEYEVENTF_KEYUP;
聽 聽 // Env铆a las pulsaciones de teclas
聽 聽 SendInput(4, inputs, sizeof(INPUT)); 聽 聽
}
#pragma ENDDUMP