Add support for Controller Keys, inspired by similar code by CtrlAltStudio Viewer

Dear Alpha Users who are curious about this:
A = Alt
B = Shift
X = Ctrl
Y = Escape
Back = Toggle Flycam mode (Use this, it's fun!!!)
Start = Toggle Cursor mode
Right Stick Click = Toggle Mouselook
Left Stick Click = Jump/Fly

Enjoy, I know I do!
This commit is contained in:
Inusaito Sayori
2014-05-14 23:48:27 -04:00
parent 18a48e6609
commit e58f8856f4
3 changed files with 29 additions and 1 deletions

View File

@@ -267,7 +267,7 @@ void LLKeyboardWin32::scanKeyboard()
// ...translate back to windows key
U16 virtual_key = inverseTranslateExtendedKey(key);
// keydown in highest bit
if (!pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000))
if (!mControllerKeys[key] && !pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000))
{
//llinfos << "Key up event missed, resetting" << llendl;
mKeyLevel[key] = FALSE;