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 › Visual Basic Programming › [Tutorial]Global Hotkey[Leeched]

[Tutorial]Global Hotkey[Leeched]

Posts 1–15 of 19 · Page 1 of 2
Invidus
Invidus
[Tutorial]Global Hotkey
Hey guys, this tutorial is leeched. I found an excellent website that contains it, and edited it. To see the original Tutorial, go here

This tutorial will explain how to make a hotkey function which works when the form is unfocused, hence, the name : Global Hotkey.

Firstly, you need to declare the GetAsyncKeyState API. To do this, type in this in the code:
[php]Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer[/php]So now, we'll want our program to check if the hotkeys are being pressed. We want it to check frequently so we can have an immediate reaction when the hotkey is pressed.

Add a timer. Double click on the Form. It should come up with the Form1.Load event.
Type this in:
[php]Timer1.enabled = true
Timer1.interval = 1[/php]

This sets the Timer's Interval to 1, and having it enabled. Now , we need the hotkey you want
pressed.

If you want 3 hotkeys to be pressed for your "whatever it is you need hotkeys for" to be
activated, then you'll need to declare 3 booleans in the Timer1.Tick Event.
For e.g. Ctrl+Alt+K. They can be called whatever you want.
[php]
Dim ctrl As Boolean
Dim alt As Boolean
Dim k As Boolean[/php]

When you have done that, you need to set their value.
We will use Ctrl-Alt-k again.

[php]ctrl = GetAsyncKeyState(Keys.ControlKey)
alt = GetAsyncKeyState(Keys.Menu)
k = GetAsyncKeyState(Keys.K)
[/php]

Now, an If Statement to check whether the keys have been pressed.

If ctrl And alt And k = True Then

'Put here the code that will initiate when the keys are pressed. E.g Timer2.Start
or Button1.Enabled

end if

So here is our final code:

[php]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.enabled = true
Timer1.interval = 1

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

Dim ctrl As Boolean
Dim alt As Boolean
Dim k As Boolean

ctrl = GetAsyncKeyState(Keys.ControlKey)
alt = GetAsyncKeyState(Keys.Menu)
k = GetAsyncKeyState(Keys.K)

If ctrl And alt And k = True Then
'
'Put here the code that will initiate when the keys are pressed. E.g Timer2.Start
or Button1.Enabled

end if
End Class[/php]

Hope it worked for you! That was just an example. You can have as many
or as short hotkeys as you want. Just edit the sample code above.
E.g. if you wanted 2 hotkeys:

[php]Dim blaa As Boolean
Dim waaa As Boolean

blaa= GetAsyncKeyState(Keys.B)
waaa = GetAsyncKeyState(Keys.W)

if blaa and waaa = true then

'Here is the code that runs again'

end if
[/php]



*A Handy Few Notes from CodingIlliterate

Any Button on your keyboard like Control, Shift etc. is
(Keys.ControlKey)
not
(Keys.Control)

I also spent lots of time searching for the Alt Key.

The Alt Key is

(Keys.Menu)

Thanks for Reading! Hope it helped and if you liked it, press thanks!
#1 · edited 16y ago · 16y ago
NextGen1
NextGen1
Thanks for sharing, Looks good
#2 · 16y ago
Invidus
Invidus
Thanks NextGen! I hope it helps those who do not know how to use hotkeys, and those who do, to learn about Global Hotkeys.
#3 · 16y ago
D3Dh0oker
D3Dh0oker
ima leech this from u >=) jk thanks it will make spammers and tappers 10+ easyer
#4 · 16y ago
Invidus
Invidus
Hhehe. NextGen can you put this in your list of TuTs?? Pweeze =D
#5 · 16y ago
NextGen1
NextGen1
I will add it soon
#6 · 16y ago
Invidus
Invidus
ok thanks nextgen
#7 · 16y ago
Blubb1337
Blubb1337
Wasn't this posted multiple times?
#8 · 16y ago
MJLover
MJLover
Thanks for sharing buddy. Very helpful
#9 · 16y ago
Invidus
Invidus
Quote Originally Posted by Blubb1337 View Post
Wasn't this posted multiple times?
Really? Didn't know that.
#10 · 16y ago
Blubb1337
Blubb1337
Yea seen it a few times on mpgh, thanks for sharing though
#11 · 16y ago
Invidus
Invidus
=P. Thanks Blubb. Anyway i didn't leech it from previous posters. I just found a good website and decided it to share info with yooh guys!
#12 · 16y ago
Blubb1337
Blubb1337
I'm thinking about doing an advanced trainer tutorial but idk
#13 · 16y ago
Invidus
Invidus
For MWF2? /too short
#14 · 16y ago
Blubb1337
Blubb1337
generally for all games
#15 · 16y ago
Posts 1–15 of 19 · Page 1 of 2

Post a Reply

Similar Threads

  • [Tutorial]Using Hotkeys VB 08By Pixie in Visual Basic Programming
    2Last post 16y ago
  • [Help]Easy Global hotkeys[Solved]By jaake in Visual Basic Programming
    7Last post 16y ago
  • [Help] Global Hotkey [Solved]By karldeovbnet in Visual Basic Programming
    6Last post 15y ago
  • [Tutorial]AntiMute Spammer [Leeched]By aLcohoL_95 in Visual Basic Programming
    5Last post 16y ago
  • [Tutorial] How To Mack HotKeys On VBBy TheRedEye in WarRock - International Hacks
    32Last post 19y ago

Tags for this Thread

None