# .NET MAUI CollectionView Keyboard Support on WinUI

The [Telerik UI for .NET MAUI CollectionView](https://www.telerik.com/maui-ui/documentation/controls/collectionview/overview) provides keyboard navigation support on `WinUI`.

While applying part of the keyboard keys, you can also change the current item behavior of the CollectionView component. For more details, see the article on [setting the .NET MAUI CollectionView Current Item](https://www.telerik.com/maui-ui/documentation/controls/collectionview/current-item)

The following table lists the actions and keyboard combinations that are available in the CollectionView:

| Hotkey          | Action                                                                                                                                                                                                                                              |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tab`           | Enters or exits the CollectionView.                                                                                                                                                                                                                 |
| `Shift` + `Tab` | Enters or exits the CollectionView.                                                                                                                                                                                                                 |
| `Up Arrow`      | Navigates to the previous item in the CollectionView when the orientation of the `ItemsLayout` is `Vertical`.                                                                                                                                       |
| `Down Arrow`    | Navigates to the next item in the CollectionView when the orientation of the `ItemsLayout` is `Vertical`.                                                                                                                                           |
| `Left Arrow`    | Navigates to the previous item in the CollectionView when the orientation of the `ItemsLayout` is `Horizontal`.                                                                                                                                     |
| `Right Arrow`   | Navigates to the next item in the CollectionView when the orientation of the `ItemsLayout` is `Horizontal`.                                                                                                                                         |
| `Space`         | Selects the currently focused item in `Single` `SelectionMode`. When `SelectionMode` is `SingleDeselect`, the `Space` key selects/deselects the current item. When `SelectionMode` is multiple, the `Space` key selects/deselects the current item. |
| `Page Up`       | When all items are in the viewport, the first item becomes current. When not all items are in the viewport, the first rendered item becomes current. Pressing `Page Up` again brings a new portion of items, and the first of them becomes current. |
| `Page down`     | When all items are in the viewport, the last item becomes current. When not all items are in the viewport, the last rendered item becomes current. Pressing `Page Down` again brings a new portion of items, and the last of them becomes current.  |
| `Home`          | The first item in the CollectionView becomes current.                                                                                                                                                                                               |
| `End`           | The last item in the CollectionView becomes current.                                                                                                                                                                                                |

## Notes

Consider the following when using the keyboard navigation support:

* Navigating through groups is not supported.
* When entering the CollectionView with the keyboard, if there is already a `CurrentItem` set, this item becomes focused and is used as a starting point for navigation onwards.
* When entering the CollectionView with the keyboard, if there is no `CurrentItem` set, the first rendered item becomes current. If there are no rendered items, then the first item from the data view becomes current. For example, when all groups in the `viewport` are collapsed, no items are rendered. In this case, when expanding the first group, the `CurrentItem` will become visible.
* When changing the `CurrentItem` to an item that is not in the `viewport`, the CollectionView scrolls to this item. The CollectionView won't scroll to an item if the `CurrentItem` is inside a collapsed group and the item is not visible.

Here is how the keyboard navigation support looks on WinUI:

![Telerik UI for .NET MAUI CollectionView on WinUI showing keyboard navigation focus moving through city items](https://www.telerik.com/maui-ui/documentation/assets/e58cca2cff57587b84a98ad786e53027/collectionview-keyboard-navigation-support.gif)

## Additional Resources

* [.NET MAUI CollectionView Product Page](https://www.telerik.com/maui-ui/collectionview)
* [.NET MAUI CollectionView Forum Page](https://www.telerik.com/forums/maui?tagId=1829)
* [Telerik .NET MAUI Blogs](https://www.telerik.com/blogs/mobile-net-maui)
* [Telerik .NET MAUI Roadmap](https://www.telerik.com/support/whats-new/maui-ui/roadmap)

## See Also

* [Keyboard navigation support on MacCatalyst](https://www.telerik.com/maui-ui/documentation/controls/collectionview/accessibility/keyboard-navigation/maccatalyst)
* [Screen Reader](https://www.telerik.com/maui-ui/documentation/controls/collectionview/accessibility/screen-reader)
