luke-chang / js-spatial-navigation

A javascript-based implementation of Spatial Navigation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repeated navigation

acontreras89 opened this issue · comments

Feature request

When sn:willmove events are originated by key presses (i.e e.detail.cause === 'keydown'), it would be nice to know what value the original event's repeat flag had.

var willmoveProperties = {
  direction: direction,
  sectionId: currentSectionId,
  cause: 'keydown',
  repeat: evt.repeat // this is everything we need to add
};

I would love to have this information available on all events, but this is the simplest one to implement. Also, whether or not this makes sense for focus-related events might need some discussion, while here fits pretty nicely.

I can prepare a PR if needed.