<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBrowserDelegate/browser(_:shouldTypeSelectFor:withCurrentSearch:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSBrowserDelegate(im)browser:shouldTypeSelectForEvent:withCurrentSearchString:"
  },
  "title" : "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.

```
@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

<doc://com.apple.documentation/documentation/Swift/true> to allow the selection; <doc://com.apple.documentation/documentation/Swift/false> to disallow it.

## See Also

[`var allowsTypeSelect: Bool`](/documentation/AppKit/NSBrowser/allowsTypeSelect)

A Boolean that indicates whether the browser allows keystroke-based selection (type select).



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)