Cours Logitech G-series Lua API, tutoriel & guide de travaux pratiques en pdf.
PressKey
The PressKey() function is used to simulate a keyboard key press.
PressKey( scancode [,scancode] );
PressKey( keyname [,keyname] );
Parameters
scancode
Specifies the numerical scancode of the key to be pressed.
keyname
Specifies the predefined keyname of the key to be pressed.
Return Values
nil
Remarks
If multiple keys are provided as arguments, all keys will be simulated with a press.
For scancode and keyname values, refer to Appendix A.
Example — Simulate « a » pressed using the scancode PressKey(30)
— Simulate « a » pressed using the keyname PressKey(« a »)
— Simulate « a » and « b » being pressed PressKey(« a », « b »)
ReleaseKey
The ReleaseKey() function is used to simulate a keyboard key release.
ReleaseKey( scancode [,scancode] );
ReleaseKey( keyname [,keyname] );
Parameters
scancode
Specifies the numerical scancode of the key to be pressed.
keyname
Specifies the predefined keyname of the key to be pressed.
Return Values
nil
Remarks
If multiple keys are provided as arguments, all keys will be simulated with a release.
For scancode and keyname values, refer to Appendix A.
Example — Simulate « a » released using the scancode ReleaseKey(30)
— Simulate « a » released using the keyname ReleaseKey(« a »)
— Simulate « a » and « b » being released ReleaseKey(« a », « b »)