KeypadInput Cluster

Cluster ID: 0x0509  |  Endpoint: Media endpoint (TV, set-top box, etc.)

KeypadInput receives key inputs from remote controls and external controllers — directional navigation, numeric keys, media control keys, color function keys, etc. It is the core interaction Cluster for media devices such as smart TVs and set-top boxes, allowing phone apps to serve as remote controls. Key codes follow the HDMI-CEC standard (CEC Key Code), covering all common remote control buttons.

Three Key Categories

KeypadInput uses three Features to indicate which key categories the device supports: NV (Navigation keys: directional, select, menu, etc.), LK (Location keys: channel numbers, favorites, etc.), NK (Number keys: 0~9, Enter, etc.). Check the FeatureMap before sending keys to avoid sending unsupported key categories.

Commands

The KeypadInput Cluster has only 1 command and 1 response. The controller sends SendKey, and the device returns SendKeyResponse with the processing result.

ID Name Direction Description
0x00 SendKey Client → Server Send a key press to the device
0x01 SendKeyResponse Server → Client Device processing result for SendKey

SendKey — Send Key Press (0x00)

Sends a CEC key code to the device, simulating a remote control key press. The device processes the key based on its current state and returns SendKeyResponse with the result.

ParameterTypeDescription
KeyCode CecKeyCode Key code to send (see enum below)
Usage Scenarios

When the phone app serves as a remote control, the user taps a directional or select key, and the app sends the corresponding CecKeyCode via SendKey to the TV. For example, when the user presses "OK", it sends KeyCode = 0x00 (Select).

SendKeyResponse — Key Response (0x01)

The device's response to the SendKey command, indicating whether the key press was successfully processed.

FieldTypeDescription
Status StatusEnum Key processing result (see enum below)
// SendKey command example
// Send "Select" key (Select = 0x00)
{
  "KeyCode": 0       // CecKeyCode.Select
}

// Device returns SendKeyResponse
{
  "Status": 0        // StatusEnum.Success
}
Error Handling

Controllers should handle exceptions based on StatusEnum: on UnsupportedKey, grey out or hide the corresponding button in the UI; on InvalidKeyInCurrentState, notify the user that the key is not available in the current state (e.g., pressing pause when not playing).

Enum Definitions

StatusEnum

Processing results for SendKeyResponse.

0
Success Success — key press was processed normally by the device
1
UnsupportedKey Unsupported — device does not recognize this key code
2
InvalidKeyInCurrentState Invalid state — key not accepted in the current state (e.g., pressing pause when not playing)

CecKeyCode (CEC Key Codes)

Key code definitions following the HDMI-CEC standard, covering all common remote control buttons. Grouped by function for easy reference.

Navigation Keys (NV Feature)

Directional navigation, select, back, menu, and other basic interaction keys — the core control area of the remote.

0x00
Select Select / OK
0x01
Up Up
0x02
Down Down
0x03
Left Left
0x04
Right Right
0x05
RightUp Right-Up
0x06
RightDown Right-Down
0x07
LeftUp Left-Up
0x08
LeftDown Left-Down
0x09
RootMenu Root Menu
0x0A
SetupMenu Setup Menu
0x0B
ContentsMenu Contents Menu
0x0D
Exit Exit

Number Keys (NK Feature)

0~9 numeric input and Enter confirmation, used for channel number entry, password input, etc.

0x20
Number0OrNumber10 Number 0 (or 10)
0x21
Numbers1 Number 1
0x22
Numbers2 Number 2
0x23
Numbers3 Number 3
0x24
Numbers4 Number 4
0x25
Numbers5 Number 5
0x26
Numbers6 Number 6
0x27
Numbers7 Number 7
0x28
Numbers8 Number 8
0x29
Numbers9 Number 9
0x2B
NumbersEnter Number input confirm

Media Control Keys

Play, pause, fast-forward, rewind, record, and other media playback control keys.

0x41
Play Play
0x42
Stop Stop
0x43
Pause Pause
0x44
Record Record
0x45
Rewind Rewind
0x46
FastForward Fast Forward
0x47
Eject Eject
0x48
Forward Next Track / Next Chapter
0x49
Backward Previous Track / Previous Chapter
0x4B
PausePlayFunction Play/Pause Toggle

Location / Channel Keys (LK Feature)

Channel switching, favorite channels, program guide, and other channel-related keys.

0x30
ChannelUp Channel +
0x31
ChannelDown Channel -
0x32
PreviousChannel Previous Channel (recall)
0x60
Data Data / Info
0x53
ElectronicProgramGuide Electronic Program Guide (EPG)

Power / Volume Keys

Device power control and volume adjustment. These keys are typically not limited by Features and are supported by most devices.

0x40
Power Power On/Off
0x6B
PowerOffFunction Power Off
0x6C
PowerOnFunction Power On
0x41
VolumeUp Volume +
0x42
VolumeDown Volume -
0x43
Mute Mute
0x6D
MuteFunction Mute (mute only)
0x6E
RestoreVolumeFunction Restore Volume (unmute)

Color Function Keys

The four color shortcut keys on the remote (red, green, yellow, blue), with functions determined by the current UI context.

0x72
F2Red Red Key
0x73
F3Green Green Key
0x74
F4Yellow Yellow Key
0x75
F5Blue Blue Key
Full CEC Key Code List

Only the most commonly used key codes are listed above. The complete CecKeyCode enum is defined in Matter 1.4 spec Section 9.10.4.1, with 80+ values including text input keys (F1~F5), audio selection, subtitle control, etc. In practice, only implement the keys used by the device and App UI.

Feature Bitmap

The KeypadInput Cluster declares supported key categories via FeatureMap (0xFFFC):

Bit 0
NV (NavigationKeyCodes) Navigation Keys — supports directional keys, select, menu, back, and other navigation operations
Bit 1
LK (LocationKeys) Location Keys — supports channel switching, channel number input, program guide, and other channel location operations
Bit 2
NK (NumberKeys) Number Keys — supports 0~9 numeric input and number confirmation keys
Feature to Key Mapping

Devices do not necessarily support all keys. Check the FeatureMap before sending SendKey: without NV, do not send directional or menu keys; without NK, do not send numeric keys; without LK, do not send channel-related keys. Sending unsupported keys causes the device to return UnsupportedKey.

Example Data

The KeypadInput Cluster has no application attributes. Below is an example of reading the FeatureMap to determine device capabilities:

{
  // --- Feature Map ---
  "0xFFFC": 7          // FeatureMap = 0b111 (NV + LK + NK all enabled)

  // KeypadInput has no application attributes,
  // it only receives key input via the SendKey command.
  // Reading FeatureMap determines which key categories the device supports.
}
Developer Tip

KeypadInput is a "command-only" Cluster — it has no readable application attributes and interacts solely through the SendKey command. The controller's remote UI should dynamically display key areas based on FeatureMap: show the directional pad if NV is supported, show the numeric keypad if NK is supported, and show channel switching buttons if LK is supported.

Common Scenarios

Scenario 1: Phone app as remote control
  1. Read the device's FeatureMap (0xFFFC) to determine supported key categories
  2. Dynamically render the remote UI based on Features:
    • NV enabled → show directional D-pad + select key + menu/back
    • NK enabled → show numeric keypad (0~9 + Enter)
    • LK enabled → show Channel +/- buttons and EPG entry
  3. The user clicks a key on the UI and sends SendKey (0x00) with the corresponding CecKeyCode enum value
  4. Check the SendKeyResponse Status:
    • Success (0) — normal, no further action needed
    • UnsupportedKey (1) — key not supported, mark as unavailable in the UI
    • InvalidKeyInCurrentState (2) — not available in the current state, notify the user
Scenario 2: Voice assistant controls TV playback
  1. The user says "pause", and the voice assistant parses the intent as pause playback
  2. Send SendKey with KeyCode = 0x43 (Pause)
  3. The device returns Success and playback pauses
  4. The user says "resume playback" and sends SendKey with KeyCode = 0x41 (Play)
  5. Note: If the device is on a menu screen instead of in playback state, sending Pause may return InvalidKeyInCurrentState — the voice assistant should provide appropriate voice feedback