Skip to content

[windows] Fix some GUI keys not working

Charlie Jiang requested to merge cqjjjzr/freetype-demos:fix-win-arrowkey into master

In current grwin32.c implementation, WM_CHAR message type is used to pass key stroke events (translate to grXxx enum values) to the main thread. However, for key codes above 256 (especially arrow keys), the high byte is truncated for unknown reasons (Maybe related to system codepage, UTF-16 and some checks).

Therefore, a custom message type for translated key stroke events is necessary. I defined WM_GR_KEY for this, which equals WM_USER+519. After some quick test, it now works normally.

A SO question that may be related to this:
Related E-Mail archive:

Merge request reports