Skip to content

small protoinput update#155

Open
Messenils wants to merge 11 commits into
SplitScreen-Me:masterfrom
Messenils:master
Open

small protoinput update#155
Messenils wants to merge 11 commits into
SplitScreen-Me:masterfrom
Messenils:master

Conversation

@Messenils
Copy link
Copy Markdown

Improved DrawFakeCursorFix, and renamed it to Game.Protoinput.DrawFakeCursorFix = true(line also enables fake cursor draw). Protohost can now position windows, making testing easier. New options: Translate X to MKB, and MKB to X. PointerInMouse translating traditional mousemessages to the new. ReRegisterInput force adds game window to rawinput.

Game.ProtoInput.TranslateXinputtoMKB =true; //true or false. Translates controller to MKB
Game.ProtoInput.TranslateMKBtoXinput = true; //true or false. Translates MKB to controller
Game.ProtoInput.PointerInMouse = true; //true or false. Send different untraditional mouse messages
Game.ProtoInput.ReRegisterInput = true; //true or false. Force add game window to raw input

//scaling. scales from selected resolution
Game.ProtoInput.ScaleFromX = 800; //old resolution to scale from. forexample if game window is resized from 800 to 1600 width then input messages will be scaled with *0.5
Game.ProtoInput.ScaleFromY = 600; //old resolution to scale from. forexample if game window is resized from 600 to 1200 height then input messages will be scaled with *0.5

//forward forcefocus-window from nucleus to protoinput. //only done at inject
Game.ForwardWindowToProtoInput = true; //can only be done on inject. Forwards nucleus grabbed window to protoinput

//XtranslateCFG all bools
//common settings for both translation methods
Game.ProtoInput.TranslateXSensitivity = 8;
Game.ProtoInput.TranslateXDeadzone = 2;

// for both translation methods
Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick

//XtranslateKeys all ints //common settings for both translation methods
Game.ProtoInput.TranslateXButtonA = Nucleus.Key.R;
Game.ProtoInput.TranslateXButtonB = Nucleus.Key.G;
Game.ProtoInput.TranslateXButtonX = Nucleus.Key.E;
Game.ProtoInput.TranslateXButtonY = Nucleus.Key.C;
Game.ProtoInput.TranslateXButtonRS = Nucleus.Key.Shift;
Game.ProtoInput.TranslateXButtonLS = Nucleus.Key.Space;
Game.ProtoInput.TranslateXButtonRight = Nucleus.Key.Right;
Game.ProtoInput.TranslateXButtonLeft = Nucleus.Key.Left;
Game.ProtoInput.TranslateXButtonUp = Nucleus.Key.Up;
Game.ProtoInput.TranslateXButtonDown = Nucleus.Key.Down;
Game.ProtoInput.TranslateXStickR = Nucleus.Key.Z;
Game.ProtoInput.TranslateXStickL = Nucleus.Key.M;
Game.ProtoInput.TranslateXStickRight = Nucleus.Key.D;
Game.ProtoInput.TranslateXStickLeft = Nucleus.Key.A;
Game.ProtoInput.TranslateXStickUp = Nucleus.Key.W;
Game.ProtoInput.TranslateXStickDown = Nucleus.Key.S;
Game.ProtoInput.TranslateXButtonOption = Nucleus.Key.Return;
Game.ProtoInput.TranslateXButtonStart = Nucleus.Key.Escape;

//only on TranslateXinputtoMKB
Game.ProtoInput.TranslateXAccelration = 4;
Game.ProtoInput.TranslateXScanner = true; //to do scans on presaved BMPS or statics listed in Xinput.ini file
Game.ProtoInput.TranslateXShouldersNextPoint = true; //use shoulders to scroll between presaved points if true
Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true
Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true
Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true
Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true
Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input
Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input
Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input
Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input
Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point
Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point
Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point
Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point

Game.ProtoInput.OnInputUnlocked = function() //or locked
{
for (var i = 0; i < PlayerList.Count; i++)
{
var player = PlayerList[i];
ProtoInput.SetTranslateMKBtoXinput(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetTranslateXinputtoMKB(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetPointerInMouse(player.ProtoInputInstanceHandle, false); //or true
}
}

Messenils and others added 11 commits January 27, 2026 19:29
…/Must be included or it will be 0. then mouse will not move. 10-30 recommended

Game.ProtoInput.TranslateXAccelration = 4; //Must be included or it will be 0. then mouse will not move 2-8 recommended
Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick
Game.ProtoInput.TranslateXScanner = true;; //to do scans on presaved BMPS or statics listed in Xinput.ini file
Game.ProtoInput.TranslateXShouldersNextPoint = true;; //use shoulders to scroll between presaved points if true
Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true
Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true
Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true
Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true
Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input
Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input
Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input
Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input
Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point
Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point
Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point
Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point

//XtranslateKeys all ints
Game.ProtoInput.TranslateXButtonA = 69; //int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonB = 69;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonX = 69;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonY = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonRS = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonLS = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonRight = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonLeft = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonUp = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonDown = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickR = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickL = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickRight = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickLeft = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickUp = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXStickDown = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonOption = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
Game.ProtoInput.TranslateXButtonStart = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
…slateXtoMKB from being zero, resulting in frozen cursor
… input. added 2 lines for manual input scaling
…slateMKBtoX is enabled for instance. new protoinput options: TranslateXtoMKB, with optional pixel mapping. PointerInmouse, sending pointer input messages to games. Reregister option adding game window to raw input. Manual scaling of input messages(oldX, oldY) scaling up messages from old resolution. Forward nucleus grab window to protoinput. New hook GetcursorInfo. Lines: Game.ProtoInput.TranslateXinputtoMKB =true; //true or false. Translates controller to MKB

Game.ProtoInput.TranslateMKBtoXinput = true; //true or false. Translates MKB to controller
Game.ProtoInput.PointerInMouse = true; //true or false. Send different untraditional mouse messages
Game.ProtoInput.ReRegisterInput = true; //true or false. Force add game window to raw input

//scaling. scales from selected resolution
Game.ProtoInput.ScaleFromX = 800; //old resolution to scale from. forexample if game window is resized from 800 to 1600 width then input messages will be scaled with *0.5
Game.ProtoInput.ScaleFromY = 600; //old resolution to scale from. forexample if game window is resized from 600 to 1200 height then input messages will be scaled with *0.5

//forward forcefocus-window from nucleus to protoinput. //only done at inject
Game.ForwardWindowToProtoInput = true; //can only be done on inject. Forwards nucleus grabbed window to protoinput

//XtranslateCFG all bools
//common settings for both translation methods
Game.ProtoInput.TranslateXSensitivity = 8;
Game.ProtoInput.TranslateXDeadzone = 2;

// for both translation methods
Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick

//XtranslateKeys all ints //common settings for both translation methods
Game.ProtoInput.TranslateXButtonA = Nucleus.Key.R;
Game.ProtoInput.TranslateXButtonB = Nucleus.Key.G;
Game.ProtoInput.TranslateXButtonX = Nucleus.Key.E;
Game.ProtoInput.TranslateXButtonY = Nucleus.Key.C;
Game.ProtoInput.TranslateXButtonRS = Nucleus.Key.Shift;
Game.ProtoInput.TranslateXButtonLS = Nucleus.Key.Space;
Game.ProtoInput.TranslateXButtonRight = Nucleus.Key.Right;
Game.ProtoInput.TranslateXButtonLeft = Nucleus.Key.Left;
Game.ProtoInput.TranslateXButtonUp = Nucleus.Key.Up;
Game.ProtoInput.TranslateXButtonDown = Nucleus.Key.Down;
Game.ProtoInput.TranslateXStickR = Nucleus.Key.Z;
Game.ProtoInput.TranslateXStickL = Nucleus.Key.M;
Game.ProtoInput.TranslateXStickRight = Nucleus.Key.D;
Game.ProtoInput.TranslateXStickLeft = Nucleus.Key.A;
Game.ProtoInput.TranslateXStickUp = Nucleus.Key.W;
Game.ProtoInput.TranslateXStickDown = Nucleus.Key.S;
Game.ProtoInput.TranslateXButtonOption = Nucleus.Key.Return;
Game.ProtoInput.TranslateXButtonStart = Nucleus.Key.Escape;

//only on TranslateXinputtoMKB
Game.ProtoInput.TranslateXAccelration = 4;
Game.ProtoInput.TranslateXScanner = true; //to do scans on presaved BMPS or statics listed in Xinput.ini file
Game.ProtoInput.TranslateXShouldersNextPoint = true; //use shoulders to scroll between presaved points if true
Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true
Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true
Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true
Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true
Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input
Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input
Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input
Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input
Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point
Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point
Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point
Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point

Game.ProtoInput.OnInputUnlocked = function() //or locked
{
     for (var i = 0; i < PlayerList.Count; i++)
 {
            var player = PlayerList[i];
            ProtoInput.SetTranslateMKBtoXinput(player.ProtoInputInstanceHandle, false); //or true
            ProtoInput.SetTranslateXinputtoMKB(player.ProtoInputInstanceHandle, false); //or true
     ProtoInput.SetPointerInMouse(player.ProtoInputInstanceHandle, false); //or true
 }
}
@Messenils
Copy link
Copy Markdown
Author

full list of Nucleus.Key names for mapping:

this line should also be possible like this now: "Game.LockInputToggleKey = Nucleus.Key.End;" instead of 0x23( 23HEX, but in int 35 i guess)

public enum Key
{

Back = 8,
Tab = 9,

Clear = 12,
Return = 13,

Shift = 16,
Control = 17,
Menu = 18,
Pause = 19,
Capital = 20,

Escape = 27,

Space = 32,
Prior = 33,
Next = 34,
End = 35,
Home = 36,
Left = 37,
Up = 38,
Right = 39,
Down = 40,
Select = 41,
Print = 42,
Execute = 43,
Snapshot = 44,
Insert = 45,
Delete = 46,
Help = 47,

N0 = 48,
N1 = 49,
N2 = 50,
N3 = 51,
N4 = 52,
N5 = 53,
N6 = 54,
N7 = 55,
N8 = 56,
N9 = 57,

A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,

LWin = 91,
RWin = 92,
Apps = 93,

Sleep = 95,

NumPad0 = 96,
NumPad1 = 97,
NumPad2 = 98,
NumPad3 = 99,
NumPad4 = 100,
NumPad5 = 101,
NumPad6 = 102,
NumPad7 = 103,
NumPad8 = 104,
NumPad9 = 105,

Multiply = 106,
Add = 107,
Separator = 108,
Subtract = 109,
Decimal = 110,
Divide = 111,

F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F10 = 121,
F11 = 122,
F12 = 123,
F13 = 124,
F14 = 125,
F15 = 126,
F16 = 127,
F17 = 128,
F18 = 129,
F19 = 130,
F20 = 131,
F21 = 132,
F22 = 133,
F23 = 134,
F24 = 135,

NumLock = 144,
Scroll = 145,

LShift = 160,
RShift = 161,
LControl = 162,
RControl = 163,
LMenu = 164,
RMenu = 165,

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant