---
title: "browser(_:shouldTypeSelectFor:withCurrentSearch:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbrowserdelegate/browser(_:shouldtypeselectfor:withcurrentsearch:)"
---

# browser(_:shouldTypeSelectFor:withCurrentSearch:)

Sent to the delegate to determine whether keyboard-based selection (type select) for a given event and search string should proceed.

## Declaration

```swift
@MainActor optional func browser(_ browser: NSBrowser, shouldTypeSelectFor event: NSEvent, withCurrentSearch searchString: String?) -> Bool
```

## Parameters

- `browser`: The browser.
- `event`: The keyboard event being processed.
- `searchString`: The keyboard-based selection string. It is nil when no keyboard-based selection has begun.

## Return Value

Return Value true to allow the selection; false to disallow it.

## See Also

### Related Documentation

- [allowsTypeSelect](appkit/nsbrowser/allowstypeselect.md)

### Managing Selection Behavior

- [browser(_:typeSelectStringForRow:inColumn:)](appkit/nsbrowserdelegate/browser(_:typeselectstringforrow:incolumn:).md)
- [browser(_:nextTypeSelectMatchFromRow:toRow:inColumn:for:)](appkit/nsbrowserdelegate/browser(_:nexttypeselectmatchfromrow:torow:incolumn:for:).md)
