/*****************************************************************************/
/* Table of names of keys in the piKey framework                             */
/*****************************************************************************/
typedef struct {
	int keycode;
	char *name;
} KEYNAME_ENTRY;

KEYNAME_ENTRY key_names[] =
{
  { KEY_ESC            , "ESC"           },
  { KEY_1              , "1"             },
  { KEY_2              , "2"             },
  { KEY_3              , "3"             },
  { KEY_4              , "4"             },
  { KEY_5              , "5"             },
  { KEY_6              , "6"             },
  { KEY_7              , "7"             },
  { KEY_8              , "8"             },
  { KEY_9              , "9"             },
  { KEY_0              , "0"             },
  { KEY_MINUS          , "MINUS"         },
  { KEY_EQUAL          , "EQUAL"         },
  { KEY_BACKSPACE      , "BACKSPACE"     },
  { KEY_TAB            , "TAB"           },
  { KEY_Q              , "Q"             },
  { KEY_W              , "W"             },
  { KEY_E              , "E"             },
  { KEY_R              , "R"             },
  { KEY_T              , "T"             },
  { KEY_Y              , "Y"             },
  { KEY_U              , "U"             },
  { KEY_I              , "I"             },
  { KEY_O              , "O"             },
  { KEY_P              , "P"             },
  { KEY_LEFTBRACE      , "LEFTBRACE"     },
  { KEY_RIGHTBRACE     , "RIGHTBRACE"    },
  { KEY_ENTER          , "ENTER"         },
  { KEY_LEFTCTRL       , "LEFTCTRL"      },
  { KEY_A              , "A"             },
  { KEY_S              , "S"             },
  { KEY_D              , "D"             },
  { KEY_F              , "F"             },
  { KEY_G              , "G"             },
  { KEY_H              , "H"             },
  { KEY_J              , "J"             },
  { KEY_K              , "K"             },
  { KEY_L              , "L"             },
  { KEY_SEMICOLON      , "SEMICOLON"     },
  { KEY_APOSTROPHE     , "APOSTROPHE"    },
  { KEY_GRAVE          , "GRAVE"         },
  { KEY_LEFTSHIFT      , "LEFTSHIFT"     },
  { KEY_BACKSLASH      , "BACKSLASH"     },
  { KEY_Z              , "Z"             },
  { KEY_X              , "X"             },
  { KEY_C              , "C"             },
  { KEY_V              , "V"             },
  { KEY_B              , "B"             },
  { KEY_N              , "N"             },
  { KEY_M              , "M"             },
  { KEY_COMMA          , "COMMA"         },
  { KEY_DOT            , "DOT"           },
  { KEY_SLASH          , "SLASH"         },
  { KEY_RIGHTSHIFT     , "RIGHTSHIFT"    },
  { KEY_KPASTERISK     , "KPASTERISK"    },
  { KEY_LEFTALT        , "LEFTALT"       },
  { KEY_SPACE          , "SPACE"         },
  { KEY_CAPSLOCK       , "CAPSLOCK"      },
  { KEY_F1             , "F1"            },
  { KEY_F2             , "F2"            },
  { KEY_F3             , "F3"            },
  { KEY_F4             , "F4"            },
  { KEY_F5             , "F5"            },
  { KEY_F6             , "F6"            },
  { KEY_F7             , "F7"            },
  { KEY_F8             , "F8"            },
  { KEY_F9             , "F9"            },
  { KEY_F10            , "F10"           },
  { KEY_NUMLOCK        , "NUMLOCK"       },
  { KEY_SCROLLLOCK     , "SCROLLLOCK"    },
  { KEY_KP7            , "KP7"           },
  { KEY_KP8            , "KP8"           },
  { KEY_KP9            , "KP9"           },
  { KEY_KPMINUS        , "KPMINUS"       },
  { KEY_KP4            , "KP4"           },
  { KEY_KP5            , "KP5"           },
  { KEY_KP6            , "KP6"           },
  { KEY_KPPLUS         , "KPPLUS"        },
  { KEY_KP1            , "KP1"           },
  { KEY_KP2            , "KP2"           },
  { KEY_KP3            , "KP3"           },
  { KEY_KP0            , "KP0"           },
  { KEY_KPDOT          , "KPDOT"         },
  { KEY_103RD          , "103RD"         },
  { KEY_F13            , "F13"           },
  { KEY_102ND          , "102ND"         },
  { KEY_F11            , "F11"           },
  { KEY_F12            , "F12"           },
  { KEY_F14            , "F14"           },
  { KEY_F15            , "F15"           },
  { KEY_F16            , "F16"           },
  { KEY_F17            , "F17"           },
  { KEY_F18            , "F18"           },
  { KEY_F19            , "F19"           },
  { KEY_F20            , "F20"           },
  { KEY_KPENTER        , "KPENTER"       },
  { KEY_RIGHTCTRL      , "RIGHTCTRL"     },
  { KEY_KPSLASH        , "KPSLASH"       },
  { KEY_SYSRQ          , "SYSRQ"         },
  { KEY_RIGHTALT       , "RIGHTALT"      },
  { KEY_LINEFEED       , "LINEFEED"      },
  { KEY_HOME           , "HOME"          },
  { KEY_UP             , "UP"            },
  { KEY_PAGEUP         , "PAGEUP"        },
  { KEY_LEFT           , "LEFT"          },
  { KEY_RIGHT          , "RIGHT"         },
  { KEY_END            , "END"           },
  { KEY_DOWN           , "DOWN"          },
  { KEY_PAGEDOWN       , "PAGEDOWN"      },
  { KEY_INSERT         , "INSERT"        },
  { KEY_DELETE         , "DELETE"        },
  { KEY_MACRO          , "MACRO"         },
  { KEY_MUTE           , "MUTE"          },
  { KEY_VOLUMEDOWN     , "VOLUMEDOWN"    },
  { KEY_VOLUMEUP       , "VOLUMEUP"      },
  { KEY_POWER          , "POWER"         },
  { KEY_KPEQUAL        , "KPEQUAL"       },
  { KEY_KPPLUSMINUS    , "KPPLUSMINUS"   },
  { KEY_PAUSE          , "PAUSE"         },
  { KEY_F21            , "F21"           },
  { KEY_F22            , "F22"           },
  { KEY_F23            , "F23"           },
  { KEY_F24            , "F24"           },
  { KEY_KPCOMMA        , "KPCOMMA"       },
  { KEY_LEFTMETA       , "LEFTMETA"      },
  { KEY_RIGHTMETA      , "RIGHTMETA"     },
  { KEY_COMPOSE        , "COMPOSE"       },
  { KEY_STOP           , "STOP"          },
  { KEY_AGAIN          , "AGAIN"         },
  { KEY_PROPS          , "PROPS"         },
  { KEY_UNDO           , "UNDO"          },
  { KEY_FRONT          , "FRONT"         },
  { KEY_COPY           , "COPY"          },
  { KEY_OPEN           , "OPEN"          },
  { KEY_PASTE          , "PASTE"         },
  { KEY_FIND           , "FIND"          },
  { KEY_CUT            , "CUT"           },
  { KEY_HELP           , "HELP"          },
  { KEY_MENU           , "MENU"          },
  { KEY_CALC           , "CALC"          },
  { KEY_SETUP          , "SETUP"         },
  { KEY_SLEEP          , "SLEEP"         },
  { KEY_WAKEUP         , "WAKEUP"        },
  { KEY_FILE           , "FILE"          },
  { KEY_SENDFILE       , "SENDFILE"      },
  { KEY_DELETEFILE     , "DELETEFILE"    },
  { KEY_XFER           , "XFER"          },
  { KEY_PROG1          , "PROG1"         },
  { KEY_PROG2          , "PROG2"         },
  { KEY_WWW            , "WWW"           },
  { KEY_MSDOS          , "MSDOS"         },
  { KEY_COFFEE         , "COFFEE"        },
  { KEY_DIRECTION      , "DIRECTION"     },
  { KEY_CYCLEWINDOWS   , "CYCLEWINDOWS"  },
  { KEY_MAIL           , "MAIL"          },
  { KEY_BOOKMARKS      , "BOOKMARKS"     },
  { KEY_COMPUTER       , "COMPUTER"      },
  { KEY_BACK           , "BACK"          },
  { KEY_FORWARD        , "FORWARD"       },
  { KEY_CLOSECD        , "CLOSECD"       },
  { KEY_EJECTCD        , "EJECTCD"       },
  { KEY_EJECTCLOSECD   , "EJECTCLOSECD"  },
  { KEY_NEXTSONG       , "NEXTSONG"      },
  { KEY_PLAYPAUSE      , "PLAYPAUSE"     },
  { KEY_PREVIOUSSONG   , "PREVIOUSSONG"  },
  { KEY_STOPCD         , "STOPCD"        },
  { KEY_RECORD         , "RECORD"        },
  { KEY_REWIND         , "REWIND"        },
  { KEY_PHONE          , "PHONE"         },
  { KEY_ISO            , "ISO"           },
  { KEY_CONFIG         , "CONFIG"        },
  { KEY_HOMEPAGE       , "HOMEPAGE"      },
  { KEY_REFRESH        , "REFRESH"       },
  { KEY_EXIT           , "EXIT"          },
  { KEY_MOVE           , "MOVE"          },
  { KEY_EDIT           , "EDIT"          },
  { KEY_SCROLLUP       , "SCROLLUP"      },
  { KEY_SCROLLDOWN     , "SCROLLDOWN"    },
  { KEY_KPLEFTPAREN    , "KPLEFTPAREN"   },
  { KEY_KPRIGHTPAREN   , "KPRIGHTPAREN"  },
  { KEY_INTL1          , "INTL1"         },
  { KEY_INTL2          , "INTL2"         },
  { KEY_INTL3          , "INTL3"         },
  { KEY_INTL4          , "INTL4"         },
  { KEY_INTL5          , "INTL5"         },
  { KEY_INTL6          , "INTL6"         },
  { KEY_INTL7          , "INTL7"         },
  { KEY_INTL8          , "INTL8"         },
  { KEY_INTL9          , "INTL9"         },
  { KEY_LANG1          , "LANG1"         },
  { KEY_LANG2          , "LANG2"         },
  { KEY_LANG3          , "LANG3"         },
  { KEY_LANG4          , "LANG4"         },
  { KEY_LANG5          , "LANG5"         },
  { KEY_LANG6          , "LANG6"         },
  { KEY_LANG7          , "LANG7"         },
  { KEY_LANG8          , "LANG8"         },
  { KEY_LANG9          , "LANG9"         },
  { KEY_PLAYCD         , "PLAYCD"        },
  { KEY_PAUSECD        , "PAUSECD"       },
  { KEY_PROG3          , "PROG3"         },
  { KEY_PROG4          , "PROG4"         },
  { KEY_SUSPEND        , "SUSPEND"       },
  { KEY_CLOSE          , "CLOSE"         },
  { KEY_UNKNOWN        , "UNKNOWN"       },
  { KEY_BRIGHTNESSDOWN , "BRIGHTNESSDOWN"},
  { KEY_BRIGHTNESSUP   , "BRIGHTNESSUP"  },

	// terminator
	{ 0, NULL },
};

KEYNAME_ENTRY button_names[] =
{
	{ PSP_CTRL_CROSS     , "CROSS"       },
	{ PSP_CTRL_CIRCLE    , "CIRCLE"      },
	{ PSP_CTRL_TRIANGLE  , "TRIANGLE"    },
	{ PSP_CTRL_SQUARE    , "SQUARE"      },
	{ PSP_CTRL_UP        , "UP"          },
	{ PSP_CTRL_DOWN      , "DOWN"        },
	{ PSP_CTRL_LEFT      , "LEFT"        },
	{ PSP_CTRL_RIGHT     , "RIGHT"       },
	{ PSP_CTRL_LTRIGGER  , "LTRIGGER"    },
	{ PSP_CTRL_RTRIGGER  , "RTRIGGER"    },
	{ PSP_CTRL_HOME      , "HOME"        },
	{ PSP_CTRL_VOLUP     , "VOLUP"       },
	{ PSP_CTRL_VOLDOWN   , "VOLDOWN"     },
	{ PSP_CTRL_SCREEN    , "SCREEN"      },
	{ PSP_CTRL_NOTE      , "NOTE"        },
	{ PSP_CTRL_SELECT    , "SELECT"      },
	{ PSP_CTRL_START     , "START"       },
	{ ENTER_BUTTON       , "CONFIRM"     },
	{ CANCEL_BUTTON      , "CANCEL"      },
	{ HELP_BUTTON        , "HELP"        },
	{ ANALOG_UP          , "ANALOG_UP"   },
	{ ANALOG_DOWN        , "ANALOG_DOWN" },
	{ ANALOG_LEFT        , "ANALOG_LEFT" },
	{ ANALOG_RIGHT       , "ANALOG_RIGHT"},

	// terminator
	{ 0, NULL },
};
