Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Keyboard.cpp File Reference

Implements bindings of keyboard keys to sim actions. More...

#include "../Include/FlyLegacy.h"
#include "../Include/Ui.h"
#include "../Include/Globals.h"
#include "../Include/UserVehicles.h"
#include "../Include/Situation.h"
#include "../Include/Cameras.h"
#include "../Include/KeyMap.h"

Go to the source code of this file.

Classes

struct  SGlutToFlyLegacyKey

Functions

bool KeyMenuLoadScenario (int keyid, int code, int modifiers)
bool KeyMenuSaveScenario (int keyid, int code, int modifiers)
bool KeyMenuSaveScenarioAs (int keyid, int code, int modifiers)
bool KeyMenuQuit (int keyid, int code, int modifiers)
static void BindMenuKeys (CKeyMap *keymap)
bool KeyGlobalCockpitToggle (int keyid, int code, int modifiers)
bool KeyGlobalNextVehicle (int keyid, int code, int modifiers)
bool KeyGlobalPrevVehicle (int keyid, int code, int modifiers)
bool KeyGlobalHomeVehicle (int keyid, int code, int modifiers)
bool KeyGlobalCameraNext (int keyid, int code, int modifiers)
bool KeyGlobalCameraPrev (int keyid, int code, int modifiers)
bool KeyGlobalMenu (int keyid, int code, int modifiers)
bool KeyGlobalTimeForward (int keyid, int code, int modifiers)
bool KeyGlobalTimeBackward (int keyid, int code, int modifiers)
bool KeyGlobalPause (int keyid, int code, int modifiers)
bool KeyGlobal (int id, int code, int modifiers)
static void BindGlobalKeys (CKeyMap *keymap)
bool KeyCameraCockpit (int id, int code, int mod)
bool KeyCameraSpot (int id, int code, int mod)
bool KeyCameraChase (int id, int code, int mod)
bool KeyCameraStationary (int id, int code, int mod)
bool KeyCameraFlyby (int id, int code, int mod)
bool KeyCameraTower (int id, int code, int mod)
bool KeyCameraZoomIn (int id, int code, int mod)
bool KeyCameraZoomInSlow (int id, int code, int mod)
bool KeyCameraZoomInFast (int id, int code, int mod)
bool KeyCameraZoomOut (int id, int code, int mod)
bool KeyCameraZoomOutSlow (int id, int code, int mod)
bool KeyCameraZoomOutFast (int id, int code, int mod)
bool KeyCameraZoomReset (int id, int code, int mod)
bool KeyCameraZoomRatioIn (int id, int code, int mod)
bool KeyCameraZoomRatioOut (int id, int code, int mod)
bool KeyCameraPanLeft (int id, int code, int mod)
bool KeyCameraPanRight (int id, int code, int mod)
bool KeyCameraPanUp (int id, int code, int mod)
bool KeyCameraPanDown (int id, int code, int mod)
bool KeyCameraUser1 (int id, int code, int mod)
bool KeyCameraDefineUser1 (int id, int code, int mod)
bool KeyCameraUser2 (int id, int code, int mod)
bool KeyCameraDefineUser2 (int id, int code, int mod)
bool KeyCameraUser3 (int id, int code, int mod)
bool KeyCameraDefineUser3 (int id, int code, int mod)
bool KeyCameraUser4 (int id, int code, int mod)
bool KeyCameraDefineUser4 (int id, int code, int mod)
bool KeyCameraUser5 (int id, int code, int mod)
bool KeyCameraDefineUser5 (int id, int code, int mod)
bool KeyCameraUser6 (int id, int code, int mod)
bool KeyCameraDefineUser6 (int id, int code, int mod)
bool KeyCameraUser7 (int id, int code, int mod)
bool KeyCameraDefineUser7 (int id, int code, int mod)
bool KeyCameraUser8 (int id, int code, int mod)
bool KeyCameraDefineUser8 (int id, int code, int mod)
bool KeyCameraHeadPitchUp (int id, int code, int mod)
bool KeyCameraHeadPitchDown (int id, int code, int mod)
bool KeyCameraCockpitScrollUp (int id, int code, int mod)
bool KeyCameraCockpitScrollDown (int id, int code, int mod)
bool KeyCameraCockpitScrollLeft (int id, int code, int mod)
bool KeyCameraCockpitScrollRight (int id, int code, int mod)
bool KeyCameraCockpitHome (int id, int code, int mod)
bool KeyCameraCockpitPageUp (int id, int code, int mod)
bool KeyCameraCockpitPageDown (int id, int code, int mod)
static void BindCameraKeys (CKeyMap *keymap)
bool KeyAirplane (int id, int code, int mod)
static void BindAirplaneKeys (CKeyMap *keymap)
bool KeySlew (int id, int code, int mod)
bool KeySlewForward (int id, int code, int mod)
bool KeySlewBackward (int id, int code, int mod)
bool KeySlewLeft (int id, int code, int mod)
bool KeySlewRight (int id, int code, int mod)
bool KeySlewBankLeft (int id, int code, int mod)
bool KeySlewBankRight (int id, int code, int mod)
bool KeySlewRotateLeft (int id, int code, int mod)
bool KeySlewRotateRight (int id, int code, int mod)
bool KeySlewRotateLeft45 (int id, int code, int mod)
bool KeySlewRotateRight45 (int id, int code, int mod)
bool KeySlewPitchUp (int id, int code, int mod)
bool KeySlewPitchDown (int id, int code, int mod)
bool KeySlewUp (int id, int code, int mod)
bool KeySlewDown (int id, int code, int mod)
bool KeySlewReorient (int id, int code, int mod)
bool KeySlewStop (int id, int code, int mod)
static void BindSlewKeys (CKeyMap *keymap)
void BindAllKeys (CKeyMap *keymap)
EKeyboardModifiers glutModifiersToFlyLegacyModifiers (int glutmod)
bool glutKeyToFlyLegacyKey (int glutkey, EKeyboardKeys *flykey)
bool glutSpecialToFlyLegacyKey (int glutkey, EKeyboardKeys *flykey)
void init_keyboard (void)

Variables

SGlutToFlyLegacyKey glutKeyMap []
SGlutToFlyLegacyKey glutSpecialMap []
SGlutToFlyLegacyKey glutKeyboard [128]
SGlutToFlyLegacyKey glutSpecial [128]


Detailed Description

Definition in file Keyboard.cpp.


Function Documentation

static void BindAirplaneKeys CKeyMap keymap  )  [static]
 

Definition at line 850 of file Keyboard.cpp.

References CKeyMap::Bind(), and KeyAirplane().

Referenced by BindAllKeys().

void BindAllKeys CKeyMap keymap  ) 
 

Definition at line 1351 of file Keyboard.cpp.

References BindAirplaneKeys(), BindCameraKeys(), BindGlobalKeys(), BindMenuKeys(), and BindSlewKeys().

Referenced by init_keyboard().

static void BindCameraKeys CKeyMap keymap  )  [static]
 

Definition at line 674 of file Keyboard.cpp.

References CKeyMap::Bind(), KeyCameraChase(), KeyCameraCockpit(), KeyCameraCockpitHome(), KeyCameraCockpitPageDown(), KeyCameraCockpitPageUp(), KeyCameraCockpitScrollDown(), KeyCameraCockpitScrollLeft(), KeyCameraCockpitScrollRight(), KeyCameraCockpitScrollUp(), KeyCameraDefineUser1(), KeyCameraFlyby(), KeyCameraHeadPitchDown(), KeyCameraHeadPitchUp(), KeyCameraPanDown(), KeyCameraPanLeft(), KeyCameraPanRight(), KeyCameraPanUp(), KeyCameraSpot(), KeyCameraStationary(), KeyCameraTower(), KeyCameraUser1(), KeyCameraUser2(), KeyCameraUser3(), KeyCameraUser4(), KeyCameraUser5(), KeyCameraUser6(), KeyCameraUser7(), KeyCameraUser8(), KeyCameraZoomIn(), KeyCameraZoomInFast(), KeyCameraZoomInSlow(), KeyCameraZoomOut(), KeyCameraZoomOutFast(), KeyCameraZoomOutSlow(), KeyCameraZoomRatioIn(), KeyCameraZoomRatioOut(), and KeyCameraZoomReset().

Referenced by BindAllKeys().

static void BindGlobalKeys CKeyMap keymap  )  [static]
 

Definition at line 240 of file Keyboard.cpp.

References CKeyMap::Bind(), KeyGlobal(), KeyGlobalCameraNext(), KeyGlobalCameraPrev(), KeyGlobalCockpitToggle(), KeyGlobalHomeVehicle(), KeyGlobalMenu(), KeyGlobalNextVehicle(), KeyGlobalPause(), KeyGlobalPrevVehicle(), KeyGlobalTimeBackward(), KeyGlobalTimeForward(), and menu.

Referenced by BindAllKeys().

static void BindMenuKeys CKeyMap keymap  )  [static]
 

Definition at line 61 of file Keyboard.cpp.

References CKeyMap::Bind(), KeyMenuLoadScenario(), KeyMenuQuit(), KeyMenuSaveScenario(), and KeyMenuSaveScenarioAs().

Referenced by BindAllKeys().

static void BindSlewKeys CKeyMap keymap  )  [static]
 

Definition at line 1279 of file Keyboard.cpp.

References CKeyMap::Bind(), KeySlew(), KeySlewBackward(), KeySlewBankLeft(), KeySlewBankRight(), KeySlewDown(), KeySlewForward(), KeySlewLeft(), KeySlewPitchDown(), KeySlewPitchUp(), KeySlewReorient(), KeySlewRight(), KeySlewRotateLeft(), KeySlewRotateLeft45(), KeySlewRotateRight(), KeySlewRotateRight45(), KeySlewStop(), and KeySlewUp().

Referenced by BindAllKeys().

bool glutKeyToFlyLegacyKey int  glutkey,
EKeyboardKeys flykey
 

Definition at line 1560 of file Keyboard.cpp.

References SGlutToFlyLegacyKey::flylegacy, and KB_KEY_META.

Referenced by keyboard().

EKeyboardModifiers glutModifiersToFlyLegacyModifiers int  glutmod  ) 
 

Definition at line 1549 of file Keyboard.cpp.

References KB_MODIFIER_ALT, KB_MODIFIER_CTRL, KB_MODIFIER_NONE, and KB_MODIFIER_SHIFT.

Referenced by keyboard(), and special().

bool glutSpecialToFlyLegacyKey int  glutkey,
EKeyboardKeys flykey
 

Definition at line 1572 of file Keyboard.cpp.

References SGlutToFlyLegacyKey::flylegacy, and KB_KEY_META.

Referenced by special().

void init_keyboard void   ) 
 

Definition at line 1590 of file Keyboard.cpp.

References BindAllKeys(), SGlutToFlyLegacyKey::flylegacy, globals, SGlutToFlyLegacyKey::glut, KB_KEY_META, and SGlobals::keymap.

Referenced by Initialize().

bool KeyAirplane int  id,
int  code,
int  mod
 

Definition at line 765 of file Keyboard.cpp.

References CAirplane::AileronDecr(), CAirplane::AileronIncr(), CAirplane::AileronTrimDecr(), CAirplane::AileronTrimIncr(), CAirplane::ElevatorDecr(), CAirplane::ElevatorIncr(), CAirplane::ElevatorTrimDecr(), CAirplane::ElevatorTrimIncr(), CSituation::GetUserVehicle(), CSituation::GetUserVehicleType(), globals, CSlewManager::IsEnabled(), CAirplane::RudderDecr(), CAirplane::RudderIncr(), CAirplane::RudderTrimIncr(), SGlobals::sit, SGlobals::slewmgr, and TYPE_FLY_AIRPLANE.

Referenced by BindAirplaneKeys().

bool KeyCameraChase int  id,
int  code,
int  mod
 

Definition at line 336 of file Keyboard.cpp.

Referenced by BindCameraKeys().

bool KeyCameraCockpit int  id,
int  code,
int  mod
 

Definition at line 318 of file Keyboard.cpp.

References CAMERA_COCKPIT, CVehicleObject::GetCameraManager(), globals, CCameraManager::SelectCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindCameraKeys().

bool KeyCameraCockpitHome int  id,
int  code,
int  mod
 

Definition at line 652 of file Keyboard.cpp.

Referenced by BindCameraKeys().

bool KeyCameraCockpitPageDown int  id,
int  code,
int  mod
 

Definition at line 666 of file Keyboard.cpp.

Referenced by BindCameraKeys().

bool KeyCameraCockpitPageUp int  id,
int  code,
int  mod
 

Definition at line 659 of file Keyboard.cpp.

Referenced by BindCameraKeys().

bool KeyCameraCockpitScrollDown int  id,
int  code,
int  mod
 

Definition at line 628 of file Keyboard.cpp.

References CSituation::GetCurrentPanel(), globals, CPanel::ScrollDown(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraCockpitScrollLeft int  id,
int  code,
int  mod
 

Definition at line 636 of file Keyboard.cpp.

References CSituation::GetCurrentPanel(), globals, CPanel::ScrollLeft(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraCockpitScrollRight int  id,
int  code,
int  mod
 

Definition at line 644 of file Keyboard.cpp.

References CSituation::GetCurrentPanel(), globals, CPanel::ScrollRight(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraCockpitScrollUp int  id,
int  code,
int  mod
 

Definition at line 620 of file Keyboard.cpp.

References CSituation::GetCurrentPanel(), globals, CPanel::ScrollUp(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraDefineUser1 int  id,
int  code,
int  mod
 

Definition at line 484 of file Keyboard.cpp.

References CCamera::DefineUser1(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraDefineUser2 int  id,
int  code,
int  mod
 

Definition at line 500 of file Keyboard.cpp.

References CCamera::DefineUser2(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser3 int  id,
int  code,
int  mod
 

Definition at line 516 of file Keyboard.cpp.

References CCamera::DefineUser3(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser4 int  id,
int  code,
int  mod
 

Definition at line 532 of file Keyboard.cpp.

References CCamera::DefineUser4(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser5 int  id,
int  code,
int  mod
 

Definition at line 548 of file Keyboard.cpp.

References CCamera::DefineUser5(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser6 int  id,
int  code,
int  mod
 

Definition at line 564 of file Keyboard.cpp.

References CCamera::DefineUser6(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser7 int  id,
int  code,
int  mod
 

Definition at line 580 of file Keyboard.cpp.

References CCamera::DefineUser7(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraDefineUser8 int  id,
int  code,
int  mod
 

Definition at line 596 of file Keyboard.cpp.

References CCamera::DefineUser8(), CSituation::GetCurrentCamera(), globals, and SGlobals::sit.

bool KeyCameraFlyby int  id,
int  code,
int  mod
 

Definition at line 346 of file Keyboard.cpp.

References CAMERA_FLYBY, CVehicleObject::GetCameraManager(), globals, CCameraManager::SelectCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindCameraKeys().

bool KeyCameraHeadPitchDown int  id,
int  code,
int  mod
 

Definition at line 612 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::HeadPitchDown(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraHeadPitchUp int  id,
int  code,
int  mod
 

Definition at line 604 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::HeadPitchUp(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraPanDown int  id,
int  code,
int  mod
 

Definition at line 464 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::PanDown(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraPanLeft int  id,
int  code,
int  mod
 

Definition at line 440 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::PanLeft(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraPanRight int  id,
int  code,
int  mod
 

Definition at line 448 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::PanRight(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraPanUp int  id,
int  code,
int  mod
 

Definition at line 456 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, CCamera::PanUp(), and SGlobals::sit.

Referenced by BindCameraKeys().

bool KeyCameraSpot int  id,
int  code,
int  mod
 

Definition at line 327 of file Keyboard.cpp.

References CAMERA_SPOT, CVehicleObject::GetCameraManager(), globals, CCameraManager::SelectCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindCameraKeys().

bool KeyCameraStationary int  id,
int  code,
int  mod
 

Definition at line 341 of file Keyboard.cpp.

Referenced by BindCameraKeys().

bool KeyCameraTower int  id,
int  code,
int  mod
 

Definition at line 355 of file Keyboard.cpp.

References CAMERA_TOWER, CVehicleObject::GetCameraManager(), globals, CCameraManager::SelectCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindCameraKeys().

bool KeyCameraUser1 int  id,
int  code,
int  mod
 

Definition at line 476 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User1().

Referenced by BindCameraKeys().

bool KeyCameraUser2 int  id,
int  code,
int  mod
 

Definition at line 492 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User2().

Referenced by BindCameraKeys().

bool KeyCameraUser3 int  id,
int  code,
int  mod
 

Definition at line 508 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User3().

Referenced by BindCameraKeys().

bool KeyCameraUser4 int  id,
int  code,
int  mod
 

Definition at line 524 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User4().

Referenced by BindCameraKeys().

bool KeyCameraUser5 int  id,
int  code,
int  mod
 

Definition at line 540 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User5().

Referenced by BindCameraKeys().

bool KeyCameraUser6 int  id,
int  code,
int  mod
 

Definition at line 556 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User6().

Referenced by BindCameraKeys().

bool KeyCameraUser7 int  id,
int  code,
int  mod
 

Definition at line 572 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User7().

Referenced by BindCameraKeys().

bool KeyCameraUser8 int  id,
int  code,
int  mod
 

Definition at line 588 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::User8().

Referenced by BindCameraKeys().

bool KeyCameraZoomIn int  id,
int  code,
int  mod
 

Definition at line 368 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomIn().

Referenced by BindCameraKeys().

bool KeyCameraZoomInFast int  id,
int  code,
int  mod
 

Definition at line 384 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomInFast().

Referenced by BindCameraKeys().

bool KeyCameraZoomInSlow int  id,
int  code,
int  mod
 

Definition at line 376 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomInSlow().

Referenced by BindCameraKeys().

bool KeyCameraZoomOut int  id,
int  code,
int  mod
 

Definition at line 392 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomOut().

Referenced by BindCameraKeys().

bool KeyCameraZoomOutFast int  id,
int  code,
int  mod
 

Definition at line 408 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomOutFast().

Referenced by BindCameraKeys().

bool KeyCameraZoomOutSlow int  id,
int  code,
int  mod
 

Definition at line 400 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomOutSlow().

Referenced by BindCameraKeys().

bool KeyCameraZoomRatioIn int  id,
int  code,
int  mod
 

Definition at line 424 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomRatioIn().

Referenced by BindCameraKeys().

bool KeyCameraZoomRatioOut int  id,
int  code,
int  mod
 

Definition at line 432 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomRatioOut().

Referenced by BindCameraKeys().

bool KeyCameraZoomReset int  id,
int  code,
int  mod
 

Definition at line 416 of file Keyboard.cpp.

References CSituation::GetCurrentCamera(), globals, SGlobals::sit, and CCamera::ZoomReset().

Referenced by BindCameraKeys().

bool KeyGlobal int  id,
int  code,
int  modifiers
 

Definition at line 206 of file Keyboard.cpp.

References CFuiManager::CreateFuiWindow(), FrameRateNotify(), FUI_WINDOW_FRAME_RATE, FUI_WINDOW_MAP, FUI_WINDOW_VECTOR_MAP, SGlobals::fuimgr, globals, MapNotify(), and VectorMapNotify().

Referenced by BindGlobalKeys().

bool KeyGlobalCameraNext int  keyid,
int  code,
int  modifiers
 

Definition at line 115 of file Keyboard.cpp.

References CVehicleObject::GetCameraManager(), globals, CCameraManager::NextCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindGlobalKeys().

bool KeyGlobalCameraPrev int  keyid,
int  code,
int  modifiers
 

Definition at line 124 of file Keyboard.cpp.

References CVehicleObject::GetCameraManager(), globals, CCameraManager::PrevCamera(), SGlobals::sit, and CSituation::user.

Referenced by BindGlobalKeys().

bool KeyGlobalCockpitToggle int  keyid,
int  code,
int  modifiers
 

Definition at line 95 of file Keyboard.cpp.

Referenced by BindGlobalKeys().

bool KeyGlobalHomeVehicle int  keyid,
int  code,
int  modifiers
 

Definition at line 110 of file Keyboard.cpp.

Referenced by BindGlobalKeys().

bool KeyGlobalMenu int  keyid,
int  code,
int  modifiers
 

Definition at line 133 of file Keyboard.cpp.

References toggle_menu().

Referenced by BindGlobalKeys().

bool KeyGlobalNextVehicle int  keyid,
int  code,
int  modifiers
 

Definition at line 100 of file Keyboard.cpp.

Referenced by BindGlobalKeys().

bool KeyGlobalPause int  keyid,
int  code,
int  modifiers
 

Definition at line 194 of file Keyboard.cpp.

References CTimeManager::GetPauseState(), globals, CTimeManager::Pause(), SGlobals::timemgr, and CTimeManager::Unpause().

Referenced by BindGlobalKeys().

bool KeyGlobalPrevVehicle int  keyid,
int  code,
int  modifiers
 

Definition at line 105 of file Keyboard.cpp.

Referenced by BindGlobalKeys().

bool KeyGlobalTimeBackward int  keyid,
int  code,
int  modifiers
 

Definition at line 167 of file Keyboard.cpp.

References SDateTimeDelta::dDays, SDateTimeDelta::dHours, SDateTimeDelta::dMillisecs, SDateTimeDelta::dMinutes, SDateTimeDelta::dMonths, SDateTimeDelta::dSeconds, dt, SDateTimeDelta::dYears, CTimeManager::GetUTCDateTime(), globals, CTimeManager::SetUTCDateTime(), CTimeManager::SubtractTimeDelta(), and SGlobals::timemgr.

Referenced by BindGlobalKeys().

bool KeyGlobalTimeForward int  keyid,
int  code,
int  modifiers
 

Definition at line 140 of file Keyboard.cpp.

References CTimeManager::AddTimeDelta(), SDateTimeDelta::dDays, SDateTimeDelta::dHours, SDateTimeDelta::dMillisecs, SDateTimeDelta::dMinutes, SDateTimeDelta::dMonths, SDateTimeDelta::dSeconds, dt, SDateTimeDelta::dYears, CTimeManager::GetUTCDateTime(), globals, CTimeManager::SetUTCDateTime(), and SGlobals::timemgr.

Referenced by BindGlobalKeys().

bool KeyMenuLoadScenario int  keyid,
int  code,
int  modifiers
 

Definition at line 37 of file Keyboard.cpp.

Referenced by BindMenuKeys().

bool KeyMenuQuit int  keyid,
int  code,
int  modifiers
 

Definition at line 52 of file Keyboard.cpp.

References APP_EXIT_SCREEN, SGlobals::appState, and globals.

Referenced by BindMenuKeys().

bool KeyMenuSaveScenario int  keyid,
int  code,
int  modifiers
 

Definition at line 42 of file Keyboard.cpp.

Referenced by BindMenuKeys().

bool KeyMenuSaveScenarioAs int  keyid,
int  code,
int  modifiers
 

Definition at line 47 of file Keyboard.cpp.

Referenced by BindMenuKeys().

bool KeySlew int  id,
int  code,
int  mod
 

Definition at line 985 of file Keyboard.cpp.

References CSlewManager::Disable(), CSlewManager::Enable(), globals, CSlewManager::IsEnabled(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewBackward int  id,
int  code,
int  mod
 

Definition at line 1011 of file Keyboard.cpp.

References CSlewManager::GetNorthRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetNorthRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewBankLeft int  id,
int  code,
int  mod
 

Definition at line 1053 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, SVector::h, CSlewManager::IsEnabled(), CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewBankRight int  id,
int  code,
int  mod
 

Definition at line 1074 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, SVector::h, CSlewManager::IsEnabled(), CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewDown int  id,
int  code,
int  mod
 

Definition at line 1237 of file Keyboard.cpp.

References CSlewManager::GetAltRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetAltRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewForward int  id,
int  code,
int  mod
 

Definition at line 997 of file Keyboard.cpp.

References CSlewManager::GetNorthRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetNorthRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewLeft int  id,
int  code,
int  mod
 

Definition at line 1025 of file Keyboard.cpp.

References CSlewManager::GetEastRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetEastRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewPitchDown int  id,
int  code,
int  mod
 

Definition at line 1201 of file Keyboard.cpp.

References DegToRad(), DrawNoticeToUser(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::p, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewPitchUp int  id,
int  code,
int  mod
 

Definition at line 1179 of file Keyboard.cpp.

References DegToRad(), DrawNoticeToUser(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::p, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewReorient int  id,
int  code,
int  mod
 

Todo:
Update user vehicle orientation

Definition at line 1251 of file Keyboard.cpp.

References globals, CSlewManager::IsEnabled(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewRight int  id,
int  code,
int  mod
 

Definition at line 1039 of file Keyboard.cpp.

References CSlewManager::GetEastRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetEastRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewRotateLeft int  id,
int  code,
int  mod
 

Definition at line 1095 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::r, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewRotateLeft45 int  id,
int  code,
int  mod
 

Definition at line 1137 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::r, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewRotateRight int  id,
int  code,
int  mod
 

Definition at line 1116 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::r, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewRotateRight45 int  id,
int  code,
int  mod
 

Definition at line 1158 of file Keyboard.cpp.

References DegToRad(), CWorldObject::GetOrientation(), CSituation::GetUserVehicle(), globals, CSlewManager::IsEnabled(), SVector::r, CWorldObject::SetOrientation(), SGlobals::sit, and SGlobals::slewmgr.

Referenced by BindSlewKeys().

bool KeySlewStop int  id,
int  code,
int  mod
 

Definition at line 1265 of file Keyboard.cpp.

References globals, CSlewManager::IsEnabled(), SGlobals::slewmgr, and CSlewManager::ZeroRate().

Referenced by BindSlewKeys().

bool KeySlewUp int  id,
int  code,
int  mod
 

Definition at line 1223 of file Keyboard.cpp.

References CSlewManager::GetAltRate(), globals, CSlewManager::IsEnabled(), CSlewManager::SetAltRate(), and SGlobals::slewmgr.

Referenced by BindSlewKeys().


Variable Documentation

SGlutToFlyLegacyKey glutKeyboard[128]
 

Definition at line 1546 of file Keyboard.cpp.

SGlutToFlyLegacyKey glutKeyMap[]
 

Todo:
Add caps, CR (13), shifted special characters

Definition at line 1373 of file Keyboard.cpp.

SGlutToFlyLegacyKey glutSpecial[128]
 

Definition at line 1547 of file Keyboard.cpp.

SGlutToFlyLegacyKey glutSpecialMap[]
 

Initial value:

{
  { GLUT_KEY_F1,      KB_KEY_F1 },
  { GLUT_KEY_F2,      KB_KEY_F2 },
  { GLUT_KEY_F3,      KB_KEY_F3 },
  { GLUT_KEY_F4,      KB_KEY_F4 },
  { GLUT_KEY_F5,      KB_KEY_F5 },
  { GLUT_KEY_F6,      KB_KEY_F6 },
  { GLUT_KEY_F7,      KB_KEY_F7 },
  { GLUT_KEY_F8,      KB_KEY_F8 },
  { GLUT_KEY_F9,      KB_KEY_F9 },
  { GLUT_KEY_F10,     KB_KEY_F10 },
  { GLUT_KEY_F11,     KB_KEY_F11 },
  { GLUT_KEY_F12,     KB_KEY_F12 },
  { GLUT_KEY_HOME,    KB_KEY_HOME },
  { GLUT_KEY_UP,      KB_KEY_UP },
  { GLUT_KEY_PAGE_UP,   KB_KEY_PGUP },
  { GLUT_KEY_LEFT,    KB_KEY_LEFT },
  { GLUT_KEY_RIGHT,   KB_KEY_RIGHT },
  { GLUT_KEY_END,     KB_KEY_END },
  { GLUT_KEY_DOWN,    KB_KEY_DOWN },
  { GLUT_KEY_PAGE_DOWN, KB_KEY_PGDN },
  { GLUT_KEY_INSERT,    KB_KEY_INSERT },
  { 127,          KB_KEY_DEL }
}

Definition at line 1520 of file Keyboard.cpp.

SourceForge.net Logo Documentation generated by doxygen