Keyboard Shortcuts in Power-Ups

Hi all, I am looking for a way to implement a keyboard shortcut into my Power-Up.

I want to be able to invoke some card actions on a specific card, while hovering over it in the list.
(e.g. similar to pressing “C” while hovering over a card, and archiving it)

I have my desired functionality working via a card button, but I cannot achieve the keyboard shortcut.

I did attempt to create event listeners that listen for a key stroke and refer to the data-card-id=“” attribute to pass to the function but ran into problems. So I thought I’d check here for solutions instead of taking such “hacky” approaches.

I wondered if this functionality is exposed in Trello’s Power-Up Client Library?

Many thanks for any suggestions you can offer.

Kind regards,

The powerUp is loaded inside iframe. There is no way to listen keyboard events of main window, you can catch key events only if your iframe is explicity selected by user.