Git: file patch view - toggle staged/unstaged changes

Plugin: GitHub
When viewing staged/unstaged changes for a file, there is a toolbar button which toggles between viewing staged and unstaged lines; see image:
Is there a way to trigger this via a command? I haven’t been able to find a built-in command for it.
It looks like this is the code which that button triggers:

Is it possible to somehow call that function from a custom command? I’m new to Atom, so I’m not sure if it’s possible to call something like that which isn’t part of the Atom API.
Or is there a way to trigger the change via keyboard which I am missing?

You can if the package defines it as a command, which github appears to do. You can add new keybindings for those commands as described in the Flight Manual.

I had previously tried those commands, but I didn’t see anything happening. Since you mentioned them also, I decided to give the a try again. This time I noticed that I am getting an uncaught exception:

Uncaught (in promise) TypeError: Cannot read property 'getPath' of undefined
at /usr/share/atom/resources/app/node_modules/github/lib/controllers/root-controller.js:662:68

It looks like there might be an open defect for the same type of error:
I’ve tried running in safe mode as well, with no change in outcome.

After taking another look at your screenshot, I don’t think you’re using the github package. github creates a view that looks like this: