Assuming that you are talking about an ordinary button (as supposed to a togglebutton) you can see all the methods it has here. As I read it there does not seem to be a function for what you are looking for, probably because these things are designed to be event driven.
In any case, I am wondering, can't you just get the events to set a boolean and have a look at that to see if it is pressed. Otherwise, maybe you can explain the rationale of why it is important to you to go around the events.
After realizing that I misread you original post and that you were talking about keyboard keys and not buttons I came up with the following suggestion.
When the program is run, it will make a gtk window and hide it, to make it possible to listen for keyboard events. Then it will listen for key released events from any of the keys that are in the shortcut that started the program (in this case ctrl-alt-u). If any of those keys are released, within the start up timeout, it will quit at the end of the timeout, otherwise, it will show the program.
If you want to delay the actual start of your program code to save resources, you can of course just use a dummy window and not load the real window or any of the underlying classes before in the
self.w = gtk.Window()
# Connect key released events to a function
# Hide the window, we actually need a gtk window to listen for
# keyboard events, so we just hide it
self.show_on_timeout = True
# Ask gtk to call the this function in 2 seconds
def on_key_press_event(self, widget, event):
""" Check if any of the key in the shortcut ctrl-alt-u is released """
# ctrl = 65507, alt = 65513, u = 117
keys = [65507, 65513, 117]
if event.keyval in keys:
self.show_on_timeout = False
""" Check if the program should be started or not """
# Returning false will destroy the timer, we only want to run this once
if __name__ == "__main__":
DELAYED_START = DelayedStart()