Split key handling function in two functions

Split key event handling function in two functions - one for handling keys in list mode which is already implemented and one for handling keys in icon view which still needs to get implemented.