This works in scratch 3.0. Press "See inside" to see my comments to try and explain on how this works. For an in-depth explanation on how to easily do this, look at my other account @AvacadoTutor for a tuorial. I guess technically you can set the key to ANY key except tab, shift, ctrl, etc.