MCPcopy
hub / github.com/Sentdex/pygta5 / ReleaseKey

Function ReleaseKey

original_project/Versions/v0.03/directkeys.py:62–67  ·  view source on GitHub ↗
(hexKeyCode)

Source from the content-addressed store, hash-verified

60 ctypes.windll.user32.SendInput(1, ctypes.pointer(x), ctypes.sizeof(x))
61
62def ReleaseKey(hexKeyCode):
63 extra = ctypes.c_ulong(0)
64 ii_ = Input_I()
65 ii_.ki = KeyBdInput( 0, hexKeyCode, 0x0008 | 0x0002, 0, ctypes.pointer(extra) )
66 x = Input( ctypes.c_ulong(1), ii_ )
67 ctypes.windll.user32.SendInput(1, ctypes.pointer(x), ctypes.sizeof(x))
68
69if __name__ == '__main__':
70 PressKey(0x11)

Callers 11

straightFunction · 0.90
leftFunction · 0.90
rightFunction · 0.90
reverseFunction · 0.90
forward_leftFunction · 0.90
forward_rightFunction · 0.90
reverse_leftFunction · 0.90
reverse_rightFunction · 0.90
no_keysFunction · 0.90
mainFunction · 0.90
directkeys.pyFile · 0.70

Calls 4

SendInputMethod · 0.80
Input_IClass · 0.70
KeyBdInputClass · 0.70
InputClass · 0.70

Tested by 10

straightFunction · 0.72
leftFunction · 0.72
rightFunction · 0.72
reverseFunction · 0.72
forward_leftFunction · 0.72
forward_rightFunction · 0.72
reverse_leftFunction · 0.72
reverse_rightFunction · 0.72
no_keysFunction · 0.72
mainFunction · 0.72