VB.Net Mirroring AHK HotKey Functionality

Discuss other programming languages besides AutoHotkey
The_Wildry_Dude
Posts: 11
Joined: 17 Aug 2015, 17:15

VB.Net Mirroring AHK HotKey Functionality

30 Sep 2016, 11:09

Hey everyone -

I'm trying to emulate the hotkey functionality in AHK with VB.Net. Basically, mirror it identically. I'm not entirely sure how to get started. I did get something basic operational, however, it's a far cry from AHK's awesome native functionality. This will be developed for windows.

VB.NET Code

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Currently, this only works when I press all the keys together (pressed at once). How can I make it work by pressing the last key in the sequence to kick off the hotkey. Additionally, how would I add termination keys, like 'Enter' and 'Space' that kick off the hotkey.

Looking for a nudge, or an example to get started.
lexikos
Posts: 5410
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: VB.Net Mirroring AHK HotKey Functionality

15 Nov 2016, 03:12

"Polling" (or in other words, continuously and repeatedly checking the state of each key) is possibly the worst way to implement a hotkey.

I suggest you look for some existing VB.NET (or other .NET) code which uses RegisterHotkey or a keyboard hook (keyword: WH_KEYBOARD_LL).

Return to “Other Programming Languages”

Who is online

Users browsing this forum: No registered users and 2 guests