Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALT+183 gives ╖ (expected À) #1905

Open
AlexandreHT opened this issue Mar 18, 2024 · 7 comments
Open

ALT+183 gives ╖ (expected À) #1905

AlexandreHT opened this issue Mar 18, 2024 · 7 comments
Labels
bug Something isn't working windows Related to the Windows operating system

Comments

@AlexandreHT
Copy link

Describe the bug
When espanso runs, the special char for ALT+183 is (not expected). When espanso doesn't run, the special char for ALT+183 is À (as expected)
(cf. #988 (comment))

To Reproduce
Steps to reproduce the behavior:
1.type ALT + 183

Expected behavior
Special char À

Screenshots
NA

Logs

10:53:04 [daemon(19716)] [INFO] reading packages from: "C:\\Users\\[redacted]\\AppData\\Roaming\\espanso\\match\\packages"
10:53:04 [daemon(19716)] [INFO] using runtime dir: "C:\\Users\\[redacted]\\AppData\\Local\\espanso"
10:53:04 [daemon(19716)] [INFO] system info: Windows v10 (19045) - kernel: 19045
10:53:04 [daemon(19716)] [INFO] watching for changes in path: "C:\\Users\\[redacted]\\AppData\\Roaming\\espanso"
10:53:04 [daemon(19716)] [INFO] espanso version: 2.2.1
10:53:04 [daemon(19716)] [INFO] spawning the worker process...
10:53:04 [daemon(19716)] [INFO] binded to named pipe: \\.\pipe\espansodaemonv2
10:53:04 [worker(4592)] [INFO] reading configs from: "C:\\Users\\[redacted]\\AppData\\Roaming\\espanso"
10:53:04 [worker(4592)] [INFO] reading packages from: "C:\\Users\\[redacted]\\AppData\\Roaming\\espanso\\match\\packages"
10:53:04 [worker(4592)] [INFO] using runtime dir: "C:\\Users\\[redacted]\\AppData\\Local\\espanso"
10:53:04 [worker(4592)] [INFO] system info: Windows v10 (19045) - kernel: 19045
10:53:04 [worker(4592)] [INFO] binded to named pipe: \\.\pipe\espansoworkerv2
10:53:04 [worker(4592)] [INFO] monitoring the status of the daemon process
10:53:04 [worker(4592)] [INFO] using Win32AppInfoProvider
10:53:04 [worker(4592)] [INFO] using Win32Source
10:53:04 [worker(4592)] [INFO] using Win32Injector
10:53:04 [worker(4592)] [INFO] using Win32Clipboard 

Setup information

  • OS: Windows 10 - 22H2 (build 19045.4046)
  • Version: espanso 2.2.1
@AlexandreHT AlexandreHT added the bug Something isn't working label Mar 18, 2024
@smeech
Copy link
Collaborator

smeech commented Mar 18, 2024

Are you using the emulate_alt_codes option?

@smeech smeech added the windows Related to the Windows operating system label Mar 18, 2024
@smeech
Copy link
Collaborator

smeech commented Mar 18, 2024

According to https://www.alt-codes.net/ and other sources, ALT-183 is "╖". "À" is ALT-0192. Does that work for you?
I see you've been reporting this problem for a while!

@AlexandreHT
Copy link
Author

Yes, emulate_alt_codes is activated (ALT-144 give É as expected)
ALT-0192 gives À but it's only a workaround, since the standard Windows shortcut for À is ALT+183 on my French edition of W10. As I was saying in #988 (comment), it looks like espanso implements code page CP437 whereas French windows uses CP1252. Would it be possible to handle this as a parameter?

@morgan-dgk
Copy link
Collaborator

@AlexandreHT, I am not at all familar with Windows input event handling so someone else may be able to chime in with more experience. That said, it looks like Espanso uses GetKeyboardLayout on windows to get the input locale identifier. From the linked page, it appears that this is different to the keyboard layout id. I wonder if this is the source of the bug?

@smeech
Copy link
Collaborator

smeech commented Mar 18, 2024

It appears to be hard-coded here, but it looks as though there is provision for CP1252.
One for the devs.

@morgan-dgk
Copy link
Collaborator

Nice find smeech.

Based on this Windows alt-codes table, it would seem your version of windows is using CP850. It looks like the alt-code synthesizer linked above should handle both CP1252 and CP437.

@Braulios1A
Copy link

According to smeech, solution is in "alt_code_synthesizer.rs", could be great define an option menu to select the right code page for each country or region. In my case ALT+155 should be ø and ALT+157 Ø for example. With espanso available return ¢ and ¥.

For any reason I don't know, only in microsoft word works OK with my region alt codes in all other softwares work with espanso alt codes include microsoft excel, powerpoint, outlook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Related to the Windows operating system
Projects
None yet
Development

No branches or pull requests

4 participants