
{"id":10138,"date":"2022-06-21T09:10:50","date_gmt":"2022-06-21T09:10:50","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/documentation\/rdk_video_documentation\/components\/open-sourced_components\/component_rdkshell\/rdkshell_key_mapping\/"},"modified":"2025-03-25T05:18:36","modified_gmt":"2025-03-25T05:18:36","slug":"rdkshell_key_mapping","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/","title":{"rendered":"RDKShell Key Mapping"},"content":{"rendered":"<p><!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\"><br \/>\n <html><body><\/p>\n<p style=\"\">RDKShell provides a way to map key codes to different values.&nbsp; Here are the steps to do so:<\/p>\n<ol style=\"\">\n<li>Add a new file to the firmware (e.g. \/opt\/rdkshell_keymapping.json)<\/li>\n<li>Edit the file.&nbsp; The contents of the file should be in this format\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{<br>  \"keyMappings\":<br>    [<br>      { \"keyCode\": 100, \"mapped\": { \"keyCode\": 50, \"modifiers\":[\"ctrl\"] } },<br>      { \"keyCode\": 150, \"mapped\": { \"keyCode\": 52, \"modifiers\":[] } },<br>      ...<br>    ]<br>}<\/pre>\n<\/li>\n<li>The keyCode value is the value received from the operating system and the mapped keyCode and (optional) modifiers will be the new mapped HTML\/JavaScript value<\/li>\n<li>Save the file<\/li>\n<li>Edit&nbsp;\/lib\/systemd\/system\/wpeframework.service<\/li>\n<li>Add the following to the&nbsp;[Service] block:&nbsp;Environment=&#8221;RDKSHELL_KEYMAP_FILE=\/opt\/rdkshell_keymapping.json&#8221;<\/li>\n<li>Save the wpeframework.service file<\/li>\n<li>Restart the wpeframework service (systemctl daemon-reload; systemctl restart wpeframework) or reboot your box<\/li>\n<li>RDKShell will now use the key mappings specified in the .json file.&nbsp; All key codes that are not mentioned in the .json file are processed by RDKShell unmodified<\/li>\n<li>The default key mapping file is stored in \/etc\/rdkshell_keymapping.json<\/li>\n<\/ol>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RDKShell provides a way to map key codes to different values.&nbsp; Here are the steps [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"parent":10128,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-10138","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RDKShell Key Mapping - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RDKShell Key Mapping - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"RDKShell provides a way to map key codes to different values.&nbsp; Here are the steps [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-25T05:18:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/\",\"name\":\"RDKShell Key Mapping - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2022-06-21T09:10:50+00:00\",\"dateModified\":\"2025-03-25T05:18:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"RDK Video\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Components\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"RDK Services\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Component: RDKShell\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/\"},{\"@type\":\"ListItem\",\"position\":7,\"name\":\"RDKShell Key Mapping\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RDKShell Key Mapping - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/","og_locale":"en_US","og_type":"article","og_title":"RDKShell Key Mapping - RDK Documentation Portal | Documentation","og_description":"RDKShell provides a way to map key codes to different values.&nbsp; Here are the steps [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2025-03-25T05:18:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/","name":"RDKShell Key Mapping - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2022-06-21T09:10:50+00:00","dateModified":"2025-03-25T05:18:36+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/rdkshell_key_mapping\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"RDK Video","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/"},{"@type":"ListItem","position":4,"name":"Components","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/"},{"@type":"ListItem","position":5,"name":"RDK Services","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/"},{"@type":"ListItem","position":6,"name":"Component: RDKShell","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/rdk_services\/component_rdkshell\/"},{"@type":"ListItem","position":7,"name":"RDKShell Key Mapping"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/10138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=10138"}],"version-history":[{"count":1,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/10138\/revisions"}],"predecessor-version":[{"id":10139,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/10138\/revisions\/10139"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/10128"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=10138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}