WM: Remove Cmd-LMB for RMB emulation for apple
The default apple keymap now uses Cmd as Ctrl, so the key isn't free to emulate RMB.
This commit is contained in:
parent
0fd96b4128
commit
aaf65749e9
@ -4134,14 +4134,15 @@ static int convert_key(GHOST_TKey key)
|
||||
|
||||
static void wm_eventemulation(wmEvent *event, bool test_only)
|
||||
{
|
||||
/* Store last mmb/rmb event value to make emulation work when modifier keys
|
||||
* are released first. This really should be in a data structure somewhere. */
|
||||
/* Store last middle-mouse event value to make emulation work
|
||||
* when modifier keys are released first.
|
||||
* This really should be in a data structure somewhere. */
|
||||
static int emulating_event = EVENT_NONE;
|
||||
|
||||
/* middlemouse and rightmouse emulation */
|
||||
/* Middle-mouse emulation. */
|
||||
if (U.flag & USER_TWOBUTTONMOUSE) {
|
||||
if (event->type == LEFTMOUSE) {
|
||||
|
||||
if (event->type == LEFTMOUSE) {
|
||||
if (event->val == KM_PRESS && event->alt) {
|
||||
event->type = MIDDLEMOUSE;
|
||||
event->alt = 0;
|
||||
@ -4150,26 +4151,12 @@ static void wm_eventemulation(wmEvent *event, bool test_only)
|
||||
emulating_event = MIDDLEMOUSE;
|
||||
}
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
else if (event->val == KM_PRESS && event->oskey) {
|
||||
event->type = RIGHTMOUSE;
|
||||
event->oskey = 0;
|
||||
|
||||
if (!test_only) {
|
||||
emulating_event = RIGHTMOUSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (event->val == KM_RELEASE) {
|
||||
/* only send middle-mouse release if emulated */
|
||||
if (emulating_event == MIDDLEMOUSE) {
|
||||
event->type = MIDDLEMOUSE;
|
||||
event->alt = 0;
|
||||
}
|
||||
else if (emulating_event == RIGHTMOUSE) {
|
||||
event->type = RIGHTMOUSE;
|
||||
event->oskey = 0;
|
||||
}
|
||||
|
||||
if (!test_only) {
|
||||
emulating_event = EVENT_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user