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 3663

Summary: Can't get key with GetKeyFromName()
Product: SDL Reporter: Miguel SARO <miguel_saro>
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.5   
Hardware: x86_64   
OS: macOS 10.12   

Description Miguel SARO 2017-06-07 18:59:24 UTC
Bonjour,
I'm working on remapping keyboard in Hatari project. I'm with à Macbook Pro (fr).
In Hatari to parse one character, its key is obtained with:

int Keymap_GetKeyFromName(const char *name)
{
	return SDL_GetKeyFromName(name);
}

Results of made tests with this are:
name = Left Ctrl    Key = 0x400000e0
name = Left Shift   Key = 0x400000e1
name = Left Alt     Key = 0x00000000   (Left Alt -> fail ?)

Thomas (from Hatari) think this is propre to OSx.
So he said I have to do a feed back.
Regards
    Miguel
Comment 1 Sam Lantinga 2017-08-11 18:14:33 UTC
On Mac OS X the ALT key has a different name:
SDL_cocoakeyboard.m:    SDL_SetScancodeName(SDL_SCANCODE_LALT, "Left Option");
SDL_cocoakeyboard.m:    SDL_SetScancodeName(SDL_SCANCODE_RALT, "Right Option");