jorgebucaran/hyperapp

How to deal with global event?

ndaidong opened this issue · 3 comments

Hi there,

I want to change app state once user presses ESC key. How to call action on that?
I can not find any tutorial relating to this popular use case.

Thanks,

In the subscription documentation there is a global event listener (window) that deals with listening to key presses: https://github.com/jorgebucaran/hyperapp/blob/main/docs/reference.md#subscriptions

@selfup ah thank you, that's my mistake. I need to reload the document system here.

All good!