I have tried your Python script but I think it has the same problem than the Gngeo Gui. When I press the key, no code is shown. Think that this is a modifier key to print an accent over a vowel, so I have to press any other key to obtain a code from the application (and the code is the one from the latest key pressed).