---
name: "input_mt_get_slot_by_key"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/input_mt_get_slot_by_key"
---

# input\_mt\_get\_slot\_by\_key(9)

return slot matching key

## NAME

input\_mt\_get\_slot\_by\_key - return slot matching key

## SYNOPSIS

**int input\_mt\_get\_slot\_by\_key(struct input\_dev \*** *dev***, int** *key***);**

## ARGUMENTS

*dev*

input device with allocated MT slots

*key*

the key of the sought slot

## DESCRIPTION

Returns the slot of the given key, if it exists, otherwise set the key on the first unused slot and return.

If no available slot can be found, -1 is returned.

## COPYRIGHT
