Bonjour

Je ne connais rien au C.
Quelqu'un ici pourrait-il m'aider à trouver l'équivalence en Delphi ?
Je mets la procédure entière mais c'est surtout l'utilisation du pipe (0 |1|1;) qui me pose problème.
Pour le reste je vais bien me débrouiller tout seul

Code C : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
void SendInputkey(HWND window, WORD key, WORD shift=0)
{
    WORD loword = 1;
    WORD scancode=0x0000;
    WORD extendedkey=0x0100;
    WORD keyup= 0 |1|1;
    WORD keydown= 0 |1|0;
    WORD hiword = scancode | extendedkey |keyup;
    if(shift!=0)
        PostMessage(window, WM_KEYDOWN,(WPARAM) shift,MAKELPARAM(loword, hiword));
    PostMessage(window, WM_KEYDOWN,(WPARAM) key,MAKELPARAM(loword, hiword));
    extendedkey=0x0000;
    hiword = scancode | extendedkey | keydown;
    if(shift!=0)
        PostMessage(window, WM_KEYUP,(WPARAM) shift,MAKELPARAM(loword, hiword));
    PostMessage(window, WM_KEYUP,(WPARAM) key,MAKELPARAM(loword, hiword));
 
}