Why can't I type "#" in InttelliJ IDEA? - intellij-idea

In the editor window in IntelliJ IDEA, I can't type #, which should be done by pressing AltGr + Q with my keyboard. If I press that sequence of buttons, nothing happens at all. It doesn't open any menu option nor window nor runs any operation.
This is true for every project I work with this IDE.
I don't have this problem in any other text field of any other program. I don't have any plug-in installed. I don't see this problem in any other IntelliJ IDEA from any other user, whether I know in person or by Internet. I'm not using any shortcut that uses Ctrl + AltGr + Q (it doesn't even accept shortcuts that start with AltGr or even AltGr for that matter), so that can't be the problem.
I can type Chinese characters so I don't think it's a character encoding thing nor a problem with the keyboard. I can paste the character, though.
What can be the reason for this, and how can I type #?

Related

Intellij outputs wierd characters for keys that are should not output anything

Intellij keeps making my life difficult. I decided to go to the bottom with it today and create a new keyboard mapping for mac using the program ukulele.
By default, Mac will output all kinds of weird characters when you hold down the option key. Now, since I never use any of those, I prefer to use them for shortcuts and using ukelele you can create a new keyboard layout. The program works fine. It is good.
Now, shortcuts are not filled on the keyboard, and in the learning phase, you will try some that are not working, or assigned.
When this happens, Intellij outputs weird characters instead. Characters such as for instance for the combo option + r. Same for e, t and so on.
This does not occur in chrome, the terminal, TextEdit or any other program.
Intellij seems to realize the combo does not result in anything and decides to put out the same character for all those keys.
As you see in the picture below from the macOS build-in keyboard viewer, the keys are not mapped (option being held down) at all.
Note, that only Intellij so far outputs these characters.

Use VI keys everywhere instead of cursor keys

I like VIM a lot because it kind of doubles the power of my keyboard in a way. It's either in insert or motion or whatever they call it mode.
Navigating through source code, typing code, while being able to keep my hands in the touch type position is great.
But when a dialog box is opened (eg. the one using ctrl+F12), if I have to select something other than the first one in the list, I am forced to have to move my right hand to the cursor keys.
Is there a way so that I can use J and K or else something with ctrl or alt or something, so that I can select an item while keeping my hands in the touch typing position?
You can redefine shortcuts for the Up, Down, Left, Right actions in File | Settings | Keymap (the regular keymap that has nothing to do with IdeaVim). IdeaVim provides Vim emulation only for code editors like file editors, interactive language consoles, etc.
Edit: I guess you can't use j and k since characters typed in the structure window are reserved for searching. But you can use Ctrl+N and Ctrl+P which is the same as the navigation shortcuts for pop-up windows in Vim.
Edit 2: You can't use Ctrl+N and Ctrl+P as well due to this bug in IntelliJ.

How to disable escaping when copy and pasting in IntelliJ?

When I copy and paste string text into quotes Intellj always escapes certain characters like ", etc,. How can I disable this annoying feature?
You can use Ctrl+Alt+Shift+V (presumably ⌘+Alt / Option+Shift+V for OS X) to do Paste Simple (also available from the right-click context menu). This will paste your most recent clipboard content without escaping it.
Many other programs that offer "simple pasting" will use Ctrl+Shift+V instead, but in IntelliJ that opens an IntelliJ clipboard memory dialog, where you can choose previously copied text to paste.
Note that these are all default, but customizable, keyboard shortcuts.
I found the Ctrl + Shift + Alt + V combination a bit cumbersome, and after some digging I found an alternative solution that was more to my liking. I want to share it here in case it is useful to anyone else.
You can actually edit the key mappings for the paste simple command, and replace them with the standard Ctrl + V that most people are familiar with.
Simply go into File -> Settings -> Keymap and enter "paste" into the search box to bring up all the various paste commands. Double click "Paste Simple" and enter Ctrl + V for the shortcut.
You will be warned that the shortcut is currently assigned and you will be given the option to remove it. After doing so, you have pretty much replaced the annoying "enhanced paste" with the standard "simple paste".
Hope that helps someone out there :)
as of December 2019, at least in IntelliJ Ultimate 2019.3, there is a configuration option to disable this annoying behavior: Go to Editor --> Smart Keys --> Javascript and uncheck the "Escape text on paste in string literals" checkbox.

Something changing how many keys are read in Jedit

Occasionally something will happen in Jedit (I guess I am pressing some key sequence that is putting me into some other mode), and the keys I press show up as all sort of strange symbols. I don't know how to fix the behavior; closing and re-opening Jedit doesn't help. The only thing that works is restarting my computer.
I also notice that sometimes there is a difference between right ctrl and left ctrl. For example, right now left ctrl + s will save my file, but right ctrl + s inserts the symbol ß into the buffer.
Can someone please explain why this happens?
I guess this is probably more a OS thing than a jEdit (not Jedit) thing.
You can see the key events that are sent to jEdit with the help of Utilities -> Troubleshooting -> Keyboard Tester... and you will probably see the your OS is sending wrong things to jEdit. Maybe you are using Windows and pressed the default Alt+TAB shortcut to change the keyboard layout. You can also show the language bar in your Taskbar to always see which keyboard layout is selected currently.
Oh, btw. if you close jEdit with the red cross in the upper right, you are probably only closing the View, not quitting jEdit. If you press Ctrl+Q or select File -> Exit, then jEdit is really closed and can be restarted. If you still think this is a jEdit rather than an OS problem, you might consider opening a bug ticket for jEdit.

TextMate map key for next complete to command + spacebar

I found a lot of tutorials and forum questions around remapping key bindings in Textmate and for the most part I know what needs to be done as far as copy the KeyBindings file and then make the changes needed. More on what I am talking about here http://blog.macromates.com/2005/key-bindings-for-switchers/
I am interested in re-mapping the esc key for nextComplete to control + spacebar. The problem is I am having a hard time finding what the code is for the spacebar or if this is even supported.
I mainly do actionscript development in eclipes and code hinting dialogue is triggered by this key combo and I would like to have the same in Textmate. Hitting the esc key kind of sux. I thought I would get used to it but the fact is that it just kills the flow of typing the rest of your code.
I could use some help figuring out what he code is for the space bar. I know control key is the ^ symbol. I tested this by changing the keybinding to ^s and it remapped just fine.
I think this one can be done with the OS X gui:
System Preferences, Keyboard, Click Keyboard Shortcuts Tab
Click the little Plus, and choose Application: Textmate.app, Menu Title: Next Completion, Type Command Space (or Control Space) and click Add and that should work. You might want to remove conflicting shortcuts - possibly spotlight?
For future reference, I used Key Codes to find the key for space is: \UF20