#973 – Keyboard Shortcuts for a ListBox

You can use any of the following keyboard shortcuts when interacting with a ListBox at run-time (this assumes that the ListBox has keyboard focus):

  • Up/Down arrow keys – move to previous /next item
  • Page Up / Page Down – move to item on previous / next page (based on size of ListBox)
  • Home / End – move to first / last item in last
  • Enter single character – move to next item that begins with that character
  • Enter sequence of characters – move to next item that begins with that sequence
  • If the SelectionMode is Single or Extended
    • Moving to another item selects it (and unselects previous)
    • Spacebar – select the current item (if not already selected)
    • Ctrl + Spacebar – unselect the current item
  • If the SelectionMode is Multiple
    • Moving to another item does not select it
    • Spacebar toggles current item as selected/unselected
  • If the SelectionMode is Extended
    • Holding down the Shift key while moving to another item adds to selection