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 - Can't get key with GetKeyFromName()
Summary: Can't get key with GetKeyFromName()
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.5
Hardware: x86_64 macOS 10.12
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-07 18:59 UTC by Miguel SARO
Modified: 2017-08-11 18:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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");