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 › Hotkeys in C++

Hotkeys in C++

Posts 1–8 of 8 · Page 1 of 1
Dave84311
[MPGH]Dave84311
Hotkeys in C++
One of the most basic things needed in a trainer, hotkeys to activate or deactivate cheats!

GetAsyncKeyState("A Virtual-Key Here");

GetAsyncKeyState will return true if the key is down and false if it isn't.

List of keys:
http://msdn.microsof*****m/library/de...alkeycodes.asp

Oh yeah you need to include the library "user32.lib"
#1 · 20y ago
NI
niggas
The RegisterHotkey() function is much more useful and efficient.. because then the program does not need to have the focus in order for the hotkeys to work. and GetASyncKeyState does not support two key combinations like Shift+ G , etc..
#2 · 20y ago
Dave84311
[MPGH]Dave84311
Quote Originally Posted by niggas
The RegisterHotkey() function is much more useful and efficient.. because then the program does not need to have the focus in order for the hotkeys to work. and GetASyncKeyState does not support two key combinations like Shift+ G , etc..
True, however GetASyncKeyState can be used for combinations of keys. BTW: Its RegisterHotKey
#3 · 20y ago
SH
shercipher
System wide hotkeys are better because you don't eat up CPU time in a loop to check key state.
#4 · 20y ago
NI
niggas
Yea, true, but that might interfere with other applications running on your system

system wide hooks in my opinion are not a good thing to practice.
#5 · 20y ago
arunforce
[MPGH]arunforce
But PowerKeyFunc() works the best IMO.
#6 · 20y ago
somethingwitty
somethingwitty
ty for these i didnt know these before
#7 · 19y ago
FU
fufu
Quote Originally Posted by Dave84311 View Post
One of the most basic things needed in a trainer, hotkeys to activate or deactivate cheats!

GetAsyncKeyState("A Virtual-Key Here");

GetAsyncKeyState will return true if the key is down and false if it isn't.

List of keys:
http://msdn.microsof*****m/library/de...alkeycodes.asp

Oh yeah you need to include the library "user32.lib"
Dave I love you so much for posting that link :P. Even though I knew most I love the volume up and down keys. Very nice
#8 · 19y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

  • vb hotkeysBy cjg333 in General Game Hacking
    7Last post 18y ago
  • Hotkeys for a VB trainerBy scooby107 in Visual Basic Programming
    10Last post 19y ago
  • [Tutorial] How To Mack HotKeys On VBBy TheRedEye in WarRock - International Hacks
    32Last post 19y ago
  • My hack release hotkey v1By purenoob134 in WarRock - International Hacks
    23Last post 19y ago
  • a pic of my ingame hotkeys(releasing soon)By cjg333 in WarRock - International Hacks
    2Last post 19y ago

Tags for this Thread

None