Eryk Sun <eryk...@gmail.com> added the comment:

I think the following wiki article still applies even though it was first 
discussed in 2003: "KeySyms on platforms other than X11" [1]. In particular, it 
states the following:

    On Windows and MacOS X Tk only supports keysyms correctly for a 
    limited number of keys, namely special keys, and the ranges of ASCII
    and ISO-8859-1 (support of ISO-8859-1 on MacOS X since 8.4.2).

I can confirm the result for the Russian keyboard mapping. The value of keysym 
is "??", even when combined with the control key. 

x:
        char: 'ч', ord: 0447, code: 0058, sym: '??', num: 0447.
Ctrl+x:
        char: '\x18', ord: 0018, code: 0058, sym: '??', num: 0447.
c:
        char: 'с', ord: 0441, code: 0043, sym: '??', num: 0441.
Ctrl+c:
        char: '\x03', ord: 0003, code: 0043, sym: '??', num: 0441.
v:
        char: 'м', ord: 043c, code: 0056, sym: '??', num: 043c.
Crl+v:
        char: '\x16', ord: 0016, code: 0056, sym: '??', num: 043c.

(I modified the keyevent function from msg408400 to use hexadecimal and repr 
formatting.)

I checked Ubuntu 20.04 with a Russian keyboard layout. It seems in Linux the 
combination with the control key changes keysym and keysym_num to use the ASCII 
characters "x", "c", and "v": 

x:
        char: 'ч', ord: 0447, code: 0035, sym: 'Cyrillic_che', num: 06de.
Ctrl+x:
        char: '\x18', ord: 0018, code: 0035, sym: 'x', num: 0078.
c:
        char: 'с', ord: 0441, code: 0036, sym: 'Cyrillic_es', num: 06d3.
Ctrl+c:
        char: '\x03', ord: 0003, code: 0036, sym: 'c', num: 0063.
v:
        char: 'м', ord: 043c, code: 0037, sym: 'Cyrillic_em', num: 06cd.
Crl+v:
        char: '\x16', ord: 0016, code: 0037, sym: 'v', num: 0076.

---
[1] https://wiki.tcl-lang.org/page/KeySyms+on+platforms+other+than+X11

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46052>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to