added key listener template code