damd
damd

Reputation: 6947

How do I disable AltGr-to-Alt-and-Ctrl key translations in PyCharm?

I have a custom Swedish Dvorak keyboard layout which relies heavily on the AltGr modifier on Swedish keyboards. However, when I hit e.g. AltGr+u (which should generate a forward slash), PyCharm interprets it as Alt+Ctrl+u, which is apparently bound to something special.

Since I'd rather not play whack-a-mole with PyCharm...is there any way to solve this in any way other than removing all taken Alt+Ctrl key bindings manually?

Upvotes: 3

Views: 3074

Answers (2)

Richard
Richard

Reputation: 1

I had the same problem with a german keyboard layout. I need to press AltGr + 8 in order to print a '[', which I need for programming all the time. PyCharm interprets this as a shortcut for jumping in the code. This was really annoying.

For me it works fine, when I switch from 'Visual Studio' to 'Eclipse' keymap settings in PyCharm.

Upvotes: 0

techturtle
techturtle

Reputation: 2587

You might want to give AutoHotKey a try. The command sequence <^>! listens for the AltGr modifier key, like so:

<^>!u::Send {/}

This line should listen for the AltGr + U key sequence and send the forward slash as expected. Because AutoHotKey listens to the keyboard and then intercepts keystrokes and sends characters separate from the underlying applications, it should be able to grab the keystroke you use and send the correct character to PyCharm, before PyCharm has a chance to interpret and alter the keystroke on its own.

This suggestion is based on similar situations I have dealt with. I have neither PyCharm nor a Swedish keyboard (Dvorak or otherwise) with which to test this.

Upvotes: 0

Related Questions