#14 Win32: Map Right Mouse Button

open
nobody
None
5
2004-05-21
2004-05-21
VShailesh
No

This patch is for Win32.

This patch allows for a click of the Right Mouse button
on a Windows 2+ button mouse, to be "translated" to
a sequence of "control key" and "left mouse click",
as is normal on a 1 button Apple mouse.

This feature is on by default for Win32,
but can be turned off by a configuration file option.

Changed Files:

ppccfg.example
The new keyword is "map_right_mouse_button".

src/main.cc
Additions to read config file and setup state.

src/system/display.h
Declares a pure virtual function "MapRightMouseButton"

src/system/posix/sysdisplay.cc
Empty defintion for "MapRightMouseButton" on Posix.

src/system/win32/sysdisplay.cc
The main changes are in this file.
When a right mouse click occurs,
we "fake" the following sequence-
control key down, left mouse down, control key up,
and after any intervening mouse moves,
when we get another mouse event,
we fake a left mouse up event.

Discussion

  • VShailesh

    VShailesh - 2004-05-21

    Win32: Map Right Mouse Button

     
  • Wolfgang Thaller

    Logged In: YES
    user_id=566359

    Why is this necessary?
    Mac OS X does understand multi-button mice connected to the USB port
    without additional software, and without emulating right-click via a
    control click. (control-click and right-click are just two different events
    that can open a context menu).

     
  • VShailesh

    VShailesh - 2004-05-26

    Logged In: YES
    user_id=1045854

    It is true that Mac OS X does recognize multi-button mice
    connected via USB. But in the current implementation of PearPC,
    mouse clicks and key strokes are read off the Windows message
    queue, and not by emulating a mouse or a keyboard device.
    Hence the need for this patch.

    Since Mac OS is not the only OS that one could run on PearPC,
    I've coded it such that this feature can to be turned on/off
    by a config file keyword.

     
  • Nobody/Anonymous

    Logged In: NO

    even better, use mac os x's true 2-button mouse support (i.e. make the
    windows mouse appear as a USB device)

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks