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

Us international keyboard: can't write á é í ó ú ñ #1311

Closed
ggsalas opened this issue Jan 16, 2019 · 10 comments
Closed

Us international keyboard: can't write á é í ó ú ñ #1311

ggsalas opened this issue Jan 16, 2019 · 10 comments

Comments

@ggsalas
Copy link

ggsalas commented Jan 16, 2019

Hi, I have configured my keyboard as US-international. With this configuration if I press ' and then a the result is á but on kitty is <00c3><00a1>. Similar issue I have to write ñ.

I think there is a problem with locale and macos Mojave. Maybe I can set manually the locales on kitty.

I have try to set a different locale on macos config:
image

If I select "Unite states" on my region, Kitty not display a locale error, but the issue persist:
image

This is my keyboard config
image

I have read #90 and #1233 but I haven't found a fix for my issue.

Also, on macos terminal is working well, but on Hyper-terminal I have same issue that I have with Kitty:
image

Thanks.

@kovidgoyal
Copy link
Owner

The way unicode input works on macOS is by pressing the option key and then another key to generate the accented text. You can enable that in kitty by setting macos_option_as_alt no in kitty.conf

@kovidgoyal
Copy link
Owner

I cannot replicate on my mojave machine with us keyboard layout and
macos_option_as_alt=no pressing option+n and then n gives me ñ

@kovidgoyal
Copy link
Owner

Oh never mind, I think I misunderstood the issue. You can type the character, it just shows up as unicode escapes in your shell. Run cat instead of a shell and you will see that kitty is sending the correct utf-8 bytes for the key presses (set the shell to cat in kitty.conf). As for why your shell is mis-behaving, you will need to ask your shell's developers. Switch to using a different shell and you should be fine.

As for setting locale, you need to do it system wide, in the macOS preferences for it to have any effect on kitty.

@ggsalas
Copy link
Author

ggsalas commented Jan 17, 2019

Hi @kovidgoyal as you say is a shell config that I need to add on ~/.zshrc file to fix that:

export LANG="en_US.UTF-8"

But I still having a difference between kitty and other terminals (or old version of kitty). If I use international keyboard I can create an accent mark with ' + a = á but at the same time if I press ' + s I get 's as expected, because the accent mark are only used on vocals (a,e,i,o,u).

That behavior is lost on kitty terminal. Is not a big issue, but is not great.

Thanks

@kovidgoyal
Copy link
Owner

I cannot reproduce, pressing option+` followed by s gives me s as expected.

@ggsalas
Copy link
Author

ggsalas commented Jan 17, 2019

The US international keyboard not requires to press option key, only 'a or 's

@kovidgoyal
Copy link
Owner

Or do you mean you want it to give you s not just plain s? Dont really see why, if you wanted to type s why would you press the option key in the first place?

@ggsalas
Copy link
Author

ggsalas commented Jan 17, 2019

to test this you need use this keyboard
image

@kovidgoyal
Copy link
Owner

The US international keyboard not requires to press option key, only 'a or 's

ah ok, I was using plain US keyboard.

@lucasalencar
Copy link

I was having a similar issue where the unicode characters were not showing at all. Instead it was rendering an underline in place.

image

Setting at my .zshrc export LANG="en_US.UTF-8" worked.
Without setting LANG and running kitty --version it returns the following warning:

$ kitty --version
[039 09:46:06.160191] Failed to set locale with LANG: en_BR.UTF-8
kitty 0.13.3 created by Kovid Goyal

Because my current locale is en_BR (BR because I am from Brazil), kitty couldn't find out the characters I guess.

I am using MacOS Mojave BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants