Bug 331368 - Stuck in US English
Summary: Stuck in US English
Status: RESOLVED FIXED
Alias: None
Product: ktouch
Classification: Applications
Component: general (show other bugs)
Version: 2.2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Gottfried
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 08:12 UTC by Damon Lynch
Modified: 2019-07-04 21:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 19.08.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damon Lynch 2014-02-21 08:12:34 UTC
I cannot figure out how to configure KTouch to give lessons in anything other than US English. Using "Configure Keyboard" I have specified the Tajik keyboard layout (tj) as the only option. I have also created a custom keyboard layout in the "Courses and Keyboard Layout Editor". Neither of these changes have any effect.

Some things that might be relevant: I am running KTouch in a Gnome environment. I am a native English speaker learning how to type in another language. I don't want to make the entire interface of my computer be that new language. Nonetheless, using the program systemsettings, I changed the language option to be Tajik. This has changed KTouch's interface, but still the only course  choice is US English.
Comment 1 Sebastian Gottfried 2014-02-21 08:22:10 UTC
KTouch matches courses to your active keyboard layout.

So the first step would be configuring your system to use the Tajik keyboard layout, at least temporary if you are training.

Since KTouch gives you still the US course, I don't think this is already the case. Try to use GNOME's system configuration utility to setup this. Usually you can configure more than one layout so you can the US and Tajik layout in tandem.

After this you should also create a course for the Tajik keyboard layout.
Comment 2 Andreas Cord-Landwehr 2014-02-21 09:01:59 UTC
@Sebastian: might it be possible to specify in the user profile settings which language should be used for training? That would make the choice much more obvious in my opinion
Comment 3 Sebastian Gottfried 2014-02-21 09:10:51 UTC
The problem is KTouch isn't able to interpret key codes on it's own. It relies on the operating system to handle text input. So if you want to train on language X first thing you have to do is to configure your system to use the corresponding keyboard layout. Since KTouch is platform independent it's bit too difficult for application to take care of the system configuration itself.

So I chose the the other way around, let the user pick a keyboard layout, to the right thing in the application.

This has the advantage that 90% of all users get the course they want without any configuration at all. The common case is still people who want to train on *their* keyboard layout.

And, at least there is now way, that the application and the operating system can get out of sync wrt to the keyboard layout. Like in the old KTouch 1.x days, there the user has to configure KTouch and the operating system independently.
Comment 4 Damon Lynch 2014-02-21 09:37:18 UTC
Thanks for responding so quickly. The UI gives no indication that it is using the system's keyboard layout that happens to be selected at the time the application starts. In my case, I had no idea that was the case. 

Now that I select the Tajik keyboard in Gnome before starting KTouch, the default is no longer US English. But to have the possibility of using a course, I had to change my user-generated keyboard layout name from tg (which is what Gnome calls it) to tj. It's confusing to me why it might be so, but when I did that suddenly the initial course I had created (based on Russian) appeared for the first time. 

Now I'm wondering how to auto-generate a course. I see some that come with the program are auto-generated, but I can't see how to do that based on the keyboard layout I have entered.
Comment 5 Sebastian Gottfried 2014-02-21 09:46:40 UTC
Actually you don't have set the keyboad layout before you launch KTouch, the application will adapt immediately. 

There is no way anymore to auto-generate courses. The previous maintainer has developed a script for this. If you look at the quality of the auto-generated courses KTouch still uses for the lack of better alternatives, you now why I haven't ported this script to the new course file format.
Comment 6 Damon Lynch 2014-02-21 09:50:54 UTC
Nothing happens in KTouch when I change the keyboard layout in Gnome and KTouch is already running. Any change takes effect only when I restart the program.
Comment 7 Sebastian Gottfried 2014-02-21 09:57:03 UTC
That is interesting. It does work for me under KDE. I have to investigate what GNOME does different.
Comment 8 Andreas Cord-Landwehr 2014-02-21 10:01:11 UTC
Regarding the user feedback about how the current training language is selected, is there a more prominent point where to tell this?
E.g. in the user profiles, KTouch could say: "Training Language: German (based on selected keyboard layout)", maybe even with an option next to it to change the keyboard layout?
Comment 9 Sebastian Gottfried 2014-02-21 10:49:21 UTC
The profile form isn't the right place for this. You can train on as many layouts as you want with single profile.

Also bear in mind that the primary target audience are pre-school kids. If possible I want to keep such technical terminology like "keyboard layout" out of the main user interface.

For the mean time I write a how-to: http://userbase.kde.org/index.php?title=User:Sebastian/KTouch/HowTo/DifferentKeyboardLayout (Still under construction)
Comment 10 Damon Lynch 2014-02-21 10:54:41 UTC
If I understand correctly, to be able to use KTouch to learn how to type in Tajik, I need to write  a custom course using the same keyboard layout I am supposed to be learning how to use?
Comment 11 Sebastian Gottfried 2014-02-21 11:19:23 UTC
That's true. Unfortunately KTouch has no Tajik course in its collection. You happen to be the first wanting to learn the Tajik keyboard layout with KTouch.

You can use one of the old scripts [0] to generate lessons and paste them in the course editor, but I don't think you will be happy with the results.

Creating courses isn't that hard, only rather time-consuming, have look at the documentation to see how it works and what makes a course a good one.

Also you don't have to create all the lessons in one go. Just create few (e.g covering the home row) and train them. Then create a few more. Repeat.

If you actually do this, I would be interested to include the results in KTouch so other users can benefit from your work as well.

[0]: https://projects.kde.org/projects/kde/kdeedu/ktouch/repository/show/extras/training-gen?rev=KDE%2F4.9
Comment 12 Andreas Cord-Landwehr 2014-02-21 11:41:17 UTC
I see your point about making the interface easy to understand for non technical people. But nevertheless I think there should be a "not to hard to discover" way to change the training language (even if it is effectively changing the keyboard layout).
Comment 13 Sebastian Gottfried 2014-02-21 11:55:14 UTC
> even if it is effectively changing the keyboard layout
And that's the problem. I could maybe do that if KTouch was a Linux/X11-only application. Even that this is difficult to do, the API for that isn't exactly non-trivial. 

But it isn't. I received a lot of pressure to make the application also available for Windows. I don't see a reasonable way to make a generic solution for both platforms.

I am really open for suggestion how to resolve this issue, but I don't see a better solution than providing a shortcut to the relevant configuration dialog. 

The discoverability of this link should be also okay, it's one of total six entries in the single menu the application has.
Comment 14 Andrew Crouthamel 2018-11-11 04:23:41 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Andrew Crouthamel 2018-11-21 04:21:48 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Sebastian Gottfried 2019-07-04 21:06:16 UTC
Git commit 106d3bbe772568f82d758da7c74d5089fdb55120 by Sebastian Gottfried.
Committed on 04/07/2019 at 21:02.
Pushed by gottfried into branch 'master'.

Merge Branch 'homescreen-ng'

This replaces the home screen to solve KTouch's most egrigous problem:
content discovery. Previously, KTouch displayed only the courses for the
the currently active keyboard layout. If KTouch has no course for this
layout, the windows was basically empty showing only the option to
create a new custom lesson. Being forced to set up first the correct
keyboad layout for your computer has proven to be unintuitive. The
new home screen shows all available training content at a glance.

Improvements in more detail:

 * There is a new sidebar allowing the user to select from all available
   keyboard layouts with their associated courses. Users still have to
   set up the correct layout matching the selected course, though, and
   they are told how to do so with an passive notification. (BUG 395264,
   BUG 385425, BUG 331368, BUG 398773, BUG 391968, BUG 364011)

 * Training statistics are now available from the home screen for each
   lesson. Previously they have been only shown on the score screen
   after completing a lesson. (BUG 401359, BUG 317174)

 * The lesson selector has been redesign to show previews of each lesson
   as selectable items in a grid view.

  * Tab focus works now as expected and allows training without using the
    mouse at all. (BUG 316058)

  * Support for HiDPI rendering has been added.

  * KTouch now uses Qt Quick Controls 2 instead of version 1.
Related: bug 385425, bug 401359, bug 398773, bug 391968, bug 364011, bug 316058, bug 395264, bug 317174
FIXED-IN: 19.08.0
Differential Revision: https://phabricator.kde.org/D20953

M  +3    -4    CMakeLists.txt
M  +7    -2    src/CMakeLists.txt
M  +2    -2    src/declarativeitems/lessonpainter.h
M  +13   -12   src/qml/homescreen/ProfileDetailsItem.qml
M  +4    -4    src/qml/keyboard/KeyItem.qml
M  +1    -1    src/qml/keyboard/Keyboard.qml
M  +2    -2    src/qml/keyboard/KeyboardLayoutEditor.qml
M  +94   -208  src/qml/scorescreen/ScoreScreen.qml
M  +3    -3    src/qml/trainingscreen/TrainingWidget.qml

https://commits.kde.org/ktouch/106d3bbe772568f82d758da7c74d5089fdb55120