-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The current keyboard structure is probably no longer capable of complex logic needed for a correct behavior.
In the beginning we designed a 3-layer structure with Win32Window, KeyboardKeyHandler and KeyboardKeyEmbedderHandler, and tries to keep API-specific information below and let higher layer to deal with logic. But we have since noticed that API-specific information is needed event for KeyboardKeyEmbedderHandler, and for redispatched messages. The abstraction does not work. The layers are tightly coupled and our unit tests do not mean much.
The system should directly receive system messages as-is. The logic needs almost every bit of information, for example, whether the message is a WM_CHAR or a WM_DEADCHAR.
The redispatching management should be at the top level to resolve issues such as #87843.
The keyboard system of Win32 and UWP will be best to separate. Due to how complex Win32 message handling can be, they do not have much code to share.