pysimplegui keyboard event returns question mark when pressing non-ascii character

458 views Asked by At

I'm using pysimplegui and trying to receive keyboard events from the window. I used the following initialization:

window = sg.Window('Window Title', layout, finalize=True, return_keyboard_events=True)

I receive keyboard events normally, but when a non-ascii key is pressed (like when using hebrew charachters), I only receive a question mark in the event.

1

There are 1 answers

0
Gonenc On

Sorry this is not exactly an answer but I cannot comment yet.

I am able to receive non-ascii characters in my console using Unicode combinations. I tried German, Turkish and Hebrew letters and they are all returned fine. Your problem could be due to operating system or IDE - (Win10 and PyCharm in my case). You could also try to encode/decode the event.