Make handleKeyStroke public