Bug 179448 - KDE 4.2 beta 2 apps seem to have problems working with scim
Summary: KDE 4.2 beta 2 apps seem to have problems working with scim
Status: RESOLVED REMIND
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 04:01 UTC by Wong CS
Modified: 2011-08-04 15:27 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wong CS 2009-01-03 04:01:25 UTC
Version:           4.1.85 (using Devel)
OS:                Linux
Installed from:    Compiled sources

I use Chinese pretty often, so I have been keeping scim running in my KDE session lately. 

Problem is, scim and KDE 4 apps seem to have problem with contention for keystrokes. While I'm moving between tabs in konsole (shift-left/right), I may suddenly find that konsole doesn't accept any inputs anymore. In konsole, I "fix" it by using the mouse to click on another tab and typing some random keystrokes (which would be accepted) and then move back to the tab which I was working on. Then it would happen again randomly (and pretty often too).

I don't use skim as the kubuntu forums advised that it was not working well with KDE 4. I installed scim together with the scim-bridge-client-qt4 package instead.

I'm using KDE 4.2 beta 2 currently. 

This issue happens for at least 3 other KDE 4 apps as well: kate, kopete and konqueror. In Kate, there doesn't seem to be any way to go around it other than to close the window and start up again. In Kopete, it would get stuck in a particular chat window and I'd have to cycle through the rest of my chat windows until I find one where I can type into and it would be ok.

I know that this issue may be scim-related but it seems to happening to KDE 4 apps only, hence I'm reporting it here.
Comment 1 Wong CS 2009-01-07 06:51:55 UTC
As per Aaron's advise (http://aseigo.blogspot.com/2009/01/bugskdeorg.html):

[wongcs@phrenic:~]$ kde4-config --version                                                                                                      (01-07 13:48)
Qt: 4.4.3
KDE: 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2))
kde4-config: 1.0
Comment 2 Richard Colley 2009-05-28 08:17:57 UTC
I also have experienced this problem.  I'll relate my experiences below, but first some environment info:

  Fedora Core 11 (rawhide)
  kernel.i586 0:2.6.29.3-140.fc11
  kdebase.i586 6:4.2.2-2.fc11
  kdelibs.i586 6:4.2.2-12.fc11
  qt.i586 1:4.5.0-14.fc11
  ibus.i586 1.1.0.20090423-1.fc11
  ibus-anthy.i586 1.1.0.20090402-1.fc11
  ibus-gtk.i586 1.1.0.20090423-1.fc11
  ibus-libs.i586 1.1.0.20090423-1.fc11

NB: I am *not* using SCIM, but instead use ibus and a japanese im (ibus-anthy).  However, it is exteremely rare that I use japanese in a konsole window.

What happens for me, is that I have one konsole running with several tabs (not sure if the fact of multiple tabs is important or not).  At some point, when I come back to type in any of the tabs, keys don't get recognised.  i.e. i type, and nothing comes out.  In general, it doesn't matter which of the tabs I type in, none respond.  Interestingly, if I start a new konsole instance (not just a new window, but running konsole again), then the keyboard doesn't work in that console either.

However, in these cases, often there will be one tab that seems to accept a keypress, but instead of displaying it, konsole immediately switches to the next tab, and the keypress appears in that window.  Very odd!

When the problem occurs for me, if I activate the window menus (e.g. File) with the mouse, then I can navigate those menus with the keyboard, and some times the console input works after this. 

I've also noticed, like the original reporter, that I can sometimes fix this issue by continuously cycling through tabs and pressing keys, and sometimes by using the menu Edit->Clear & Reset.  However there doesn't seem to be a clear, repeatable solution.  Usually I have to try these things a few times before konsole starts working again.

NB: while this problem is happening with konsole, other apps seem unaffected. 
At least, firefox still accepts keypresses correctly.  I am not sure about other kde apps however.
Comment 3 dector 2009-06-25 20:08:19 UTC
I have a very similar scim related bug that can be reproduced:
1) make sure scim is running (do scim & if not)
2) open konsole
3) type kate &
4) close the kate window. Focus returns to konsole but typing doesn't work.

Keyboard becomes active again if you change focus to another window (by alt+tab or mouse).

If I kill scim, the bug doesn't appear. Also if I open a non-KDE program, such as firefox or totem, the bug doesn't appear. Can anyone confirm this?

I'm using Kubuntu 9.04 with KDE4.2.2, scim-bridge with scim-anthy:
kdebase-bin              4:4.2.2-0ubuntu4 
libqtcore4               4.5.0-0ubuntu4.1
scim                     1.4.7-3ubuntu12
scim-anthy               1.2.7-0ubuntu1   
scim-bridge-client-qt    0.4.14-2ubuntu5
scim-bridge-client-gtk   0.4.14-2ubuntu5 

To me it sounds like incompatibility in kwin focus switching and scim. I'm willing to contribute to solving this if I get some help.
Comment 4 Richard Colley 2009-06-26 01:27:32 UTC
(In reply to comment #3)
> I have a very similar scim related bug that can be reproduced:

This sounds different to my problems.  For a start, I don't use SCIM.  Second, window focus isn't a problem.  The decorations on the windows change to correctly indicate the focus.  It's just that keystrokes don't work.

Just a thought, what focus method do you have activated?  Depending on the position of the mouse cursor at the time you close kate, maybe this behaviour is correct.

Anyway, for me this bug report may be a duplicate of https://bugs.kde.org/show_bug.cgi?id=183649
Comment 5 dector 2009-07-13 18:51:23 UTC
(In reply to comment #4)
> For a start, I don't use SCIM.
In my case the problem doesn't appear after killing scim. It's also mentioned in the bug https://bugs.kde.org/show_bug.cgi?id=183649 . Therefore this may be input method related. Have you tried killing/removing ibus?

> Second, window focus isn't a problem.
I agree, window focus is not a problem I my case either. But keyboard becomes unresponsive at the same time as the window focus changes.

> Just a thought, what focus method do you have activated? 
"Click to focus" so no, it's not correct behaviour.
Comment 6 dector 2009-07-14 23:21:16 UTC
OK, I installed ibus just to test it. The version from the Jaunty repository didn't seem to work correctly (?) so I installed ibus following these instructions:
http://code.google.com/p/ibus/wiki/Ubuntu

Now all the keyboard issues I had are gone.
Comment 7 Jekyll Wu 2011-07-31 14:57:43 UTC
[Off topic]

AFIK, scim is not actively maintained anymore. It is better to switch to other well maintained alternatives, such as ibus and fcitx(mainly for Chinese).
Comment 8 Jekyll Wu 2011-08-04 15:27:14 UTC
Can't reproduce it with KDE-4.7.0

Feel free to reopen  if this still happens in recent version.