Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: matrem on April 23, 2008, 09:20:48 pm

Title: space bar doesn't work
Post by: matrem on April 23, 2008, 09:20:48 pm
Hi,

I'm under linux ubuntu 8.04 rc with codeblock 8.02.
All work great until yesterday, I don't know why, but my space bar does'nt add space in code blocks editor view...  :?

In fact it have the same effect than ctrl space.

I tried to remove .codeblocks configure directory and even reinstall it, but nothing change.

what can I do?  :(
Title: Re: space bar doesn't work
Post by: JGM on April 23, 2008, 09:46:52 pm
Does your space bar works on other applications, because if not you should get a new keyboard :wink:
Title: Re: space bar doesn't work
Post by: Myzu on April 26, 2008, 12:09:40 am
hello,

I have the same problem : the space bar doesn't work any more after the upgrade of my Ubuntu 8.04.
The space bar works great on all other applications (firefox, gedit, openOffice.org, ...) and on the search pop up but doesn't in the editor's view. The only way to add a space in the editor is to copy and paste an other space or press Ctrl + Alt + Space.

I tried to delete ./codeblocks and reinstall it but it doesn't works.
Title: Re: space bar doesn't work
Post by: JGM on April 26, 2008, 04:25:39 am
thats scary since I want to update to the new version of ubuntu  :?
Title: Re: space bar doesn't work
Post by: Barking_Mad on April 26, 2008, 05:01:16 am
Im currently on U8.04 Hardy release, no problem with space here with CB 5010.

Ive modified my Editor options for Tabs/Spaces somewhat though.  8)


Title: Re: space bar doesn't work
Post by: Jenna on April 26, 2008, 09:47:31 am
The problem does not only occur with C::B's editor:

https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/221112 (https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/221112)
Title: Re: space bar doesn't work
Post by: alex_is_there on April 28, 2008, 04:18:39 pm
Same problem here with Ubuntu 8.04 and Code::Block svn 5020, are there any patch ?
Title: Re: space bar doesn't work
Post by: libfab on May 01, 2008, 02:28:39 am
I'm relieved to notice I'm not alone in experiencing this freaky bug.
I'm under Ubuntu 8.04 release.
The bug appears to be related to code-completion : on hitting the space bar the code completion window appears to show options.
Tried to erase all configuration files to no avail, this does not seem to be a configuration-related bug.
Oddly, when I create a brand-new project with an empty file, the bug vanishes into thin air, and everything is back to normal for a while (yes, try it!) even when I swap to a "normal" C project.
Then the bug comes back on launching the app again ...

Is this a French keyboard-related Ubuntu issue however? The Ubuntu forum link suggests so to some extent.

Fab
Title: Re: space bar doesn't work
Post by: sharky.fr on May 01, 2008, 02:43:42 am
Someone found how to fix it.

Code
$ sudo gedit /etc/X11/xorg.conf

Then comment this line :

Quote
Option      "XkbVariant"   "oss"

Then save the file and reboot.

---

https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/221112/comments/14 (https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/221112/comments/14)
http://bugzilla.gnome.org/show_bug.cgi?id=530123 (http://bugzilla.gnome.org/show_bug.cgi?id=530123)
Title: Re: space bar doesn't work
Post by: alex_is_there on May 01, 2008, 10:10:12 am
Works Great Thanks a lot !!!  :D
Title: Re: space bar doesn't work
Post by: libfab on May 01, 2008, 12:04:25 pm
Worked fine for me too, thanks sharky.

Fab
Title: Re: space bar doesn't work
Post by: sharky.fr on May 01, 2008, 04:09:28 pm
Glad to see it helped you :D
Title: Re: space bar doesn't work
Post by: libfab on July 14, 2008, 06:48:58 pm
Some news of the maddening "space bar" issue which seems to affect French keyboard layouts.
The "Sharky fix" seemed to work all right, yet it was not enough for Kunbuntu (I have a fresh Kubuntu 4 platform).

After browsing the bug posts kindly given to me by Jens, I have come to the following fix, which works both on Ubuntu and Kubuntu and so far has the added bonus of apparently thwarting the "cursor shift" bug that I reported on other thread:


(/etc/X11/xorg.conf)

replace "XkbVariant"  "oss"
with      "XkbVariant"  "latin9"   

add below a full line:
##libfab fix:
    Option     "XkbOptions"  "nbsp:none"

Actually the bug seems to arise from nbsp settings rather than from "oss" itself. On Kubuntu, commenting out "XkbVariant" "oss"  was not enough, as it was with gnome Ubuntu.

I have not tried to check if, under gnome Ubuntu, it still is possible to preserve "XkbVariant"  "oss" if the "nbsp:none" setting is added.

Another less intrusive method is to use setxkbmap (just check the man page) on a command line:

setxkbmap  -option nbsp:none

is well enough under Kubuntu. You can possibly add:

-model pc 105 -layout fr -variant latin 9

if it is not enough.

Hope this helps.

Fab

Title: Re: space bar doesn't work
Post by: wilbefast on September 10, 2009, 05:46:18 pm
I know this is necromancy but it's exactly the same problem so a little context is probably helpful:

I've recently swapped Windows XP for Ubuntu and re-installed Codeblocks - suddenly I get an auto-complete pop-up whenever I press space so the only way to add spaces is to copy paste them  :( I'm using a French (AZERTY) keyboard setup - both Ubuntu and Codeblocks are the newest versions (I just downloaded them see).

I tried using the fix but there is no "XkbVariant" line in my xorg.conf file so I can't replace it :-S
This may be because I'm using the standard Ubuntu release with Gnome rather than Kubuntu. Here is what the file looks like for me:

Code
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
EndSection

Section "Module"
Load "glx"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection
Title: Re: space bar doesn't work
Post by: Jenna on September 10, 2009, 05:56:11 pm
I know this is necromancy but it's exactly the same problem so a little context is probably helpful:

I've recently swapped Windows XP for Ubuntu and re-installed Codeblocks - suddenly I get an auto-complete pop-up whenever I press space so the only way to add spaces is to copy paste them  :( I'm using a French (AZERTY) keyboard setup - both Ubuntu and Codeblocks are the newest versions (I just downloaded them see).

I tried using the fix but there is no "XkbVariant" line in my xorg.conf file so I can't replace it :-S
This may be because I'm using the standard Ubuntu release with Gnome rather than Kubuntu. Here is what the file looks like for me:

xorg.conf is no longer used for keyboardsettings, it's done via hal now.

Searching google for
Code
xkbvariant ubuntu hal
should give an answer (at least it does here in germany).
I can give you a link to german ubuntu site, but I don't know if it can help you: http://wiki.ubuntuusers.de/HAL/Eingabeger%C3%A4te (http://wiki.ubuntuusers.de/HAL/Eingabeger%C3%A4te) .

EDIT:
This should be the same in english: https://wiki.ubuntu.com/X/Config/Input (https://wiki.ubuntu.com/X/Config/Input)
Title: Re: space bar doesn't work
Post by: wilbefast on September 10, 2009, 07:00:06 pm
German's not my forte  - prefer French or Italian. I had a look on Google for help and I found another (duplicate) codeblocks thread that I hadn't picked up before:

http://forums.codeblocks.org/index.php/topic,8298.0.html

ameirhaeghe suggested fiddling with keyboard setting (System > Preferences > Keyboard) so I changed a few setting and it all seems to be working now (fingers crossed I haven't broken something else though  :o)

I changed from in General "France Alternative" (default settings picked up by flash boot) to "France" and changed the Layout from something that wasn't Dell to Dell "Laptop/Notebook Inspiron" (there was no option for Vostro but I figure that's close enough).



William
Title: Re: space bar doesn't work
Post by: libfab on September 13, 2009, 01:07:22 pm
I also have the bug again due to kubuntu's new xorg.conf by-pass. As a follow-on, I tried the hal way, with no result.
There still remains the setxkbmap way (see my post above).
As a lazy (yet efficient) way out, I now integrate the setxkbmap command to my ... codeblocks.desktop icon:

right-click on icon > Application > Command > setxkbmap -option nbsp:none && codeblocks %F

Not ideal yet it works.
Title: Re: space bar doesn't work
Post by: wilbefast on September 13, 2009, 02:24:35 pm
Have you tried fiddling with the keyboard settings? It worked fine for me and I didn't even have to mess around with manually editing configuration files.
Title: Re: space bar doesn't work
Post by: libfab on September 14, 2009, 09:11:10 pm
Yes, it works your way too. On Kunbuntu the fiddling is a bit different, use:
Configuration systeme (System settings) > Region et langue   (Region and language) > Model: any generic key PC will do (I use 105 key) | Layout variant: Défaut (Default)
It's the Alternative variant that causes the bug (-variant oss and subvariants like oss_latin9). With -variant unspecified, it's OK.

Still, I wonder whether the bug is Ubuntu's, Wx's, or C::B's ...
Title: Re: space bar doesn't work
Post by: 3sv on March 14, 2010, 06:49:32 pm
I had also this bug with Ubuntu 9.10, 64 bit. In the beginning space bar was working ok, but it stopped for an unknown reason.
I was able to fix it just by setting my keyboard lay-out to qwerty, and then back to azerty.
Seems like it's not related to any codeblocks setting, I have deleted my ~/.codeblocks folder and that didn't changed anything.
I am also not sure if this bug pure ubuntu related. I found no other program with the same problem, and I can't reproduce the error now that its works again. Nasty.
Title: Re: space bar doesn't work
Post by: c.panel on August 01, 2010, 10:48:07 am
Ubuntu with gnome on french keyboard : I have the same problem : space bar doesn't work on a freshly installed codeblock software.
-first : the installation doesn't install the build tools (c++, headers...). thus the same soft installs everything on windows (why not on linux ?)
-second : french keyboard doesn't work.

I fix the second quirks by changing the keybord map : Systeme|Preferences|Clavier and reaffecting the french keyboard. It seems that installing of codeblocks changes something here (I had installed "France" and find "France autre"?). All other applications yet seemed to work fine with keyboard.

Title: Re: space bar doesn't work
Post by: bikepunk on April 16, 2013, 11:08:38 am
Sorry for getting this thread out of the grave, but on Ubuntu 12.04 LTS, codeblocks version 10.05 from the official repos makes this space bar problem...

Good news : upgrading to codeblocks 12.11 solved the problem.   ;)
see : http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_Sometime.2C_in_the_text_editor.2C_space_bar_triggers_Code_Completion.2C_how_do_I_fix_that.3F