---
title: "getNumKeys"
canonical: "https://help.vicon.com/space/ShogunPost121/1253736846/getNumKeys"
format: markdown
---
# Description

Returns the number of frames on which a module has keys.

Used to determine the number of frames on which the primary selected module has keys.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getNumKeys propertyName[-s] [-onMod string]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `propertyName` | string | yes | Channel property |

### Flags

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `s` | 0 | — | — | Selected keys only |
| `onMod` | 1 | string | — | Returns key count for the specified module. |

## Return value

integer 

> Macro (scroll-pagebreak)

## Examples

```plaintext
int $i;
select RKNE; $i = `getNumKeys "Translation"`;
print $i; //Output "4058"
selectRange 1 100;
selectKeys -ranges;
$i = `getNumKeys "Translation.X" -s`;
print $i; //Output "100"
select;
$i = `getNumKeys Translation -onMod RKNE`;
print $i; //Output "4058"
```

# Additional information

## Related commands

- [breakTangents](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736556)
- [unbreakTangents](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738586)