Created
April 28, 2021 06:23
-
-
Save WhiteMagic/b492b620700635463340af2743487a39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gremlin | |
stick = gremlin.input_devices.JoystickDecorator( | |
"T16000.M", | |
"4DCB3090-97EC-11EB-8003-444553540000", | |
"Default" | |
) | |
# Create a macro that can be used repeatedly | |
key_macro = gremlin.macro.Macro() | |
key_macro.exclusive = False | |
key_macro.add_action(gremlin.macro.KeyAction(gremlin.macro.key_from_name("A"), True)) | |
key_macro.add_action(gremlin.macro.PauseAction(0.1)) | |
key_macro.add_action(gremlin.macro.KeyAction(gremlin.macro.key_from_name("A"), False)) | |
@stick.button(1) | |
def axis1(event, vjoy): | |
if event.is_pressed: | |
gremlin.macro.MacroManager().queue_macro(key_macro) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment