Follow-up to my comment above: a workaround tested on a device
Short version: the real fix belongs in Flutter, not Fluxer (flutter/flutter#185849, a regression in Flutter's Android key handling since 3.47). Fluxer can't fix the root cause in the app itself. The bug clears up once Flutter ships a fix and Fluxer moves to that release. Until then, the stopgap below restores Gboard selection in Fluxer, if you want to ship something in the meantime.
Correction to my earlier suggestion
In my last comment I suggested extending ImeEditingShortcutBridge.kt. I built and tested that on a device, and it doesn't work. With the keyboard open, Gboard's arrows reach Flutter through the IME's input connection (InputConnectionAdaptor.sendKeyEvent → KeyboardManager) and never go through Activity.dispatchKeyEvent, where the bridge sits.
Stopgap that works
Wrap ServicesBinding.instance.keyEventManager.keyMessageHandler. Flutter drops Shift before building the KeyEvent, but the raw Android event (RawKeyEventDataAndroid) still has it in metaState, with deviceId == -1.
For Shift+DPAD ←→↑↓ from the virtual keyboard, with no Ctrl/Alt/Meta, run ExtendSelectionByCharacterIntent / ExtendSelectionVerticallyToAdjacentLineIntent (collapseSelection: false) on the focused field and mark the event handled. This reuses the existing TextEditingShortcutKind / performTextEditingShortcut plumbing.
Steps aside by itself: it only acts while HardwareKeyboard.instance.isShiftPressed is false. Once Flutter fixes #185849 and the framework sees Shift again, events fall through to Flutter's default text editing shortcuts, so the workaround can simply be deleted later. Physical keyboards are never affected.
Caveat: it relies on the deprecated raw key API. That's the only place the Shift flag is still visible on the Dart side, which is another reason it should be temporary.
Testing (same device and keyboard as above; self-built from canary 022f1249, build 3021, Flutter 3.47.9)
Unit + widget tests: the mapping, extending a real TextField from a raw Shift+Left message, and stepping aside when Shift is already pressed. They pass alongside the existing text-input tests, and the analyzer and formatter are clean.
On the phone:
Gboard selection-mode ← / → select and shrink the selection one character at a time, in the composer and in channel search.
adb Shift+Left ×4 selects test.
Plain arrows, |←, Select all, and Gboard's change-case (⇧ on a selection) behave as before.
The patch is about 280 lines, mostly tests: one new file (virtual_keyboard_shift_arrows.dart) plus small changes to text_editing_shortcuts.dart, fluxer_clipboard_scope.dart and main.dart. Happy to share it or open a PR. Either way, a or a "Fluxer is affected" comment on the Flutter issue would help get the real fix prioritized.
Thread
Comment by Charles W (K5CDW)
Follow-up to my comment above: a workaround tested on a device
Short version: the real fix belongs in Flutter, not Fluxer (flutter/flutter#185849, a regression in Flutter's Android key handling since 3.47). Fluxer can't fix the root cause in the app itself. The bug clears up once Flutter ships a fix and Fluxer moves to that release. Until then, the stopgap below restores Gboard selection in Fluxer, if you want to ship something in the meantime. Correction to my earlier suggestion In my last comment I suggested extendingImeEditingShortcutBridge.kt. I built and tested that on a device, and it doesn't work. With the keyboard open, Gboard's arrows reach Flutter through the IME's input connection (InputConnectionAdaptor.sendKeyEvent→KeyboardManager) and never go throughActivity.dispatchKeyEvent, where the bridge sits. Stopgap that works- Wrap
- For Shift+DPAD ←→↑↓ from the virtual keyboard, with no Ctrl/Alt/Meta, run
- Steps aside by itself: it only acts while
- Caveat: it relies on the deprecated raw key API. That's the only place the Shift flag is still visible on the Dart side, which is another reason it should be temporary.
Testing (same device and keyboard as above; self-built fromServicesBinding.instance.keyEventManager.keyMessageHandler. Flutter drops Shift before building theKeyEvent, but the raw Android event (RawKeyEventDataAndroid) still has it inmetaState, withdeviceId == -1.ExtendSelectionByCharacterIntent/ExtendSelectionVerticallyToAdjacentLineIntent(collapseSelection: false) on the focused field and mark the event handled. This reuses the existingTextEditingShortcutKind/performTextEditingShortcutplumbing.HardwareKeyboard.instance.isShiftPressedis false. Once Flutter fixes #185849 and the framework sees Shift again, events fall through to Flutter's default text editing shortcuts, so the workaround can simply be deleted later. Physical keyboards are never affected.canary022f1249, build 3021, Flutter 3.47.9)- Unit + widget tests: the mapping, extending a real
- On the phone:
- Gboard selection-mode ← / → select and shrink the selection one character at a time, in the composer and in channel search.
- adb Shift+Left ×4 selects
- Plain arrows, |←, Select all, and Gboard's change-case (⇧ on a selection) behave as before.
The patch is about 280 lines, mostly tests: one new file (TextFieldfrom a raw Shift+Left message, and stepping aside when Shift is already pressed. They pass alongside the existing text-input tests, and the analyzer and formatter are clean.test.virtual_keyboard_shift_arrows.dart) plus small changes totext_editing_shortcuts.dart,fluxer_clipboard_scope.dartandmain.dart. Happy to share it or open a PR. Either way, a