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

Non-US keyboard layouts #89

Open
Gaarco opened this issue Jun 26, 2020 · 4 comments
Open

Non-US keyboard layouts #89

Gaarco opened this issue Jun 26, 2020 · 4 comments

Comments

@Gaarco
Copy link

Gaarco commented Jun 26, 2020

rx now works only with US layout and it was hard to figure out (I didn't see anything related on the website), may be possible to have support for different keyboard layouts?

@cloudhead
Copy link
Owner

See #88

@fnatte
Copy link

fnatte commented Jul 26, 2020

I use a Swedish layout and had problems with v0.4.0. The master-branch works for me, so I guess #88 or some other commit solved this issue.

EDIT:
Actually, I can only get a few characters working, such as ':' and '?'. I still struggle with '/', ']' etc. Trying to figure out why. The logs show ReceivedCharacter('/', ModifiersState { shift: true, ctrl: false, alt: false, meta: false }) but it seems like it can't find the mapping to the command.

@fnatte
Copy link

fnatte commented Jul 26, 2020

I found that there's a difference between Input::key and Input::Character bindings. While #88 did change :mode command to a character binding, it did not change the other bindings. I solved this my in init.rx, like:

map         '/'             :zoom 1.0                                 --  Reset active view zoom
map/normal  '='             :brush/toggle perfect                     --  Pixel-perfect brush
map/normal  ']'             :brush/size +                             --  Increase brush size
map/normal  '['             :brush/size -                             --  Decrease brush size
map/visual  '\'             :selection/expand

That is, simply wrap problematic bindings with '.

@cloudhead
Copy link
Owner

Yeah, that's the way to go for now, since character bindings are not as powerful as key bindings (they don't support release events), I can't switch them all over.

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