Changed keyboard scrolling fcn to switch statement