/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.server.hdmi;
import android.view.KeyEvent;
import libcore.util.EmptyArray;
import java.util.Arrays;
/**
* Helper class to translate android keycode to hdmi cec keycode and vice versa.
*/
final class HdmiCecKeycode {
public static final int UNSUPPORTED_KEYCODE = -1;
public static final int NO_PARAM = -1;
// =========================================================================
// Hdmi CEC keycodes
public static final int CEC_KEYCODE_SELECT = 0x00;
public static final int CEC_KEYCODE_UP = 0x01;
public static final int CEC_KEYCODE_DOWN = 0x02;
public static final int CEC_KEYCODE_LEFT = 0x03;
public static final int CEC_KEYCODE_RIGHT = 0x04;
public static final int CEC_KEYCODE_RIGHT_UP = 0x05;
public static final int CEC_KEYCODE_RIGHT_DOWN = 0x06;
public static final int CEC_KEYCODE_LEFT_UP = 0x07;
public static final int CEC_KEYCODE_LEFT_DOWN = 0x08;
public static final int CEC_KEYCODE_ROOT_MENU = 0x09;
public static final int CEC_KEYCODE_SETUP_MENU = 0x0A;
public static final int CEC_KEYCODE_CONTENTS_MENU = 0x0B;
public static final int CEC_KEYCODE_FAVORITE_MENU = 0x0C;
public static final int CEC_KEYCODE_EXIT = 0x0D;
// RESERVED = 0x0E - 0x0F
public static final int CEC_KEYCODE_MEDIA_TOP_MENU = 0x10;
public static final int CEC_KEYCODE_MEDIA_CONTEXT_SENSITIVE_MENU = 0x11;
// RESERVED = 0x12 â |