Skip to content

Commit

Permalink
* Fix backspace on MacOS X (from tjw)
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Apr 14, 2006
1 parent a596185 commit b191cc0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/unix/sdl_glimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,14 @@ static const char *XLateKey(SDL_keysym *keysym, int *key)
//else if (ch >= 'A' && ch <= 'Z')
// ch = ch - 'A' + 'a';

buf[0] = ch;
// tjw: translate K_BACKSPACE to ctrl-h for MACOS_X (others?)
if (ch == K_BACKSPACE)
{
*key = 'h' - 'a' + 1;
buf[0] = *key;
}
else
buf[0] = ch;
}

return buf;
Expand Down

0 comments on commit b191cc0

Please sign in to comment.