Hi all, but mainly Tim Golden:\nTim, I am using your wonderful message loop for keyboard input, the\none on your site that you pointed me to a few months ago. It has been\nworking perfectly as long as I had only one dictionary of keys mapping\nto one dictionary of functions, but now I want two of each. My program\nhas different modes, which may have varying keystrokes, and I also\nhave some global keystrokes which are the same across all modes, like\nexiting or switching modes. I cannot figure out how to make the\nmessage loop look in two dictionaries at onc. I tried using an if,\nsaying that if action_to_take was not set in the mode-specific\ndictionary then look at the global dictionary, but it is like it is\nnever looking in the global dictionary at all. I get no syntax errors\nor problems when running the program, so it has to be something in my\nlogic. Go to\n[URL]http://www.gateway2somewhere.com/sw/main.pyw[/URL]\nto see what I mean; the problem code is near the very bottom of the\nfile. Thanks for any suggestions. Oh, please note that I indent one\nspace per indentation level.