key listener calls corresponding functions