Added functionality to detect and react to modifier keys
Added doMenu() function for controlling menu.