Hi Bjarni, The table chart doesn't support keyboard events currently, but you could attach event handlers to the html elements yourself, and in your handler call table.setSelection(). You should probably attach your handler to the container element that you give to the table chart constructor, rather than to any deeper html that is generated by the table chart.
To find out if a table element has the focus, in your document keydown handler, here is an appropriate stackoverflow page about that: http://stackoverflow.com/questions/497094/how-do-i-find-out-which-dom-element-has-the-focus Given the active element, you can crawl up the dom tree to find out if your table container is one of the ancestors. Hope that helps. It would be nice if we had some built-in support for keyboard events in the table chart. Feel free to make a feature request about that: https://code.google.com/p/google-visualization-api-issues/issues/list On Fri, Mar 20, 2015 at 1:30 PM, Bjarni <[email protected]> wrote: > Hi, I've had problem figuring out if and how I can implement this. To > select the next or previous row in a table using the arrow keys. > Is there a way to capture the keydown event when the focus is on the table > - or during a document keydown capture detect if my table has the focus so > I can react accordingly ? > > Anyone ? > > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
