none
Keyboard shortcut name for Find's "Match whole word" RRS feed

  • Question

  • I recently assigned a different hotkey/keyboard shortcut to ALT+W (which was the Find "Match whole word's" default keyboard shortcut), and now want to assign a different keyboard shortcut for "Match whole word." I cannot find the command string associated with it.

    All I see for Edit.BriefFind<...> is Prev, Repeat, Replace, ToggleCaseSensitivity, and RegExpr.

    Friday, December 6, 2019 11:58 PM

Answers

  • Hi Tianyu,

    To clarify, CTRL+F then CTRL+W can be modified. I have assigned a global shortcut of ALT+W to Window.PinTab. Even after pressing ALT+F to open the Find window, pressing ALT+W pins my current file.

    But good news--I found the solution! =) I guess "Use new shortcut in: Global" overrides any other hotkey. I don't think there is a string command assigned to "Find whole word" in the Options > Environment > Keyboard window. I believe CTRL+F then CTRL+W is the default hotkeys for "Find whole word," but the my global hotkey overwrote it. I highlighted "Window.PinTab" from the list, and then used the Remove button. Voila. Thanks everyone for helping.

    • Marked as answer by coffeeelove Wednesday, December 11, 2019 2:56 AM
    Wednesday, December 11, 2019 2:56 AM
  • [...] I'd like to avoid resetting my defiend hotkeys, but want ALT+W to be back to what it was before!

    Then go to Keyboard options dialog, find your command, check that <Alt+W> is still assigned (see the dropdown box), and press “Remove”. Then find “Images.RoundedRectangleTool” and re-assign the <Alt+W> key, if not assigned.

    Go to Quick Find or Find in Files dialog and check that <Alt+W> selects “Match whole words” option (when dialog is focused).



    • Edited by Viorel_MVP Wednesday, December 11, 2019 5:36 AM
    • Marked as answer by coffeeelove Thursday, December 12, 2019 7:53 AM
    Wednesday, December 11, 2019 5:32 AM

All replies

  • Hi coffeelove,

    I'd like to confirm:

    1) Scope of the keyboard shortcut that you want to assign.
       Is it applied to the whole Windows (applied to Windows itself and all applications), or specified/applied to some specific application (e.g. applied to only MS-Word)?

    2) Do you want to do it with using command prompt?

    Regards,

    Ashidacchi -- http://hokusosha.com


    • Edited by Ashidacchi Saturday, December 7, 2019 9:58 AM
    Saturday, December 7, 2019 9:57 AM
  • It seems that these keys cannot be redefined. Compare with “Find in Files” dialog, where <Alt+W> has the same meaning, because “w” represents a dialog-level access key (“mnemonic”). Probably “w” is a predefined mnemonic in “Quick Find” dialog too.

    Saturday, December 7, 2019 1:33 PM
  • Hi coffeeelove,

    Thank you for posting here.

    As far as I know, ALT+W is assigned to Image.RpundedRectangleTool command by default.

    For your requirement, I am not sure if you’d like this command: Edit.FindinFiles. This command is assigned to Ctrl+Shift+F, you could try to press this shortcut key and check if this feature is what you want and if you want to customize this shortcut key, you could press shortcut keys you want in “Press shortcut keys” box from keyboard -> Assign.

    If I misunderstand you or this feature isn’t what you want, please feel free to let me know.

    Any feedback will be expected.

    Sincerely,

    Tianyu


    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, December 9, 2019 2:51 AM
  • Hi Ashidacchi,

    (1) The scope is within the Find window (default CTRL + F) within the Visual Studio application.

    (2) Are you asking if I want to fix this via the command prompt? I just want to re-enable the default hotkey without having to wipe out all of my current settings.


    • Edited by coffeeelove Tuesday, December 10, 2019 8:33 AM
    Tuesday, December 10, 2019 8:32 AM
  • Hi Tianyu,

    Yes, ALT + W is assigned to Image.RoundedRectangleTool by default. But with the Find window open (CTRL + F), this hotkey was used for "something" that pressed the "Match whole word" button on the Find window. I've uploaded an image to IMGUR to show what I am describing. Thanks!

    https://imgur.com/K25uQg0

    Tuesday, December 10, 2019 8:34 AM
  • Ahh, this would be unfortunate. =( I'd like to avoid resetting my defiend hotkeys, but want ALT+W to be back to what it was before!
    Tuesday, December 10, 2019 8:35 AM
  • Hi coffeeelove,

    Thank you for your feedback.

    I have tested in my side and I find that the “Match whole word” actually assigned to ALT + W. And this shortcut will be triggered after you press Ctrl + F and enter the name of the word -> press ALT + W(or select the word first and press Ctrl+F then press ALT+W).

    I’m afraid, this shortcut key used differently when perform the above operation. If you focus your cursor/selected to this search window, then ALT + W will press “Match whole word” button. However, if you focus your cursor to the editor window, then ALT + W will open Window option from menu.

    Like the gif below, I focus cursor to editor window -> press ALT+W -> focus cursor to editor window -> Ctrl + F -> ALT+W(several times) -> focus cursor to editor window -> ALT+W

    So this is by designed, I mean press Ctrl+F then press ALT+W and could not be modified.

    If you really need this feature, we suggest you could go to Help -> Send Feedback -> Report a Problem/Suggest a Feature to the Visual Studio product team.

    BTW, if you want to reset the configuration/settings you could go to Tools -> Import and Export Settings -> Reset all settings -> Next -> choose “No, just reset settings, overwriting my current settings” -> Next -> Finish.

    Sorry for this inconvenience and thanks for your understanding.

    Sincerely,

    Tianyu


    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, December 10, 2019 9:26 AM
  • Hi coffeeelove,

    Thank you for replying to my confirmation.

    about (2):
      Yes, I asked if you want to do via the command prompt.  Now, I can understand (2).

    about (1):
      If the scope is within Visual Studio (especially Code Editor in Visual Studio), I'm wondering why you want the keyboard shortcut for Find Whole Word.
    In Visual Studio (in Code Editor), <Ctrl + F> has a function of incremental search. So, if we want search the whole word (like a part of a word) by <Ctrl + F>.


      Sorry, if I misunderstand your intention of <Alt + W>.

    Regards,

    Ashidacchi -- http://hokusosha.com

    Tuesday, December 10, 2019 10:29 AM
  • Hi Ashidacchi,

    CTRL+F then CTRL+W is the default setting for "Find whole word" in the context of the Find window. I just want that hotkey back to default settings (without wiping out my other hotkeys).

    "Find" has incremental search, but "Find whole word" option is case-sensitive. It makes things like Find and Replace a lot easier when coding.

    Wednesday, December 11, 2019 2:48 AM
  • Hi Tianyu,

    To clarify, CTRL+F then CTRL+W can be modified. I have assigned a global shortcut of ALT+W to Window.PinTab. Even after pressing ALT+F to open the Find window, pressing ALT+W pins my current file.

    But good news--I found the solution! =) I guess "Use new shortcut in: Global" overrides any other hotkey. I don't think there is a string command assigned to "Find whole word" in the Options > Environment > Keyboard window. I believe CTRL+F then CTRL+W is the default hotkeys for "Find whole word," but the my global hotkey overwrote it. I highlighted "Window.PinTab" from the list, and then used the Remove button. Voila. Thanks everyone for helping.

    • Marked as answer by coffeeelove Wednesday, December 11, 2019 2:56 AM
    Wednesday, December 11, 2019 2:56 AM
  • Hi coffeeelove,

    I'm using Visual Studio 2019 (mainly creating VB.NET applications).
    We can make "Find" case-sensitive.
        

    Can't this satisfy your needs? 

    Regards,

    Ashidacchi -- http://hokusosha.com

    Wednesday, December 11, 2019 3:08 AM
  • [...] I'd like to avoid resetting my defiend hotkeys, but want ALT+W to be back to what it was before!

    Then go to Keyboard options dialog, find your command, check that <Alt+W> is still assigned (see the dropdown box), and press “Remove”. Then find “Images.RoundedRectangleTool” and re-assign the <Alt+W> key, if not assigned.

    Go to Quick Find or Find in Files dialog and check that <Alt+W> selects “Match whole words” option (when dialog is focused).



    • Edited by Viorel_MVP Wednesday, December 11, 2019 5:36 AM
    • Marked as answer by coffeeelove Thursday, December 12, 2019 7:53 AM
    Wednesday, December 11, 2019 5:32 AM