Ultimate PC game controller/mouse

You'll have to poll (read) the slide often.
If (it's < threshold)
{ it branches to mouse stuff }
else
{ it's left to keyboard stuff }