Thread: Global Hotkeys

Results 1 to 4 of 4
  1. #1
    Steb.'s Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    2

    Post Global Hotkeys

    I need a code that toggles something even though the form is not focused.

  2. #2
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    You need to have a listener for the event, which in this case are the hotkeys. Your app should register the keys as they are clicked if you have a listener in the background.
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  3. #3
    supermarre1's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    72
    Reputation
    44
    Thanks
    175
    My Mood
    Cool
    You can do this too.
    if you have NuGet.
    Install MouseKeyHook.
    Follow the documentation.

  4. #4
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    From my halted project:
    Code:
        class Extern
        {
            [DllImport("user32.dll")]
            static extern short GetKeyState(int key);
    
            private const int KEY_PRESSED = 0x8000;
    
    
    
            public bool IsPressed(int key)
            {
                return (GetKeyState(key) & KEY_PRESSED) != 0;
            }
        }
    Hope you'll be able to put it to good use

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  5. The Following User Says Thank You to _NightWare For This Useful Post:

    DaniielSanchez (11-16-2016)

Similar Threads

  1. [Patched] Dragon Nest SEA patcher 0.2: Disable GPK / Multiclient / Unblock Global Hotkeys
    By antifoo in forum Dragon Nest Hacks & Cheats
    Replies: 336
    Last Post: 07-26-2012, 02:07 AM
  2. [Solved] Global Hotkeys
    By dudezone2 in forum Visual Basic Programming
    Replies: 22
    Last Post: 04-19-2012, 11:16 AM
  3. [Help] Global Hotkey [Solved]
    By karldeovbnet in forum Visual Basic Programming
    Replies: 6
    Last Post: 03-03-2011, 07:28 AM
  4. [Tutorial]Global Hotkey[Leeched]
    By Invidus in forum Visual Basic Programming
    Replies: 18
    Last Post: 03-29-2010, 04:24 PM
  5. [Help]Easy Global hotkeys[Solved]
    By jaake in forum Visual Basic Programming
    Replies: 7
    Last Post: 03-13-2010, 05:09 PM