Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-15 06:31:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-15 06:38:43 +0300
commitaaf65749e9df7349cdbffd2cce05717783dad1f5 (patch)
tree89f5c6b6bc4e77f989374a9bd46acabbe111a628 /source
parent0fd96b4128ffb5d24d01c8a937046720dd2f2fbe (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 005e05c4003..9ffa2be8293 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -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;