Advertisement
svenhoefer

Untitled

Mar 20th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.72 KB | None | 0 0
  1. void GLFbPC::initKeys()
  2. {
  3.     mSpecialMap[GLUT_KEY_UP]    = KEY_UP;
  4.     mSpecialMap[GLUT_KEY_DOWN]  = KEY_DOWN;
  5.     mSpecialMap[GLUT_KEY_LEFT]  = KEY_LEFT;
  6.     mSpecialMap[GLUT_KEY_RIGHT] = KEY_RIGHT;
  7.  
  8.     mSpecialMap[GLUT_KEY_F1]  = KEY_RED;
  9.     mSpecialMap[GLUT_KEY_F2]  = KEY_GREEN;
  10.     mSpecialMap[GLUT_KEY_F3]  = KEY_YELLOW;
  11.     mSpecialMap[GLUT_KEY_F4]  = KEY_BLUE;
  12.  
  13.     mSpecialMap[GLUT_KEY_F5]  = KEY_RECORD;
  14.     mSpecialMap[GLUT_KEY_F6]  = KEY_PLAY;
  15.     mSpecialMap[GLUT_KEY_F7]  = KEY_PAUSE;
  16.     mSpecialMap[GLUT_KEY_F9]  = KEY_STOP;
  17.  
  18.     mSpecialMap[GLUT_KEY_F9]  = KEY_FORWARD;
  19.     mSpecialMap[GLUT_KEY_F10] = KEY_REWIND;
  20.     mSpecialMap[GLUT_KEY_F11] = KEY_NEXT;
  21.     mSpecialMap[GLUT_KEY_F12] = KEY_PREVIOUS;
  22.  
  23.     mSpecialMap[GLUT_KEY_PAGE_UP]   = KEY_PAGEUP;
  24.     mSpecialMap[GLUT_KEY_PAGE_DOWN] = KEY_PAGEDOWN;
  25.  
  26.     mKeyMap['0']  = KEY_0;
  27.     mKeyMap['1']  = KEY_1;
  28.     mKeyMap['2']  = KEY_2;
  29.     mKeyMap['3']  = KEY_3;
  30.     mKeyMap['4']  = KEY_4;
  31.     mKeyMap['5']  = KEY_5;
  32.     mKeyMap['6']  = KEY_6;
  33.     mKeyMap['7']  = KEY_7;
  34.     mKeyMap['8']  = KEY_8;
  35.     mKeyMap['9']  = KEY_9;
  36.  
  37.     mKeyMap[0x0d] = KEY_OK;
  38.     mKeyMap[0x1b] = KEY_EXIT;
  39.  
  40.     mKeyMap['-']  = KEY_VOLUMEDOWN;
  41.     mKeyMap['.']  = KEY_MUTE;
  42.     mKeyMap['+']  = KEY_VOLUMEUP;
  43.     mKeyMap['a']  = KEY_AUDIO;
  44.     mKeyMap['e']  = KEY_EPG;
  45.     //     ['f']    is reserved to toggle fullscreen;
  46.     mKeyMap['g']  = KEY_GAMES;
  47.     mKeyMap['h']  = KEY_HELP;
  48.     mKeyMap['i']  = KEY_INFO;
  49.     mKeyMap['m']  = KEY_MENU;
  50.     mKeyMap['p']  = KEY_POWER;
  51.     mKeyMap['r']  = KEY_RADIO;
  52.     mKeyMap['s']  = KEY_SUBTITLE;
  53.     mKeyMap['t']  = KEY_TV;
  54.     mKeyMap['v']  = KEY_VIDEO;
  55.     mKeyMap['z']  = KEY_SLEEP;
  56.  
  57.     /* shift keys */
  58.     mKeyMap['F']  = KEY_FAVORITES;
  59.     mKeyMap['M']  = KEY_MODE;
  60.     mKeyMap['S']  = KEY_SAT;
  61.     mKeyMap['T']  = KEY_TEXT;
  62.     mKeyMap['W']  = KEY_WWW;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement