As always, the #developer documentation from #Apple for new features in the now almost one year old #macOS 15 is completely amazing, full of detail, hints, and usage recommendations.
/s
NOT!
Seriously, how does Apple expect us to write insanely great apps with that complete dummy of a documentation?
Anyhow, you add that new method to any custom NSView you have, so that invoking the contextual menu in macOS "Sequoia" with the keyboard, using the new hotkey Alt-Return, knows !where! in your view the current selection is being displayed, and the context menu thus shall appear.