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

Add a check for the current system keyboard language/layout. #1406

Open
mr0sheatfish opened this issue Dec 7, 2024 · 6 comments
Open

Add a check for the current system keyboard language/layout. #1406

mr0sheatfish opened this issue Dec 7, 2024 · 6 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@mr0sheatfish
Copy link

Is your feature request related to a problem? Please describe.

Hope I didn't miss anything in the documentation.
The problem is that if you have more than two keyboard layouts, especially more than two input languages, you'll get a huge mess in the configuration file with switch states.

Describe the solution you'd like.

For example:

$some-key1 (switch 
			((input-layout us_altgr-intl)) $some-action1 break
			((input-layout us_dvorak)) $some-action2 break
			((input-layout fr_oss)) $some-action3 break
			)
$some-key2 (switch 
			((input-lang en_US)) $some-action1 break
			((input-lang fr_FR)) $some-action2 break
			)

Describe alternatives you've considered.

A lot of switch states.

(switch
	((input real $key1)) $dif-key1
	((input real $key2)) $dif-key2
	...
	((input real $keyN)) $dif-keyN
)

### Additional context

_No response_
@mr0sheatfish mr0sheatfish added the enhancement New feature or request label Dec 7, 2024
@jtroo
Copy link
Owner

jtroo commented Dec 7, 2024

Are you on Windows? If so does winiov2 solve your problem?

@mr0sheatfish
Copy link
Author

Yes, the machine I needed to install three input languages ​​on is Windows.
As long as I used two system input languages ​​and one layout for each of them, everything worked fine. However, I needed to add another input language and two layouts for it.
With the default layout (en_US Qwerty) everything works fine in the system, but if I install a third input language and switch between layouts, the position of the keys in one of the layouts no corresponds to their intended position.
Hmm... Maybe I should add a second layout for the language via Kanata, not via the system?

@jtroo
Copy link
Owner

jtroo commented Dec 8, 2024

Asking again, are you using winiov2 already? Does it change anything or not?

https://github.com/jtroo/kanata/releases/tag/v1.7.0

NOTE: The kanata_winIOv2.exe variant contains an experimental breaking change that fixes #152 where the Windows LLHOOK+SendInput version of kanata does not handle defsrc consistently compared to other versions and other operating systems. This variant will be of interest to you for any of the following reasons:

  • you are a new user
  • you are a cross-platform user
  • you use multiple language layouts within Windows and want kanata to handle the key positions consistently

@jtroo jtroo added the question Further information is requested label Dec 8, 2024
@mr0sheatfish
Copy link
Author

Sorry, I didn't read your message carefully.
I've always used only kanata_winIOv2.exe on Windows.

@jtroo
Copy link
Owner

jtroo commented Dec 8, 2024

I see. You're already using winiov2 so that's not the issue.

I'm not 100% sure what is incorrect when you state:

if I install a third input language and switch between layouts, the position of the keys in one of the layouts no corresponds to their intended position

If you remapped the meaning of keys in QWERTY away from QWERTY layout in Kanata, then the keycode transformation will persist regardless of QWERTY vs some other OS layout being used. Some workarounds for this are to use solely US intl layout or equivalent for multi language support and use different Kanata layers for different OS layouts.

@mr0sheatfish
Copy link
Author

Thanks.
I'll try.
The only thing is that then the input language indicator in the OS will not correspond to the actual input language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants