-
Notifications
You must be signed in to change notification settings - Fork 1
Key Codes
The remote control sends key codes to the TV or HT. This Wiki page documents the known key codes.
Most of the key code names match their function, e.g.: KEY_VOLUP
is the Volume Up button.
However sometimes the name of the key code does not match the function. Thus if you can not find the desired key code name, then some experimentation is needed to find the key code that works for your TV or HT model. If you find any codes where the key code name and the function differ, please let me know and I will document them here.
The plugin can send multiple key codes in sequence, simply separate the key codes with spaces. Keys are sent at intervals of 100ms, but can be changed by inserting a wait(ms) in the key code sequence. The ms is optional and defaults to 100ms.
Thus KEY_1 wait(100) KEY_2 wait(100) KEY_ENTER
and KEY_1 wait() KEY_2 wait() KEY_ENTER
and KEY_1 KEY_2 KEY_ENTER
are the same.
A longer wait can be specified in ms as follows: KEY_TV wait(200) KEY_1 KEY_2 KEY_ENTER
. The required wait time varies according to the function you are selecting on the TV. Experiment with different wait times to find the most reliable wait time for each TV function.
Examples:
-
KEY_TV wait(200) KEY_1 KEY_2 KEY_ENTER
- Send TV 1 2 ENTER to select TV channel 12. Need to wait 200ms for the TV to switch to TV channels. -
KEY_TOOLS KEY_DOWN KEY_DOWN KEY_LEFT KEY_ENTER
- Send TOOLS DOWN DOWN LEFT ENTER to select energy saving to picture off. Can be sent in rapid sequence.
Confirmed working on my D-series D5000 TV and on an ES-series ES8090.
Cycle through inputs with each press:
-
KEY_SOURCE
- each press selects the next SOURCE -
KEY_HDMI
- each press selects the next HDMI input
NOTE: Each press of the SOURCE button (sending of KEY_SOURCE
) cycles to the next input source. To do the same in the Apple Home app, you need two SOURCE inputs, so that you can select one and then the other. Name them something like Source and Source Next.
Alternative configuration of inputs to allow navigation and selection of any source:
-
KEY_SOURCE
- name the input "Source" -
KEY_UP
- name the input "Up" -
KEY_DOWN
- name the input "Down" -
KEY_ENTER
- name the input "Enter"
Direct selection of inputs means that the desired input is selected directly from the input list with a single tap:
-
KEY_TV
- selects the TV input (the TV tuner as used for analog or digital TV) -
KEY_EXT20
- selects the HDMI1/AVI input (and not EXT20, as indicated by the key code) -
KEY_AUTO_ARC_PIP_WIDE
- selects the HDMI2 input (and not AUTO_ARC_PIP_WIDE, as indicated by the key code) -
KEY_AUTO_ARC_PIP_RIGHT_BOTTOM
- selects the HDMI3 input (and not AUTO_ARC_PIP_RIGHT_BOTTOM, as indicated by the key code) -
KEY_AUTO_ARC_AUTOCOLOR_FAIL
- selects the HDMI4 input (and not AUTO_ARC_AUTOCOLOR_FAIL, as indicated by the key code) -
KEY_AV1
- selects the Ext. input (and not AV, as indicated by the key code) -
KEY_PCMODE
- selects the PC input
Unfortunately, I do not know the SOURCE key code for the Home Theater SOURCE button. If anyone knows it, please let me know.
Tested and working on my D5000 TV and my HT-D6500 Home Theater:
-
KEY_VOLUP
- each press raises the volume by one step -
KEY_VOLDOWN
- each press lowers the volume by one step -
KEY_MUTE
- each press toggles the mute state on. If muted, sendingKEY_VOLUP
orKEY_VOLDOWN
will unmute.
Tested and working on my D5000 TV and my HT-D6500 Home Theater:
-
KEY_MENU
- show the menu -
KEY_LEFT
,KEY_RIGHT
,KEY_UP
,KEY_DOWN
- the navigation arrow buttons -
KEY_ENTER
- select a current item -
KEY_TOOLS
- show the tools popup screen -
KEY_INFO
- show the info popup screen -
KEY_EXIT
- exit out of a current screen -
KEY_RETURN
- return from a current screen
Note that the HT doesn't let you use the EXIT key to exit from a menu, you have to select an input to close the menu.
-
KEY_PLAY
- play media -
KEY_PAUSE
- pause media -
KEY_STOP
- stop media -
KEY_REC
- record media (if supported by e.g. a plugged in hard drive) -
KEY_REWIND
- rewind media -
KEY_FF
- fast forward media
Key layout taken from a AA59-00465A remote control as supplied with a UED5000 TV
Remote Key | Key Code | Notes |
---|---|---|
POWER | KEY_POWEROFF |
Power on only via HDMI-CEC or IR |
SOURCE | KEY_SOURCE |
|
HDMI | KEY_HDMI |
|
1...0 |
KEY_1 ... KEY_0
|
The number keys |
TTX/MIX | KEY_TTX_MIX |
|
PRE-CH | KEY_PRECH |
|
Volume Up | KEY_VOLUP |
|
Volume Down | KEY_VOLDOWN |
|
MUTE | KEY_MUTE |
|
Channel Up | KEY_CHUP |
|
Channel Down | KEY_CHDOWN |
|
CH LIST | KEY_CH_LIST |
|
CONTENT | KEY_CONTENTS |
|
MENU | KEY_MENU |
|
GUIDE | KEY_GUIDE |
|
TOOLS | KEY_TOOLS |
|
INFO | KEY_INFO |
|
RETURN | KEY_RETURN |
|
EXIT | KEY_EXIT |
|
Up Arrow | KEY_UP |
|
Down Arrow | KEY_DOWN |
|
Left Arrow | KEY_LEFT |
|
Right Arrow | KEY_RIGHT |
|
Select | KEY_ENTER |
|
A,B,C,D |
KEY_RED , KEY_GREEN , KEY_YELLOW , KEY_CYAN
|
|
P.MODE | KEY_PMODE |
|
SRS | KEY_SRS |
|
DUALI-II | ? | |
E-MANUAL | KEY_TOPMENU |
|
P-SIZE | KEY_PICTURE_SIZE |
|
AD/SUBT. |
KEY_AD or KEY_CAPTION
|
|
Rewind | KEY_REWIND |
|
Pause | KEY_PAUSE |
|
Fast Fwd | KEY_FF |
|
Record | KEY_REC |
|
Play | KEY_PLAY |
|
Stop | KEY_STOP |
These extra keys are not on the physical Samsung remote control. But they do work, and are especially useful for direct selection of the TV inputs.
Key Code | Notes |
---|---|
KEY_ESAVING |
Energy Saving mode |
KEY_TV |
Selects the TV source directly |
KEY_EXT20 |
Selects the HDMI1/AVI source directly |
KEY_AUTO_ARC_PIP_WIDE |
Selects the HDMI2 source directly |
KEY_AUTO_ARC_PIP_RIGHT_BOTTOM |
Selects the HDMI3 source directly |
KEY_AUTO_ARC_AUTOCOLOR_FAIL |
Selects the HDMI4 source directly |
KEY_AV1 |
Selects the Ext. source directly |
KEY_PCMODE |
Selects the PC source directly |
Key layout taken from a AH59-02342A remote control as supplied with a HT-D5500 Home Theater
Remote Key | Key Code | Notes |
---|---|---|
POWER | BD_KEY_POWER |
Power on only via HDMI-CEC or IR |
SOURCE | ? | |
BD | -- | Selects target device on remote. Does not send a key code |
TV | -- | Selects target device on remote. Does not send a key code |
Eject | KEY_OPEN |
|
SLEEP | KEY_SLEEP |
|
1...0 |
KEY_1 ... KEY_0
|
The number keys |
FULL SCREEN |
BD_KEY_FULLSCREEN or KEY_CALLER_ID
|
|
REPEAT | ? | |
Rewind | KEY_REWIND |
|
Fast Fwd | KEY_FF |
|
Record | KEY_REC |
|
Stop | KEY_STOP |
|
Play | KEY_PLAY |
|
Pause | KEY_PAUSE |
|
Volume Up | KEY_VOLUP |
|
Volume Down | KEY_VOLDOWN |
|
MUTE | KEY_MUTE |
|
SFE MODE | KEY_INSTANT_REPLAY |
|
Channel Up | KEY_CHUP |
|
Channel Down | KEY_CHDOWN |
|
DISC MENU | KEY_DISC_MENU |
|
MENU | KEY_MENU |
|
Subtitles | KEY_SUB_TITLE |
|
TITLE MENU | ? | |
TOOLS | KEY_TOOLS |
|
INFO | KEY_INFO |
|
RETURN | KEY_RETURN |
|
EXIT | KEY_EXIT |
|
Up Arrow | KEY_UP |
|
Down Arrow | KEY_DOWN |
|
Left Arrow | KEY_LEFT |
|
Right Arrow | KEY_RIGHT |
|
Select | KEY_ENTER |
|
A,B,C,D |
KEY_RED , KEY_GREEN , KEY_YELLOW , KEY_CYAN
|
|
SMART HUB |
KEY_INTERACTIVE or KEY_RSS
|
|
SEARCH | KEY_DTV_SIGNAL |
|
S/W LEVEL | KEY_VCHIP |
|
2D 3D | ? | |
3D SOUND | KEY_DOOR |
|
Dolby PLII | KEY_LIVE |
|
DSP | KEY_LINK |
|
vTuner | ? |
These extra keys are not on the physical Samsung remote control. But they do work.
Key Code | Notes |
---|---|
KEY_SUB_TITLE |
Shows the sub-title controls |
SamyGo, an old but good site for Samsung key codes: https://wiki.samygo.tv/index.php?title=Key_codes
samsung-tv-control, a github project for controlling the Samsung TV. He has a key code list: https://github.com/Toxblh/samsung-tv-control/blob/master/src/keys.ts
Samsung developer documentation, has some but not many key codes: https://developer.samsung.com/smarttv/develop/legacy-platform-library/ref00006/tvkeyvalue_object.html
Samsung TV Bindings on openhab, has a large list of key codes: https://docs.openhab.org/v2.1/addons/bindings/samsungtv1/readme.html
Home | FAQ | Model Numbers | Power Control | Key Codes | Siri | Shortcuts