Can't access keyboard response duration

Did a little digging - this is interesting and unintuitive. This code should work if you put it in “Each frame”:

if key_resp.keys:
    print(_key_resp_allKeys[-1].duration)

In short the builder is doing a little bit of deceptive magic and hiding the raw output of getKeys by putting it into the keyboard component object, but it skips the duration (which is something that should be looked at for a future version - I don’t have time to make the feature request now but I might later). However, it also creates a hidden variable that it uses to store the actual raw output, which is the one I’m referring to in this code block. That should let you access the duration information.