Move keyState to Session. No apparent reduction in performance, looks good.