Bug 339722

Summary: ktouch can't start a built-in course
Product: [Applications] ktouch Reporter: James Ruan <ruanbeihong>
Component: generalAssignee: Sebastian Gottfried <sebastian.gottfried>
Status: RESOLVED NOT A BUG    
Severity: major    
Priority: NOR    
Version: 2.3.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The keyboard layout setting
Keyboard Layout Settings

Description James Ruan 2014-10-06 08:11:27 UTC
I want to practice Dvorak layout in Ktouch. So I installed it by installing the kdeedu package.
The first time open prompts me with a dialog to create new user profile and proficiency.
I choose the experienced one. And then I can only access to Custom Lessons.
No other button lead to use of built-in course. I tried to create a new user profile and selected the unlocked one, and still no access to the built-in course.
Then I check the manual to see if I missed something. According to my understanding the course selection should be right there after successfully create a new user profile.

Then I try to remove the profiles.db in ~/.kde/share/apps/ktouch/ and then start the Ktouch in Konsole. All happened are just as described above.




Reproducible: Always


Actual Results:  
New user can't start any built-in course, only custom lesson is available.

Expected Results:  
Ktouch should let new user select a built-in course.
Ktouch should let there be ways to access to built-in course.

 The info in Konsole is pasted below:

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/ruan/.config/fontconfig/fonts.conf manually
file:///usr/share/kde4/apps/ktouch/qml/LessonSelectorBase.qml:44:9: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column
file:///usr/share/kde4/apps/ktouch/qml/LessonSelectorBase.qml:44:9: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column
file:///usr/lib/kde4/imports/org/kde/plasma/components/Button.qml:194:5: QML Row: Possible anchor loop detected on fill.
file:///usr/lib/kde4/imports/org/kde/plasma/components/Button.qml:194:5: QML Row: Possible anchor loop detected on fill.
file:///usr/share/kde4/apps/ktouch/qml/TrainingScreenMenuOverlay.qml:91:13: QML Button: Binding loop detected for property "minimumWidth"
file:///usr/share/kde4/apps/ktouch/qml/TrainingScreenMenuOverlay.qml:91:13: QML Button: Binding loop detected for property "minimumWidth"
file:///usr/share/kde4/apps/ktouch/qml/TrainingScreenMenuOverlay.qml:91:13: QML Button: Binding loop detected for property "minimumWidth"
file:///usr/share/kde4/apps/ktouch/qml/TrainingScreenMenuOverlay.qml:91:13: QML Button: Binding loop detected for property "minimumWidth"
file:///usr/lib/kde4/imports/org/kde/plasma/components/Button.qml:194:5: QML Row: Possible anchor loop detected on fill.
file:///usr/lib/kde4/imports/org/kde/plasma/components/Button.qml:194:5: QML Row: Possible anchor loop detected on fill.
file:///usr/share/kde4/apps/ktouch/qml/DetailedRadioButton.qml:42:9: QML Text: Binding loop detected for property "width"
file:///usr/share/kde4/apps/ktouch/qml/KeyItem.qml:233: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyItem.qml:235: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyItem.qml:202: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyLabel.qml:72: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyLabel.qml:72: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyLabel.qml:72: TypeError: Result of expression 'referenceKey' [null] is not an object.
file:///usr/share/kde4/apps/ktouch/qml/KeyLabel.qml:72: TypeError: Result of expression 'referenceKey' [null] is not an object.
ktouch(4423)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:

ktouch -v shows:

Qt: 4.8.6
KDE Development Platform: 4.14.1
Typewriting Trainer: 2.3.0
Comment 1 Sebastian Gottfried 2014-10-13 08:59:37 UTC
KTouch can't configure your keyboard layout. That's a technical limitation.

You see your custom lessons because KTouch has no courses for your normal keyboard layout.

So the first thing you have to do to train on Dvorak is to configure your system to use this keyboard layout. If you use the KDE workspace, there is shortcut to the relevant system settings module in the  tools menu. If not, use the settings tools of your workspace.

If you have configured your system to use the correct keyboard layout, KTouch will offer the relevant courses instantly. Be aware that there are many different Dvorak versions. KTouch has courses for the US, the German and Spanish Dvorak version.

Feel free to reopen the bug if there is an actual problem.
Comment 2 James Ruan 2014-10-13 13:13:23 UTC
Created attachment 89113 [details]
The keyboard layout setting
Comment 3 James Ruan 2014-10-13 13:19:21 UTC
I'm not doing a lot setting about keyboard layout. Only add a switchable Dvorak Layout as showed in the attached PNG file.

I'm quite new about Dvorak and I want to practice it before really invest into a real hardware. So is there any work around that I can practice Dvorak Layout without a real Dvorak Keyboard?
Comment 4 Sebastian Gottfried 2014-10-13 13:24:49 UTC
Looks reasonable. What is your *current* keyboard layout? This not visible in your screenshot.

In the same configuration module there is checkbox to activate a keyboard layout switcher in system tray. Use this to switch between layouts on the fly.

Chinese isn't supported by KTouch, make sure to activate the Dvorak layout for training.

There is no need to buy real hardware as long you have standard PC keyboard with the usual key arrangement. The printed labels on the keys won't match obviously anymore, though.
Comment 5 James Ruan 2014-10-14 09:20:13 UTC
I looked at the layout indicator at the system tray. I'm using a layout called Chinese(cn) which is just the international standard US layout but in a different name in KDE ( the reason is not known to me ). However, I just can't change it by any means. It's always the default layout. The layout is only switchable when an input area is available, which can't be found in ktouch startup.

Just as you've said, ktouch doesn't support my layout. So I create a keyboard layout in ktouch, name it Chinese(cn), and a course using that. That setting allows me to start a built-in-replicated course with my DEFAULT layout, but still, no way to use the Dvorak layout.
Comment 6 Sebastian Gottfried 2014-10-14 09:38:07 UTC
Hmm, on my system I can change keyboard layouts all the time, regardless what application is running or whether an input element has the focus or not. I do that very often during KTouch development to test things out. 

I'm attaching a screen shot of my keyboard layout settings, maybe it helps you.
Comment 7 Sebastian Gottfried 2014-10-14 09:38:50 UTC
Created attachment 89125 [details]
Keyboard Layout Settings
Comment 8 James Ruan 2014-10-14 10:23:33 UTC
My setting is almost the same as yours.

So now the problem has change to:
1. When multiply layouts are configured 
  1.1 when Chinese(cn) is included, the layout indicator shows 'cn' and others
  1.2 when Chinese(cn) is not included, the layout indicator shows others AND Chinese(cn)
  Both are switchable ONLY when the focus is on an input area.
2. When single layout is configured, the layout indicator shows the configured layout.
3. When no layout is configured, the layout indicator shows Chinese(cn) AND last worked previous configured layouts, and IS switchable ONLY when the focus is on an input area.

Only by configuring a Dvorak layout as `2` can I use the ktouch for practicing Dvorak layout.

It seems like the problem is not caused by ktouch itself. Where should I look for help then?
Comment 9 James Ruan 2014-10-14 11:28:56 UTC
I think I find the key point causing this problem.

I'm using a X input method called "fcitx", and its not compatible to the KDE's way of managing keyboard layout.

It use the default layout ( which is set to Chinese(cn) ) when there's no input under focus. And this behavior can't be closed ( you can change the default layout although ). So I see the point that keyboard layout switching is working good in your environment: you have no East Asian input method installed to change the keyboard layout when input area is out of focus.

I believe there's no good solution unless input method is native-implemented under KDE or further cooperation between the KDE and IM developers.