There are somethings KM to do that would apply genericly to all apps, but generally you have to target an app first.
Here are two AppleScripts and a JXA that use the System Events app to target the current frontmost app. You can easily put these in a KM macro using the "Execute AppleScript" action.
Between the two of these, you should have a good starting point to create whatever other actions you want to apply to apps in general.