Bug Report T952539
Visible to All Users

Feature Advisor - Shortcuts shown in notifications are not localized for different keyboards

created 4 years ago

Today I have got the CodeRush advisory: Comment Selection with "/" Key.

This doesn't work (at least on my keyboard).

Can you imagine, why? I am using a German keyboard layout and the "/" character is reached by shift+7. If I press the key labeled "Ä" (i.e. pressing the small "ä"), the selection is (un)commented.

Could you please localize CodeRush to take care of different keyboard layouts or omit such nonsense advisories?

Comments (1)
DevExpress Support Team 4 years ago

    Hello,
    You are right. The "Feature Advisor" suggests an incorrect shortcut, the suggested shortcut should be localized and should match with shortcut in CodeRush shortcut options (Extensions->CodeRush->Shortcuts).

    T952539.png

    We will try to fix the problem as soon as possible, once we will fix it, we will notify you in the context of the current ticket.

    Answers approved by DevExpress Support

    created 4 years ago

    We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

    Note: Hotfixes may be unavailable for betas/updates set for release within a week.

      Comments (2)

        With CodeRush 20.2.6 you have changed the key to "#". But this key doesn't work on German keyboard layout either. On German keyboards the "#" is mostly located on the right side between "Ä" and "Enter" and reachable without Shift.
        In Jetbrain's development environments this function works on any keyboard layout like a charm. Pressing Ctrl and the key where the "/" is located (whether it is reachable with shift or not) triggers the comment/uncomment function.

        DevExpress Support Team 4 years ago

          Hi,

          Thank you for informing us about your results.

          With CodeRush 20.2.6 you have changed the key to "#".

          First of all, I need to explain that we didn't change the shortcut. As you can see in the screenshot in Dmitry's post, the shortcuts for the comment/uncomment code were '#' for C# and 'ä' for Visual Basic in the German keyboard layout in previous versions as well. We have corrected the way these shortcuts are displayed in the Feature Advisor, and now it shows actual shortcuts.

          CodeRush shortcuts are bound to the special code of keyboard keys. Some keys have the same code, but different characters in different layouts. This is true for the comment/uncomment command shortcuts. The key that types the '/' character for the English layout corresponds to the '#' character in the German layout. Please note that Visual Studio has the same behavior for key bindings. I have recorded a screencast that illustrates it and attached it to this post.

          You can manually change the shortcut to Shift + 7 in the German layout. To learn how to change shortcuts, please refer to the corresponding section of the following article: [How to Resolve Keyboard Shortcut Conflicts][0].
          [0]: https://docs.devexpress.com/CodeRushForRoslyn/401700/examples/settings/how-to-resolve-keyboard-shortcut-conflicts

          In Jetbrain's development environments this function works on any keyboard layout like a charm. Pressing Ctrl and the key where the "/" is located (whether it is reachable with shift or not) triggers the comment/uncomment function.

          We agree that this behavior can be improved. We will consider the possibility of making shortcuts for different keyboard layouts more convenient.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.