RawKeyboardMacos accepts a new field "specifiedLogicalKey" (#100803)

This commit is contained in:
Tong Mu
2022-04-14 11:24:11 -07:00
committed by GitHub
parent 08e467dde7
commit c5e3e1cf5f
6 changed files with 63 additions and 3 deletions

View File

@@ -83,9 +83,9 @@ class LogicalKeyboardKey extends KeyboardKey {
const int valueMaskWidth = 32;
// Equivalent to assert(divisorForValueMask == (1 << valueMaskWidth)).
const int _firstDivisorWidth = 28;
const int firstDivisorWidth = 28;
assert(divisorForValueMask ==
(1 << _firstDivisorWidth) * (1 << (valueMaskWidth - _firstDivisorWidth)));
(1 << firstDivisorWidth) * (1 << (valueMaskWidth - firstDivisorWidth)));
// JS only supports up to 2^53 - 1, therefore non-value bits can only
// contain (maxSafeIntegerWidth - valueMaskWidth) bits.

View File

@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#include "./KeyCodeMap_internal.h"
#include "./KeyCodeMap_Internal.h"
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by
@@ -17,6 +17,8 @@
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
namespace flutter {
@@@MASK_CONSTANTS@@@
const NSDictionary* keyCodeToPhysicalKey = @{
@@ -36,3 +38,9 @@ const NSDictionary* modifierFlagToKeyCode = @{
};
@@@SPECIAL_KEY_CONSTANTS@@@
const std::vector<LayoutGoal> layoutGoals = {
@@@LAYOUT_GOALS@@@
};
} // namespace flutter