Macros
Il est possible de configurer des macros clavier/souris/joystick : une touche ou un bouton peut déclencher une série d'événements clavier/souris/joystick, avec un certain timing.
Contents
Répertoire
Les macros doivent être définies dans des fichiers sauvés sous :
- Ubuntu : le répertoire ~/.emuclient/macros. ~ est le dossier personnel, et .emuclient est un dossier caché (dans le gestionnaire de fichiers, appuyer sur ctrl+h pour afficher les dossiers cachés).
- Windows 32bits : le répertoire C:\Program Files\GIMX\macros.
- Windows 64bits : le répertoire C:\Program Files (x86)\GIMX\macros.
Syntaxe
MACRO <DEVICE EVENT> <ID> <DEVICE EVENT> <ID> DELAY <MS> #<COMMENT>
<DEVICE EVENT>: KEYDOWN, KEYUP, MBUTTONDOWN, MBUTTONUP, JBUTTONDOWN, JBUTTONUP <ID> : l'id de l’événement (sensible à la casse) tel qu'affiché dans gimx-config <MS> : une valeur entière en millisecondes <COMMENT> : un commentaire, non interprété
Commandes
- KEYDOWN : touche du clavier enfoncée
- KEYUP : touche du clavier relâchée
- KEY : KEYDOWN + DELAY 50 + KEYUP
- MBUTTONDOWN : bouton de la souris enfoncé
- MBUTTONUP : bouton de la souris relâché
- JBUTTONDOWN : bouton du joystick enfoncé
- JBUTTONUP : bouton du joystick relâché
- DELAY : un délai en millisecondes
Exemple: rapid_fire.txt
MACRO MBUTTONDOWN BUTTON_LEFT KEYDOWN p DELAY 50 KEYUP p DELAY 50 MBUTTONDOWN BUTTON_LEFT MACRO MBUTTONUP BUTTON_LEFT KEYUP p MBUTTONDOWN BUTTON_LEFT
'p' est bindé à r1 dans les profils 1 (vue normale) et 2 (visée).
'BUTTON_LEFT' n'est PAS bindé à r1 dans les profils 1 et 2.
Notes
Boucle
To make a macro loop, just add a KEYDOWN or MBUTTONDOWN or JBUTTONDOWN command at the end of the macro definition.
Example:
MACRO MBUTTONDOWN BUTTON_LEFT KEYDOWN p DELAY 50 KEYUP p DELAY 50 MBUTTONDOWN BUTTON_LEFT
The macro is triggered by pressing 'BUTTON_LEFT'.
The last command of the macro restarts the macro, creating a loop.
To stop a macro loop, just press the trigger again. The macro is stopped immediately, and the state of the controller is unchanged.
Multiple keyboards/mice/joysticks
In case multiple keyboards or mice or joysticks are used, it's not possible to specify the device for which events are generated.
Events are generated for the first keyboard/mouse/joystick found in the configuration.