HelpDynamic Keybinding?

Posts 1–4 of 4 · Page 1 of 1
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.
Quote Originally Posted by Skips 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)
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.
char hotKey1;
cout << "Please enter key." << endl;
cin.get(hotKey1);
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us