Skip to content

Commit 67dca52

Browse files
committed
修复添加描述导致的按键捕获失效
1 parent e833c50 commit 67dca52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/pages/settings/keyboard_settings.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ class _KeyboardSettingsPageState extends State<KeyboardSettingsPage> {
113113
child: Focus(
114114
focusNode: focusNode,
115115
autofocus: true,
116+
canRequestFocus: true,
117+
skipTraversal: true,
118+
descendantsAreFocusable: true,
116119
onKeyEvent: (node, event) {
117120
if (event is! KeyDownEvent) return KeyEventResult.ignored;
118121
if (listeningFunction == null) return KeyEventResult.ignored;
@@ -151,7 +154,6 @@ class _KeyboardSettingsPageState extends State<KeyboardSettingsPage> {
151154
const SizedBox(height: 8),
152155
Wrap(
153156
spacing: 8,
154-
runSpacing: 8,
155157
children: [
156158
for (int i = 0; i < keys.length; i++)
157159
GestureDetector(

0 commit comments

Comments
 (0)