What model Mac do you have, and what model/type of screen? Is it possible that the screen's cable or plug is being nudged when you manoeuvre your mouse? Possibly the plug is not secure or the cable is damaged.
As for the F12 option to bring up the Dashboard, try checking it in Apple Menu --> System Preferences --> Dashboard. Make sure you've set F1 as the shortcut key you want to use.