1. -- 
  2. -- Jan & Uwe R. Zimmer, Australia, July 2011 
  3. -- 
  4.  
  5. package body Keyboard is 
  6.  
  7.    ----------------------- 
  8.    -- Keyboard Commands -- 
  9.    ----------------------- 
  10.    procedure Get_Keys (Commands : in out Commands_Array; 
  11.                        Selected_Keyboard : access GLUT.Devices.Keyboard := GLUT.Devices.default_Keyboard'Access) is 
  12.  
  13.    begin 
  14.       if Selected_Keyboard.all.modif_set (GLUT.Active_Alt) then -- Alt Button Commands 
  15.          Commands (Full_Screen)      := Selected_Keyboard.all.normal_set ('F'); 
  16.          Commands (Reset_Camera)     := Selected_Keyboard.all.normal_set ('C'); 
  17.          Commands (Text_Overlay)     := Selected_Keyboard.all.normal_set ('T'); 
  18.          Commands (Toggle_Axis)      := Selected_Keyboard.all.normal_set (','); 
  19.          Commands (Toggle_Lines)     := Selected_Keyboard.all.normal_set ('.'); 
  20.          Commands (Screen_Shot)      := Selected_Keyboard.all.normal_set ('S'); 
  21.       else 
  22.          Commands (Move_Accelerator) := Selected_Keyboard.all.modif_set (GLUT.Active_Shift); 
  23.          Commands (Space)            := Selected_Keyboard.all.normal_set (' '); 
  24.          -- Rotate Commands -- 
  25.          Commands (Rotate_Up)        := Selected_Keyboard.all.normal_set ('I'); 
  26.          Commands (Rotate_Down)      := Selected_Keyboard.all.normal_set ('K'); 
  27.          Commands (Rotate_Left)      := Selected_Keyboard.all.normal_set ('J'); 
  28.          Commands (Rotate_Right)     := Selected_Keyboard.all.normal_set ('L'); 
  29.          Commands (Rotate_CW)        := Selected_Keyboard.all.normal_set ('O'); 
  30.          Commands (Rotate_AntiCW)    := Selected_Keyboard.all.normal_set ('U'); 
  31.          -- Strafe Commands -- 
  32.          Commands (Strafe_Up)        := Selected_Keyboard.all.normal_set ('Q'); 
  33.          Commands (Strafe_Down)      := Selected_Keyboard.all.normal_set ('E'); 
  34.          Commands (Strafe_Left)      := Selected_Keyboard.all.normal_set ('A'); 
  35.          Commands (Strafe_Right)     := Selected_Keyboard.all.normal_set ('D'); 
  36.          Commands (Strafe_Forward)   := Selected_Keyboard.all.normal_set ('W'); 
  37.          Commands (Strafe_Backward)  := Selected_Keyboard.all.normal_set ('S'); 
  38.          -- Swarm 
  39.          Commands (Add_Vehicle)      := Selected_Keyboard.all.normal_set ('+'); 
  40.          Commands (Remove_Vehicle)   := Selected_Keyboard.all.normal_set ('-'); 
  41.       end if; 
  42.    end Get_Keys; 
  43.  
  44. end Keyboard;