GetKeyNameText

[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int GetKeyNameText(
   uint lParam,
   StringBuilder lpString,
   int nSize
);

Microsoft documentation: Link

Last updated