5#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_MANAGER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_MANAGER_H_
15#include "flutter/fml/macros.h"
142 using OnKeyCallback =
148 bool placeholder =
false;
159 void ProcessNextEvent();
165 void PerformProcessEvent(std::unique_ptr<PendingEvent>
event,
173 void HandleOnKeyResult(std::unique_ptr<PendingEvent>
event,
174 bool framework_handled);
180 void DispatchText(
const PendingEvent&
event);
188 UINT PeekNextMessageType(
UINT wMsgFilterMin,
UINT wMsgFilterMax);
202 std::vector<Win32Message> current_session_;
207 bool last_key_is_ctrl_left_down;
212 uint8_t ctrl_left_scancode;
217 bool should_synthesize_ctrl_left_up;
223 std::deque<std::unique_ptr<PendingEvent>> pending_events_;
226 std::atomic<bool> processing_event_;
230 std::deque<Win32Message> pending_redispatches_;
virtual UINT Win32DispatchMessage(UINT Msg, WPARAM wParam, LPARAM lParam)=0
virtual void OnText(const std::u16string &text)=0
virtual BOOL Win32PeekMessage(LPMSG lpMsg, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)=0
virtual ~WindowDelegate()=default
std::function< void(bool)> KeyEventCallback
virtual void OnKey(int key, int scancode, int action, char32_t character, bool extended, bool was_down, KeyEventCallback callback)=0
virtual uint32_t Win32MapVkToChar(uint32_t virtual_key)=0
KeyboardManager(WindowDelegate *delegate)
bool HandleMessage(UINT const message, WPARAM const wparam, LPARAM const lparam)
WindowDelegate::KeyEventCallback KeyEventCallback
virtual void RedispatchEvent(std::unique_ptr< PendingEvent > event)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
union flutter::testing::@2836::KeyboardChange::@76 content
std::vector< Win32Message > session
bool IsHighSurrogate() const
bool IsLowSurrogate() const
bool IsGeneralKeyDown() const