diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5a318836a..21038eeb8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20081107 +-------- +arch/sdl/key.c: Only read UNICODE values from 31 to 254 to make sure we do not read any non-printable characters and prefer the keysym that way; Added left and right Command Key for MAC Keyboards + 20081103 -------- misc/args.c: Fixed Typo diff --git a/arch/sdl/key.c b/arch/sdl/key.c index 275f053fe..037457e52 100644 --- a/arch/sdl/key.c +++ b/arch/sdl/key.c @@ -217,8 +217,8 @@ key_props key_properties[256] = { { "", 255, -1 }, { "PAD", 255, SDLK_KP_ENTER }, { "RCTRL", 255, SDLK_RCTRL }, -{ "", 255, -1 }, -{ "", 255, -1 }, +{ "LCMD", 255, SDLK_LMETA }, +{ "RCMD", 255, SDLK_RMETA }, { "", 255, -1 }, // 160 { "", 255, -1 }, { "", 255, -1 }, @@ -359,7 +359,7 @@ void key_handler(SDL_KeyboardEvent *event) event_keysym = event->keysym.sym; // Read (latin) unicode - if (event->keysym.unicode > 31) + if (event->keysym.unicode > 31 && event->keysym.unicode < 255) { event_keyuni = tolower(event->keysym.unicode); // Now add the UNICODE char to our map (see comment on sym2unimap declaration) @@ -373,7 +373,7 @@ void key_handler(SDL_KeyboardEvent *event) } } } - else // UNICODE reported as 0 - now check which one! + else // no valid UNICODE - possibly 0 - see if we remove it from the list { for (i = 0; i < KEY_BUFFER_SIZE; i++) {