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

Bind_tab issue with french keyboard #198

Closed
bacardi55 opened this issue Feb 19, 2021 · 6 comments
Closed

Bind_tab issue with french keyboard #198

bacardi55 opened this issue Feb 19, 2021 · 6 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@bacardi55
Copy link

bacardi55 commented Feb 19, 2021

Hi! Thanks for the great work on Amfora!

I downloaded the latest version (1.8.0) today and setup the bind_tab like this:

bind_tab1 = "&"
bind_tab2 = "é"
bind_tab3 = '"'
bind_tab4 = "'"
bind_tab5 = "("
bind_tab6 = "-"
bind_tab7 = "è"
bind_tab8 = "_"
bind_tab9 = "ç"
bind_tab0 = "à"

This is the default values for the number keywords without shift (opposed to US where without shift you have the numbers).

The bind 2 (é), 7 (è), 9 (ç) and 0 (à) do not work, the other do.

I don't have go installed nor go skilled (yet at least :)), but let me know if you need more details.

@makew0rld
Copy link
Owner

Thanks for reporting, I'll look into this. It seems like it's the non-ASCII characters that are causing problems. Could be an upstream issue in tcell with handling those characters, or could be the way we are.

cc @phaedrus-jaf since you added keybindings you may be interested in looking into this. No worries if not.

@makew0rld makew0rld added bug Something isn't working question Further information is requested labels Feb 20, 2021
@phaedrus-jaf
Copy link
Contributor

I'm going to bet it breaks with any UTF-8 character on any key bind (I'm American, my whole keymap fits in the 7-bit ASCII space). I will try and take a crack at reproducing this this weekend (shouldn't be too hard, I can definitely get my terminal to send higher order characters as keypresses).

@bacardi55 do you know what character encoding your terminal is using? Is it UTF-8 or is it one of the older ISO 8859 encodings? (Running echo $LANG should get you the answer)

@makeworld-the-better-one feel free to assign this to me. I'm happy to get it working.

@bacardi55
Copy link
Author

Thanks for looking at this!
I'm indeed using utf-8:

╰─➤  echo "$LANG"
fr_FR.UTF-8

@phaedrus-jaf
Copy link
Contributor

This was my bad. I forgot that len(string) returns the number of bytes not the number of runes. Just needed to change one line, and it should work now. Pull request here: #200

@makew0rld
Copy link
Owner

This is fixed by #200, merged in commit 809d7fd. @bacardi55 feel free to test from master, there's instructions on the README if you're up for it.

@bacardi55
Copy link
Author

I just tested the master branch and it works.

Thanks both for quick reactivity!
And keep the awesome work that is amfora (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants