kettle11 / kapp

A pure Rust window and input library for Windows, Mac, and Web. (Work in progress)
Apache License 2.0
56 stars 4 forks source link

Holding down keys on Mac makes IME character entry appear. This is bad for game controls like WASD. #40

Closed kettle11 closed 3 years ago

kettle11 commented 3 years ago

Perhaps IME text entry mode needs to be toggled on and off somehow instead of always being available.

kettle11 commented 3 years ago

It seems let () = msg_send![this, interpretKeyEvents: array]; should be prevented when text input is not desired. But does that have any negative consequences?

Additionally some other libraries seem to use inputContext handleEvent instead. Why?

kettle11 commented 3 years ago

Fixed by https://github.com/kettle11/kapp/commit/f0c6f2915c61a4a3db13b0dde25685378b7399e2

start_text_input and end_text_input functions are added to Application to support entering and exiting text input mode. By default text input is off.