Media1289 — Keypad Input

Matter Cluster 1289 — Keypad Input

Matter Cluster 1289 (0x0509) Keypad Input: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 1289 — Keypad Input Cluster

Matter Cluster 1289, also written as 0x0509, is the Keypad Input Cluster. This cluster provides an interface for key code based input and control on a device like a Video Player or an endpoint like a Content App. This may include text or action commands such as UP, DOWN, and SELECT. This cluster would be supported on Video Player devices as well as devices that support remote control input from a keypad or remote.

Cluster Identity

FieldValue
Cluster ID decimal1289
Cluster ID hex0x0509
Cluster nameKeypad Input
Cluster revision (Matter 1.6.1)1
Roleapplication
ScopeEndpoint
PICS codeKEYPADINPUT
Typical endpoint1

Revision history

RevisionChange
1Initial revision

Shadow Path Format

Cluster 1289 values in the device shadow use this format:

endpoint_id / 1289 / attribute_id

Cluster 1289 Features

The FeatureMap attribute (1/1289/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.

BitCodeFeatureConformanceMeaning
0NVNavigationKeyCodesOSupports UP, DOWN, LEFT, RIGHT, SELECT, BACK, EXIT, MENU
1LKLocationKeysOSupports CEC keys 0x0A (Settings) and 0x09 (Home)
2NKNumberKeysOSupports numeric input 0..9

Example: FeatureMap = 0 means no optional feature is enabled; 7 means every feature listed above is enabled.


Data Types

CecKeyCodeEnum

ValueNameConformanceMeaning
0SelectM—
1UpM—
2DownM—
3LeftM—
4RightM—
5RightUpM—
6RightDownM—
7LeftUpM—
8LeftDownM—
9RootMenuM—
10SetupMenuM—
11ContentsMenuM—
12FavoriteMenuM—
13ExitM—
16MediaTopMenuM—
17MediaContextSensitiveMenuM—
29NumberEntryModeM—
30Number11M—
31Number12M—
32Number0OrNumber10M—
33Numbers1M—
34Numbers2M—
35Numbers3M—
36Numbers4M—
37Numbers5M—
38Numbers6M—
39Numbers7M—
40Numbers8M—
41Numbers9M—
42DotM—
43EnterM—
44ClearM—
47NextFavoriteM—
48ChannelUpM—
49ChannelDownM—
50PreviousChannelM—
51SoundSelectM—
52InputSelectM—
53DisplayInformationM—
54HelpM—
55PageUpM—
56PageDownM—
64PowerM—
65VolumeUpM—
66VolumeDownM—
67MuteM—
68PlayM—
69StopM—
70PauseM—
71RecordM—
72RewindM—
73FastForwardM—
74EjectM—
75ForwardM—
76BackwardM—
77StopRecordM—
78PauseRecordM—
79ReservedM—
80AngleM—
81SubPictureM—
82VideoOnDemandM—
83ElectronicProgramGuideM—
84TimerProgrammingM—
85InitialConfigurationM—
86SelectBroadcastTypeM—
87SelectSoundPresentationM—
96PlayFunctionM—
97PausePlayFunctionM—
98RecordFunctionM—
99PauseRecordFunctionM—
100StopFunctionM—
101MuteFunctionM—
102RestoreVolumeFunctionM—
103TuneFunctionM—
104SelectMediaFunctionM—
105SelectAvInputFunctionM—
106SelectAudioInputFunctionM—
107PowerToggleFunctionM—
108PowerOffFunctionM—
109PowerOnFunctionM—
113F1BlueM—
114F2RedM—
115F3GreenM—
116F4YellowM—
117F5M—
118DataM—

StatusEnum

ValueNameConformanceMeaning
0SuccessMSucceeded
1UnsupportedKeyMKey code is not supported.
2InvalidKeyInCurrentStateMRequested key code is invalid in the context of the responder's current state.

Cluster 1289 Attributes

Cluster 1289 defines no cluster-specific attributes; only the global attributes are present.

Global attributes

IDHexAttributeMeaning
655280xFFF8GeneratedCommandListResponse command IDs this server generates.
655290xFFF9AcceptedCommandListCommand IDs this server accepts.
655310xFFFBAttributeListAttribute IDs implemented.
655320xFFFCFeatureMapImplemented optional features (see above).
655330xFFFDClusterRevisionCluster revision implemented; 1 for a Matter 1.6.1 device.

Cluster 1289 Commands

Cluster 1289 has 1 client-to-server command and 1 response.

IDHexCommandDirectionConformanceResponseDescription
00x00SendKeyclient → serverMSendKeyResponseOn receipt, this must process a keycode as input to the media endpoint.
10x01SendKeyResponseserver → clientM—This command is generated in response to a SendKey command.

AcceptedCommandList

The AcceptedCommandList attribute lists the command IDs the endpoint actually implements:

endpoint_id / 1289 / 65529
{
  "1/1289/65529": [
    0
  ]
}

Before sending a Cluster 1289 command, check that the command ID exists in endpoint/1289/65529. Optional commands are only present when the matching feature is set in FeatureMap.


Bridge Command Payload Format

The bridge accepts Matter commands in this structure:

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1289,
    "command_name": "SendKey",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 1289, always use "cluster_id": 1289. Payload keys are the command field names in lowerCamelCase. Octet-string fields are base64-encoded. timed_request_timeout_ms is required for timed commands and ignored otherwise.


Command: SendKey

Purpose

On receipt, this must process a keycode as input to the media endpoint. If a device has multiple media endpoints implementing this cluster, such as a casting video player endpoint with one or more content app endpoints, then only the endpoint receiving the command must process the keycode as input. In other words, a specific content app endpoint must NOT process a keycode received by a different content app endpoint. If a second SendKey request with the same KeyCode value is received within 200 ms, then the endpoint will consider the first key press to be a press and hold.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameSendKey
Directionclient → server
ConformanceM
ResponseSendKeyResponse
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0KeyCodekeyCodeCecKeyCodeEnumM—Indicates the key code to process.

KeyCode values (CecKeyCodeEnum): 0 = Select, 1 = Up, 2 = Down, 3 = Left, 4 = Right, 5 = RightUp, 6 = RightDown, 7 = LeftUp, 8 = LeftDown, 9 = RootMenu, 10 = SetupMenu, 11 = ContentsMenu, 12 = FavoriteMenu, 13 = Exit, 16 = MediaTopMenu, 17 = MediaContextSensitiveMenu, 29 = NumberEntryMode, 30 = Number11, 31 = Number12, 32 = Number0OrNumber10, 33 = Numbers1, 34 = Numbers2, 35 = Numbers3, 36 = Numbers4, 37 = Numbers5, 38 = Numbers6, 39 = Numbers7, 40 = Numbers8, 41 = Numbers9, 42 = Dot, 43 = Enter, 44 = Clear, 47 = NextFavorite, 48 = ChannelUp, 49 = ChannelDown, 50 = PreviousChannel, 51 = SoundSelect, 52 = InputSelect, 53 = DisplayInformation, 54 = Help, 55 = PageUp, 56 = PageDown, 64 = Power, 65 = VolumeUp, 66 = VolumeDown, 67 = Mute, 68 = Play, 69 = Stop, 70 = Pause, 71 = Record, 72 = Rewind, 73 = FastForward, 74 = Eject, 75 = Forward, 76 = Backward, 77 = StopRecord, 78 = PauseRecord, 79 = Reserved, 80 = Angle, 81 = SubPicture, 82 = VideoOnDemand, 83 = ElectronicProgramGuide, 84 = TimerProgramming, 85 = InitialConfiguration, 86 = SelectBroadcastType, 87 = SelectSoundPresentation, 96 = PlayFunction, 97 = PausePlayFunction, 98 = RecordFunction, 99 = PauseRecordFunction, 100 = StopFunction, 101 = MuteFunction, 102 = RestoreVolumeFunction, 103 = TuneFunction, 104 = SelectMediaFunction, 105 = SelectAvInputFunction, 106 = SelectAudioInputFunction, 107 = PowerToggleFunction, 108 = PowerOffFunction, 109 = PowerOnFunction, 113 = F1Blue, 114 = F2Red, 115 = F3Green, 116 = F4Yellow, 117 = F5, 118 = Data

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1289,
    "command_name": "SendKey",
    "payload": {
      "keyCode": 0
    }
  }
}

The device answers with SendKeyResponse (see below).


Command: SendKeyResponse

Purpose

This command is generated in response to a SendKey command.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameSendKeyResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0StatusstatusStatusEnumM—Indicates the status of the request.

Status values (StatusEnum): 0 = Success, 1 = UnsupportedKey, 2 = InvalidKeyInCurrentState


Cluster 1289 Events

Cluster 1289 defines no events.


SmartphoneKey Notes

  • Cluster 1289 is not currently exposed by SmartphoneKey devices. This page documents the Matter 1.6.1 specification so that future devices can be interpreted without changes to the backend.
  • Shadow paths follow endpoint/1289/attribute; attribute values that the device reports as unreadable are written as n/a.
  • Attribute IDs, command IDs and enum values on this page come from the CSA Matter 1.6.1 data model; descriptions are condensed from the specification text.