Electronic – how might i make a mouse who’s L and R buttons flip depending on what side of the keyboard it’s on

mouse

I was thinking trying to make a little prototype of a wireless mouse that was left-handed or right-handed depending on which side of the keyboard it's on.

How might I modify a mouse so that the signals from the button clicks cross if they are on oppisite sides of the keyboard?

I'm thinking some kind of small component that knows if it's with a keyboards-width-distance of something attached to one side of the keyboard could toggle whatever mechanism does the reversing.

Is this maybe doable?

Best Answer

a manual switch would be the easiest, but you could use IR LEDs on each side of the key board and 2 IR receivers one on each side of the mouse, then it just detects which side the IR led is lit up on and changes the buttons to the correct configuration.