Skip to content

Commit deb8e57

Browse files
authored
Fix for tab not working (flutter#14165)
* some logs * Masking moddifier state for lock keys if the key code is not the same as the modifier. this fixes tab issue happening when numlock/capslock is on. * removing modifier state for locks * addresing pr comments'
1 parent 76d264e commit deb8e57

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

lib/web_ui/lib/src/engine/keyboard.dart

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ const int _modifierShift = 0x01;
117117
const int _modifierAlt = 0x02;
118118
const int _modifierControl = 0x04;
119119
const int _modifierMeta = 0x08;
120-
const int _modifierNumLock = 0x10;
121-
const int _modifierCapsLock = 0x20;
122-
const int _modifierScrollLock = 0x40;
123120

124121
/// Creates a bitmask representing the meta state of the [event].
125122
int _getMetaState(html.KeyboardEvent event) {
@@ -136,15 +133,8 @@ int _getMetaState(html.KeyboardEvent event) {
136133
if (event.getModifierState('Meta')) {
137134
metaState |= _modifierMeta;
138135
}
139-
if (event.getModifierState('NumLock')) {
140-
metaState |= _modifierNumLock;
141-
}
142-
if (event.getModifierState('CapsLock')) {
143-
metaState |= _modifierCapsLock;
144-
}
145-
if (event.getModifierState('ScrollLock')) {
146-
metaState |= _modifierScrollLock;
147-
}
136+
// TODO: Re-enable lock key modifiers once there is support on Flutter
137+
// Framework. https://github.com/flutter/flutter/issues/46718
148138
return metaState;
149139
}
150140

0 commit comments

Comments
 (0)