fixed missing semicolon
viewer now will ignore key pressed when menus are shown
fixed formatting
better error checking in menuitemrange