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

Certain keys don't work for swedish (/non-english?) keyboard settings #168

Open
AhmadGhaemi opened this issue Apr 5, 2023 · 14 comments
Open

Comments

@AhmadGhaemi
Copy link

Screen Recording 2023-03-31 at 14 46 04 mov

See the gif. I use cmd+j as a shortcut for normal mode in the gif. English keyboard settings work fine, but not the Swedish ones. There is no key for '/' on a swedish keyboard; instead the combo shift+7 is used. But pressing shift+7 doesn't take me to search mode, neither does pressing the swedish equivalence of the english '/' -button (which is the '-' button for us). Have not checked if this counts for other keyboard languages as well but I would assume so.

@godbout
Copy link
Owner

godbout commented Apr 7, 2023

Have not checked if this counts for other keyboard languages as well but I would assume so.

i've tested with a French layout and there's the issue too. so definitely something i need to investigate. thanks for reporting!

@godbout
Copy link
Owner

godbout commented Apr 15, 2023

things have been a bit slow lately coz i'm moving to a new place beginning of May. workstation will be back then and work will be back full time on kV then!

@godbout
Copy link
Owner

godbout commented Jun 13, 2023

gonna start checking this now, for kV54. sorry for the late!

@AhmadGhaemi
Copy link
Author

Cool! No worries

@godbout
Copy link
Owner

godbout commented Aug 1, 2023

There is no key for '/' on a swedish keyboard; instead the combo shift+7 is used. But pressing shift+7 doesn't take me to search mode, neither does pressing the swedish equivalence of the english '/' -button (which is the '-' button for us).

digging into this now. but i'm getting confused because it seems that each language would have to be handled independently? to generate a / on a French keyboard it's shift + .. what about the Swedish one? i don't understand your shift + 7 AND -.

@godbout
Copy link
Owner

godbout commented Aug 1, 2023

There is no key for '/' on a swedish keyboard; instead the combo shift+7 is used. But pressing shift+7 doesn't take me to search mode, neither does pressing the swedish equivalence of the english '/' -button (which is the '-' button for us).

digging into this now. but i'm getting confused because it seems that each language would have to be handled independently? to generate a / on a French keyboard it's shift + .. what about the Swedish one? i don't understand your shift + 7 AND -.

of course i got it as soon as i posted.
humm. confusing to me. not sure how i'm gonna be able to integrate that properly. i could do exceptions for a few languages but that's not gonna be sustainable.

@AhmadGhaemi
Copy link
Author

Yeah I meant that we have a --key where the U.S. keyboard has its /-key.

Sorry, no idea how to implement this. I haven't worked with stuff like this so I have no idea how it works. Are there any adapters, like plugins that can be used? idk.

@godbout
Copy link
Owner

godbout commented Aug 3, 2023

Yeah I meant that we have a --key where the U.S. keyboard has its /-key.

yeah got it after using my brain a little.

Sorry, no idea how to implement this. I haven't worked with stuff like this so I have no idea how it works. Are there any adapters, like plugins that can be used? idk.

i'm using something that already map proper key codes depending on the keyboard layout (https://github.com/Clipy/Sauce). now the issue is that a same key combination may mean different things in different layouts. like for the Swedish keyboard, the / is shift 7. but on a French keyboard shift 7 is gonna mean something else. and same thing may happen on different layouts. the mapper i'm using helps well for letters, like if you have a French software layout on a English hardware keyboard, pressing the q will do send a a, which is what we want. the issue now for me is translating all the things that are not letters it seems, according to the different language layouts. seems like a mega pain 😂️

thinking out loud here. not sure yet where this goes. but thinking and typing it helps my process.

@AhmadGhaemi
Copy link
Author

Leave an issue on Sauce 😄 nah, let me know if you figure something out

@godbout
Copy link
Owner

godbout commented Aug 4, 2023

Leave an issue on Sauce 😄 nah, let me know if you figure something out

i don't think it's a Sauce issue. Sauce is not done for that. but yeah will def investigate and let you know.
btw except / and ?, any other keys that don't work properly on your Swedish board?

@godbout
Copy link
Owner

godbout commented Aug 13, 2023

so after deeper investigation, if i get this correctly, i need to revamp my whole key combination system. it was done the way it is currently because it seems the opposite issue was found early on. see: #12

so i'm gonna have to test with different software layout but also different hardware combinations. gonna be a big one.

@godbout
Copy link
Owner

godbout commented Aug 14, 2023

btw temporarily you could remap the keys through Karabiner-Elements, when kV is in Normal Mode (or more). kV sends macOS Distributed Notifications (https://github.com/godbout/kindaVim.docs#apis) when it changes mode. you can catch them and act accordingly. that's what's supposed to be used rather than kV building a native remapping tool. (in your case tho, it's more of a "bug" so i should take care of this natively.)

@AhmadGhaemi
Copy link
Author

Leave an issue on Sauce 😄 nah, let me know if you figure something out

i don't think it's a Sauce issue. Sauce is not done for that. but yeah will def investigate and let you know. btw except / and ?, any other keys that don't work properly on your Swedish board?

$ too unfortunately.

Are . and q supposed to work for repeating and macros respectively? they don't even when I have the US keyboard on.

@godbout
Copy link
Owner

godbout commented Aug 20, 2023

$ too unfortunately.

👌️ will see what i can do.

Are . and q supposed to work for repeating and macros respectively? they don't even when I have the US keyboard on.

macros are not implemented. the list of moves implemented is here: https://github.com/godbout/kindaVim.docs#current-vim-implementation

you can also see the ones that are currently repeatable. if you have move that are not repeated, you can request them here: #138

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

2 participants