We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5412

Summary: Scancodes are different between 1.2 and 2.0
Product: sdl12-compat Reporter: Malte Kießling <mkalte>
Component: everythingAssignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   

Description Malte Kießling 2020-12-23 02:10:12 UTC
So, the good old sdl 1.2 documentation states that scancodes are "best left alone". 

Turns out that people didn't care. There is the issue now that dosbox (to give an example) is somewhat activly using scancodes (dosbox/src/gui_sdl_mapper.cpp:421; function called GetKeyCode). The bounds-checking is also only an assert, so this is a guaranteed crash. 

I have "fixed" this by permanently setting the scancode of the key event to zero. I have no idea if that is an actual fix - who knows what else depends on the scancodes. Emulating old behaviour here is probalby preferable.