macOS fix for backspace in text/label tools in some languages
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.
This commit is contained in:
parent
3d4dd494b5
commit
c126eb92b5
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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] */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue