Jump to content

Recent Status Updates

  • Photo
      16 Sep

    Some spammers sign up to CC and then they leave their account hidden so they think it won't get noticed but with an obvious name like "SaxophoneRetailSingapore" it's hard not to know they are a spam bot. #ModLife

    Show comments (3)
  • Photo
      15 Sep

    Programming is something that I enjoy and want to make a career out of. But, I usually tend to start things and not finish them. Any advice on how I can finish what I start?

    Show comments (1)
  • Photo
      12 Sep

    Just joined. Really enjoy this sight. Excited to become a great programmer, and helper.

    Show comments (3)
View All Updates

Developed by Kemal Taskin
- - - - -

Detect If Mouse Buttons is Swapped

delphi mouse button swap swapped mouse button

  • Please log in to reply
No replies to this topic

#1 Luthfi


    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1,318 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 22 February 2013 - 01:28 AM

In Windows, users may swapped mouse button to make physical right button to be considered as left button, and vice versa. This feature is to support left-handled people. And if you need to detect this possibility (like after you detect a mouse button is pressed, like in this code snippet), you can use the following code.


  , Windows

(* This function returns true if the mouse buttons are swapped *)
function IsMouseBtnSwapped: Boolean;
  Result := GetSystemMetrics(SM_SWAPBUTTON) <> 0;

Edited by LuthfiHakim, 22 February 2013 - 01:33 AM.

  • 0