Skip to main content
While the physical design of remote controls can vary between manufacturers (e.g., Philips, JVC), the core keycodes sent to your application are standardized, with exception of the back button. Your application should be built against this core set of keys to ensure broad compatibility.

Standard Keys and Keycodes

Every remote control compatible with Titan OS will provide a standard 5-way navigation experience (Up, Down, Left, Right, OK/Enter) along with other essential keys. Your application should listen for keydown events to handle these inputs. The following table lists the mandatory keys, their intended use, and the corresponding JavaScript key and keyCode values your application will receive.

Consistent Keycode Event Handling

Every single key press operation consists of corresponding keydown and keyup events. To prevent processing a key twice, act on either the keydown event or the keyup event, not both. Handling both events can lead to overlapping actions. It is most common to act on keydown.

The Back Button

The button may be physically labeled as “Back”, “Return”, or with an arrow icon in the remote control. Each partner is free to customize the back behavior in your app, depending on the user experience that you’ve defined for your pages and states, since it’s following the logic of bringing the user to the latest page or state (e.g. exiting player or closing modals). It should also comply with the following specific rules:
  • Exiting the App: When the Back button is pressed on the app’s main screen, the application should exit. It’s mandatory prompt the user with a confirmation dialog (“Do you want to exit?”).
  • Device compatibility: Make sure your app is listening to the back button keycode corresponding to all brands included in your scope (e.g. Philips uses the keycode 8 and JVC uses the keycode 461). More details below.
Note: When pressed repeatedly from any screen, it must eventually lead the user back to the app’s main/home screen. This is a normal behavior and expected. Device compatibility The back button keycode is different for Philips, Sharp and JVC devices. To ensure compatibility with all devices, your app must listen to all keycodes depending on which brand you’re running your app. To do it, you have the option to listen to the device keycode dynamicaly (in runtime), or manually listen to all keycodes for each brand. If you opt to second option, you should make sure your app is aways updated with the keycodes for the devices in your scope. Using the TitanSDK.DeviceInfo.getKeyCodes() function from the TitanSDK to listen to the codes dynamically:
Alternatively you can listen to each brand’s back button keycode:
  • Identify the brand with Titan SDK
  • Apply a condition to handle the keyCode 8 for Philips and 461 for JVC.
Sample Custom Back Key Handling
Notes:
  • The codes above is just a logical example for you to understand the flow. We recommend you to use your own logic based on this one to make sure your app is doing what is expected for your needs.
  • To give the preference to your logic, use the e.preventDefault(). This prevents default browser back behavior and make sure your app is runing your custom logic.

Manufacturer-Specific Remotes

This section details the physical remote controls for specific TV brands running Titan OS. While the core keycodes above remain the same, some remotes may have additional keys. Important: Keys not listed in the core keycode table (e.g., Settings, Source, branded app buttons like Netflix) are handled by the OS. Events for these keys will not be sent to your application.

Philips Remotes

Unique Keys: Ambilight Key: This key is handled by the system to control the TV’s Ambilight feature. It does not generate an event for the application. Settings (Gear Icon): Opens the main TV settings menu. This is a system-level action.

JVC Remotes

JVC remotes may have a different layout, including dedicated media or branded application buttons. Unique Keys: Branded App Keys (e.g., YouTube, Prime Video): These keys are shortcuts to launch the respective applications. They are handled by the system and cannot be intercepted by your app. If your app is in the foreground, pressing one of these keys will cause your app to be suspended and the new app to launch. Source/Input Key: Opens the TV’s input selection menu (e.g., HDMI 1, AV). This is a system-level action.

OSKB

Titan OS features a system keyboard that is automatically displayed on the screen when the focus is placed in an input field. Referred to as the on-screen keyboard (OSKB), it serves as the primary text input method for Titan OS. Utilising the system keyboard is optional - it is possible to use your own on-screen keyboard solution if preferred or required.

System keyboard UI

Titan OS’ OSKB incorporates variations in its user interface across different devices to ensure usability. However, it generally adheres to the following characteristics:
  • Emerges from the bottom of the screen
  • Occupies 100% of the screen width
  • Occupies 1/3 of the screen height
  • Initially set to English language; future updates will align with the device’s country settings
The OSKB supports multiple layouts, including:
  • Standard QWERTY
  • Alpha-numeric
  • Standard numeric with numbers 0-9
  • Standard numeric with alternate characters such as %, +

Custom keyboard

If the system keyboard does not meet your application’s requirements or if you seek UI consistency within your app, you can define a custom keyboard. Considerations for implementing a custom keyboard include:
  • Keyboard usability
  • UI coherence with the application
  • Smooth focus movement
Enabling a custom keyboard will require adjustments to the input box, such as adding disabled properties, etc.

Common Issues and Troubleshooting

Key Press Events Overlapping
Actions are triggered twice due to handling both keydown and keyup events.Solution:Ensure the app handles only one of the events, preferably the keydown event.
Incorrect Keycode for Back Key
The app listens for the wrong keycode (e.g., 27 instead of 8).Solution:Update the app to use the correct keycode (8) or the constant window.VK_BACK for better readability.
Back Key Not Handled Properly
The back key does not perform the expected action, such as navigating to the previous screen.Solution:Verify the keycode handling in the app and ensure it aligns with TitanOS standards. Check if VK_BACK is implemented correctly in the app’s code.
Back Key Causes App Exit
Pressing the back key exits the app instead of navigating within it.Solution:Ensure the back key functionality is limited to navigation within the app and only exits the app from the main menu or home screen.
Intermediate Screen Display During Navigation
When pressing the back key during video playback, an intermediate screen is briefly displayed before returning to the content page.Solution:Review and adjust the key event handling and navigation logic to ensure that pressing the back key during playback directly returns to the content page without intermediate screens. Ensure proper state management to avoid temporary state changes that cause intermediate screens to display.
OSKB: Keyboard triggred automatically when pressing ok on inputs
When a user presses the Enter key in an <input> tag, it triggers the platform OSKB (On-Screen Keyboard). This may cause two keyboards to appear on the screen. This behavior can be adjusted by following one of the approaches below.Solution:
  • Avoid using <input> tags: Instead of using the <input> tag, implement the input field using a different element, such as a <div>. This allows you to use the app’s OSKB without interference from the platform OSKB.
  • Use <input> tags with Platform OSKB: If you prefer to use the <input> tag, ensure that only the platform OSKB is called and not the app’s OSKB. This ensures a consistent user experience without triggering multiple keyboards.