English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 14 February 2017, 18:15   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Toggling between mouse grabbed and un-grabbed

I have a mouse which has 5 buttons, and set the 4th button to "Toggle between mouse grabbed and un-grabbed" on the Input settings page.

I noticed a couple of issues:
  • With emulation running, un-capture the mouse then left-click in the emulation window to capture it. Pressing the 4th button does nothing. Pressing it a second time does un-capture the mouse.
  • This is probably intentional, but... If you un-capture the mouse, pressing the 4th button doesn't actually toggle the mouse-captured state, since pressing it again doesn't re-capture the mouse. Left-clicking in the emulation window does capture the mouse again.
mark_k is online now  
AdSense AdSense  
Old 14 February 2017, 20:31   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Attach your config file. (Always minimize unknown variables.)
Toni Wilen is online now  
Old 14 February 2017, 21:59   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Here you go. [This is on Windows 10 1607 x86-64 btw.]

Are there any input logging command-line options I could try?
Attached Files
File Type: zip 4thButtonUncaptureMouse.zip (2.5 KB, 15 views)

Last edited by mark_k; 15 February 2017 at 15:20.
mark_k is online now  
Old 15 February 2017, 18:42   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
It has simple reason, mouse input is ignored if WinUAE does not have focus. Not sure if this can be fixed or worked around without other side-effects.
Toni Wilen is online now  
Old 15 February 2017, 20:27   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
I'm not sure I follow...

For the first point I mentioned, when "Untrap = middle button" is enabled, after you click in the emulation window to capture the mouse, the first middle button press un-captures it. But the first press of the 4th button seems to be lost/ignored.

For the second point, the emulation window always has focus (as far as I can see). WinUAE is able to detect the left button being pressed and captures the mouse then.
mark_k is online now  
Old 15 February 2017, 20:51   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Oops, I meant mouse captured, not focus.

Left button always captures the mouse. When not captured, WinUAE listens for WM_LBUTTONDOWN and does not forward any mouse events to input mapping (and to Amiga side). After mouse has been captured, rawinput is used (unless "Windows mouse") and only then mouse events are again forwarded to input mapping.

EDIT: This worked in some very old (mouse movements leaked to Amiga-side even when not captured which was not that nice) version but input focus/captured state was changed to something more user friendly and to match how virtual machines commonly work.

Last edited by Toni Wilen; 15 February 2017 at 20:58.
Toni Wilen is online now  
Old 16 February 2017, 12:42   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
OK, but what about needing to press the 4th button twice to uncapture? I was wondering whether that was some Windows 10 bug/issue, but it happens on Wine too.
mark_k is online now  
Old 16 February 2017, 19:10   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by mark_k View Post
OK, but what about needing to press the 4th button twice to uncapture? I was wondering whether that was some Windows 10 bug/issue, but it happens on Wine too.
Fixed.

It was a real bug. Right button was seen as still pressed because button release was ignored because mouse was already uncaptured. Button press state should be cleared when capture state changes.
Toni Wilen is online now  
Old 17 February 2017, 20:33   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
This isn't related to the issue above, but since it's about the 4th and 5th buttons I thought I'd mention it here...

I noticed that the default button mapping for "Windows Mouse" has the 4th and 5th buttons both mapping to the Amiga left Alt key. Is that intentional?
Attached Thumbnails
Click image for larger version

Name:	WinUAE_mouse_input.png
Views:	26
Size:	34.7 KB
ID:	52076  
mark_k is online now  
Old 18 February 2017, 11:12   #10
Tomislav
Registered User

 
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 74
Actually they are assigned to "Left Alt" AND "Cursor Left" (button 4) and "Cursor Right" (button 5). Go to "Game Ports" and press "Remap / Test" of Port 1 (where is Windows Mouse) and scroll down.
Click image for larger version

Name:	WinUAEMouseButtons.jpg
Views:	24
Size:	45.5 KB
ID:	52079

Last edited by Tomislav; 18 February 2017 at 11:17.
Tomislav is offline  
Old 18 February 2017, 11:55   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
That.

Default was inherited from original less configurable input system. I don't anymore remember where it came from or why..
Toni Wilen is online now  
Old 18 February 2017, 12:11   #12
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Maybe Alt-Left/Right would move to the start or end of the line in some text editor, or forward/back in a web browser??? Either way I don't think it makes much sense to have that mapping be the default.

[I noticed this before you fixed the stuck-button-state issue; booting a disk and pressing Ctrl-D, typing in the CLI showed strange characters since Alt was pressed, until I clicked the 4th button again.]
mark_k is online now  
Old 19 February 2017, 13:53   #13
Tomislav
Registered User

 
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 74
WinUAE just used default parameters from Windows. And yes they made it that it's by default as forward/back history in browser. My mouse have them, too.

If you want to reconfigure it you need to set mouse to "<none>" in "Game Ports" and set your configuration in "Input". Or you can use some of mouse configuration utilities for Windows.
Tomislav is offline  
Old 19 February 2017, 15:47   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
I don't think Windows fakes key presses for the 4th and 5th mouse buttons though, they probably (I didn't bother looking into it too deeply) generate distinct input events.
mark_k is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A2000 left mouse button use in workbench causes mouse to stop responding. gary_nz support.Hardware 5 17 September 2017 10:03
Mouse click problem with cintiq companion and virtual mouse driver donmikko support.WinUAE 9 19 February 2017 11:32
Amiga Mouse Original Tank Mouse Optical sensor Faulty Help please. Audronic support.Hardware 5 01 February 2017 09:42
Color and flickering problem when toggling menu mode on OS X? _ThEcRoW support.FS-UAE 1 22 March 2014 23:38
Unattended Num Lock toggling NewDeli support.WinUAE 2 21 December 2009 09:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:16.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.16615 seconds with 12 queries