SCIM disturbs keyboard focus

Bug #293001 reported by David Monniaux on 2008-11-03
84
This bug affects 14 people
Affects Status Importance Assigned to Milestone
SCIM
Unknown
Unknown
eclipse (Ubuntu)
Low
Unassigned
scim (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: scim

Ubuntu 8.10 (but the same problems occured in 8.04LTS)
SCIM 1.4.7-3ubuntu10

Sometimes, when multiple applications are in use, or when applications produce popups, the keyboard focus is lost. One then has to force the keyboard focus to move to another application (say, another terminal) then move it back to the original application.

While this seems to act up haphazardly, there seems to be a way to reliably reproduce the error:
* activate SCIM for your locale (using im-switch) and restart the session (there is no need to actually run a SCIM input method; it suffices that SCIM is active)
* start Eclipse
* start typing away a small Java program including: System.out.println("something")

When you start typing System., Eclipse will attempt autocompletion (show a list of members of the System class), then when 'out' is selected, it will print a list of members of the PrintStream class.

When it does so, Eclipse has lost keyboard focus. Even if one clicks in the Eclipse window, Eclipse does not see keyboard action. It's impossible to type anymore in Eclipse unless one starts another application, clicks in it to force focus to go into that other application, then clicks back into Eclipse.

If one disables SCIM, Eclipse does what it's supposed to do: if the user continues typing, then what the user types goes into the editor window.

The problem is independent of the window manager (tried with Metacity, Sawfish, and KDE's window manager). The problem occurs with other applications than Eclipse, including gnome-terminal, but with Eclipse the problem can be reproduced reliably.

Other people seem to have the same problem, see http://hrstc.org/node/21

David Monniaux wrote:
> While this seems to act up haphazardly, there seems to be a way to reliably reproduce the error:
> * activate SCIM for your locale (using im-switch) and restart the session (there is no need to actually run a SCIM input method; it suffices that SCIM is active)
> * start Eclipse
> * start typing away a small Java program including: System.out.println("something")

This is a known problem with java. Does this also happen with other
non-java applications?
Maybe related to the fact that java uses the XIM protocol, which is not
very reliable. BUt I'm not sure if the bug is in scim or in java.

David Monniaux (david-monniaux) wrote :

The problem occurs with non-Java applications, including Emacs, Firefox, gnome-terminal and so on, except that it's more intermittently.

Another example is Adobe Flash Plugin in Firefox. Go browse www.deezer.com, it's impossible to input text in the Deezer search field, which is part of a Flash animation, except by right-clicking an selecting "paste". Keyboard events don't go to the flash window.

David Monniaux wrote:
> The problem occurs with non-Java applications, including Emacs, Firefox,
> gnome-terminal and so on, except that it's more intermittently.
>
> Another example is Adobe Flash Plugin in Firefox. Go browse
> www.deezer.com, it's impossible to input text in the Deezer search
> field, which is part of a Flash animation, except by right-clicking an
> selecting "paste". Keyboard events don't go to the flash window.
>

The flash plugin issue is also known and a bug in the flash plugin.
Since it's proprietary software, we cannot fix it but have to wait for
Adobe to fix it.

For the other applications, can you please post the output of
'im-switch -l' ?

David Monniaux (david-monniaux) wrote :

In the configuration where I expect semi-random focus problems:

Your input method setup under en_US locale as below.
=======================================================
The configuration "/home/david/.xinput.d/en_US" is defined as a link pointing to
scim
This private configuration supersedes the system wide default.
=======================================================
The system wide default is pointed by "/etc/alternatives/xinput-all_ALL" .
xinput-all_ALL - status is auto.
 link currently points to default
default - priority 10
default-xim - priority 0
none - priority 0
Current `best' version is default.
=======================================================
The available input method configuration files are:
default default-xim none scim scim-bridge scim-chewing scim-immodule scim-pinyin scim_xim th-xim
=======================================================

The problem was suppressed by removing ~/.xinput.d/en_US

Arne Goetje (arnegoetje) wrote :

David Monniaux wrote:
> In the configuration where I expect semi-random focus problems:
>
> Your input method setup under en_US locale as below.
> =======================================================
> The configuration "/home/david/.xinput.d/en_US" is defined as a link pointing to
> scim
> This private configuration supersedes the system wide default.
> =======================================================
> The system wide default is pointed by "/etc/alternatives/xinput-all_ALL" .
> xinput-all_ALL - status is auto.
> link currently points to default
> default - priority 10
> default-xim - priority 0
> none - priority 0
> Current `best' version is default.
> =======================================================
> The available input method configuration files are:
> default default-xim none scim scim-bridge scim-chewing scim-immodule scim-pinyin scim_xim th-xim
> =======================================================
>
> The problem was suppressed by removing ~/.xinput.d/en_US
>

OK, thought so. Can you please do:

im-switch -s scim-bridge

then log out and see if that helps?

David Monniaux (david-monniaux) wrote :

This seems to fix the problem!

Zentai Andras (andras-zentai) wrote :

I also had the same problem using Kubuntu 64 (hardy and jaunty) and Ubuntu 64 jaunty and

im-switch -s scim-bridge

solved it. Thanks a lot!

Rolf Leggewie (r0lf) wrote :

Is this merely a configuration issue?

ChM (christophe-meessen) wrote :

Rolf Leggewie a écrit :
> Is this merely a configuration issue?
>
>
I'm not sure. I solved it by installing a missing package which was not
signales as missing when (re)installing SCIM.

I now have no problems to handle compose characters properly, but I do
saw a SCIM zombie process after that. So I suspect there is still a
problem with it.

When using some particular key combinations needed in some applications,
(i.e. copy drag with constrain) the SCIM logo window may show up. I
tried to remove all shortcuts defined in SCIM but this was apparently
not enough.

Ch. Meessen

If I use im-switch -s scim then I have focus problems in Eclipse, particularly with the autocompletion.

In previous versions of Ubuntu, on ia32, this problem was solved with im-switch -s scim-bridge. However, with 9.04 on x86_64, this causes various problems (gscan2pdf crashes as in bug 414719, emacs has trouble with Multi_key, and overall SCIM does not work as in bug 413048).

$ apt-cache policy scim
scim:
  Installed: 1.4.9-1ubuntu1~rolf2
  Candidate: 1.4.9-1ubuntu1~rolf2
  Version table:
 *** 1.4.9-1ubuntu1~rolf2 0
        100 /var/lib/dpkg/status
     1.4.7-3ubuntu12 0
        500 http://ftp.oleane.net jaunty/main Packages

$ apt-cache policy eclipse
eclipse:
  Installed: 3.2.2-5ubuntu3
  Candidate: 3.2.2-5ubuntu3
  Version table:
 *** 3.2.2-5ubuntu3 0
        500 http://ftp.oleane.net jaunty/universe Packages
        100 /var/lib/dpkg/status

The problem can be suppressed by unsetting XMODIFIERS prior to launching Eclipse, though this is of course very heavy handed.

Niels Thykier (niels-thykier) wrote :

Hi

Is this still a problem with the new eclipse 3.5.1 in Karmic/Lucid (9.04 and 9.10 respectively).

~Niels

Changed in eclipse (Ubuntu):
status: New → Incomplete
Sampi (kalaka) wrote :

I haven't been able to test it with Karmic/Lucid but I will give it a try
when I can.

thanks,
Juan

On Sun, Nov 8, 2009 at 11:58 PM, Niels Thykier <email address hidden> wrote:

> Hi
>
> Is this still a problem with the new eclipse 3.5.1 in Karmic/Lucid (9.04
> and 9.10 respectively).
>
> ~Niels
>
>
> ** Changed in: eclipse (Ubuntu)
> Status: New => Incomplete
>
> --
> SCIM disturbs keyboard focus
> https://bugs.launchpad.net/bugs/293001
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in SCIM: Unknown
> Status in “eclipse” package in Ubuntu: Incomplete
> Status in “scim” package in Ubuntu: New
>
> Bug description:
> Binary package hint: scim
>
> Ubuntu 8.10 (but the same problems occured in 8.04LTS)
> SCIM 1.4.7-3ubuntu10
>
> Sometimes, when multiple applications are in use, or when applications
> produce popups, the keyboard focus is lost. One then has to force the
> keyboard focus to move to another application (say, another terminal) then
> move it back to the original application.
>
> While this seems to act up haphazardly, there seems to be a way to reliably
> reproduce the error:
> * activate SCIM for your locale (using im-switch) and restart the session
> (there is no need to actually run a SCIM input method; it suffices that SCIM
> is active)
> * start Eclipse
> * start typing away a small Java program including:
> System.out.println("something")
>
> When you start typing System., Eclipse will attempt autocompletion (show a
> list of members of the System class), then when 'out' is selected, it will
> print a list of members of the PrintStream class.
>
> When it does so, Eclipse has lost keyboard focus. Even if one clicks in the
> Eclipse window, Eclipse does not see keyboard action. It's impossible to
> type anymore in Eclipse unless one starts another application, clicks in it
> to force focus to go into that other application, then clicks back into
> Eclipse.
>
> If one disables SCIM, Eclipse does what it's supposed to do: if the user
> continues typing, then what the user types goes into the editor window.
>
> The problem is independent of the window manager (tried with Metacity,
> Sawfish, and KDE's window manager). The problem occurs with other
> applications than Eclipse, including gnome-terminal, but with Eclipse the
> problem can be reproduced reliably.
>
> Other people seem to have the same problem, see http://hrstc.org/node/21
>

Niels Thykier (niels-thykier) wrote :

Hi

I have not heard anything on this for nearly two months, Sampi, have you had a chance to test if eclipse is still affected by this?

If I have not heard from anyone able to reproduce this issue soon (14 days give or take), I will close this bug as invalid/expired.

~Niels

Sampi (kalaka) wrote :

Hi,

I'm sorry it's taken so long for me to respond. I'm using Karmic and the latest version of (java 1.6.0_15-b03) now.

The bug is not gone but there is a simple workaround so I think it should be tagged as 'Low' importance.
First you must set the input method with im-switch to scim-bridge.
Then, when the java program starts, just quit and restart SCIM.

thanks for your help,
sampi

Benjamin Drung (bdrung) on 2010-04-15
Changed in eclipse (Ubuntu):
status: Incomplete → New
importance: Undecided → Low
xtknight (xt-knight) wrote :

low priority? please consider raising the priority, as this makes the computer frustrating to use.

i have confirmed the behavior in ubuntu natty. if i remove scim as my input method in the preferences (which I assume dictates that the scim daemon not be started) and then log out/log in again, the problem disappears.

also, it happens regardless of compiz or anything like that. in general, the keyboard (and EVEN mouse clicks) have a lot of lag. i'm not sure if my mouse problems are related, but if there's something i want to blame right now, it's scim, probably because things are spontaneously losing focus.

xtknight (xt-knight) wrote :

i don't know why i said lag, but i meant to say that they weren't responsive until refocusing the window. sorry about that.

Changed in eclipse (Ubuntu):
status: New → Invalid
Changed in scim (Ubuntu):
status: New → Confirmed

I can confirm this behaviour with Spring Tool Suite (which is based on Eclipse 3.7.1) in Ubuntu Oneiric.

lengoanhcat (lengoanhcat) wrote :

I confirm that this bug affect the usage of my Eclipse 3.7.1 on Ubuntu 11.10, and it is irritating me a lot. ^^

Yoni Aug (johnnyaug) wrote :

I can confirm this on Eclipse Java EE 3.7.1 on ubuntu 11.10.

phpxer (phpxer) wrote :

Still affect the usage of my eclipse 3.7.1 on ubuntu 11.10 with oracle JDK 1.7_02.

manolo (manuel-sales) wrote :

This bug is the same as 213503
It doesn't matter whatever the java, ubuntu, eclipse version we post, the bug remains and always happens when java application launches an event that disturbs the current keyboard focus.
What is sad is that after 4 years is unassigned, I suppose that it needs to crash to get the attention (loosing keyboard focus is not relevant even the effect is the same as a crash as the program doesnt work)

I've got the same problem with IntelliJ IDEA. It is a full Swing application.

I regularly loose focus when switching from one virtual desktop to another, or when a dialogue box opens.
When I quit Scim, keyboard lock-up vanishes.

Rolf Leggewie (r0lf) wrote :

a fix was applied upstream around 2012. If you experience something similar, please report a new ticket. Feel free to subscribe me.

Changed in scim (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.