Definitely not on Linux. Global hotkeys are managed by the compositor and can't be spied on by applications. There's also no API no read keystrokes from external apps. This is actually a security feature.
AFAIK, on iOS, the app is actually sent an event by the OS when a screenshot is captured.