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 1731

Summary: Regression in SDL_GetKeyFromScancode
Product: SDL Reporter: Andreas Schiffler <aschiffler>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2 CC: gabomdq
Version: HG 2.0   
Hardware: x86_64   
OS: Windows 7   

Description Andreas Schiffler 2013-02-26 07:34:43 UTC
The latest changes to the windows keyboard mapping code seem to have introduced a regression which cause the automated test keyboard_getKeyFromScancode to fail.

The behavior of SDL_GetKeyFromScancode(0) changed to return 1073741824 rather than the expected value UNKNOWN.

Repro on cygwin:
./testautomation --filter keyboard_getKeyFromScancode

INFO:  02/26/13 15:28:37: ----- Test Case 4.4: 'keyboard_getKeyFromScancode' started
INFO:  02/26/13 15:28:37: Test Description: 'Check call to SDL_GetKeyFromScancode'
INFO:  02/26/13 15:28:37: Test Iteration 1: execKey 14134826104437399765
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(valid)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call, expected: 97, got: 97': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(0)': Pass
ERROR: 02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 1073741824': Failed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(-999)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 0': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Validate that error message was not NULL': Passed
INFO:  02/26/13 15:28:37: Assert 'Validate error message, expected: 'Parameter 'scancode' is invalid', got: 'Parameter 'scancode' is invalid'': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(999)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 0': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Validate that error message was not NULL': Passed
INFO:  02/26/13 15:28:37: Assert 'Validate error message, expected: 'Parameter 'scancode' is invalid', got: 'Parameter 'scancode' is invalid'': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
ERROR: 02/26/13 15:28:37: Assert Summary: Total=17 Passed=16 Failed=1
INFO:  02/26/13 15:28:37: Total Test runtime: 0.0 sec
ERROR: 02/26/13 15:28:37: >>> Test 'keyboard_getKeyFromScancode': Failed
Comment 1 Gabriel Jacobo 2013-02-27 02:36:41 UTC

*** This bug has been marked as a duplicate of bug 1730 ***