Added pageturns hook for detecting keys