AntiAim Architect
-
Автор темы
- #1
Sup, I'm going to show you all how to improve the functionality of your Hotkey function because I'm sick of seeing all these shit pastes with broken hotkeys.
Glossary
Part 1: Adding Mouse 4 and Mouse 5
Part 2: Adding Extra Keys (.,?; 'Ect)
Part 1
1.1) Check you have the ability for the Mouse 4 and 5 keys to be called when you ID is active inside of your Hotkey function. Like so:
1.2) Go to line 212 (roughly) of imgui_impl_dx9.cpp and add the following. If you already have it there then don't. This need to go inside the switch statement.
Part 2
2.1) Locate your KeyNames and update it with the following. (
The extra keys have been added, Commonly used ones are renamed) Keynames can be found here in your hotkey function
2.2) Go to where you key is set inside your hotkey function and look for the "for statement" There is a range from VK_BACK to VK_RMENU. The RMenu needs to be changed to VK_OEM_8 as this will allow the extra keys to be seen by the statement. It should finish like this
Explanation: All that was happening is that the Function was not able to pick up these keys because
they were out of its scope. This can be seen if you look inside of the WinUser.h file and look at where VK_RMENU stops. It stops well before you get to the special keys. We have to increase the size of the KeyNames because it normally does not support the keys that are this far down.
Credit: Freefire123 for Mouse 4/5 Code
Glossary
Part 1: Adding Mouse 4 and Mouse 5
Part 2: Adding Extra Keys (.,?; 'Ect)
Part 1
1.1) Check you have the ability for the Mouse 4 and 5 keys to be called when you ID is active inside of your Hotkey function. Like so:
C++:
for (auto i = 0; i <5; i ++) {
if (io.MouseDown [i]) {
switch (i) {
case 0:
key = VK_LBUTTON;
break;
case 1:
key = VK_RBUTTON;
break;
case 2:
key = VK_MBUTTON;
break;
case 3:
key = VK_XBUTTON1;
break;
case 4:
key = VK_XBUTTON2;
break;
}
value_changed = true;
ClearActiveID ();
}
}
C++:
case WM_XBUTTONDOWN:
if ((GET_KEYSTATE_WPARAM (wParam) & MK_XBUTTON1) == MK_XBUTTON1)
io.MouseDown [3] = true;
else if ((GET_KEYSTATE_WPARAM (wParam) & MK_XBUTTON2) == MK_XBUTTON2)
io.MouseDown [4] = true;
return true;
Part 2
2.1) Locate your KeyNames and update it with the following. (
C++:
const char * const KeyNames [] = {
"None",
"Mouse 1",
"Mouse 2",
"Esc",
"Mouse 3",
"Mouse 4",
"Mouse 5",
"None",
"Back",
"Tab",
"None",
"None",
"Backspace",
"Enter",
"None",
"None",
"Shift",
"Ctrl",
"Alt",
"Pause Break",
"Caps Lock",
"VK_KANA",
"Unknown",
"VK_JUNJA",
"VK_FINAL",
"VK_KANJI",
"Unknown",
"Esc",
"VK_CONVERT",
"VK_NONCONVERT",
"VK_ACCEPT",
"VK_MODECHANGE",
"Space",
"Page Up",
"Page Down",
"End",
"Home",
"Left",
"Up",
"Right",
"Down",
"VK_SELECT",
"VK_PRINT",
"VK_EXECUTE",
"Print Screen",
"Ins",
"Del",
"VK_HELP",
"0",
"one",
"2",
"3",
"4",
"five",
"6",
"7",
"eight",
"nine",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"Left Windows",
"Right Windows",
"VK_APPS",
"Unknown",
"VK_SLEEP",
"NUMPAD0",
"NUMPAD1",
"NUMPAD2",
"NUMPAD3",
"NUMPAD4",
"NUMPAD5",
"NUMPAD6",
"NUMPAD7",
"NUMPAD8",
"NUMPAD9",
"Multiply",
"+",
"Separator",
"Subtract",
"-",
"/",
"F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
"F8",
"F9",
"F10",
"F11",
"F12",
"F13",
"F14",
"F15",
"F16",
"F17",
"F18",
"F19",
"F20",
"F21",
"F22",
"F23",
"F24",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Num Lock",
"Scroll lock",
"VK_OEM_NEC_EQUAL",
"VK_OEM_FJ_MASSHOU",
"VK_OEM_FJ_TOUROKU",
"VK_OEM_FJ_LOYA",
"VK_OEM_FJ_ROYA",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Left Shift",
"Right Shift",
"Left Ctrl",
"Right Ctrl",
"Left Alt",
"Right Alt",
"Browser Back",
"Browser Forward",
"VK_BROWSER_REFRESH",
"VK_BROWSER_STOP",
"VK_BROWSER_SEARCH",
"VK_BROWSER_FAVORITES",
"VK_BROWSER_HOME",
"VK_VOLUME_MUTE",
"VK_VOLUME_DOWN",
"VK_VOLUME_UP",
"VK_MEDIA_NEXT_TRACK",
"VK_MEDIA_PREV_TRACK",
"VK_MEDIA_STOP",
"VK_MEDIA_PLAY_PAUSE",
"VK_LAUNCH_MAIL",
"VK_LAUNCH_MEDIA_SELECT",
"VK_LAUNCH_APP1",
"VK_LAUNCH_APP2",
"Unknown",
"Unknown",
";:",
"= +",
", <",
"-_",
".>",
"/?",
"` ~ ",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"[{",
"|",
"}]",
"Quote",
"VK_OEM_8",
"Unknown",
"Unknown",
"VK_OEM_102",
"Unknown",
"VK_PROCESSKEY",
"Unknown",
"VK_PACKET",
"Unknown",
"Unknown",
"VK_ATTN",
"VK_CRSEL",
"VK_EXSEL",
"VK_EREOF",
"Play",
"Zoom",
"Unknown",
"VK_PA1",
"Clear"
};
Explanation: All that was happening is that the Function was not able to pick up these keys because
Credit: Freefire123 for Mouse 4/5 Code
Последнее редактирование: