Hello @Xiaodong Hu ,
The virtual key value of a key may alter depending on the current keyboard layout or what other keys were pressed, but the scan code will always be the same.
This is based on the the fact that OS is Windows and hardware is not changed.
Since the scan code is from hardware so if the hardware keeps unchanged and scan code will be the same.
Since the keyboard layout can be changed via Settings. There is a such case, virtual code [VK_OEM_4 (0xDB) in the US standard keyboard is correspond the '{' key but maybe another different key in another different keyboard layout.
Thank you!
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.