keypressd handle added and some documentation