IntelliJ IDEA: Can't type { and [

2020-04-02 07:16发布

So I have a problem where in IntelliJ IDEA I can't type In

<br>{ --(Alt Gr + B or Ctrl + Alt + B)  

and

[ --(Alt Gr + F or Ctrl + Alt + F)  
<br>

I did try to edit shortcuts but there are no shortcuts that match mentiond ones
And when I try using SquareBrackets I get a message a little bit like this: "Cannot perform refactoring. Caret should be positioned at the name of local variable or expression to be refactored"

How can I fix this problem?

7条回答
可以哭但决不认输i
2楼-- · 2020-04-02 07:41

There are related issues on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-177327, https://youtrack.jetbrains.com/issue/IDEA-91975 Problem should be fixed in IDEA 2018.3. By the way, you could try to add "actionSystem.force.alt.gr=true" option using "Help | Edit Custom Properties"

查看更多
▲ chillily
3楼-- · 2020-04-02 07:45

Guys I found a solution to BOTH of the problems So here are the solutions:

This applies for:
KeyBoards Without [ and { keys (I just English-UK ones have those keys)
and IntelliJ IDEA Deafult KeyMap (May work for some others)

For the "Can't type [ in IntelliJ IDEA":
1.Press Ctrl + Alt + S ,Alt Gr + S or Goto: File > Settings > KeyMap
2.Extend Folder:Main Menu, then folder Refactor and THEN folder Extract
3.Right-Click onto Field...
4.In the pop-up menu Click on Remove Ctrl + Alt + F

For the "Can't type { in IntelliJ IDEA":
1.Press Ctrl + Alt + S ,Alt Gr + S or Goto: File > Settings > KeyMap
2.Extend Folder:Main Menu, then folder Navigate and THEN folder Bookmarks
3.Right-Click onto Implementation(s)
4.In the pop-up menu Click on Remove Ctrl + Alt + B

Hope that helped You :D

查看更多
Juvenile、少年°
4楼-- · 2020-04-02 07:46

It worked for me by going to Ctrl+Shift+A (actions) -> Registry... and then disabling "actionSystem.force.alt.gr"

查看更多
对你真心纯属浪费
5楼-- · 2020-04-02 07:48

Worked for me: While focus is on PyCharm then Ctrl+Shift+A (actions) -> Registry... and then enabling "actionSystem.force.alt.gr"

查看更多
Root(大扎)
6楼-- · 2020-04-02 07:56

In my case it was caused by LaTeX plugin for IntelliJ IDEA. After its installation the 'Toggle Star' option key was set 'alt+shift+8' which coincides with { of my keyboard. Hence the solution is analogous to your own answer:

1) Open Keymap (double-shift and type keymap)

2) Expand: Main menu > LaTex

3) Right-click 'Toggle Star' and remove the mapping.

4) Apply + Ok

查看更多
欢心
7楼-- · 2020-04-02 07:58

An other solution (not related to Jetbrain's suite).

This solution suits you if :

  • The problem is sporadic (occurring at irregular intervals and eventually disappear)
  • AltGr combinations seems not works on any other windows app

In this case this is a well known bug in Windows, just close all your RDP sessions and the AltGr will start acts as it should.

查看更多
登录 后发表回答