@ -5,6 +5,8 @@
# include "common/string_util.h"
# include "IconsPromptFont.h"
# include "fmt/format.h"
# include "util/input_manager.h"
@ -14,446 +16,447 @@ struct KeyCodeName
{
int code ;
const char * name ;
const char * icon_name ;
} ;
static constexpr KeyCodeName s_qt_key_names [ ] = { { Qt : : Key_Escape , " Escape " },
{ Qt : : Key_Tab , " Tab " },
{ Qt : : Key_Backtab , " Backtab " },
{ Qt : : Key_Backspace , " Backspace " },
{ Qt : : Key_Return , " Return " },
{ Qt : : Key_Enter , " Enter " },
{ Qt : : Key_Insert , " Insert " },
{ Qt : : Key_Delete , " Delete " },
{ Qt : : Key_Pause , " Pause " },
{ Qt : : Key_Print , " Print " },
{ Qt : : Key_SysReq , " SysReq " },
{ Qt : : Key_Clear , " Clear " },
{ Qt : : Key_Home , " Home " },
{ Qt : : Key_End , " End " },
{ Qt : : Key_Left , " Left " },
{ Qt : : Key_Up , " Up " },
{ Qt : : Key_Right , " Right " },
{ Qt : : Key_Down , " Down " },
{ Qt : : Key_PageUp , " PageUp " },
{ Qt : : Key_PageDown , " PageDown " },
{ Qt : : Key_Shift , " Shift " },
{ Qt : : Key_Control , " Control " },
{ Qt : : Key_Meta , " Meta " },
{ Qt : : Key_Alt , " Alt " },
{ Qt : : Key_CapsLock , " CapsLock " },
{ Qt : : Key_NumLock , " NumLock " },
{ Qt : : Key_ScrollLock , " ScrollLock " },
{ Qt : : Key_F1 , " F1 " },
{ Qt : : Key_F2 , " F2 " },
{ Qt : : Key_F3 , " F3 " },
{ Qt : : Key_F4 , " F4 " },
{ Qt : : Key_F5 , " F5 " },
{ Qt : : Key_F6 , " F6 " },
{ Qt : : Key_F7 , " F7 " },
{ Qt : : Key_F8 , " F8 " },
{ Qt : : Key_F9 , " F9 " },
{ Qt : : Key_F10 , " F10 " },
{ Qt : : Key_F11 , " F11 " },
{ Qt : : Key_F12 , " F12 " },
{ Qt : : Key_F13 , " F13 " },
{ Qt : : Key_F14 , " F14 " },
{ Qt : : Key_F15 , " F15 " },
{ Qt : : Key_F16 , " F16 " },
{ Qt : : Key_F17 , " F17 " },
{ Qt : : Key_F18 , " F18 " },
{ Qt : : Key_F19 , " F19 " },
{ Qt : : Key_F20 , " F20 " },
{ Qt : : Key_F21 , " F21 " },
{ Qt : : Key_F22 , " F22 " },
{ Qt : : Key_F23 , " F23 " },
{ Qt : : Key_F24 , " F24 " },
{ Qt : : Key_F25 , " F25 " },
{ Qt : : Key_F26 , " F26 " },
{ Qt : : Key_F27 , " F27 " },
{ Qt : : Key_F28 , " F28 " },
{ Qt : : Key_F29 , " F29 " },
{ Qt : : Key_F30 , " F30 " },
{ Qt : : Key_F31 , " F31 " },
{ Qt : : Key_F32 , " F32 " },
{ Qt : : Key_F33 , " F33 " },
{ Qt : : Key_F34 , " F34 " },
{ Qt : : Key_F35 , " F35 " },
{ Qt : : Key_Super_L , " Super_L " },
{ Qt : : Key_Super_R , " Super_R " },
{ Qt : : Key_Menu , " Menu " },
{ Qt : : Key_Hyper_L , " Hyper_L " },
{ Qt : : Key_Hyper_R , " Hyper_R " },
{ Qt : : Key_Help , " Help " },
{ Qt : : Key_Direction_L , " Direction_L " },
{ Qt : : Key_Direction_R , " Direction_R " },
{ Qt : : Key_Space , " Space " },
{ Qt : : Key_Any , " Any " },
{ Qt : : Key_Exclam , " Exclam " },
{ Qt : : Key_QuoteDbl , " QuoteDbl " },
{ Qt : : Key_NumberSign , " NumberSign " },
{ Qt : : Key_Dollar , " Dollar " },
{ Qt : : Key_Percent , " Percent " },
{ Qt : : Key_Ampersand , " Ampersand " },
{ Qt : : Key_Apostrophe , " Apostrophe " },
{ Qt : : Key_ParenLeft , " ParenLeft " },
{ Qt : : Key_ParenRight , " ParenRight " },
{ Qt : : Key_Asterisk , " Asterisk " },
{ Qt : : Key_Plus , " Plus " },
{ Qt : : Key_Comma , " Comma " },
{ Qt : : Key_Minus , " Minus " },
{ Qt : : Key_Period , " Period " },
{ Qt : : Key_Slash , " Slash " },
{ Qt : : Key_0 , " 0 " },
{ Qt : : Key_1 , " 1 " },
{ Qt : : Key_2 , " 2 " },
{ Qt : : Key_3 , " 3 " },
{ Qt : : Key_4 , " 4 " },
{ Qt : : Key_5 , " 5 " },
{ Qt : : Key_6 , " 6 " },
{ Qt : : Key_7 , " 7 " },
{ Qt : : Key_8 , " 8 " },
{ Qt : : Key_9 , " 9 " },
{ Qt : : Key_Colon , " Colon " },
{ Qt : : Key_Semicolon , " Semicolon " },
{ Qt : : Key_Less , " Less " },
{ Qt : : Key_Equal , " Equal " },
{ Qt : : Key_Greater , " Greater " },
{ Qt : : Key_Question , " Question " },
{ Qt : : Key_At , " At " },
{ Qt : : Key_A , " A " },
{ Qt : : Key_B , " B " },
{ Qt : : Key_C , " C " },
{ Qt : : Key_D , " D " },
{ Qt : : Key_E , " E " },
{ Qt : : Key_F , " F " },
{ Qt : : Key_G , " G " },
{ Qt : : Key_H , " H " },
{ Qt : : Key_I , " I " },
{ Qt : : Key_J , " J " },
{ Qt : : Key_K , " K " },
{ Qt : : Key_L , " L " },
{ Qt : : Key_M , " M " },
{ Qt : : Key_N , " N " },
{ Qt : : Key_O , " O " },
{ Qt : : Key_P , " P " },
{ Qt : : Key_Q , " Q " },
{ Qt : : Key_R , " R " },
{ Qt : : Key_S , " S " },
{ Qt : : Key_T , " T " },
{ Qt : : Key_U , " U " },
{ Qt : : Key_V , " V " },
{ Qt : : Key_W , " W " },
{ Qt : : Key_X , " X " },
{ Qt : : Key_Y , " Y " },
{ Qt : : Key_Z , " Z " },
{ Qt : : Key_BracketLeft , " BracketLeft " },
{ Qt : : Key_Backslash , " Backslash " },
{ Qt : : Key_BracketRight , " BracketRight " },
{ Qt : : Key_AsciiCircum , " AsciiCircum " },
{ Qt : : Key_Underscore , " Underscore " },
{ Qt : : Key_QuoteLeft , " QuoteLeft " },
{ Qt : : Key_BraceLeft , " BraceLeft " },
{ Qt : : Key_Bar , " Bar " },
{ Qt : : Key_BraceRight , " BraceRight " },
{ Qt : : Key_AsciiTilde , " AsciiTilde " },
{ Qt : : Key_nobreakspace , " nobreakspace " },
{ Qt : : Key_exclamdown , " exclamdown " },
{ Qt : : Key_cent , " cent " },
{ Qt : : Key_sterling , " sterling " },
{ Qt : : Key_currency , " currency " },
{ Qt : : Key_yen , " yen " },
{ Qt : : Key_brokenbar , " brokenbar " },
{ Qt : : Key_section , " section " },
{ Qt : : Key_diaeresis , " diaeresis " },
{ Qt : : Key_copyright , " copyright " },
{ Qt : : Key_ordfeminine , " ordfeminine " },
{ Qt : : Key_guillemotleft , " guillemotleft " },
{ Qt : : Key_notsign , " notsign " },
{ Qt : : Key_hyphen , " hyphen " },
{ Qt : : Key_registered , " registered " },
{ Qt : : Key_macron , " macron " },
{ Qt : : Key_degree , " degree " },
{ Qt : : Key_plusminus , " plusminus " },
{ Qt : : Key_twosuperior , " twosuperior " },
{ Qt : : Key_threesuperior , " threesuperior " },
{ Qt : : Key_acute , " acute " },
{ Qt : : Key_mu , " mu " },
{ Qt : : Key_paragraph , " paragraph " },
{ Qt : : Key_periodcentered , " periodcentered " },
{ Qt : : Key_cedilla , " cedilla " },
{ Qt : : Key_onesuperior , " onesuperior " },
{ Qt : : Key_masculine , " masculine " },
{ Qt : : Key_guillemotright , " guillemotright " },
{ Qt : : Key_onequarter , " onequarter " },
{ Qt : : Key_onehalf , " onehalf " },
{ Qt : : Key_threequarters , " threequarters " },
{ Qt : : Key_questiondown , " questiondown " },
{ Qt : : Key_Agrave , " Agrave " },
{ Qt : : Key_Aacute , " Aacute " },
{ Qt : : Key_Acircumflex , " Acircumflex " },
{ Qt : : Key_Atilde , " Atilde " },
{ Qt : : Key_Adiaeresis , " Adiaeresis " },
{ Qt : : Key_Aring , " Aring " },
{ Qt : : Key_AE , " AE " },
{ Qt : : Key_Ccedilla , " Ccedilla " },
{ Qt : : Key_Egrave , " Egrave " },
{ Qt : : Key_Eacute , " Eacute " },
{ Qt : : Key_Ecircumflex , " Ecircumflex " },
{ Qt : : Key_Ediaeresis , " Ediaeresis " },
{ Qt : : Key_Igrave , " Igrave " },
{ Qt : : Key_Iacute , " Iacute " },
{ Qt : : Key_Icircumflex , " Icircumflex " },
{ Qt : : Key_Idiaeresis , " Idiaeresis " },
{ Qt : : Key_ETH , " ETH " },
{ Qt : : Key_Ntilde , " Ntilde " },
{ Qt : : Key_Ograve , " Ograve " },
{ Qt : : Key_Oacute , " Oacute " },
{ Qt : : Key_Ocircumflex , " Ocircumflex " },
{ Qt : : Key_Otilde , " Otilde " },
{ Qt : : Key_Odiaeresis , " Odiaeresis " },
{ Qt : : Key_multiply , " multiply " },
{ Qt : : Key_Ooblique , " Ooblique " },
{ Qt : : Key_Ugrave , " Ugrave " },
{ Qt : : Key_Uacute , " Uacute " },
{ Qt : : Key_Ucircumflex , " Ucircumflex " },
{ Qt : : Key_Udiaeresis , " Udiaeresis " },
{ Qt : : Key_Yacute , " Yacute " },
{ Qt : : Key_THORN , " THORN " },
{ Qt : : Key_ssharp , " ssharp " },
{ Qt : : Key_division , " division " },
{ Qt : : Key_ydiaeresis , " ydiaeresis " },
{ Qt : : Key_AltGr , " AltGr " },
{ Qt : : Key_Multi_key , " Multi_key " },
{ Qt : : Key_Codeinput , " Codeinput " },
{ Qt : : Key_SingleCandidate , " SingleCandidate " },
{ Qt : : Key_MultipleCandidate , " MultipleCandidate " },
{ Qt : : Key_PreviousCandidate , " PreviousCandidate " },
{ Qt : : Key_Mode_switch , " Mode_switch " },
{ Qt : : Key_Kanji , " Kanji " },
{ Qt : : Key_Muhenkan , " Muhenkan " },
{ Qt : : Key_Henkan , " Henkan " },
{ Qt : : Key_Romaji , " Romaji " },
{ Qt : : Key_Hiragana , " Hiragana " },
{ Qt : : Key_Katakana , " Katakana " },
{ Qt : : Key_Hiragana_Katakana , " Hiragana_Katakana " },
{ Qt : : Key_Zenkaku , " Zenkaku " },
{ Qt : : Key_Hankaku , " Hankaku " },
{ Qt : : Key_Zenkaku_Hankaku , " Zenkaku_Hankaku " },
{ Qt : : Key_Touroku , " Touroku " },
{ Qt : : Key_Massyo , " Massyo " },
{ Qt : : Key_Kana_Lock , " Kana_Lock " },
{ Qt : : Key_Kana_Shift , " Kana_Shift " },
{ Qt : : Key_Eisu_Shift , " Eisu_Shift " },
{ Qt : : Key_Eisu_toggle , " Eisu_toggle " },
{ Qt : : Key_Hangul , " Hangul " },
{ Qt : : Key_Hangul_Start , " Hangul_Start " },
{ Qt : : Key_Hangul_End , " Hangul_End " },
{ Qt : : Key_Hangul_Hanja , " Hangul_Hanja " },
{ Qt : : Key_Hangul_Jamo , " Hangul_Jamo " },
{ Qt : : Key_Hangul_Romaja , " Hangul_Romaja " },
{ Qt : : Key_Hangul_Jeonja , " Hangul_Jeonja " },
{ Qt : : Key_Hangul_Banja , " Hangul_Banja " },
{ Qt : : Key_Hangul_PreHanja , " Hangul_PreHanja " },
{ Qt : : Key_Hangul_PostHanja , " Hangul_PostHanja " },
{ Qt : : Key_Hangul_Special , " Hangul_Special " },
{ Qt : : Key_Dead_Grave , " Dead_Grave " },
{ Qt : : Key_Dead_Acute , " Dead_Acute " },
{ Qt : : Key_Dead_Circumflex , " Dead_Circumflex " },
{ Qt : : Key_Dead_Tilde , " Dead_Tilde " },
{ Qt : : Key_Dead_Macron , " Dead_Macron " },
{ Qt : : Key_Dead_Breve , " Dead_Breve " },
{ Qt : : Key_Dead_Abovedot , " Dead_Abovedot " },
{ Qt : : Key_Dead_Diaeresis , " Dead_Diaeresis " },
{ Qt : : Key_Dead_Abovering , " Dead_Abovering " },
{ Qt : : Key_Dead_Doubleacute , " Dead_Doubleacute " },
{ Qt : : Key_Dead_Caron , " Dead_Caron " },
{ Qt : : Key_Dead_Cedilla , " Dead_Cedilla " },
{ Qt : : Key_Dead_Ogonek , " Dead_Ogonek " },
{ Qt : : Key_Dead_Iota , " Dead_Iota " },
{ Qt : : Key_Dead_Voiced_Sound , " Dead_Voiced_Sound " },
{ Qt : : Key_Dead_Semivoiced_Sound , " Dead_Semivoiced_Sound " },
{ Qt : : Key_Dead_Belowdot , " Dead_Belowdot " },
{ Qt : : Key_Dead_Hook , " Dead_Hook " },
{ Qt : : Key_Dead_Horn , " Dead_Horn " },
{ Qt : : Key_Back , " Back " },
{ Qt : : Key_Forward , " Forward " },
{ Qt : : Key_Stop , " Stop " },
{ Qt : : Key_Refresh , " Refresh " },
{ Qt : : Key_VolumeDown , " VolumeDown " },
{ Qt : : Key_VolumeMute , " VolumeMute " },
{ Qt : : Key_VolumeUp , " VolumeUp " },
{ Qt : : Key_BassBoost , " BassBoost " },
{ Qt : : Key_BassUp , " BassUp " },
{ Qt : : Key_BassDown , " BassDown " },
{ Qt : : Key_TrebleUp , " TrebleUp " },
{ Qt : : Key_TrebleDown , " TrebleDown " },
{ Qt : : Key_MediaPlay , " MediaPlay " },
{ Qt : : Key_MediaStop , " MediaStop " },
{ Qt : : Key_MediaPrevious , " MediaPrevious " },
{ Qt : : Key_MediaNext , " MediaNext " },
{ Qt : : Key_MediaRecord , " MediaRecord " },
{ Qt : : Key_MediaPause , " MediaPause " },
{ Qt : : Key_MediaTogglePlayPause , " MediaTogglePlayPause " },
{ Qt : : Key_HomePage , " HomePage " },
{ Qt : : Key_Favorites , " Favorites " },
{ Qt : : Key_Search , " Search " },
{ Qt : : Key_Standby , " Standby " },
{ Qt : : Key_OpenUrl , " OpenUrl " },
{ Qt : : Key_LaunchMail , " LaunchMail " },
{ Qt : : Key_LaunchMedia , " LaunchMedia " },
{ Qt : : Key_Launch0 , " Launch0 " },
{ Qt : : Key_Launch1 , " Launch1 " },
{ Qt : : Key_Launch2 , " Launch2 " },
{ Qt : : Key_Launch3 , " Launch3 " },
{ Qt : : Key_Launch4 , " Launch4 " },
{ Qt : : Key_Launch5 , " Launch5 " },
{ Qt : : Key_Launch6 , " Launch6 " },
{ Qt : : Key_Launch7 , " Launch7 " },
{ Qt : : Key_Launch8 , " Launch8 " },
{ Qt : : Key_Launch9 , " Launch9 " },
{ Qt : : Key_LaunchA , " LaunchA " },
{ Qt : : Key_LaunchB , " LaunchB " },
{ Qt : : Key_LaunchC , " LaunchC " },
{ Qt : : Key_LaunchD , " LaunchD " },
{ Qt : : Key_LaunchE , " LaunchE " },
{ Qt : : Key_LaunchF , " LaunchF " },
{ Qt : : Key_MonBrightnessUp , " MonBrightnessUp " },
{ Qt : : Key_MonBrightnessDown , " MonBrightnessDown " },
{ Qt : : Key_KeyboardLightOnOff , " KeyboardLightOnOff " },
{ Qt : : Key_KeyboardBrightnessUp , " KeyboardBrightnessUp " },
{ Qt : : Key_KeyboardBrightnessDown , " KeyboardBrightnessDown " },
{ Qt : : Key_PowerOff , " PowerOff " },
{ Qt : : Key_WakeUp , " WakeUp " },
{ Qt : : Key_Eject , " Eject " },
{ Qt : : Key_ScreenSaver , " ScreenSaver " },
{ Qt : : Key_WWW , " WWW " },
{ Qt : : Key_Memo , " Memo " },
{ Qt : : Key_LightBulb , " LightBulb " },
{ Qt : : Key_Shop , " Shop " },
{ Qt : : Key_History , " History " },
{ Qt : : Key_AddFavorite , " AddFavorite " },
{ Qt : : Key_HotLinks , " HotLinks " },
{ Qt : : Key_BrightnessAdjust , " BrightnessAdjust " },
{ Qt : : Key_Finance , " Finance " },
{ Qt : : Key_Community , " Community " },
{ Qt : : Key_AudioRewind , " AudioRewind " },
{ Qt : : Key_BackForward , " BackForward " },
{ Qt : : Key_ApplicationLeft , " ApplicationLeft " },
{ Qt : : Key_ApplicationRight , " ApplicationRight " },
{ Qt : : Key_Book , " Book " },
{ Qt : : Key_CD , " CD " },
{ Qt : : Key_Calculator , " Calculator " },
{ Qt : : Key_ToDoList , " ToDoList " },
{ Qt : : Key_ClearGrab , " ClearGrab " },
{ Qt : : Key_Close , " Close " },
{ Qt : : Key_Copy , " Copy " },
{ Qt : : Key_Cut , " Cut " },
{ Qt : : Key_Display , " Display " },
{ Qt : : Key_DOS , " DOS " },
{ Qt : : Key_Documents , " Documents " },
{ Qt : : Key_Excel , " Excel " },
{ Qt : : Key_Explorer , " Explorer " },
{ Qt : : Key_Game , " Game " },
{ Qt : : Key_Go , " Go " },
{ Qt : : Key_iTouch , " iTouch " },
{ Qt : : Key_LogOff , " LogOff " },
{ Qt : : Key_Market , " Market " },
{ Qt : : Key_Meeting , " Meeting " },
{ Qt : : Key_MenuKB , " MenuKB " },
{ Qt : : Key_MenuPB , " MenuPB " },
{ Qt : : Key_MySites , " MySites " },
{ Qt : : Key_News , " News " },
{ Qt : : Key_OfficeHome , " OfficeHome " },
{ Qt : : Key_Option , " Option " },
{ Qt : : Key_Paste , " Paste " },
{ Qt : : Key_Phone , " Phone " },
{ Qt : : Key_Calendar , " Calendar " },
{ Qt : : Key_Reply , " Reply " },
{ Qt : : Key_Reload , " Reload " },
{ Qt : : Key_RotateWindows , " RotateWindows " },
{ Qt : : Key_RotationPB , " RotationPB " },
{ Qt : : Key_RotationKB , " RotationKB " },
{ Qt : : Key_Save , " Save " },
{ Qt : : Key_Send , " Send " },
{ Qt : : Key_Spell , " Spell " },
{ Qt : : Key_SplitScreen , " SplitScreen " },
{ Qt : : Key_Support , " Support " },
{ Qt : : Key_TaskPane , " TaskPane " },
{ Qt : : Key_Terminal , " Terminal " },
{ Qt : : Key_Tools , " Tools " },
{ Qt : : Key_Travel , " Travel " },
{ Qt : : Key_Video , " Video " },
{ Qt : : Key_Word , " Word " },
{ Qt : : Key_Xfer , " Xfer " },
{ Qt : : Key_ZoomIn , " ZoomIn " },
{ Qt : : Key_ZoomOut , " ZoomOut " },
{ Qt : : Key_Away , " Away " },
{ Qt : : Key_Messenger , " Messenger " },
{ Qt : : Key_WebCam , " WebCam " },
{ Qt : : Key_MailForward , " MailForward " },
{ Qt : : Key_Pictures , " Pictures " },
{ Qt : : Key_Music , " Music " },
{ Qt : : Key_Battery , " Battery " },
{ Qt : : Key_Bluetooth , " Bluetooth " },
{ Qt : : Key_WLAN , " WLAN " },
{ Qt : : Key_UWB , " UWB " },
{ Qt : : Key_AudioForward , " AudioForward " },
{ Qt : : Key_AudioRepeat , " AudioRepeat " },
{ Qt : : Key_AudioRandomPlay , " AudioRandomPlay " },
{ Qt : : Key_Subtitle , " Subtitle " },
{ Qt : : Key_AudioCycleTrack , " AudioCycleTrack " },
{ Qt : : Key_Time , " Time " },
{ Qt : : Key_Hibernate , " Hibernate " },
{ Qt : : Key_View , " View " },
{ Qt : : Key_TopMenu , " TopMenu " },
{ Qt : : Key_PowerDown , " PowerDown " },
{ Qt : : Key_Suspend , " Suspend " },
{ Qt : : Key_ContrastAdjust , " ContrastAdjust " },
{ Qt : : Key_LaunchG , " LaunchG " },
{ Qt : : Key_LaunchH , " LaunchH " },
{ Qt : : Key_TouchpadToggle , " TouchpadToggle " },
{ Qt : : Key_TouchpadOn , " TouchpadOn " },
{ Qt : : Key_TouchpadOff , " TouchpadOff " },
{ Qt : : Key_MicMute , " MicMute " },
{ Qt : : Key_Red , " Red " },
{ Qt : : Key_Green , " Green " },
{ Qt : : Key_Yellow , " Yellow " },
{ Qt : : Key_Blue , " Blue " },
{ Qt : : Key_ChannelUp , " ChannelUp " },
{ Qt : : Key_ChannelDown , " ChannelDown " },
{ Qt : : Key_Guide , " Guide " },
{ Qt : : Key_Info , " Info " },
{ Qt : : Key_Settings , " Settings " },
{ Qt : : Key_MicVolumeUp , " MicVolumeUp " },
{ Qt : : Key_MicVolumeDown , " MicVolumeDown " },
{ Qt : : Key_New , " New " },
{ Qt : : Key_Open , " Open " },
{ Qt : : Key_Find , " Find " },
{ Qt : : Key_Undo , " Undo " },
{ Qt : : Key_Redo , " Redo " },
{ Qt : : Key_MediaLast , " MediaLast " },
{ Qt : : Key_Select , " Select " },
{ Qt : : Key_Yes , " Yes " },
{ Qt : : Key_No , " No " },
{ Qt : : Key_Cancel , " Cancel " },
{ Qt : : Key_Printer , " Printer " },
{ Qt : : Key_Execute , " Execute " },
{ Qt : : Key_Sleep , " Sleep " },
{ Qt : : Key_Play , " Play " },
{ Qt : : Key_Zoom , " Zoom " },
{ Qt : : Key_Exit , " Exit " },
{ Qt : : Key_Context1 , " Context1 " },
{ Qt : : Key_Context2 , " Context2 " },
{ Qt : : Key_Context3 , " Context3 " },
{ Qt : : Key_Context4 , " Context4 " },
{ Qt : : Key_Call , " Call " },
{ Qt : : Key_Hangup , " Hangup " },
{ Qt : : Key_Flip , " Flip " },
{ Qt : : Key_ToggleCallHangup , " ToggleCallHangup " },
{ Qt : : Key_VoiceDial , " VoiceDial " },
{ Qt : : Key_LastNumberRedial , " LastNumberRedial " },
{ Qt : : Key_Camera , " Camera " },
{ Qt : : Key_CameraFocus , " CameraFocus " }} ;
static constexpr KeyCodeName s_qt_key_names [ ] = { { Qt : : Key_Escape , " Escape " , ICON_PF_ESC },
{ Qt : : Key_Tab , " Tab " , ICON_PF_TAB },
{ Qt : : Key_Backtab , " Backtab " , nullptr },
{ Qt : : Key_Backspace , " Backspace " , ICON_PF_BACKSPACE },
{ Qt : : Key_Return , " Return " , ICON_PF_ENTER },
{ Qt : : Key_Enter , " Enter " , ICON_PF_ENTER },
{ Qt : : Key_Insert , " Insert " , ICON_PF_INSERT },
{ Qt : : Key_Delete , " Delete " , ICON_PF_DELETE },
{ Qt : : Key_Pause , " Pause " , ICON_PF_PAUSE },
{ Qt : : Key_Print , " Print " , ICON_PF_PRTSC },
{ Qt : : Key_SysReq , " SysReq " , ICON_PF_PAUSE },
{ Qt : : Key_Clear , " Clear " , nullptr },
{ Qt : : Key_Home , " Home " , ICON_PF_HOME },
{ Qt : : Key_End , " End " , ICON_PF_END },
{ Qt : : Key_Left , " Left " , ICON_PF_ARROW_LEFT },
{ Qt : : Key_Up , " Up " , ICON_PF_ARROW_UP },
{ Qt : : Key_Right , " Right " , ICON_PF_ARROW_RIGHT },
{ Qt : : Key_Down , " Down " , ICON_PF_ARROW_DOWN },
{ Qt : : Key_PageUp , " PageUp " , ICON_PF_PAGE_UP },
{ Qt : : Key_PageDown , " PageDown " , ICON_PF_PAGE_DOWN },
{ Qt : : Key_Shift , " Shift " , ICON_PF_SHIFT },
{ Qt : : Key_Control , " Control " , ICON_PF_CTRL },
{ Qt : : Key_Meta , " Meta " , ICON_PF_SUPER },
{ Qt : : Key_Alt , " Alt " , ICON_PF_ALT },
{ Qt : : Key_CapsLock , " CapsLock " , ICON_PF_CAPS },
{ Qt : : Key_NumLock , " NumLock " , ICON_PF_NUMLOCK },
{ Qt : : Key_ScrollLock , " ScrollLock " , ICON_PF_SCRLK },
{ Qt : : Key_F1 , " F1 " , ICON_PF_F1 },
{ Qt : : Key_F2 , " F2 " , ICON_PF_F2 },
{ Qt : : Key_F3 , " F3 " , ICON_PF_F3 },
{ Qt : : Key_F4 , " F4 " , ICON_PF_F4 },
{ Qt : : Key_F5 , " F5 " , ICON_PF_F5 },
{ Qt : : Key_F6 , " F6 " , ICON_PF_F6 },
{ Qt : : Key_F7 , " F7 " , ICON_PF_F7 },
{ Qt : : Key_F8 , " F8 " , ICON_PF_F8 },
{ Qt : : Key_F9 , " F9 " , ICON_PF_F9 },
{ Qt : : Key_F10 , " F10 " , ICON_PF_F10 },
{ Qt : : Key_F11 , " F11 " , ICON_PF_F11 },
{ Qt : : Key_F12 , " F12 " , ICON_PF_F12 },
{ Qt : : Key_F13 , " F13 " , nullptr },
{ Qt : : Key_F14 , " F14 " , nullptr },
{ Qt : : Key_F15 , " F15 " , nullptr },
{ Qt : : Key_F16 , " F16 " , nullptr },
{ Qt : : Key_F17 , " F17 " , nullptr },
{ Qt : : Key_F18 , " F18 " , nullptr },
{ Qt : : Key_F19 , " F19 " , nullptr },
{ Qt : : Key_F20 , " F20 " , nullptr },
{ Qt : : Key_F21 , " F21 " , nullptr },
{ Qt : : Key_F22 , " F22 " , nullptr },
{ Qt : : Key_F23 , " F23 " , nullptr },
{ Qt : : Key_F24 , " F24 " , nullptr },
{ Qt : : Key_F25 , " F25 " , nullptr },
{ Qt : : Key_F26 , " F26 " , nullptr },
{ Qt : : Key_F27 , " F27 " , nullptr },
{ Qt : : Key_F28 , " F28 " , nullptr },
{ Qt : : Key_F29 , " F29 " , nullptr },
{ Qt : : Key_F30 , " F30 " , nullptr },
{ Qt : : Key_F31 , " F31 " , nullptr },
{ Qt : : Key_F32 , " F32 " , nullptr },
{ Qt : : Key_F33 , " F33 " , nullptr },
{ Qt : : Key_F34 , " F34 " , nullptr },
{ Qt : : Key_F35 , " F35 " , nullptr },
{ Qt : : Key_Super_L , " Super_L " , nullptr },
{ Qt : : Key_Super_R , " Super_R " , nullptr },
{ Qt : : Key_Menu , " Menu " , nullptr },
{ Qt : : Key_Hyper_L , " Hyper_L " , nullptr },
{ Qt : : Key_Hyper_R , " Hyper_R " , nullptr },
{ Qt : : Key_Help , " Help " , nullptr },
{ Qt : : Key_Direction_L , " Direction_L " , nullptr },
{ Qt : : Key_Direction_R , " Direction_R " , nullptr },
{ Qt : : Key_Space , " Space " , ICON_PF_SPACE },
{ Qt : : Key_Any , " Any " , nullptr },
{ Qt : : Key_Exclam , " Exclam " , nullptr },
{ Qt : : Key_QuoteDbl , " QuoteDbl " , nullptr },
{ Qt : : Key_NumberSign , " NumberSign " , nullptr },
{ Qt : : Key_Dollar , " Dollar " , nullptr },
{ Qt : : Key_Percent , " Percent " , nullptr },
{ Qt : : Key_Ampersand , " Ampersand " , nullptr },
{ Qt : : Key_Apostrophe , " Apostrophe " , nullptr },
{ Qt : : Key_ParenLeft , " ParenLeft " , nullptr },
{ Qt : : Key_ParenRight , " ParenRight " , nullptr },
{ Qt : : Key_Asterisk , " Asterisk " , nullptr },
{ Qt : : Key_Plus , " Plus " , nullptr },
{ Qt : : Key_Comma , " Comma " , nullptr },
{ Qt : : Key_Minus , " Minus " , nullptr },
{ Qt : : Key_Period , " Period " , nullptr },
{ Qt : : Key_Slash , " Slash " , nullptr },
{ Qt : : Key_0 , " 0 " , ICON_PF_0 },
{ Qt : : Key_1 , " 1 " , ICON_PF_1 },
{ Qt : : Key_2 , " 2 " , ICON_PF_2 },
{ Qt : : Key_3 , " 3 " , ICON_PF_3 },
{ Qt : : Key_4 , " 4 " , ICON_PF_4 },
{ Qt : : Key_5 , " 5 " , ICON_PF_5 },
{ Qt : : Key_6 , " 6 " , ICON_PF_6 },
{ Qt : : Key_7 , " 7 " , ICON_PF_7 },
{ Qt : : Key_8 , " 8 " , ICON_PF_8 },
{ Qt : : Key_9 , " 9 " , ICON_PF_9 },
{ Qt : : Key_Colon , " Colon " , nullptr },
{ Qt : : Key_Semicolon , " Semicolon " , nullptr },
{ Qt : : Key_Less , " Less " , nullptr },
{ Qt : : Key_Equal , " Equal " , nullptr },
{ Qt : : Key_Greater , " Greater " , nullptr },
{ Qt : : Key_Question , " Question " , nullptr },
{ Qt : : Key_At , " At " , nullptr },
{ Qt : : Key_A , " A " , ICON_PF_KEY_A },
{ Qt : : Key_B , " B " , ICON_PF_KEY_B },
{ Qt : : Key_C , " C " , ICON_PF_KEY_C },
{ Qt : : Key_D , " D " , ICON_PF_KEY_D },
{ Qt : : Key_E , " E " , ICON_PF_KEY_E },
{ Qt : : Key_F , " F " , ICON_PF_KEY_F },
{ Qt : : Key_G , " G " , ICON_PF_KEY_G },
{ Qt : : Key_H , " H " , ICON_PF_KEY_H },
{ Qt : : Key_I , " I " , ICON_PF_KEY_I },
{ Qt : : Key_J , " J " , ICON_PF_KEY_J },
{ Qt : : Key_K , " K " , ICON_PF_KEY_K },
{ Qt : : Key_L , " L " , ICON_PF_KEY_L },
{ Qt : : Key_M , " M " , ICON_PF_KEY_M },
{ Qt : : Key_N , " N " , ICON_PF_KEY_N },
{ Qt : : Key_O , " O " , ICON_PF_KEY_O },
{ Qt : : Key_P , " P " , ICON_PF_KEY_P },
{ Qt : : Key_Q , " Q " , ICON_PF_KEY_Q },
{ Qt : : Key_R , " R " , ICON_PF_KEY_R },
{ Qt : : Key_S , " S " , ICON_PF_KEY_S },
{ Qt : : Key_T , " T " , ICON_PF_KEY_T },
{ Qt : : Key_U , " U " , ICON_PF_KEY_U },
{ Qt : : Key_V , " V " , ICON_PF_KEY_V },
{ Qt : : Key_W , " W " , ICON_PF_KEY_W },
{ Qt : : Key_X , " X " , ICON_PF_KEY_X },
{ Qt : : Key_Y , " Y " , ICON_PF_KEY_Y },
{ Qt : : Key_Z , " Z " , ICON_PF_KEY_Z },
{ Qt : : Key_BracketLeft , " BracketLeft " , nullptr },
{ Qt : : Key_Backslash , " Backslash " , nullptr },
{ Qt : : Key_BracketRight , " BracketRight " , nullptr },
{ Qt : : Key_AsciiCircum , " AsciiCircum " , nullptr },
{ Qt : : Key_Underscore , " Underscore " , nullptr },
{ Qt : : Key_QuoteLeft , " QuoteLeft " , nullptr },
{ Qt : : Key_BraceLeft , " BraceLeft " , nullptr },
{ Qt : : Key_Bar , " Bar " , nullptr },
{ Qt : : Key_BraceRight , " BraceRight " , nullptr },
{ Qt : : Key_AsciiTilde , " AsciiTilde " , nullptr },
{ Qt : : Key_nobreakspace , " nobreakspace " , nullptr },
{ Qt : : Key_exclamdown , " exclamdown " , nullptr },
{ Qt : : Key_cent , " cent " , nullptr },
{ Qt : : Key_sterling , " sterling " , nullptr },
{ Qt : : Key_currency , " currency " , nullptr },
{ Qt : : Key_yen , " yen " , nullptr },
{ Qt : : Key_brokenbar , " brokenbar " , nullptr },
{ Qt : : Key_section , " section " , nullptr },
{ Qt : : Key_diaeresis , " diaeresis " , nullptr },
{ Qt : : Key_copyright , " copyright " , nullptr },
{ Qt : : Key_ordfeminine , " ordfeminine " , nullptr },
{ Qt : : Key_guillemotleft , " guillemotleft " , nullptr },
{ Qt : : Key_notsign , " notsign " , nullptr },
{ Qt : : Key_hyphen , " hyphen " , nullptr },
{ Qt : : Key_registered , " registered " , nullptr },
{ Qt : : Key_macron , " macron " , nullptr },
{ Qt : : Key_degree , " degree " , nullptr },
{ Qt : : Key_plusminus , " plusminus " , nullptr },
{ Qt : : Key_twosuperior , " twosuperior " , nullptr },
{ Qt : : Key_threesuperior , " threesuperior " , nullptr },
{ Qt : : Key_acute , " acute " , nullptr },
{ Qt : : Key_mu , " mu " , nullptr },
{ Qt : : Key_paragraph , " paragraph " , nullptr },
{ Qt : : Key_periodcentered , " periodcentered " , nullptr },
{ Qt : : Key_cedilla , " cedilla " , nullptr },
{ Qt : : Key_onesuperior , " onesuperior " , nullptr },
{ Qt : : Key_masculine , " masculine " , nullptr },
{ Qt : : Key_guillemotright , " guillemotright " , nullptr },
{ Qt : : Key_onequarter , " onequarter " , nullptr },
{ Qt : : Key_onehalf , " onehalf " , nullptr },
{ Qt : : Key_threequarters , " threequarters " , nullptr },
{ Qt : : Key_questiondown , " questiondown " , nullptr },
{ Qt : : Key_Agrave , " Agrave " , nullptr },
{ Qt : : Key_Aacute , " Aacute " , nullptr },
{ Qt : : Key_Acircumflex , " Acircumflex " , nullptr },
{ Qt : : Key_Atilde , " Atilde " , nullptr },
{ Qt : : Key_Adiaeresis , " Adiaeresis " , nullptr },
{ Qt : : Key_Aring , " Aring " , nullptr },
{ Qt : : Key_AE , " AE " , nullptr },
{ Qt : : Key_Ccedilla , " Ccedilla " , nullptr },
{ Qt : : Key_Egrave , " Egrave " , nullptr },
{ Qt : : Key_Eacute , " Eacute " , nullptr },
{ Qt : : Key_Ecircumflex , " Ecircumflex " , nullptr },
{ Qt : : Key_Ediaeresis , " Ediaeresis " , nullptr },
{ Qt : : Key_Igrave , " Igrave " , nullptr },
{ Qt : : Key_Iacute , " Iacute " , nullptr },
{ Qt : : Key_Icircumflex , " Icircumflex " , nullptr },
{ Qt : : Key_Idiaeresis , " Idiaeresis " , nullptr },
{ Qt : : Key_ETH , " ETH " , nullptr },
{ Qt : : Key_Ntilde , " Ntilde " , nullptr },
{ Qt : : Key_Ograve , " Ograve " , nullptr },
{ Qt : : Key_Oacute , " Oacute " , nullptr },
{ Qt : : Key_Ocircumflex , " Ocircumflex " , nullptr },
{ Qt : : Key_Otilde , " Otilde " , nullptr },
{ Qt : : Key_Odiaeresis , " Odiaeresis " , nullptr },
{ Qt : : Key_multiply , " multiply " , nullptr },
{ Qt : : Key_Ooblique , " Ooblique " , nullptr },
{ Qt : : Key_Ugrave , " Ugrave " , nullptr },
{ Qt : : Key_Uacute , " Uacute " , nullptr },
{ Qt : : Key_Ucircumflex , " Ucircumflex " , nullptr },
{ Qt : : Key_Udiaeresis , " Udiaeresis " , nullptr },
{ Qt : : Key_Yacute , " Yacute " , nullptr },
{ Qt : : Key_THORN , " THORN " , nullptr },
{ Qt : : Key_ssharp , " ssharp " , nullptr },
{ Qt : : Key_division , " division " , nullptr },
{ Qt : : Key_ydiaeresis , " ydiaeresis " , nullptr },
{ Qt : : Key_AltGr , " AltGr " , nullptr },
{ Qt : : Key_Multi_key , " Multi_key " , nullptr },
{ Qt : : Key_Codeinput , " Codeinput " , nullptr },
{ Qt : : Key_SingleCandidate , " SingleCandidate " , nullptr },
{ Qt : : Key_MultipleCandidate , " MultipleCandidate " , nullptr },
{ Qt : : Key_PreviousCandidate , " PreviousCandidate " , nullptr },
{ Qt : : Key_Mode_switch , " Mode_switch " , nullptr },
{ Qt : : Key_Kanji , " Kanji " , nullptr },
{ Qt : : Key_Muhenkan , " Muhenkan " , nullptr },
{ Qt : : Key_Henkan , " Henkan " , nullptr },
{ Qt : : Key_Romaji , " Romaji " , nullptr },
{ Qt : : Key_Hiragana , " Hiragana " , nullptr },
{ Qt : : Key_Katakana , " Katakana " , nullptr },
{ Qt : : Key_Hiragana_Katakana , " Hiragana_Katakana " , nullptr },
{ Qt : : Key_Zenkaku , " Zenkaku " , nullptr },
{ Qt : : Key_Hankaku , " Hankaku " , nullptr },
{ Qt : : Key_Zenkaku_Hankaku , " Zenkaku_Hankaku " , nullptr },
{ Qt : : Key_Touroku , " Touroku " , nullptr },
{ Qt : : Key_Massyo , " Massyo " , nullptr },
{ Qt : : Key_Kana_Lock , " Kana_Lock " , nullptr },
{ Qt : : Key_Kana_Shift , " Kana_Shift " , nullptr },
{ Qt : : Key_Eisu_Shift , " Eisu_Shift " , nullptr },
{ Qt : : Key_Eisu_toggle , " Eisu_toggle " , nullptr },
{ Qt : : Key_Hangul , " Hangul " , nullptr },
{ Qt : : Key_Hangul_Start , " Hangul_Start " , nullptr },
{ Qt : : Key_Hangul_End , " Hangul_End " , nullptr },
{ Qt : : Key_Hangul_Hanja , " Hangul_Hanja " , nullptr },
{ Qt : : Key_Hangul_Jamo , " Hangul_Jamo " , nullptr },
{ Qt : : Key_Hangul_Romaja , " Hangul_Romaja " , nullptr },
{ Qt : : Key_Hangul_Jeonja , " Hangul_Jeonja " , nullptr },
{ Qt : : Key_Hangul_Banja , " Hangul_Banja " , nullptr },
{ Qt : : Key_Hangul_PreHanja , " Hangul_PreHanja " , nullptr },
{ Qt : : Key_Hangul_PostHanja , " Hangul_PostHanja " , nullptr },
{ Qt : : Key_Hangul_Special , " Hangul_Special " , nullptr },
{ Qt : : Key_Dead_Grave , " Dead_Grave " , nullptr },
{ Qt : : Key_Dead_Acute , " Dead_Acute " , nullptr },
{ Qt : : Key_Dead_Circumflex , " Dead_Circumflex " , nullptr },
{ Qt : : Key_Dead_Tilde , " Dead_Tilde " , nullptr },
{ Qt : : Key_Dead_Macron , " Dead_Macron " , nullptr },
{ Qt : : Key_Dead_Breve , " Dead_Breve " , nullptr },
{ Qt : : Key_Dead_Abovedot , " Dead_Abovedot " , nullptr },
{ Qt : : Key_Dead_Diaeresis , " Dead_Diaeresis " , nullptr },
{ Qt : : Key_Dead_Abovering , " Dead_Abovering " , nullptr },
{ Qt : : Key_Dead_Doubleacute , " Dead_Doubleacute " , nullptr },
{ Qt : : Key_Dead_Caron , " Dead_Caron " , nullptr },
{ Qt : : Key_Dead_Cedilla , " Dead_Cedilla " , nullptr },
{ Qt : : Key_Dead_Ogonek , " Dead_Ogonek " , nullptr },
{ Qt : : Key_Dead_Iota , " Dead_Iota " , nullptr },
{ Qt : : Key_Dead_Voiced_Sound , " Dead_Voiced_Sound " , nullptr },
{ Qt : : Key_Dead_Semivoiced_Sound , " Dead_Semivoiced_Sound " , nullptr },
{ Qt : : Key_Dead_Belowdot , " Dead_Belowdot " , nullptr },
{ Qt : : Key_Dead_Hook , " Dead_Hook " , nullptr },
{ Qt : : Key_Dead_Horn , " Dead_Horn " , nullptr },
{ Qt : : Key_Back , " Back " , nullptr },
{ Qt : : Key_Forward , " Forward " , nullptr },
{ Qt : : Key_Stop , " Stop " , nullptr },
{ Qt : : Key_Refresh , " Refresh " , nullptr },
{ Qt : : Key_VolumeDown , " VolumeDown " , nullptr },
{ Qt : : Key_VolumeMute , " VolumeMute " , nullptr },
{ Qt : : Key_VolumeUp , " VolumeUp " , nullptr },
{ Qt : : Key_BassBoost , " BassBoost " , nullptr },
{ Qt : : Key_BassUp , " BassUp " , nullptr },
{ Qt : : Key_BassDown , " BassDown " , nullptr },
{ Qt : : Key_TrebleUp , " TrebleUp " , nullptr },
{ Qt : : Key_TrebleDown , " TrebleDown " , nullptr },
{ Qt : : Key_MediaPlay , " MediaPlay " , nullptr },
{ Qt : : Key_MediaStop , " MediaStop " , nullptr },
{ Qt : : Key_MediaPrevious , " MediaPrevious " , nullptr },
{ Qt : : Key_MediaNext , " MediaNext " , nullptr },
{ Qt : : Key_MediaRecord , " MediaRecord " , nullptr },
{ Qt : : Key_MediaPause , " MediaPause " , nullptr },
{ Qt : : Key_MediaTogglePlayPause , " MediaTogglePlayPause " , nullptr },
{ Qt : : Key_HomePage , " HomePage " , nullptr },
{ Qt : : Key_Favorites , " Favorites " , nullptr },
{ Qt : : Key_Search , " Search " , nullptr },
{ Qt : : Key_Standby , " Standby " , nullptr },
{ Qt : : Key_OpenUrl , " OpenUrl " , nullptr },
{ Qt : : Key_LaunchMail , " LaunchMail " , nullptr },
{ Qt : : Key_LaunchMedia , " LaunchMedia " , nullptr },
{ Qt : : Key_Launch0 , " Launch0 " , nullptr },
{ Qt : : Key_Launch1 , " Launch1 " , nullptr },
{ Qt : : Key_Launch2 , " Launch2 " , nullptr },
{ Qt : : Key_Launch3 , " Launch3 " , nullptr },
{ Qt : : Key_Launch4 , " Launch4 " , nullptr },
{ Qt : : Key_Launch5 , " Launch5 " , nullptr },
{ Qt : : Key_Launch6 , " Launch6 " , nullptr },
{ Qt : : Key_Launch7 , " Launch7 " , nullptr },
{ Qt : : Key_Launch8 , " Launch8 " , nullptr },
{ Qt : : Key_Launch9 , " Launch9 " , nullptr },
{ Qt : : Key_LaunchA , " LaunchA " , nullptr },
{ Qt : : Key_LaunchB , " LaunchB " , nullptr },
{ Qt : : Key_LaunchC , " LaunchC " , nullptr },
{ Qt : : Key_LaunchD , " LaunchD " , nullptr },
{ Qt : : Key_LaunchE , " LaunchE " , nullptr },
{ Qt : : Key_LaunchF , " LaunchF " , nullptr },
{ Qt : : Key_MonBrightnessUp , " MonBrightnessUp " , nullptr },
{ Qt : : Key_MonBrightnessDown , " MonBrightnessDown " , nullptr },
{ Qt : : Key_KeyboardLightOnOff , " KeyboardLightOnOff " , nullptr },
{ Qt : : Key_KeyboardBrightnessUp , " KeyboardBrightnessUp " , nullptr },
{ Qt : : Key_KeyboardBrightnessDown , " KeyboardBrightnessDown " , nullptr },
{ Qt : : Key_PowerOff , " PowerOff " , nullptr },
{ Qt : : Key_WakeUp , " WakeUp " , nullptr },
{ Qt : : Key_Eject , " Eject " , nullptr },
{ Qt : : Key_ScreenSaver , " ScreenSaver " , nullptr },
{ Qt : : Key_WWW , " WWW " , nullptr },
{ Qt : : Key_Memo , " Memo " , nullptr },
{ Qt : : Key_LightBulb , " LightBulb " , nullptr },
{ Qt : : Key_Shop , " Shop " , nullptr },
{ Qt : : Key_History , " History " , nullptr },
{ Qt : : Key_AddFavorite , " AddFavorite " , nullptr },
{ Qt : : Key_HotLinks , " HotLinks " , nullptr },
{ Qt : : Key_BrightnessAdjust , " BrightnessAdjust " , nullptr },
{ Qt : : Key_Finance , " Finance " , nullptr },
{ Qt : : Key_Community , " Community " , nullptr },
{ Qt : : Key_AudioRewind , " AudioRewind " , nullptr },
{ Qt : : Key_BackForward , " BackForward " , nullptr },
{ Qt : : Key_ApplicationLeft , " ApplicationLeft " , nullptr },
{ Qt : : Key_ApplicationRight , " ApplicationRight " , nullptr },
{ Qt : : Key_Book , " Book " , nullptr },
{ Qt : : Key_CD , " CD " , nullptr },
{ Qt : : Key_Calculator , " Calculator " , nullptr },
{ Qt : : Key_ToDoList , " ToDoList " , nullptr },
{ Qt : : Key_ClearGrab , " ClearGrab " , nullptr },
{ Qt : : Key_Close , " Close " , nullptr },
{ Qt : : Key_Copy , " Copy " , nullptr },
{ Qt : : Key_Cut , " Cut " , nullptr },
{ Qt : : Key_Display , " Display " , nullptr },
{ Qt : : Key_DOS , " DOS " , nullptr },
{ Qt : : Key_Documents , " Documents " , nullptr },
{ Qt : : Key_Excel , " Excel " , nullptr },
{ Qt : : Key_Explorer , " Explorer " , nullptr },
{ Qt : : Key_Game , " Game " , nullptr },
{ Qt : : Key_Go , " Go " , nullptr },
{ Qt : : Key_iTouch , " iTouch " , nullptr },
{ Qt : : Key_LogOff , " LogOff " , nullptr },
{ Qt : : Key_Market , " Market " , nullptr },
{ Qt : : Key_Meeting , " Meeting " , nullptr },
{ Qt : : Key_MenuKB , " MenuKB " , nullptr },
{ Qt : : Key_MenuPB , " MenuPB " , nullptr },
{ Qt : : Key_MySites , " MySites " , nullptr },
{ Qt : : Key_News , " News " , nullptr },
{ Qt : : Key_OfficeHome , " OfficeHome " , nullptr },
{ Qt : : Key_Option , " Option " , nullptr },
{ Qt : : Key_Paste , " Paste " , nullptr },
{ Qt : : Key_Phone , " Phone " , nullptr },
{ Qt : : Key_Calendar , " Calendar " , nullptr },
{ Qt : : Key_Reply , " Reply " , nullptr },
{ Qt : : Key_Reload , " Reload " , nullptr },
{ Qt : : Key_RotateWindows , " RotateWindows " , nullptr },
{ Qt : : Key_RotationPB , " RotationPB " , nullptr },
{ Qt : : Key_RotationKB , " RotationKB " , nullptr },
{ Qt : : Key_Save , " Save " , nullptr },
{ Qt : : Key_Send , " Send " , nullptr },
{ Qt : : Key_Spell , " Spell " , nullptr },
{ Qt : : Key_SplitScreen , " SplitScreen " , nullptr },
{ Qt : : Key_Support , " Support " , nullptr },
{ Qt : : Key_TaskPane , " TaskPane " , nullptr },
{ Qt : : Key_Terminal , " Terminal " , nullptr },
{ Qt : : Key_Tools , " Tools " , nullptr },
{ Qt : : Key_Travel , " Travel " , nullptr },
{ Qt : : Key_Video , " Video " , nullptr },
{ Qt : : Key_Word , " Word " , nullptr },
{ Qt : : Key_Xfer , " Xfer " , nullptr },
{ Qt : : Key_ZoomIn , " ZoomIn " , nullptr },
{ Qt : : Key_ZoomOut , " ZoomOut " , nullptr },
{ Qt : : Key_Away , " Away " , nullptr },
{ Qt : : Key_Messenger , " Messenger " , nullptr },
{ Qt : : Key_WebCam , " WebCam " , nullptr },
{ Qt : : Key_MailForward , " MailForward " , nullptr },
{ Qt : : Key_Pictures , " Pictures " , nullptr },
{ Qt : : Key_Music , " Music " , nullptr },
{ Qt : : Key_Battery , " Battery " , nullptr },
{ Qt : : Key_Bluetooth , " Bluetooth " , nullptr },
{ Qt : : Key_WLAN , " WLAN " , nullptr },
{ Qt : : Key_UWB , " UWB " , nullptr },
{ Qt : : Key_AudioForward , " AudioForward " , nullptr },
{ Qt : : Key_AudioRepeat , " AudioRepeat " , nullptr },
{ Qt : : Key_AudioRandomPlay , " AudioRandomPlay " , nullptr },
{ Qt : : Key_Subtitle , " Subtitle " , nullptr },
{ Qt : : Key_AudioCycleTrack , " AudioCycleTrack " , nullptr },
{ Qt : : Key_Time , " Time " , nullptr },
{ Qt : : Key_Hibernate , " Hibernate " , nullptr },
{ Qt : : Key_View , " View " , nullptr },
{ Qt : : Key_TopMenu , " TopMenu " , nullptr },
{ Qt : : Key_PowerDown , " PowerDown " , nullptr },
{ Qt : : Key_Suspend , " Suspend " , nullptr },
{ Qt : : Key_ContrastAdjust , " ContrastAdjust " , nullptr },
{ Qt : : Key_LaunchG , " LaunchG " , nullptr },
{ Qt : : Key_LaunchH , " LaunchH " , nullptr },
{ Qt : : Key_TouchpadToggle , " TouchpadToggle " , nullptr },
{ Qt : : Key_TouchpadOn , " TouchpadOn " , nullptr },
{ Qt : : Key_TouchpadOff , " TouchpadOff " , nullptr },
{ Qt : : Key_MicMute , " MicMute " , nullptr },
{ Qt : : Key_Red , " Red " , nullptr },
{ Qt : : Key_Green , " Green " , nullptr },
{ Qt : : Key_Yellow , " Yellow " , nullptr },
{ Qt : : Key_Blue , " Blue " , nullptr },
{ Qt : : Key_ChannelUp , " ChannelUp " , nullptr },
{ Qt : : Key_ChannelDown , " ChannelDown " , nullptr },
{ Qt : : Key_Guide , " Guide " , nullptr },
{ Qt : : Key_Info , " Info " , nullptr },
{ Qt : : Key_Settings , " Settings " , nullptr },
{ Qt : : Key_MicVolumeUp , " MicVolumeUp " , nullptr },
{ Qt : : Key_MicVolumeDown , " MicVolumeDown " , nullptr },
{ Qt : : Key_New , " New " , nullptr },
{ Qt : : Key_Open , " Open " , nullptr },
{ Qt : : Key_Find , " Find " , nullptr },
{ Qt : : Key_Undo , " Undo " , nullptr },
{ Qt : : Key_Redo , " Redo " , nullptr },
{ Qt : : Key_MediaLast , " MediaLast " , nullptr },
{ Qt : : Key_Select , " Select " , nullptr },
{ Qt : : Key_Yes , " Yes " , nullptr },
{ Qt : : Key_No , " No " , nullptr },
{ Qt : : Key_Cancel , " Cancel " , nullptr },
{ Qt : : Key_Printer , " Printer " , nullptr },
{ Qt : : Key_Execute , " Execute " , nullptr },
{ Qt : : Key_Sleep , " Sleep " , nullptr },
{ Qt : : Key_Play , " Play " , nullptr },
{ Qt : : Key_Zoom , " Zoom " , nullptr },
{ Qt : : Key_Exit , " Exit " , nullptr },
{ Qt : : Key_Context1 , " Context1 " , nullptr },
{ Qt : : Key_Context2 , " Context2 " , nullptr },
{ Qt : : Key_Context3 , " Context3 " , nullptr },
{ Qt : : Key_Context4 , " Context4 " , nullptr },
{ Qt : : Key_Call , " Call " , nullptr },
{ Qt : : Key_Hangup , " Hangup " , nullptr },
{ Qt : : Key_Flip , " Flip " , nullptr },
{ Qt : : Key_ToggleCallHangup , " ToggleCallHangup " , nullptr },
{ Qt : : Key_VoiceDial , " VoiceDial " , nullptr },
{ Qt : : Key_LastNumberRedial , " LastNumberRedial " , nullptr },
{ Qt : : Key_Camera , " Camera " , nullptr },
{ Qt : : Key_CameraFocus , " CameraFocus " , nullptr }} ;
std : : optional < u32 > InputManager : : ConvertHostKeyboardStringToCode ( const std : : string_view & str )
{
@ -497,6 +500,21 @@ std::optional<std::string> InputManager::ConvertHostKeyboardCodeToString(u32 cod
return ret ;
}
const char * InputManager : : ConvertHostKeyboardCodeToIcon ( u32 code )
{
if ( code & Qt : : KeyboardModifierMask )
return nullptr ;
const u32 masked_code = ( code & ~ Qt : : KeyboardModifierMask ) ;
for ( const KeyCodeName & name : s_qt_key_names )
{
if ( static_cast < int > ( masked_code ) = = name . code )
return name . icon_name ;
}
return nullptr ;
}
u32 QtUtils : : KeyEventToCode ( const QKeyEvent * ev )
{
return static_cast < u32 > ( ev - > key ( ) ) | ( static_cast < u32 > ( ev - > modifiers ( ) ) & static_cast < u32 > ( Qt : : KeypadModifier ) ) ;