diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index a7d121714..49f239d20 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -199,6 +199,12 @@ http://www.tuxpaint.org/ * Fonts are now also looked for in the system preferences path, /Library/Application Support/TuxPaint/fonts + * Fixed the issue with the backspace not working in text and label tools + when in certain language modes in macOS. Mac keyboards have the DELETE + key where PC keyboards have the BACKSPACE key, and the two keys have + different keycodes, so the backspace requires special handling on the + macOS in programs writtens for the PC. + * Documentation updates: --------------------- * macOS Apple Silicon and Universal Binary build instructions diff --git a/src/tuxpaint.c b/src/tuxpaint.c index c1b72235a..92997c237 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -2825,6 +2825,11 @@ static void mainloop(void) /* Queue each character to be displayed */ while (*im_cp) { +#ifdef __APPLE__ + /* Apple uses DEL for BACKSPACE */ + if (*im_cp == SDLK_DELETE) *im_cp = L'\b'; +#endif + if (*im_cp == L'\b') { /* [Backspace] */