C++ sending Joystick directional input to program <p>I'm trying to spoof a PS3 controller and send analog stick directional input to a specific program, but i can't figure out how the INPUT.hi struct works. I can send keypresses over with</p> <pre><code>INPUT keys; keys.type = INPUT_KEYBOARD; keys.ki.dwFlags = KEYEVENTF_SCANCODE; keys.ki.wScan = 0x11;//hex for 'w' key SendInput(1, &amp;keys, sizeof(INPUT)); Sleep(60);//delay to ensure game doesnt drop keypress keys.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; SendInput(1, &amp;keys, sizeof(INPUT)); </code></pre> <p>and i believe that sending over joystick commands would work similarly, something like </p> <pre><code>INPUT analogSticks; analogSticks.type = INPUT_HARDWARE; analogSticks.hi.uMsg = WM_INPUT; analogSticks.hi.wParamL = //what are the values for these? analogSticks.hi.wParamH = //what are the values for these? SendInput(1, &amp;analogSticks, sizeof(INPUT)); </code></pre> <p>but trying out different values for wParamL and wParamH doesnt do anything. Am i doing something wrong, and/or is there a way i can input specific angles, say, if i were to put in 45, i could generate a joystick signal that would correspond to that angle, much like i can do with keypresses?</p>