Dynatrace only captures user actions when there is a web request involved.
You can utilize the API of the JavaScript agent to create user actions for any interaction you like though.
It’s pretty straight forward and you can download examples directly from the dynatrace UI:
Settings → Web and Mobile Monitoring → Advanced Setup → JavaScript tag API