https://bitbucket.org/daniel_fort/magic-lantern
Raw File
Tip revision: f5e25c2d765320c5346833ff2244473f5ca5288e authored by dannephoto on 20 August 2017, 03:29:13 UTC
Closed branch crop_rec_4k
Tip revision: f5e25c2
scrnshot.lua
-- Screenshot on Keypress
-- take a screenshot every time a key is pressed.

scrnshot_menu = menu.new
{
    parent  = "Screenshot on Keypress",
    name    = "Enabled",
    choices = { "OFF", "ON" },
    value   = "OFF",
    help    = "Take a screenshot every time a key is pressed",

}

-- fixme: this slows down the GUI a lot
-- also takes many unnecessary screenshots
-- (for example, on press/unpress events)
function event.keypress(key)
    if key ~= 0 and scrnshot_menu.value == "ON" then
        display.screenshot()
    end
end
back to top