Skip to content

Navigation Using Arrows Keys #280

Answered by mikke89
hero-clashes asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.

You just need to script this behavior as you see fit.

  • First you need some way to track the state of the currently selected item. For example, you can use a custom class name, or perhaps focus the active element using element->Focus().
  • Then when you register an arrow down click, you need to find the next element. If they are always ordered next to each other in RML, then it is simply focused_element->GetNextSibling()->Focus(). Of course you also need end of list and error handling.
  • You can do this entirely on the client side, or you can setup event listeners such as to keydown events and act when that is triggered. See the event documentation for more details.
  • As an extension to the a…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@hero-clashes
Comment options

@mikke89
Comment options

@hero-clashes
Comment options

@hero-clashes
Comment options

@mikke89
Comment options

Answer selected by hero-clashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #278 on February 06, 2022 10:06.