Docked variant of cranked

I figured out the inputHandlers and find it really useful for creating maps based on my play state. However, I think it would be useful if we could push a callback for when the crank is docked/undocked. This would bring a level of consistency to the whole of user input possibilities.


Just checking: have you seen playdate.isCrankDocked()?

Indeed! But I found I had to use it in update() instead of being a callback that gets fired like all my other controls using an inputHandler.

local myInputHandlers = {

    AButtonDown = function()
        -- do stuff

    cranked = function(change, acceleratedChange)
        -- do other stuff

    -- etc.

This is really convenient because I can set them up and just push them to the handlers table when I switch game modes. So it would be nice to be able to attach logic to docked rather than always check docked myself.

1 Like

filed that! makes sense, since we have callbacks for all the other button/crank inputs

1 Like