Keybinding problems

Answered
Hi,

I'm experiencing a very annoying problem with Pycharm. I can't type square brackets [
Square brackets are used all the time in Python, and I can't open them, because I can't type the left one.
The right square bracket works, but not the other one. I'll explain why-
Keyboard input layout for my language (which I am used to), has square brackets set to Alt+F and Alt+G.
It works in any other program, but not in Pycharm. In Pycharm, if I hit Alt+F it just says "Cannot perform refactoring using selected elements".

Okay, it looks like Alt+F is a shortcut to something called refactoring. But when I browse the keymap in Pycharm settings, I swear I can't find that shortcut anywhere. I can't unbind it!
It's starting to get so frustrating that I'm probably going to switch to some other code editor, unless I find a way to fix this.

If anyone has any idea on how to change this, please let me know.
Thank you in advance!

EDIT: SOLVED! Square brackets on my keyboard are typed using the right Alt (Alt Gr), which is the same as Control Alt.
(I forgot that Alt Gr is basically Ctrl+Alt)
Well, turns out that there was Refactoring binded to Ctrl+Alt+F. Removed that and I can type square brackets now. Yay [[[[[[[
10 comments
Comment actions Permalink

I have pretty same problem on Webstorm and IntelliJ. I can't type comments in my national language as there are shortcuts assigned to OPTION key on Mac). The option key in most text-editing-applications is registered for national keys. Why da heck you use it for shortcuts in your apps?

0
Comment actions Permalink

it would be useful if you would write where the hell is the refactoring thing, im just on the same issue and i cannot find any "refactoring" in pycharm keymap bound to alt+f or ctrl+alt+f...
EDIT: after couple more searches, for anyone interested, the keymap function is called "Field..." and it can be found under Refactor - Extract.

0
Comment actions Permalink

Hi,

In case you need to find an action by a shortcut, you can use the following button:

Also, you are free to reassign shortcuts or change the Keymap scheme.

0
Comment actions Permalink

Thank you Sergey.

But I think we missed point here. It is not a solution to keep me reassigning plenty of shortcuts on all apps I use - like PyCharm, WebStorm, IntelliJ on all machines I use (at least three). The thing is the all text applications in the world don't use ALT (OPTION on Mac) key for it's own shortcuts. All operating systems in the world have reserved ALT/OPTION key for national characters. for instance alt-c is "ć" in my language. Therefore it is really bad idea to assign alt-c shortcut as you can no longer normally type text in your language - neither as comments, or commits, or TODOs. Some ALT/OPTION key combinations are used to make special characters like "∑", "®", "©", which are used sometimes in comments.

It is really annoying and destructive for my code, when I type some comment for my self - like TODO and I get code destroyed because one of shortcuts jumped me in other place in a code, etc, etc. And I cannot type! I have to switch to NORMAL text editor, type text and copy-paste it to IntelliJ. Crazy and stupid to do it like this, don't you think?

You should disable all ALT/OPTION shortcuts in all your apps by factory default. It is anti-standard behaviour for text-editing-application to do something on ALT/OPTION key combination

 

0
Comment actions Permalink

I see. Please feel free to submit a feature request about it to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY and let us know if you need any help.

By the way, I believe you can customise shortcuts in one IDE and then import them into another one, so you won't have to do it again manually.

0
Comment actions Permalink

The thing is I don't want to customize shortcuts. It's bad idea when you cooperate with other people and from time to time you do pair-programming. It's nightmare when one's keyboard shortcuts does different things. I use at least three your apps - WebStorm/PyCharm/IntelliJ, each of them has different shortcuts for same things like Go-To-Line, so I would have to do customizations on all these three apps and export those three and import them on other machines.... and... it will fail. As Mac and Linux have some different keyboard layouts, so when I export my CMD+<something> shortcuts from Mac it won't work on Linux. Neither I don't want to configure all shortcuts on Linux and export it to Mac, as this would lead to change all CMD+<something> shortcuts to CTRL+<something> shortcuts on Mac and it wouldn't be ergonomic to use on Mac's keyboard.

0
Comment actions Permalink

Agreed. It should not be that way. I am not sure if it is related to any other feature requests, so I ask you to submit another one.

0
Comment actions Permalink

Hi there,

I have a similar issue. Since a updated PyCharm to this build : #PC-191.6183.50, i can't use any of the (Ctrl + Alt + [0-9]) symbole of my keyboard, eventhough there is not shortcuts assign in the Keymap for any of those associations. I have no error message, it just doesn't do anything. Does anyone have an idea of what can be the issue ?

EDIT: solved with the solution given in the first comment of the case IDEA-88508

1
Comment actions Permalink

Thanks linfame!

I was experiencing the exact same thing on my Danish keyboard.

Solution that worked for me:

  1. Click the Help menu, select Edit Custom Properties
  2. Add actionSystem.force.alt.gr=true to idea.properties, if asked to create the file click yes (obviously!)
  3. Restart the IDE
  4. Go crazy and make all the lists in lists in lists you want!
6

Please sign in to leave a comment.