moved encrypt hook after keyboard hook