Is there any API call that distinguishes what ascii code represents the "A", "B", "Caps", etc. on the keyboard?

Thanks in advance.