I'm using GetRawInputData for sniffing barcode reader data. https://github.com/mfakane/rawinput-sharp
When I read a barcode from my barcode scanner normally it gets the right characters both rawinput and pc screen. Below image shows right scenario.
My problem is, if I change the language settings of the barcode scanner to Turkey, rawinput gets additional characters like below image.
If somebody used RawInput library before, please help me about why this is happening and I need an idea about how to sniff the data exactly like pc gets like the images.


I don't quite understand what do you mean by this. Also I don't know which exactly HID device type your barcode scanner is implementing.
If we talk about
RIM_TYPEKEYBOARDdata (HID Usage Page 0x01, Usage Id 0x06) - Raw Input Windows API doesn't provide any characters by itself.WM_INPUTgives you PS/2 scancode of the key (inRAWKEYBOARD.MakeCode, it is actually converted by KBDHID.sys driver from HID Usages according to this table) and VK_* code of the key (inRAWKEYBOARD.VKeyfield).These presses could be mapped to characters by the call to ToUnicode API. It needs as input - scan code, vk code and keyboard state (which contains for example CAPSLOCK and SHIFT state). It will convert based on active keyboard layout of callers thread. If you need other keyboard layout then you can use ToUnicodeEx that have additional parameter
HKL dwhkl.Proper use of
ToUnicode/ToUnicodeExis tricky because it could emit several characters on a single key press. Also there there could be dead keys...But for simple case it could be something like this: