Sixaxis emulator: keyboard macros

It’s now possible to configure keyboard macros.

A key press will generate a series of events, with timing conditions.

Commands are the following:
– key down
– key up
– key press (= key down + delay + key up)
– delay (unit = ms)

Each macro has to be defined in a file.

Example: macro_example.txt

#Defines the action that triggers the macro execution
MACRO F1
#Performs a keystroke (key down + delay 50ms + key up)
KEY e
#Sleep 50ms
DELAY 50
#Perform a key down
KEYDOWN SPACE
#Sleep 50ms (minimum delay between KEYDOWN and KEYUP)
DELAY 50
#Perform a key up
KEYUP SPACE

Lines beginning with # are comments.

Each macro file has to be referenced in the macros.txt file.

All keys of the keyboard can trigger a macro. The complete list can be found in macro.c.

Remaining work:
– support for mouse events (buttons + moves)
– record/replay functionnality

6 Replies to “Sixaxis emulator: keyboard macros”

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

    Montana

    http://pianotutorial.net

  2. I'm loving your wares now that I finally got it working…but the Macros seem troublesome. With the old version, they only worked for the first few lines (usually quit in under 10 keystrokes)…with the new version they don't want to work at all.

  3. Thanks for the feedback. It seems I broke the macros with the 0.20 version. This is due to the multiple keyboard support : macros generate events for keyboard #0, which is now identified as the Virtual Keyboard and is not selectable in sixemuconf 🙁

    I just created issue 72 to track this problem.

    For the problems with the 0.15 version, please send me your macro file.

  4. Hey again sorry to bother you. I'm new to all this but a quick study. I got the program to work and able to play via my laptop now on the ps3. Now I'm tried to figure out this macros. I know there is an issue with them right now (issue 72)but I still should be able to create them and have them ready by time this issue gets fixed. So I was wondering what do you mean by "All keys of the keyboard can trigger a macro. The complete list can be found in macro.c." Can you please advise? Thanks!

Leave a Reply to Arnold Cancel reply

Your email address will not be published. Required fields are marked *