Use * key as a toggle to select and deselect all the files in a active window

Is it possible in DO to use the * key as a toggle to select and deselect ONLY all the files in a active window.
And even better if there is an option to in(ex)clude folders as well.

It could be done using a fairly simple script.

Please link your account for detailed help.

I assigned this command: Select INVERT TYPE=files to the key.
It works fine.