hi guys, I am trying to detect these few keys from a USB keyboard. The keys are CUT, PASTE, COPY, HELP, and STOP. I have tried two aproaches in tackling this problem, which is detecting their ASCII code by using the keyboard hook method. The API function that I used including GetKeyboardState(), ToAscii() and GetKeyNameText(). Other normal standard keys are identified except these 5 keys. Then I tried another method by detecting their Virtual Key codes with the API function GetKeyState(). However these five keys still can't be detected. So I don't know what to do next.
But it seems like there is a table called USB HID Usage Table which shows that the codes for the keys are:-
CUT = H7B (Dec: 123)
PASTE = H7D (Dec: 125)
COPY = H7C (Dec: 124)
HELP = H75 (Dec: 117)
STOP = H78 (Dec: 120)
I am still not sure how to get those data yet. Any ideas? Thx a lot
But it seems like there is a table called USB HID Usage Table which shows that the codes for the keys are:-
CUT = H7B (Dec: 123)
PASTE = H7D (Dec: 125)
COPY = H7C (Dec: 124)
HELP = H75 (Dec: 117)
STOP = H78 (Dec: 120)
I am still not sure how to get those data yet. Any ideas? Thx a lot