none
How can I use AltGr as Ctrl+Alt in Visual Studio 2015?

    Question

  • Hi, I'm trying to set up some text editor keyboard shortcuts in VS 2015 but am having problems with AltGr. When setting shortcuts in Tools -> Options -> Keyboard, AltGr registers as Ctrl+Alt (e.g. AtrGr+V shows in the shortcut keys text box as Ctrl+Alt+V), however when I'm in the text editor AltGr doesn't appear to do anything - either as Ctrl+Alt or as a regular Alt.

    How can I fix this so that AltGr behaves as Ctrl+Alt in the text editor?



    • Edited by MorayM Friday, November 18, 2016 11:07 AM
    Friday, November 18, 2016 10:57 AM

All replies

  • Hi MorayM,

    I got some information here:

    https://en.wikipedia.org/wiki/AltGr_key

    Control + Alt as a substitute: Originally, US PC keyboards (specifically, the US 101-key PC/AT keyboards) did not have an AltGr key because that was relevant to only non-US markets; they simply had "left" and "right" Alt keys.

    Other members also met the similar issue before:

    http://stackoverflow.com/questions/36780208/visual-studio-angle-bracket-alt-gr-not-working

    So it seems that it is related to the keyboard layout and configuration or others.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 21, 2016 11:25 AM
    Moderator
  • Hi Jack,

    Yes I saw that post, but I asked this question as AltGr behaves differently in different parts of VS. It behaves as I would expect it to behave in the Tools window (indicating that my keyboard driver maps it to Ctrl+Alt) however it does nothing in the text editor window.

    For example, I want to map Resharper's Paste Multiple action to AltGr+V as on my keyboard it's an easier combination than the default Ctrl+Shift+V. I've removed all the existing shortcuts that use Ctrl+Alt+V and reassigned it to the Paste Multiple action in the text editor. However when I'm in the text editor Ctrl+Alt+V works as expected but AltGr+V does nothing. Might this be a VS bug?

    Monday, November 21, 2016 11:43 AM
  • Hi MorayM,

    Thanks for your friendly response.

    Sorry for that no the same PC keyboard in my side. But I will provide a path for you.

    (1) Not custom the keyboard in your VS IDE, you could also custom it in other software like word or windows keyboard or others. And check that whether it has the same issue as the VS IDE. So we could know that whether it is related to the keyboard or the VS IDE or others.

    (2) Could you tell me the real windows and VS Environment? Do you use the English VS and windows Environment? What is your PC keyboard? I'm think about that whether there are other language supports for this issue, so they could use the same Environment to repro this issue. 

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 22, 2016 2:24 AM
    Moderator