Author Topic: Trying to get some comfort of AMouse with a virtualized OS/2 system  (Read 7441 times)

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
AMouse has for me 2 advantages compared to SMouse in respect of mouse
wheel scrolling:

1. AMouse sends scroll messages and can be configured to behave otherwise.
   SMouse sends only keyboard messages.
   
   Scroll messages for a text window have the advantage that the window
   immediately starts scrolling, as if the vertical slider was moved.
   This behavior is ideal for text reading.
   
   Keyboard messages move the cursor. A window moves if the cursor
   reaches window boundaries. That means that starting scrolling may take
   some time, dependent on the initial cursor position.
   
2. AMouse effects on the window below the mouse pointer. It can be
   configured to behave otherwise. SMouse effects on the window with the
   keyboard input focus, usually the topmost window.
   
The Nice WPS Enhancer allows for redirecting mouse messages from the
window with the input focus to the window below the mouse pointer.

Unfortunately that doesn't seem to work with a virtualized OS/2
(VirtualBox and Virtual PC tested) and the adapted mouse driver from the
OS/2 addititions installed.

On a real system, with Nice and SMouse installed, I had success in
configuring Nice to behave like AMouse for item 2.

Both AMouse advantages are the main reason, why I'm not mainly using
a virtualized system.

Does anybody have any experience with that?
« Last Edit: April 16, 2018, 11:12:41 pm by Andreas Schnellbacher »

ak74

  • Guest
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #1 on: April 15, 2018, 07:09:23 pm »
I know it's not a solution, but a workaround to not use emulated PS/2 mice. You can connect serial mice and use appropriate device drivers supplied by the guest OS. VirtualBox should additionally allow USB-connected devices. I had a similar problem, now I can use 3 mouse buttons inside a UnixWare guest.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #2 on: April 15, 2018, 07:45:26 pm »
Hi Andreas, I'll try that. I have a PS/2 mouse connected. An additional USB mouse for the OS/2 guest is doable, but somewhat uncomfortable, because the host system shouldn't have loaded it before the guest connects to it. That might mean that the USB mouse has to be plugged in just after the host was started up.
« Last Edit: April 16, 2018, 11:11:34 pm by Andreas Schnellbacher »

Bogdan

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #3 on: April 26, 2018, 08:26:25 pm »
Andreas wrote me that he was banned from this forum because of this posting. I have no clue about this witch-hunt.

I'm not a specialist for VirtualBox but perhaps it's helpful to know that it depends on user privileges inside the host OS how the device attachment will be handled. For VirtualBox GUI there should be something called device filters, which can deal with this issues and can link devices to specific VMs. Usually the host operating system should prompt the user for device driver install unless a matching driver can be installed automatically. It's a good idea to disable the automatic driver update service inside a Windows host operating system. For UNIX host environments similar settings can be done through the DCU facility or its siblings.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #4 on: April 26, 2018, 10:24:48 pm »
Andreas wrote me that he was banned from this forum because of this posting.
That's only the end of the long story.

Back to the subject:

The reason is known. It's caused by the OS/2 mouse driver of the VirtualBox Additions. That one is needed for seamless focus switching between the host and the guest. Also keyboard and graphic drivers come from that driver package.

The Nice WPS Enhancer shows that's possible to add functionality of the AMouse driver by an application, without changing the driver. Unfortunately its automatic focus switching to the window below the muse pointer doesn't work with the VirtalBox Addtions drivers. Additionally, an application to turn a mouse drivers keyboard messages into scroll messages is unknown to me.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #5 on: April 27, 2018, 06:33:40 am »
When you use VBox, you really should use the VBox extensions for the guest. The extensions replace the mouse driver with one that interfaces to the host system, so you effectively use the host mouse driver, which makes the OS/2 mouse driver, of choice, totally redundant (it should be REMed). The same is true of the video driver. Use GRADD, and when you replace GRADD.DLL with the one in the VBox extensions, it then uses the host video driver. Adding AMouse, SNAP, or Panaorama, is just a waste of resources, and they don't really do anything.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #6 on: April 27, 2018, 07:48:00 am »
When you use VBox, you really should use the VBox extensions for the guest.
That's no question. Apparently you got me wrong. Please read what I've written in the first posting.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #7 on: April 27, 2018, 08:09:00 am »
... I have no clue about this witch-hunt.
....
If you've no clue about don't use inappropriately buzz words.

Sergey Posokhov

  • Full Member
  • ***
  • Posts: 169
  • Karma: +8/-6
    • View Profile
    • OS/2 API Research
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #8 on: April 28, 2018, 05:09:24 pm »
The Nice WPS Enhancer shows that's possible to add functionality of the AMouse driver by an application, without changing the driver. Unfortunately its automatic focus switching to the window below the muse pointer doesn't work with the VirtalBox Addtions drivers.

Yes, it does not work because this program just adds message filter (also known as "input hook") and it works with Presentation Manager only.

If you open a file "MouseMapper_hook.cpp", you will see the function named "MouseMapper_MoveInputFocusWhenScrollingNode()" which switches input focus (the term "node" in this case means "a special part of program"). It just calls "WinSetFocus()".

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Trying to get some comfort of AMouse with a virtualized OS/2 system
« Reply #9 on: April 28, 2018, 07:02:37 pm »
Yes, it does not work because this program just adds message filter (also known as "input hook") and it works with Presentation Manager only.
I know what a hook is. But I didn't know that the focus within a guest (PM) window is controlled by the driver that communicates with the host system. That makes sense. Thanks for the explanation.