Typey McTypeface   🪄⌨️

Record your keystrokes so you can play them back again later and make your demo look ✨🦄🌈.

lua array will appear here, click to copy to clipboard
// 🔨🥄 Example hammerspoon config

// Paste your keystrokes array defn here.

function typeOutKeystrokes(keystrokes)
    -- Ensure the frontmost application is active to receive keystrokes
    hs.application.frontmostApplication():activate()

    -- Function to "type" each character with a specific delay
    for i, stroke in ipairs(keystrokes) do
        hs.timer.doAfter((stroke.delay/1000)*0.5, function()
            if stroke.key == "Backspace" then
                hs.eventtap.keyStroke({}, "delete")
            else
                hs.eventtap.keyStrokes(stroke.key)
            end
        end)
    end
end

hs.hotkey.bind({"alt"}, "1", function()
    typeOutKeystrokes(keystrokes)
end)