Android Question Detect user keyboard key presses

Hi guys

how i can detect user keyboard key presses outside my app ?
My application can also be in foreground mode if needed
This is very important and im tired please help me?

Thanks all
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…