Functional keys programming

I have created two GUI screens without using PhAB.
I want Program the Functionals keys such that If F1 is pressed ,first GUI screen should be veiwed ,if F2 is pressed sceond GUI screen should be veiwed. for F3 the system should shutdown.

can any body help us in this matter?

You need a Raw widget to detect the keyboard event(s). Deciding what to view can be done in a number of ways. One would be to change the size of the unviewed screen to 1,1. Another would be to change which window is on top.