Why do you want to capture all the key events? If it’s for implementing key shortcuts, you’d be much better off using the ApplicationCommand classes.
Or you could implement the keyPressed callback - the top level component will have any unwanted key events passed up to it if they’re not claimed by other components.