Eclipse is printing the wrong characters in the text editor - eclipse

I have a strange problem with Eclipse (Helios). After a few hours of working some of my keyboard keys start printing different characters in the text editor window.
For example:
SHIFT+2 normally prints " but actually prints #
# normally prints # but actually prints /
It feels like it changes the keyboard locale from UK to US, however I don't change any settings. I am mainly using Eclipse for Android development. No other programs are affected. Any ideas on how to fix, or even what could cause such a problem?

I've hit something similar before: Windows has this evil key-shortcut enabled by default, that changes between installed locales when you press left ALT + left Shift, which is needed in many Eclipse-shortcuts. Check your keyboard -settings (or something alike) under control panel, I don't have a Windows-machine to check where you could disable this with right now.

To switch off the switch between input languages behaviour (as described by #esaj) goto:
Control Panel->Region and Language->Keyboards and Languages->Change keyboards->Advanced Key Settings->Highlight Between input languages->Change Key Sequence->Change to Not Assigned.
Jeez, what a lot of clicks!

Before you change Keyboard setting (as suggested by #dontumer), hit "left shift+ left alt" until you get your layout back. It doesn't take more than two or three times. Once your layout is back then you can change keyboard settings if you are interested.

Related

Change size of whitespace tab arrow character in VS Code

I am currently setting up VS Code on a new computer and want to maintain all the same configuration, addons etc that I had on my previous computer. I was able to copy all of the settings, fonts, themes I like, etc; however for some reason I can't figure out how to change the size of the Tab arrow character for whitespace.
In my old editor, the Tab arrow spanned two spaces, whereas on my new computer, the tab arrow only spans one space.
I've been looking all over, and tried googling any variation of "change tab character size", "modify tab arrow span" etc that I could think of. I seem to remember changing the arrow size at some years ago, which is how I got it in my old editor, but I've totally forgotten, and can't find the setting anywhere, neither searching in the VS Code settings, nor on google like I mentioned; the only things that turn up are for changing tab indent size from 2, to 4 spaces etc.
Here are some screenshots of what I mean, from the new VS Code editor and from the one on my older computer:
Current tab arrow size in VS Code:
Old tab arrows size (what I want in my new editor):
This is driving me crazy, and I'm sure it's a simple setting somewhere that I'm missing. Any help would be appreciated!
Edit: In case it is relevant, I'm using JetBrains Mono as my font, and its the same version of the font as from my old computer as well, I copied it over and installed it on the new PC.
To my shock, the issue resolved itself after rebooting my PC. Once again it would seem that the tried and true "have you tried turning it off and on again" continues to ring true in many cases.
The only explanation I can think of is that perhaps some of the font symbols for whitespace characters weren't fully updated for some reason after installing the JetBrains Mono font, which I had installed earlier the same day, and after rebooting my PC I guess all the characters were fully updated/refreshed, and now the longer arrow is displayed for the tabs; I guess this also means that there is no arrow resizing per se, and the arrow symbol for the tab is simply the font symbol.
In any case, I figured I should write this update as an answer in case something like this happens to anyone else in the future.

Keyboard input blocks in VSCode

Since yesterday, I have a problem when want to edit code in VSCode. Apparently, after changing focus within VSCode, say switching to the menu bar or a to different view and then coming back to the editor view, the cursor changed from the caret to a filled rectangle, and normal keyboard input is blocked. I need to do something like pressing the Escape key which on the first, second, or third try finally puts me into overwrite mode from which I have to switch to insert mode. This is a very annoying situation. Does anyone have a remedy for this?
Apparently, I happened somehow to switch to the vim schema. Once I became aware of this, I simply switched back to the VS schema which I'm used to, and everything works as desired.

all spaces replaced by tabs when ctrl+shift+f

working in eclipse,when I type 'tab',it insert 4 spaces,it works well.but after ctrl +shift +f to format,all the 4 space will been replaced by tabs.how to stop it?
Window->Preferences->Java->Code Style->Formatter: Edit Active profile->Indentation->Tab Policy: Select Spaces
You can't change the default profiles so you must provide a new profile name, then press the Apply button, then the Okay button. It may help to press the Apply button once you have returned to the Formatter screen. Go back and look at the Tab Policy again to verify that your changes were saved.
Including the above suggestions, I recommend searching for code style or style to get to the coding standard being applied with the user requests formatting of the code. It is possible that the code style uses tabs instead of spaces.
The only way that currently works is to use Ctrl-A Ctrl-X Ctrl-V on all code after using Ctrl-Shift-F. This will replace all tabs with spaces.
Don't know which version of Eclipse you are using but for
Eclipse 3.6 (for example) you may go to
Window->Preferences->General->Editors->Text Editors->Insert spaces for tabs
This will change Eclipse to use spaces instead of tabs
The place in the Preferences may be different depending on which version of Eclipse you use. If you load the preferences window you can use the search function there to find "Formatters" and set your preferences for different types of files, or generally.

Validate Autocomplete in Eclipse

Coming from Visual Studio and starting a project in Java, I realized I couldn't cope with having to press ctrl+space to have the autocomplete panel show up. An easy workaround was to set all keyboard characters to be trigger characters for autocompletion.
My only problem is that, when presented with autocomplete suggestions, a single press on the space bar will write the first proposition. In situations where I'm happy with the suggestions, that's just fine. In situations where I actually want to use what I wrote down initially, I have to press 'escape' first to remove the autocomplete panel before I can press 'space' safely.
Netbeans doesn't use the space bar as a validating key for autocompletion (only 'enter' does that) and I like that behavior. Any way to replicate it in Eclipse?
Thanks in advance for your answers!
EDIT: I should have mentioned I'm using Eclipse on the Mac.
Guillaume
I have the same problem with Eclipse Indigo on Windows XP actually. Coming from intellij idea, I also felt the need to set the whole keyboard to trigger auto-complete.
A quick proof that SPACE key does accept suggestions : type inte on a new line. If the auto-complete menu shows, press SPACE. It goes for Integer.
If anyone knows how to set the SPACE key to "ignore suggestions", it would be great, because the escape key on my keyboard is also too far away :)
Thanks
Edit : actually the best would be to have only the ENTER key validating, because ';' and '(' also seem to validate
I just tried to reproduce your behavior, but couldn't. Here is the configuration I have (and the steps I have done to reproduce):
I have installed Indigo (current version of Eclipse, version number 3.7).
I did not change any configuration there, this is what is the default:
Under Window > Preferences > Java > Editor > Content Assist, I have the following settings:
Completion inserts (instead of overwrite)
Insert single proposal automatically (which is ok most of the time)
not insert common prefix automatically
I have a simple class, go down to a method, and do the following steps:
Enter this.no and wait some time. Sometimes I have to press CTRL + SPACE, sometimes not.
Proposal pops up which includes notify and notifyAll.
I press SPACE and a space is inserted in the text, the autocomplete suggestions are closed without inserting anything.
I do not know if older versions of eclipse have the same behavior.

eclipse keyboard

i have encountered a really weirdest bug in eclipse, i would love if someone will help with it.
after a while of coding eclipse simply starts to "mix up" with the letters that are being typed. meaning i press 's' and it displays a different letter 'o' and it happens for other keys as well d becomes an e...and so on.
the weird thing is that out side of eclipse every the keyboard works fine...
and if i restart eclipse every think goes back to normal...till it happens again
i have switched keyboard, reinstalled eclipse... any other ideas?
i work with windows XP, and galileo-php-eclpse
any ideas?
Sometimes you use combination of keys Alt+Shift+SomeOtherLetter. If you don't choose SomeOtherLetter quick enough keyboard will be switched to some other defined in Control Panel -> Regional And Language Options -> Languages -> Details...
After restarting Eclipse will pickup default keyboard language.
Just do a Alt+Shift it will switch among the languages of your windows.
For example in my system I have defined two languages German and English So if I do Alt+shift
It switches to German from English and vise versa.