KeysAnalyzer is an open source tool designed to report all keys defined and used in a DITA map.
A standard DITAVAL file can be used to filter out topics and maps when harvesting keys.
Installers are available at https://www.maxprograms.com/products/keysanalyzer.html