You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strange character inserted when the app is called (₢) #195
Every time I call the app shortcut, a strange character (₢) is inserted in place of the text that is selected. Even if I do not select any text, the character is still being inserted. I don't know if this issue is specific to my PC or if there is an issue with the app. Currently, my shortcut is alt+', but I've already changed it to other shortcuts, and the character insertion persists.
It seems when we call the program, you copy the selected text, right? Also, when I hit AltGr + C, the ₢ appears. So maybe the shortcut that has been triggered is AltGr + C, then Ctrl + C to copy the selected text content. I've tested with the English (EN-US) keyboard, and the ₢ char is not inserted. So maybe the problem is related to my keyboard layout, which is PT-BR (Brazilian Portuguese). What do you think?
Apparently, the problem is the function press_ctrl_c() from Windows_and_Linux/WritingToolApp.py. Maybe you should add a sleep before press_ctrl_c() calling the function, and not just after, to guarantee that if the user uses alt as a shortcut, the alt_gr key is not pressed, considering that the alt_gr key is the same thing as pressing ctrl and alt together: alt_gr = ctrl + alt. So, possibly pynput is computing the alt_gr key because I use alt + ' as a shortcut, and the time between when I release the alt and when the ctrl + c simulation is triggered is too short. What do you think?
The issue persists in the Arabic layout. Initially, it was believed to affect both English and Arabic layouts; however, further testing revealed that the problem is isolated to non-English layouts. As a temporary workaround, the keyboard layout is being switched to English before using the shortcut. It is suspected that this issue is not specific to Brazilian Portuguese or Arabic, but rather affects all non-English layouts. #183
Thanks for the debussing and contribution, @BrunoGeorgevich. In 2 weeks from now, I'll be able to start work on Writing Tools again, and I'll take a deeper look at this!
Activity
BrunoGeorgevich commentedon May 21, 2025
It seems when we call the program, you copy the selected text, right? Also, when I hit AltGr + C, the
₢appears. So maybe the shortcut that has been triggered is AltGr + C, then Ctrl + C to copy the selected text content. I've tested with the English (EN-US) keyboard, and the₢char is not inserted. So maybe the problem is related to my keyboard layout, which is PT-BR (Brazilian Portuguese). What do you think?BrunoGeorgevich commentedon May 21, 2025
Apparently, the problem is the function
press_ctrl_c()fromWindows_and_Linux/WritingToolApp.py. Maybe you should add a sleep beforepress_ctrl_c()calling the function, and not just after, to guarantee that if the user usesaltas a shortcut, thealt_grkey is not pressed, considering that thealt_grkey is the same thing as pressingctrlandalttogether:alt_gr=ctrl+alt. So, possiblypynputis computing thealt_grkey because I usealt+'as a shortcut, and the time between when I release thealtand when thectrl + csimulation is triggered is too short. What do you think?AbdelrhmanElbaz commentedon Jun 9, 2025
The issue persists in the Arabic layout. Initially, it was believed to affect both English and Arabic layouts; however, further testing revealed that the problem is isolated to non-English layouts. As a temporary workaround, the keyboard layout is being switched to English before using the shortcut. It is suspected that this issue is not specific to Brazilian Portuguese or Arabic, but rather affects all non-English layouts.
#183
AbdelrhmanElbaz commentedon Jun 9, 2025
Could you please confirm whether the implemented solution has resolved the shortcut functionality issue across various non-English keyboard layouts?
5989341
theJayTea commentedon Oct 25, 2025
Thanks for the debussing and contribution, @BrunoGeorgevich. In 2 weeks from now, I'll be able to start work on Writing Tools again, and I'll take a deeper look at this!