How to select feature in custom context

Can I select features or nodes interactively in my custom context just like what I can do in model context?

Thanks.