~/talk

Understanding keyboard shortcuts in Jetpack Compose

Talkat droidcon London 2025 · 2025-10-30..10-31· [android]
slides:none on file

A sample app called keyboard shortcut demo demonstrates cross‑platform shortcut support by mapping a platform‑agnostic KeyboardShortcut class to Android’s onProvideKeyboardShortcuts / onKeyShortcut, iOS UIKeyCommand, and a desktop menu bar. The class uses a conflated channel and flow to publish presses to Composables; dropdown items render key labels via a custom renderer. Access keys underline one character with a regex and intercepts use onPreviewKeyEvent; iOS needs extra filtering (Alt+D inserts characters) and Android requires a Gboard workaround for dictation. The implementation compiles and runs across Android, iPad, and desktop with noted platform quirks.

AI-written summary · about

  1. 0:00Keyboard shortcuts in Jetpack Compose
  2. 5:07Defining shortcuts and access keys
  3. 9:00Global shortcuts in Compose
  4. 16:33Shortcuts with flows and UI updates
  5. 21:51Shortcuts on iOS and desktop
  6. 27:06Access keys in Jetpack Compose
  7. 31:05Key event handling with onPreviewKeyEvent
  8. 36:25Detecting physical keyboards
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.