What could cause Command-Tab task switching to get "stuck"? When I Command-Tab to task switch (in both Mavericks and Yosemite), occasionally (maybe 60% of the time) the task switcher will behave as if the Tab button was held down. That is, the task-switcher selection will fly over to the right-most icon. If I mouse-over the app icons, the cursor will continue constantly moving to the right. 

I doubt it's a stuck Tab key, because I use the Tab key all the time when coding, navigating Cocoa controls, etc...never have a problem with Tabs being constantly entered. This only ever occurs on Command-Tab.

Any ideas?
Just had the same issue.

Turns out it is because I've got my mouse in my bag and it's still connected to the bluetooth dongle on the machine. So essentially is the mouse.

As soon as I disconnected the mouse the issue went away.