---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.cursor.Accessor.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/util.cursor.Accessor.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# util.cursor.Accessor

Object providing access to the cursor added to the map.

[Constructor](#constructor-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
util.cursor.Accessor(key)
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`key`](#param-key)[*](*star) | — | Type: String

Key that corresponds to the cursor in the cursor storage. ||
|#

\* Mandatory parameter/option.

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [getKey](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.cursor.Accessor.md#getKey)() | String | Returns the current key for access to the cursor in the cursor storage. ||
|| [remove](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.cursor.Accessor.md#remove)() | | Removes the cursor from the map. ||
|| [setKey](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.cursor.Accessor.md#setKey)() | | Sets a new key for accessing the cursor. For this key, there should be a corresponding cursor in the cursor storage. If this cursor is active, it is immediately changed.||
|#

## Methods details {#method_detail}

### getKey {#getKey}

```javascript
{String} getKey()
```

**Returns** the current key for access to the cursor in the cursor storage.

### remove {#remove}

```javascript
{} remove()
```

Removes the cursor from the map.

### setKey {#setKey}

```javascript
{} setKey()
```

Sets a new key for accessing the cursor. For this key, there should be a corresponding cursor in the cursor storage. If this cursor is active, it is immediately changed.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`key`](#setKey-param-key)[*](*star) | — | Type: String ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.