Opened 17 years ago
Last modified 8 years ago
#1766 reopened defect
ctrl key on OS X is not usable
Reported by: | clf | Owned by: | |
---|---|---|---|
Component: | GUI | Version: | VirtualBox 1.6.2 |
Keywords: | ctrl click context menu | Cc: | |
Guest type: | other | Host type: | Mac OS X |
Description
When using an OS X host, the control (ctrl) + mouse press key combination is not recognized correctly. Ctrl + left click results in a right-click, which means that selecting multiple items by ctrl-clicking on files, etc. is not possible. Using ctrl-click as a command (to open links in tabs in a browser, for example) is also affected by this, as ctrl opens a context menu. In many cases this makes typical tasks impossible or frustrating in the guest OS.
Change History (15)
comment:1 by , 17 years ago
Component: | other → GUI |
---|---|
Host type: | other → Mac OS X |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Having the same issue as in this ticket (#1766) after upgrading to VBox 4.3.28 r100309
Host: Mac OS 10.9.5 Guest OS: Windows XP/Windows 8
The problem occurs when Mouse Integration is enabled. When I hold Ctrl and left-click the mouse (and slightly move the mouse) this results in right-clicking the mouse (I get context menu displayed)
When I Disable Mouse Integration, mouse works as it should.
follow-up: 7 comment:6 by , 8 years ago
It's still broken in 5.1.2 r108956 (tried on OSX with Linux guest). As mentioned by meon, broken since 4.3.28.
Note: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/libx11-ddefs.html #define ShiftMask (1<<0) #define ControlMask (1<<2) #define Button1Mask (1<<8) #define Button3Mask (1<<10)
Test with xev:
Incorrect events for ctrl+left MB (note state is 0x4 (press) 0x404 (release WRONG) - should be 0x4 and 0x104) ctrl+left MB, then ctrl+middle MB, then ctrl+right MB:
KeyPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11086089, (89,79), root:(468,583), state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11087521, (89,79), root:(468,583), state 0x4, button 3, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11087736, (89,79), root:(468,583), state 0x404, button 3, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11088480, (88,79), root:(467,583), state 0x4, button 2, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11088792, (88,79), root:(467,583), state 0x204, button 2, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11089448, (89,79), root:(468,583), state 0x4, button 3, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11089648, (89,79), root:(468,583), state 0x404, button 3, same_screen YES
KeyRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 11090961, (89,79), root:(468,583), state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
For comparison: correct events for shift+MB shift+left MB, then shift+middle MB, then shift+right MB:
KeyPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10950625, (89,79), root:(519,496), state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10951761, (89,79), root:(519,496), state 0x1, button 1, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10952136, (89,79), root:(519,496), state 0x101, button 1, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10953472, (89,78), root:(519,495), state 0x1, button 2, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10953864, (89,78), root:(519,495), state 0x201, button 2, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10954864, (89,79), root:(519,496), state 0x1, button 3, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10955192, (89,79), root:(519,496), state 0x401, button 3, same_screen YES
KeyRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x17b, subw 0x0, time 10957361, (89,79), root:(519,496), state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
comment:7 by , 8 years ago
Replying to mooflu:
As mentioned by meon, broken since 4.3.28.
Just one small correction. It is not broken since 4.3.28. This is a 5.1.x regression. It works fine with 5.0.26 and all the 5.0.x series. I think it might have to do with either the Qt5 or that they changed the compiler used for the 5.1.x series.
Or something totally unrelated.
comment:8 by , 8 years ago
Ok, thanks for the correction.
Not sure if this narrows it down further, but when I run it with VBOX_RELEASE_LOG=+main.e.l3:
ctrl+left MB
00:01:53.820827 virtual nsresult Mouse::putMouseEventAbsolute(PRInt32, PRInt32, PRInt32, PRInt32, PRInt32): x=135, y=533, dz=0, dw=0, fButtons=0x2
just left MB:
00:01:52.961004 virtual nsresult Mouse::putMouseEventAbsolute(PRInt32, PRInt32, PRInt32, PRInt32, PRInt32): x=135, y=533, dz=0, dw=0, fButtons=0x1
comment:9 by , 8 years ago
So I guess this gets triggered in src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
#ifdef VBOX_WS_MAC /* Simulate the right click on host-key + left-mouse-button: */ if (machineLogic()->keyboardHandler()->isHostKeyPressed() && machineLogic()->keyboardHandler()->isHostKeyAlone() && iMouseButtonsState == KMouseButtonState_LeftButton) iMouseButtonsState = KMouseButtonState_RightButton; #endif /* VBOX_WS_MAC */
My host-key is the default (I believe) and set to left ⌘ (command)
Same behaviour when I change host-key to left ⌥ (option) Tried some other host-keys as well, but (left or right) ctrl+ left MB always results in right MB no matter what the host key is configured as.
comment:10 by , 8 years ago
If you have 3 finger drag enabled on the OS X host (accessibility preferences), you can use small 3-finger-drags over each item as a painful workaround to multi-select on a windows guest with mouse integration enabled. This will select the item *and* activate the context menu.
comment:11 by , 8 years ago
Having the same issue as in this ticket (#1766) after upgrading to VBox 5.1.4 r110228 (already installed VboxGuestAddition)
Host: Mac OS 10.11.6 Guest OS: Windows 7 (64bit)
The problem occurs when Mouse Integration is enabled. When I hold Ctrl and left-click the mouse (and slightly move the mouse) this results in right-clicking the mouse (I get context menu displayed)
When I Disable Mouse Integration, the mouse works as it should.
comment:12 by , 8 years ago
Having the same issue as in this ticket (#1766) after upgrading to VBox 5.1.4 r110228 (already installed VboxGuestAddition)
Host: Mac OS 10.11.6 Guest OS: Arch Linux (32bit)
The problem occurs when Mouse Integration is enabled. When I hold Ctrl and left-click the mouse (and slightly move the mouse) this results in right-clicking the mouse (I get context menu displayed)
When I Disable Mouse Integration, the mouse works as it should.
It works fine with 5.0.26 and all the 5.0.x series.
comment:13 by , 8 years ago
Having the same issue as in this ticket (#1766) after upgrading to VBox 5.1.x (already installed VboxGuestAddition)
Host: Mac OS 10.11.6 Guest OS: Windows 10 (64bit)
As described above, the problem occurs when Mouse Integration is enabled. When I hold Ctrl and left-click the mouse this results in right-clicking the mouse (I get context menu displayed). Previous reports say that this must coincide witha slight movement of the mouse. I cannot confirm whether the mouse is moving as I am trying not to move it as I press the left mouse button, but it could be moving ever so slightly.
When I Disable Mouse Integration, the mouse works as it should.
It worked fine with all the 5.0.x series.
follow-up: 15 comment:14 by , 8 years ago
I have the same issue with VB 5.1.8 on Mac OS X host and Ubuntu 14.04 guest, turning off mouse integration makes the mouse work correctly. Has this been fixed?
Thanks.
comment:15 by , 8 years ago
Replying to kestryth:
Has this been fixed?
As I replied to you in the thread you opened in the forums, the majority of users do not see this problem, including the developers, so unless they see it they can't "fix" it. I strongly believe that there is something different about your setup.
Please let's continue the discussion in the thread.
Please reopen if still relevant with VBox 4.3.2.