我想打印“a”。相反,它打印“9”。为什么,以及如何解决这个问题?
use Win32::API;
$kbd_event = Win32::API->new(
"user32.dll",
"VOID keybd_event( BYTE bVk, BYTE bScan, DWORD dwFlags, DWORD dwExtraInfo );"
);
$a = 0x61;
$kbd_event->Call( $a, 0, 0, 0 ); # press
$kbd_event->Call( $a, 0, 2, 0 ); # release