Tkinter will not work in the version of python that is embedded in Rhino.
Can you tell us what it is you are trying to do? Monitoring keyboard events (other than escape key) is an extremely rare thing to do in Rhino commands/scripts and there may be a different “technique” to do what you are trying to do.