I believe you can just save state into your own variable for use elsewhere.
At the top of your script:
var last_state
At the integrate forces:
func _integrate_forces(state):
last_state = state
In input:
func _input(event):
# do something with last_state