Version: 2021.2
LanguageEnglish
  • C#

SearchField.autoSetFocusOnFindCommand

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public bool autoSetFocusOnFindCommand;

Description

Changes the keyboard focus to the search field when the user presses ‘Ctrl/Cmd + F’ when set to true. It is true by default.

An ExecuteCommand event is dispatched when a user presses ‘Ctrl/Cmd + F’. The search field automatically handles this event and sets the keyboard focus on the text field. This behavior can be disabled by setting autoSetFocusOnFindCommand to false. It is true by default.