ppl how can i manipulate my app from eg standby?

4eg:
if appswitch.application_list(0) in u'Standby mode' and '''i press shift key''':
appuifw.note(u'you pressed shift','info')


pls inform me abt this

tq,
wook