#include #include #include Int main (void) { The int value=https://bbs.csdn.net/topics/0; Printf (" The current status of your The rid_device_info_keyboard is: \ n "); X0040 value=https://bbs.csdn.net/topics/peekb (0, 0 x0017); If (value & amp; 1) Printf (" Right shift on \ n "); The else Printf (" Right shift off \ n "); If (value & amp; 2) Printf (" the Left shift on \ n "); The else Printf (" the Left shift off \ n "); If (value & amp; 4) Printf (" the Control key on \ n "); The else Printf (" the Control key off \ n "); If (value & amp; 8) Printf (" Alt key on \ n "); The else Printf (" Alt key off \ n "); If (value & amp; 16) Printf (" Scroll lock on \ n "); The else Printf (" Scroll lock off \ n "); If (value & amp; 32) Printf (" Num lock on \ n "); The else Printf (" Num lock off \ n "); If (value & amp; 64) Printf (" Caps lock on \ n "); The else Printf (" Caps lock off \ n "); return 0; }
CodePudding user response:
You call the function peekb is doing this in, specification can read it,