Macro Issue - Shifting Function Keys on the Keybow

Hi there;

I am having fun with my new clicky Keybow, but I am having an issue and it’s making a little insane.

I’m trying to set it up to handle my savestates in SNES9X. The way this works is that each function key is mapped to a save slot. To load a save state, press F1 (for example). To save into that slot, press SHIFT+F1.

I can map a function key to a button, no problem. I tap the key, it loads the associated save.

The problem arises when I try to use a macro to handle saving. In theory, this should work, as it’s just a slight modification of the example macro from the tutorial:

function handle_key_03(pressed)
if pressed then
keybow.set_modfier(keybow.LEFT_SHIFT, keybow.KEY_DOWN)
keybow.tap_key(keybow.F1, pressed)
keybow.set_modifier(key.LEFT_SHIFT, keybow.KEY_UP)
end
end

This doesn’t actually work. It either ignores the keypress entirely, or it acts as though I pressed F1 with no modifier.

I have attempted to use other variations of this macro, including keybow.tap_function_key, but I either end up with a key that does nothing or a script that doesn’t run.

This is my first time with Lua. Is there a syntax I’m missing? Is there something weird about how it handles modifiers+function keys (or modifiers+variables) that I’m missing? I’ve pored over the code snippets and the keybow.lua file but I can’t figure out why this isn’t working or how to fix it.

Thanks for any help!