Remote key press event

I recently implemented the image screensaver, but I’m facing an issue with handling key events. In some places, the key event is not detected, which requires me to add key event–related code on every page.Is it possible to capture remote key events globally (for example, in appInfo), so that we can manage them in a single place based on observation—instead of duplicating the logic across all pages?