PDA

View Full Version : Lefty mouse button


Captain Wingo
07-09-2007, 10:04 PM
Hey, I just tried a game from somebody's sig (it was Mark_Tempe's game, "1000 Crystals of Altaxia") and it set off my #1 pet peeve, so I had to come post about it. :)

I'm left handed, and I have my mouse buttons swapped (it's an option in the control panel under "Mouse"). But the game doesn't recognize it! At first I couldn't figure out how to click anything, because my clicks weren't doing anything. They were being interpreted as right clicks and discarded. (Mark's game is certainly not unique in forgetting about us lefties, so I don't mean to pick on him!)

In many games the right mouse button doesn't do anything, so why not make both buttons do the same thing? If your game does need to tell the difference, it's very easy to check for swapped buttons. In C++, it's just this:

BOOL IsMouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);

I think implementing "lefty support" will earn you a few more sales over time, because as a lefty I never buy games without swapped-button support. After a while, it hurts my hand to keep right-clicking (aka left-clicking, reversed).

Not all lefties swap their mouse buttons, of course, but I've met a decent number...

ChrisP
07-09-2007, 11:10 PM
Thanks for reminding me of this. I know I get terribly confused when I use a lefty's computer and they've swapped the mouse buttons on me. :)

Thankfully I just tested my game and it works already without me having to do anything. Thank you, SDL. (So any other game developers using SDL can rest assured that it already handles this for them, at least on Windows.)

I wonder why Windows doesn't always automatically translate LMB clicks into RMB clicks and vice versa when this option is enabled (I'm sure it does in many cases, but please contradict me if I'm wrong). Something to do with how low-level you go to grab your input I guess. Does anyone know how where you get your input from affects whether button-swapping is done for you already?

oNyx
07-10-2007, 12:23 AM
[...]
Thankfully I just tested my game and it works already without me having to do anything. Thank you, SDL.[...]

Same with LWJGL... yey :)

Captain Wingo
07-10-2007, 12:26 AM
Does anyone know how where you get your input from affects whether button-swapping is done for you already?

That's a good point! If you use Windows messages (like WM_LBUTTONDOWN), it's done for you automatically. If you use DirectInput, it doesn't get swapped automatically for some reason.

Desktop Gaming
07-10-2007, 01:57 AM
I'm left handed, too. But, I've always used my right hand for mousing.

If I'm drawing on paper, I use my left hand. Drawing on PC with a mouse - right hand.

I also play guitar right handed (mainly because when I was learning, the only left handed guitar available was crap).

I play snooker left handed.

I play darts right handed.

I'm a hybrid!

GBGames
07-10-2007, 08:45 AM
If your game does need to tell the difference, it's very easy to check for swapped buttons. In C++, it's just this:

BOOL IsMouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);


Well, that solution is Windows-specific. Does anyone know if there is something similar on Mac OS X or Gnu/Linux?

Desktop Gaming
07-10-2007, 09:57 AM
Does anyone know if there is something similar on Mac OS XMac has more than one mousebutton now?? :eek: :D :p

Greg Squire
07-10-2007, 10:17 AM
Mac has more than one mousebutton now??

People have been using two button mice on Macs for a long time. A standard USB mouse works on a Mac just fine, and a lot of software supports "right clicking". Also new Macs come with the new Mighty Mouse which has two buttons (if you want) and a scroll ball. (see http://www.apple.com/mightymouse/ for more details on the Mighty Mouse)

Desktop Gaming
07-10-2007, 10:27 AM
People have been using two button mice on Macs for a long time. A standard USB mouse works on a Mac just fine, and a lot of software supports "right clicking". Also new Macs come with the new Mighty Mouse which has two buttons (if you want) and a scroll ball. (see http://www.apple.com/mightymouse/ for more details on the Mighty Mouse)

My sarcasm clearly went straight over your head.... ;)

frozax
07-10-2007, 12:20 PM
Under Windows, I was using GetKeyboardState() to get the state of the mouse buttons (yes, you get the mouse buttons with GetKeyboardState), and it does not work with reverted buttons.
What's funny is that I AM left-handed, but I use the standard button configuration so I did not see this bug.
Thanks for the reminder.

Also new Macs come with the new Mighty Mouse which has two buttons (if you want) and a scroll ball.
The touchpad of my iBook only has one mouse button.

Greg Squire
07-10-2007, 01:17 PM
My sarcasm clearly went straight over your head.... ;)
Sorry, I guess it did. Sometimes its hard to read sarcasm from forum posts. I should of looked at the smileys closer.