SDL is trying to support essentially 3 different types of keyboard input:
- SDL scancodes are used for games that require position independent key input, e.g. an FPS that uses WASD for movement should use scancodes because the position is important (i.e. the key position shouldn’t change on a French AZERTY keyboard, etc.)
- SDL keycodes are used for games that use symbolic key input, e.g. ‘I’ for inventory, ‘B’ for bag, etc. This is useful for MMOs and other games where the label on the key is important for understanding what the action is. Typically shift or control modifiers on those keys do something related to the original function and aren’t related to another letter that might be mapped there (e.g. Shift-B closes all bags, etc.)
- SDL text input is used for games that have a text field for chat, or character names, etc.
Games don’t always follow these usage patterns, but this is the way it was originally designed.