secondaryTap method
Right-clicks target — the mouse's other button, and how a context menu
is asked for on every desktop.
Always the mouse, whatever the device: onSecondaryTap is a mouse's
gesture, and a finger has no second button. It is the mouse hover
moves, so the click leaves target hovered — a menu opening under the
pointer finds the pointer where it should be — and unhover ends that.
Implementation
Future<void> secondaryTap(dynamic target, {Shot? shot, Settle? settle}) =>
_step(
shot,
settle,
() async {
var finder = await _resolve(target, 'secondaryTap');
var at = _aimFor(target, finder);
await _approach('secondaryTap');
await _mouse.click(
at,
buttons: kSecondaryButton,
over: describeTarget(target),
);
},
verb: 'secondaryTap',
target: describeTarget(target),
);