Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › How does this work?!

How does this work?!

Posts 1–4 of 4 · Page 1 of 1
why06
why06
How does this work?!
I don't think Im the only one who has been seeing this a lot lately:
Code:
if(GetAsyncKeyState(vk_code)<0)
Now I don't know how in the world this could work, but some how it is returning true when some people press the correct key, when in reality it should always return false. I know some of you are like: "Well if it works who cares?", but this is a problem it shows a serious inconsistency and I would like to find out why. If anyone has any ideas please share them.
#1 · 16y ago
Joshcarr2006
Joshcarr2006
Did you try


If 1=true then 0=false,Key1=1,if hit,Key1=0,if hitx2,


/idk what i'm talking about.
#2 · 16y ago
Retoxified
Retoxified
Ask BA, he's god o__O
probably because GetAsyncKeyState doesn't function properly on modern computers with their fancy multicores and being able to process way too many shizzle at the same time.
#3 · 16y ago
why06
why06
Yes but I dont see how getakeysync could be a problem because ... hmmm hold on a sec....

Testing.... yep thats it!
Code:
#include <iostream.h>
#include <windows.h>
using namespace std;

int main()
{
    while(1)
    {
            cout<<GetAsyncKeyState(VK_SPACE);
            Sleep(200);
    }
    return 1;
}
I forgot GetAsyncKeyState returns a signed WORD value. So it actually returns a negative number when it's pressed because the highest bit is set to 1. That is how the whole < 0 thing works. since GetAsyncKeyState is less then zero when pressed, but goddam why go through so much trouble. any nonzero is true... =/
#4 · 16y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • How does this work?By Jakeoff10 in Combat Arms Hacks & Cheats
    1Last post 17y ago
  • How does this work?By Spookerzz in General
    11Last post 15y ago
  • Does this work?By 19900606 in General
    5Last post 16y ago
  • how does wallhack work?By billythekid1 in WarRock Discussions
    5Last post 16y ago
  • OGKeys - How does it work?By foxhound in WarRock - International Hacks
    5Last post 18y ago

Tags for this Thread

None