Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • FreeType Demo Programs FreeType Demo Programs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FreeTypeFreeType
  • FreeType Demo ProgramsFreeType Demo Programs
  • Merge requests
  • !20

[windows] Fix some GUI keys not working

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Charlie Jiang requested to merge cqjjjzr/freetype-demos:fix-win-arrowkey into master Apr 06, 2022
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

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: https://stackoverflow.com/questions/12954545/strange-wm-char-behaviour-wrong-chcharcode
Related E-Mail archive: https://lists.nongnu.org/archive/html/freetype-devel/2022-04/msg00001.html

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-win-arrowkey