Results 1 to 4 of 4
  1. #1
    Skips's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    363
    Reputation
    23
    Thanks
    193

    Dynamic Keybinding?

    Any ideas on how to fulfill this logic?

    OnButtonClick(){

    //Wait for user keypress
    //Capture keypress
    //Save keypress for later keybinds

    }

    I'd like for the use to be able to press any button(Most buttons works too) but I need mouse buttons to work.

    - - - Updated - - -

    I've looked @ some stuff involving getch()? But got very confused and information was diluted.

  2. #2
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    Quote Originally Posted by Skipss View Post
    Any ideas on how to fulfill this logic?

    OnButtonClick(){

    //Wait for user keypress
    //Capture keypress
    //Save keypress for later keybinds

    }

    I'd like for the use to be able to press any button(Most buttons works too) but I need mouse buttons to work.

    - - - Updated - - -

    I've looked @ some stuff involving getch()? But got very confused and information was diluted.
    if((GetKeyState(VK_LBUTTON) & 0x100) != 0)

  3. #3
    Skips's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    363
    Reputation
    23
    Thanks
    193
    Quote Originally Posted by MikeRohsoft View Post
    if((GetKeyState(VK_LBUTTON) & 0x100) != 0)
    And what exactly would that solve? Why would I need to check the keystate of the leftmouse button?

    - - - Updated - - -

    That sounded rude, whoops.

  4. #4
    HexMurder's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    System.Diagnostics
    Posts
    344
    Reputation
    96
    Thanks
    3,170
    char hotKey1;
    cout << "Please enter key." << endl;
    cin.get(hotKey1);

Similar Threads

  1. Dynamic memory
    By Lynie in forum C++/C Programming
    Replies: 2
    Last Post: 12-30-2008, 02:49 AM
  2. Display a box with a dynamic size [nasm]
    By radnomguywfq3 in forum Assembly
    Replies: 0
    Last Post: 08-31-2008, 01:28 AM
  3. Dynamic Pulse/Blue Ice
    By -[standoff]- in forum Art & Graphic Design
    Replies: 20
    Last Post: 03-13-2007, 03:37 AM
  4. Changing MAC and Dynamic IP Manually
    By MagikBullet in forum WarRock - International Hacks
    Replies: 32
    Last Post: 12-27-2006, 10:33 PM
  5. Dynamic IP?
    By aldregon in forum General Game Hacking
    Replies: 2
    Last Post: 04-10-2006, 07:31 AM