Page MenuHome

Trackpad: change the default of "Trackpad Natural" preference.
AbandonedPublic

Authored by Yevgeny Makarov (jenkm) on Aug 12 2020, 3:10 PM.

Details

Summary

Trackpad: change the default of the "Trackpad Natural" user preference.

It is assumed that this flag always matches the macOS system preferences.
So in some cases (e.g., scroll active items in menu, alt-scroll values in buttons),
the direction is absolute and does not depend on the system preferences for trackpad.

In fact, we must just read the system settings and set this flag automatically.

- (BOOL)isEventDirectionInverted:(NSEvent*)event {
  if ([event respondsToSelector:@selector(isDirectionInvertedFromDevice)])
    return [event isDirectionInvertedFromDevice];
  return NO;
}

Done: D9402: Read the 'directionInvertedFromDevice' property and push it to the event system

For now, simply set the default value to match the default system settings, which is "natural".

T64917: Apple Magic mouse pan is opposite for view3d.rotate
T71431: Rotating the view with trackpad reversed from rotating with the gizmo, not configurable.

Any other code (at least my patches) assumes that this flag matches to the system settings.

With defaults "natural" - content tracks finger movement. Objects rotate in the same direction as the fingers,
which also matches the direction of rotation using the gizmo or the middle mouse button.

Diff Detail

Repository
rB Blender

Event Timeline

Yevgeny Makarov (jenkm) requested review of this revision.Aug 12 2020, 3:10 PM
Yevgeny Makarov (jenkm) created this revision.
Yevgeny Makarov (jenkm) edited the summary of this revision. (Show Details)Aug 13 2020, 8:19 PM
Yevgeny Makarov (jenkm) planned changes to this revision.Aug 20 2020, 6:41 AM
Yevgeny Makarov (jenkm) retitled this revision from Trackpad: removal Trackpad Natural preference to Trackpad: change the default of "Trackpad Natural" preference..
Yevgeny Makarov (jenkm) edited the summary of this revision. (Show Details)

I think we should reset this to the default in existing preferences since the other patches would lead to a regression otherwise?

Brecht Van Lommel (brecht) requested changes to this revision.Oct 12 2020, 3:04 PM
This revision now requires changes to proceed.Oct 12 2020, 3:04 PM

If the OS preference is "un-natural" and the Blender also set to "un-natural" then everything works correctly, now and after my patches. Resetting will break this case.
Once again, this flag should always match the macOS system preferences. Most likely, the user's current settings are correct and do not need to be changed.