Inputlistener class

(same as previous commit)