Author Topic: Strange key stroke behaviour in editor in Linux  (Read 6543 times)

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Strange key stroke behaviour in editor in Linux
« on: November 27, 2010, 06:53:24 pm »
First let me say:

Code::Blocks is a great IDEa!
Thanks for the development!
Thanks to the one(s) supplying packages in OpenSuse repositories!

Now to my question:

I have worked with Windows before, since some time I am working in Linux and have sometimes problems in the editor.

After pressing space no space is inserted in text, after pressing space twice C2A0 is inserted (which is Non-Breaking Space I read).
Semicolon must be pressed more than once to be inserted in text.
Also other keys are influenced, when pressed not appearing on screen and when pressed more times another character is inserted into the
text (e.g. Copyright sign instead of C, ' instead of ". Or a \ when I press / twice fast, a [ when I press (
This occurrences are more often in combination with SHIFT and CTRL keys. This happens not always but often enough to be annoying.

OS: Linux, OpenSuse 11.3 32 Bit
Code::Blocks Version: svn 6583 from OpenSuse repositories

Another thing I wondered: Is it intended, that the forum can only be searched by registered persons? In former days I could do that without being registered.

Thank you for your answer in advance!

PgmHelmi

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #1 on: November 30, 2010, 05:49:48 pm »
Has someone at least a hint for me where or what to search? I have already searched very intensive, but nothing found up to now.

I forgot to mention, that I am using Gnome Desktop.

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Strange key stroke behaviour in editor in Linux
« Reply #2 on: November 30, 2010, 06:42:21 pm »
I don't get that with Kubuntu. I have also used C::B with GNOME, I did never noticed that.
Kernel Extremist - PedroM power ©

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Strange key stroke behaviour in editor in Linux
« Reply #3 on: November 30, 2010, 07:21:51 pm »
I use C::B on gnome, sometimes on kde and used it in xfce and lxde. This problem never occurs.
It might be a problem with your systems keyboard settings.

There has been a space-bar problem with french alternative keyboard.
See http://lgp203.free.fr/spip/spip.php?article1 and go down to the "Post scriptum" and/ or this bug report: https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/221112 (there are more similar bug-reports if I remember right).

Maybe it can lead you in the right direction.
If you find a solution or the cause for the error, please post it here.

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #4 on: November 30, 2010, 09:58:02 pm »
Thanks for your answers!

I have no french keyboard layout, but a german one and it is not only the space bar but other keys too. For testing I tried US layout but it did not change the behavior.
But now I know exactly how to reproduce it: Mark something with Shift + Ctrl + Cursor Right then enter another key like space. On first key stroke of space nothing
happens on second a non breaking space is entered. Other keys have to be pressed more than once too, but not all are converted. E.g. converted keys are c, s and ,
May be OpenSuse has another configuration than Ubuntu, which causes the behavior. So my searching goes on, further help is appreciated.

Kind regards!

PgmHelmi


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Strange key stroke behaviour in editor in Linux
« Reply #5 on: November 30, 2010, 11:13:34 pm »
I also use a german keyboard layout, but never had such a behaviour.
Neither on windows (xp,vista,win7-64) nor on linux (debian,ubuntu,centos,fedora,opensuse).
I will test it tomorrow with the version you use.

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #6 on: December 01, 2010, 02:44:18 pm »
Hi Jens!

Would be great if you could do this. On Windows I never had this problem too.

But before check another thing, because I noticed now, that it happens only with the Ctrl key on the right side and not with the one on the left side.
Also when marking text with mouse or only with Shift + Cursor Right it works correctly.

Kind regards!

PgmHelmi

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Strange key stroke behaviour in editor in Linux
« Reply #7 on: December 01, 2010, 03:33:30 pm »
Works fine here.
OpenSuse 11.3 32-bit C::B 6853, in kvm virtual machine.

There is one thing that does not work (or more exactly two): the grave accent (`) and the acute accent (´), but they don't work in any place in my suse-installation.

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #8 on: December 01, 2010, 04:12:01 pm »
Intersting!

The accent keys work for me. There are two key board settings. "Deutschland" where the accent keys work in combination with other keys, e.g. à and
"Deutschland Akzenttasten deaktivieren" where the accent keys are only single characters and this is the default setting when OpenSuse is installed new
and which I have. The other I tested only.
Do you have the german user interface too, or the english one and only keyboard layout set to german? When I find it how to change I will try the english
user interface.

Kind regards!

PgmHelmi


Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #9 on: December 01, 2010, 05:31:37 pm »
Found the reason!

Searched again in internet with my latest knowledge and found that the behavior comes from the "Compose Key", which is apparently set to Shift + Right-Ctrl.
It signals the software to interpret the following sequence of two (or more) keystrokes as a combination in order to produce a character not found directly on the keyboard.
It has nothing to do with marking, but could be solved by the underlying text editor.
Because I found in gedit the compose key works as expected when only the two keys mentioned above are pressed and when Right Arrow for marking is pressed additionally it works
like expected not as "Compose Key" too.
I know it is not a direct Code::Blocks issue but the editor it uses. And I could find the same behavior in Firefox address text field.
Now the only thing is to find how to change the "Compose Key".


Kind regards!

PgmHelmi

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Strange key stroke behaviour in editor in Linux
« Reply #10 on: December 01, 2010, 09:37:13 pm »
On my german gnome (on openSuse) the settings are in "System -> Hardware -> Tastatur -> Belegungen -> Optionen" ("system -> hardware -> -> keyboard ...").
On debian it's "settings" ("Einstellungen") instead of hardware.

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #11 on: December 02, 2010, 08:33:27 pm »
Unfortunately it is not that easy. If I set the compose key position in that setting to another key, it is an additional compose key to the Right-Ctrl key. The Right-Ctrl Key
was not checked from the beginning. After searching in internet my knowledge up to now is, that there exist a compose key setting for XWindow and one for Gnome/GTK+. I think the
setting you mentioned is for Gnome/GTK+, but the XWindow settings are used additionally. So I am searching to disabling or changing the compose key of the XWindow system in
OpenSuse.

Kind regards!

PgmHelmi

Offline PgmHelmi

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange key stroke behaviour in editor in Linux
« Reply #12 on: December 06, 2010, 09:48:08 am »
Finally found a solution:

In /etc/X11 is a file named Xmodmap which contains examples for changing keys. Copy this file as .Xmodmap into your $HOME directory or create an empty file with that name.
Add following line into that file:
keysym Control_R = Control_R
After next login Shift + Ctrl_R is not the compose key anymore. More info you get with man xmodmap.
It is a per user solution but it is enough for me. Could not find how to change it for whole system.

Thanks to all for trying to help me, especially Jens.

Only out of curiosity I would like to ask again: Is it intended, that the forum can only be searched by registered persons?

Kind regards!

PgmHelmi