-
Notifications
You must be signed in to change notification settings - Fork 134
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
Layout toggling does not work correctly. #39
Comments
Thanks for the detailed report. You even recorded a video, that helps a lot. Can you please tell if your keyboard has a hardware switch to toggle between different layouts? I think I've seen such a behavior before. For a typical, dumb keyboard it works as follows.
In keybr we have the emulation option. When enabled, it ignores the character codes reported by the OS and uses an internal table to map physical key locations to character codes. This option removes the need to switch the keyboard layout in your OS. Now, there are smart keyboards that have customizable profiles and hardware switches. They work differently.
This is a clever trick which works because the absolute vast majority of applications don't care about physical key locations. However, keybr is an exception. If you really have such a keyboard, I recommend switching it to the Qwerty mode and configure layouts in the OS instead. That being said, I think I can add an option to keybr to undo the hardware emulation that I described above. |
The keyboard I have is indeed "smart" and it's layout it set to Dvorak. The nice thing about smart boards, is that I can just switch out a physical keyboard or have two different keyboards attached and have two separate layouts available at the same time.
I thought that's what the "Emulate Layout" toggle was for in settings, but it seems like it has no effect. |
Hmm, no. Unfortunately we don't go as far. The emulation option that we have in keybr assumes you use a typical, dump keyboard. It allows you to practice Dvorak/Colemak in an OS that was configured with any layout. But it cannot undo the hardware remapping like your keyboard does. To support your keyboard we need a new checkbox, smth like "My keyboard layout is configured in hardware". |
After giving it a second thought, maybe I should remove the existing emulation check box, the one that confused you, and simply keep the emulation option always on. It would be easier for the users, less options to tweak, and the application always works regardless of the OS settings. Then what's left is the new check box for the smart keyboards. Let me think about it. |
There is another reason why this would be a nice addition. Location based key reading only works for defined keyboard layouts, and would not work correctly with more exotic ones like Colemak DH, Azerty and others. |
same problem here, my keyboard is "smart" 😢 |
I noticed the same issue today. Only the highlight effect on the on-screen keyboard is affected and the actual lesson works fine. Notably, I am using a plain old dumb Logitech keyboard, nothing smart about it. So I do not think this issue has anything to do with "smart" keyboards. The new linked issue #113 has more details. |
I have this issue as well with a smart keyboard. I am happy to contribute a fix if it is the correct direction to go. I am a little confused why a separate toggle would be needed for "smart keyboards". It seems like there are two features that should be tied together here. The actual key registered in the lesson which is either the correct one advancing to the next character in the lesson or an incorrect one which does not advance and turns the current character in the lesson red. The other feature is the highlighting of the currently pressed key on the keyboard. I would think these features would track together based on whether the Emulate Layout checkbox is checked. If the emulate layout checkbox is checked: If the emulate layout checkbox is unchecked: If the emulate layout checkbox is unchecked: I see above a mention of a second checkbox for smart keyboards, but as far as I understand the intention of the emulate layout feature we should only need one checkbox. People with smart keyboards mapped to the same layout as the lesson's layout can unselect the checkbox. People using a standard layout dumb keyboard can use emulate layout. I am interested in contributing a patch for this, but because of the mention of a second checkbox needed I want to make sure I am not missing something about how this should work. |
Tried switching layout to colemak and noticed that some of the inputs are displayed in their QWERTY positions.
Here's input from QWERTY keyboard, on a Colemak layout, you can see that the keys are highlighted in order, even though E should have been highlighted on the home row.
Here is the Colemak keyboard with the "QWF" motion. You can see that instead of the F being highlighted in the top row, it's highlighted as a T (that's where the F is located at on the QWERTY layout.
![colemak, colemak](https://private-user-images.githubusercontent.com/15068255/273343981-61ca11f4-0434-4be2-b479-fd82d14aec3f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2NTA4ODcsIm5iZiI6MTcyMTY1MDU4NywicGF0aCI6Ii8xNTA2ODI1NS8yNzMzNDM5ODEtNjFjYTExZjQtMDQzNC00YmUyLWI0NzktZmQ4MmQxNGFlYzNmLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDEyMTYyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4ZTVlNTMwMjEzNTQxZDBkNWJiMTZmZGI5ZGFlZWE3NDI4ZDZkYzc0ZDJkZTk3MTA5NDExYjZiZmE0NTNmMTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Cg6cJLdfAW5FDCyKhItATSf3EKyPkmBewqnBv6_4z8w)
The text was updated successfully, but these errors were encountered: