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

Fix keyboards detection and do full swicth on input method #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mnivet
Copy link

@mnivet mnivet commented May 27, 2020

I don't know if you expect to really maintain your copy
But it seems to be the most recent one among all the forks that I've found, and none as really tacle the main issue of that program which is that keyboard detection and switch is only based on languages and not really on input methods (which are a language + a keyboard layout)

this should fix:
agabor/RightKeyboard#1
agabor/RightKeyboard#2
agabor/RightKeyboard#4
https://www.codeproject.com/Articles/20994/Using-multiple-keyboards-with-different-layouts-on?msg=5710252#xx5710252xx
https://www.codeproject.com/Articles/20994/Using-multiple-keyboards-with-different-layouts-on?msg=5646681#xx5646681xx
and probably others…

Also note that some dev have already tried to do that fix, but I looked at it and in fact it just write the id of the keyboard but not the name:
https://github.com/glmnet/RightKeyboard

Interpretation of input local identifier returned by GetKeyboardLayout was really partial since only the language part was interpreted.
Now the language part is map with names provided by the system through CultureInfo (no need of a Layout.txt mapping file for that).
And the keyboard part is read with more system call and a call to the registry.

So now their is no more limitations on the number of keyboards we can setup in a language, and can switch between multiple keyboards in a same language or in different languages.
…on of something that could be testable.

Currently looking why sometimes the popup comes back while nothing is expected, but no clue found yet.
@Jonas-Metzger
Copy link

Thanks for this update! Is it possible to tell the tool to only switch the (layout, language) pair to the respective default if a keypress comes from a different keyboard than the last keypress? This would allow me to manually switch languages on a given keyboard

@mnivet
Copy link
Author

mnivet commented Nov 9, 2020

@Jonas-Metzger: Not sure to really understand your question so I will reformulate the facts:
The tool allow to switch the (layout, language) pair each time it detect that a keypress (any key) comes from a different keyboard.
The first time a keypress is detected from a new keyboard it display a screen so you can assign a (layout, language) pair to that keyboard
The goal is to switch automatically

On the other hand if you want to switch manually the (layout, language) pair on a keyboard you can use the windows native shortcut which is Win+Space. Maintain the window key and repeat space key to scroll up to the desired layout.

@Jonas-Metzger
Copy link

Jonas-Metzger commented Nov 11, 2020

@mnivet Thanks a lot for your response! Here's my problem: I would like to always have the tool running, so whenever I switch keyboards it automatically switches to a respective default (layout, language) pair. But while the tool is running, I would like to have the option to manually switch the (layout, language) pair via Win+Space, without having my choice overriden on the next key press, if I'm still on the same keyboard. My feature suggestion for RightKeyboard would be to only switch the (layout, language) pair to the respective default when when it registers a key press coming from a different keyboard than the last key press. That way, RightKeyboard would also work for users who need to use multiple languages per layout. Does that make sense?

@mnivet
Copy link
Author

mnivet commented Nov 12, 2020

@Jonas-Metzger ok I understand now and it's probably do-able
I just saw that you already open an issue that describe that: #3
So I will try and give an answer in the issue instead of in that PR which is not linked to that request.

@chuakc92
Copy link

@mnivet Do you mind publishing an exe?

@mnivet
Copy link
Author

mnivet commented Mar 11, 2022

@chuakc92 on this repo I can‘t.
But you can found one that match this PR on my fork here: https://github.com/mnivet/RightKeyboard/releases

I should admit that there is still some issues, but I won't try to fix them because I don't use the tool anymore.
It was useful for me for a time, but now, I've totally switch to a new layout and don't come back to the one I was used to before.

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

Successfully merging this pull request may close these issues.

3 participants