Implementing Shortcut Keys For Anvil App

What I’m trying to do:
I want to implement shortcut keys for my app. can anyone tell me how can I do that.

What I’ve tried and what’s not working:
In WinForms its a straight forward process. But literally no idea how can I do that in Anvil.

Hi @ehsensiraj

You can use Anvil extras to listen for key down events and then pass the captured events to wherever you need them.

This will only work on your main form. If you need the keypresses on other forms, you may want to have a look at the messaging module of the same library.

3 Likes

@ehsensiraj I see you ‘liked’ my reply. Did that solve the problem for you?

@owen.campbell I havent tested it yet. But its pretty much the thing I was looking for.

1 Like