FAQ-Issues and Workarounds
Return to FAQ.
Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that?
A: The problem is solved in the version 12.11.
On Ubuntu 12.04 LTS, version 10.05 from the official repos makes this space bar problem, upgrading to codeblocks 12.11 solved the problem.
For earlier versions, there are (at least) 3 working fixes :
Information found [/index.php/topic,8291.0.html on the forum]
run this command before running Code::Blocks (works fines for KUbuntu)
setxkbmap -option nbsp:none
if it's not enough you can try:
setxkbmap -option nbsp:none -model pc 105 -layout fr -variant latin 9
Hal Solution (Ubuntu 8.10 and above):
Note : Hal is now deprecated
For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference.
- Menu System => Preferences => Keyboard
- Select Tab Layout
- Edit "Layout Options..."
- Expand last option "Using space key to input non-breakable space character"
- Select the last choice "Usual Space at any level"
This is not system wide.
A system wide solution would be to add an fdi file there (for instance)
put the right thing in it (I did not succeed), unplug your keyboard, plug it again.
Xorg Solution (prior Hal based distrib):
as root, edit /etc/X11/xorg.conf and find something like :
Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" ... Option "XkbVariant" "oss" EndSection
Try one of the following workarounds :
1. you comment the line
Option "XkbVariant" "oss"
# Option "XkbVariant" "oss"
2. you replace
This works for Ubuntu prior 8.10 (before hal)
It seems that KUbuntu requires the following line:
Option "XkbOptions" "nbsp:none"
Q: IDE is drawing the text from Right to Left?
A: Uncheck "Settings -> Environment -> View -> Internationalization" and restart Code::Blocks
Note: Code::Blocks currently only supports the GNU GDB and MSVC CDB debuggers.
Q: My project works everywhere except one computer?
A: Some parts of Code::Blocks or the back-end compiler may not support non-ASCII characters (such as é) or possibly spaces. Try moving the project on the affected computer to a directory that contains neither of these in its path.
Q: Syntax highlighting is broken; how do I fix it?
A: Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (for example, *.c or *.cpp for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open Edit->Highlight mode and select the language the current file is using. Alternatively add the extension to the lexer configuration in the editor options. This will permanently apply the chosen syntax highlighting for all files with this extension.
Q: I posted on the forums that Code::Blocks was not working, but no one could help me?
A: There is a distinct lack of crystal balls and divining mirrors here, so you may want to post some information. Using this template in your problem description would be a great help.
Q: I cannot find any text in my Code::Blocks logs?
A: On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. Please note that this is a known wxWidgets bug in wxWidgets v2.8.x. See more details in [/index.php/topic,15940.msg108421.html#msg108421 refresh issue in wx2.8.12]
Q: Scrolling causes gray areas/distortions to obscure my code in the editor?
A: This has been a reported problem, sometimes occurring on Ubuntu (and its derivatives). There are several actions that seem to resolve the issue.
- Install all the newest updates from Update Manager.
- Reset Unity.
- unity --reset
- Reload compiz by switching to metacity, then back to compiz.
Q: I cannot type a greater-than '>' sign?
A: The keyboard shortcut Ctrl-Alt-. is known to occasionally conflict with this.
Open Settings->Editor...->Keyboard shortcuts. The command Ctrl-Alt-. is assigned to Menu bar->Search->Open include file by default. Changing or removing this shortcut should resolve the problem.
Q: Using Code::Blocks with high dpi screens and windows
Return to FAQ.