#slint #navigation #spatial #arrow #focus #ui #key

slint-spatial-focus

Adds arrow key navigation to Slint UI

1 release (0 unstable)

1.9.2-1.0.0 Feb 23, 2025

#465 in GUI

Download history 111/week @ 2025-02-19 32/week @ 2025-02-26

143 downloads per month

MIT and GPL-3.0-only…

36KB
292 lines

Arrow Key Navigation For Slint UI

This library adds spatial navigation to Slint applications.

How to use it:

  • Use the SpatialFocusHandler as a root item in your window
  • Export the SpatialFocus global object
  • Call the slint_spatial_focus::init! macro to initialize the library

For details see the example.

Limitations

  • The library depends on the i-slint-core and should be used with the specific Slint version (1.9.2 for now).
  • Focus traversal algorithm searches enabled FocusScope and TextInput objects. So, it misses all native controls.
  • Only float point Coord representation is supported

Dependencies

~12–22MB
~321K SLoC