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 › [Help] Global Hotkey [Solved]

[Help] Global Hotkey [Solved]

Posts 1–7 of 7 · Page 1 of 1
karldeovbnet
karldeovbnet
[Help] Global Hotkey [Solved]
i was doing some mini projects on the tutorial section,

Tutorial: Hotkeys with a Module

when i tried to do this one, i encountered this error, can you pls tell me what am i doing wrong?

#1 · edited 15y ago · 15y ago
T0
T0P-CENT
put this code in ur form
Code:
Declare Function GetAsyncKeyState Lib "user32" (Byval vKey As Integer) As Integer
put this code in ur timer
Code:
If GetAsyncKeyState(Keys.Insert) Then : Msgbox("Insert") : End If
#2 · 15y ago
karldeovbnet
karldeovbnet
solved it on my own,

changed this part:

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

to:

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Integer

thank you top cent, figured it out a sec ago

Quote Originally Posted by T0P-CENT View Post
put this code in ur form
Code:
Declare Function GetAsyncKeyState Lib "user32" (Byval vKey As Integer) As Integer
put this code in ur timer
Code:
If GetAsyncKeyState(Keys.Insert) Then : Msgbox("Insert") : End If
do you know how to make it with alt/shift/ctrl?

hotkeys like alt+q in code
#3 · edited 15y ago · 15y ago
T0
T0P-CENT
Code:
If GetAsyncKeyState(Keys.ShiftKey) And GetAsyncKeyState(Keys.N) Then
            MsgBox("You pressed shift + N")
        End If
method 1 ^^
method 2
Code:
If GetAsyncKeyState(Keys.A) Then
If GetAsyncKeyState(Keys.B) Then
Msgbox("You pressed A AND B")
End If
End If
#4 · 15y ago
WE
wee123
how do you target the process you want to send keys to? like i want to send some keys to a certain program


also whats the api or function to send keys in the background (Afk bot like)
#5 · 15y ago
Jason
Jason
Quote Originally Posted by wee123 View Post
how do you target the process you want to send keys to? like i want to send some keys to a certain program


also whats the api or function to send keys in the background (Afk bot like)
The question isn't exactly related to the issue of globally detected hotkeys, which is just a case of a minor keyboard hook or an API call. Sending keystrokes to a minimized process is somewhat more difficult and will require you to look into SendMessage/SendInput. It ain't always easy.

Original thread question is now solved.
#6 · 15y ago
T0
T0P-CENT
Quote Originally Posted by wee123 View Post
how do you target the process you want to send keys to? like i want to send some keys to a certain program


also whats the api or function to send keys in the background (Afk bot like)

this check if u pressed a key not sending a key to application
and afk bots it just makes a mouse click and move ur cursor
#7 · 15y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Tags for this Thread

None