void __fastcall TForm1::Edit2KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) if (Shift.Contains(ssAlt) && Shift.Contains(ssCtrl)) How to change Alt to A / F key code? Using the key code ( 65 ) does not help.
void __fastcall TForm1::Edit2KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) if (Shift.Contains(ssAlt) && Shift.Contains(ssCtrl)) How to change Alt to A / F key code? Using the key code ( 65 ) does not help.
if ((Shift.Contains(ssCtrl)) && (Key == 65)) #include <Windows.h> #include <iostream> using namespace std; bool keydown(int key) { return (GetAsyncKeyState(key) & 0x8000) != 0; } int main() { while (!keydown(VK_ESCAPE)) { if (keydown(VK_LCONTROL) && keydown('A')) { cout << "combo pressed!" << endl; } Sleep(10); } return 0; } Source: https://ru.stackoverflow.com/questions/579799/
All Articles
GetAsyncKeyStatetried? - Duracell