Flutter macOS Embedder
<FlutterKeyboardViewDelegate> Protocol Reference

#import <FlutterKeyboardViewDelegate.h>

Instance Methods

(void) - sendKeyEvent:callback:userData:
 
(nonnull id< FlutterBinaryMessenger >) - getBinaryMessenger
 
(BOOL) - onTextInputKeyEvent:
 
(void) - subscribeToKeyboardLayoutChange:
 
(flutter::LayoutClue- lookUpLayoutForKeyCode:shift:
 
(nonnull NSDictionary *) - getPressedState
 

Properties

NSResponder * nextResponder
 

Detailed Description

An interface for a class that can provides |FlutterKeyboardManager| with platform-related features.

This protocol is typically implemented by |FlutterViewController|.

Definition at line 42 of file FlutterKeyboardViewDelegate.h.

Method Documentation

◆ getBinaryMessenger

- (nonnull id<FlutterBinaryMessenger>) getBinaryMessenger

Get a binary messenger to send channel messages with.

This method is used to create the key data channel and typically forwards to |FlutterEngine.binaryMessenger|.

◆ getPressedState

- (nonnull NSDictionary*) getPressedState

Returns the keyboard pressed state.

Returns the keyboard pressed state. The dictionary contains one entry per pressed keys, mapping from the logical key to the physical key.

◆ lookUpLayoutForKeyCode:shift:

- (LayoutClue FlutterKeyboardViewDelegate-)p: (uint16_t)  keyCode
shift: (BOOL)  shift 

Querying the printable result of a key under the given modifier state.

◆ onTextInputKeyEvent:

- (BOOL) onTextInputKeyEvent: (nonnull NSEvent *)  event

Dispatch events that are not handled by the keyboard event handlers to the text input handler.

This method typically forwards events to |TextInputPlugin.handleKeyEvent|.

◆ sendKeyEvent:callback:userData:

- (void) sendKeyEvent: (const FlutterKeyEvent &)  event
callback: (nullable FlutterKeyEventCallback)  callback
userData: (nullable void *)  userData 

Dispatch events to the framework to be processed by |HardwareKeyboard|.

This method typically forwards events to |FlutterEngine.sendKeyEvent:callback:userData:|.

◆ subscribeToKeyboardLayoutChange:

- (void) subscribeToKeyboardLayoutChange: (nullable flutter::KeyboardLayoutNotifier callback

Add a listener that is called whenever the user changes keyboard layout.

Only one listeners is supported. Adding new ones overwrites the current one. Assigning nil unsubscribes.

Property Documentation

◆ nextResponder

- (NSResponder*) nextResponder
readrequirednonatomicassign

Get the next responder to dispatch events that the keyboard system (including text input) do not handle.

If the |nextResponder| is null, then those events will be discarded.

Definition at line 51 of file FlutterKeyboardViewDelegate.h.


The documentation for this protocol was generated from the following file: