Yesterday's Office Hours: Keyboard Shortcuts

Each office hours time surprises me. Whether it is the conversation others bring or a spark of something I was working on beforehand, our discussion is incredibly useful and productive (eventually).

During the time we explore something and hopefully learn something. I enjoy it when other share their successes, and I enjoy bringing something to the table to explore together.

Yesterday’s office hours was no exception. I’ve been exploring adding keyboard shortcuts to widgets I develop in the web viewer. So I brought that to the small group. We looked at:

  1. The addListener() method and its various possibilities inside JS.

  2. The Event object that is sent to the method when a key is pressed.

  3. How to handle web viewer keyboard shortcut usage inside a FileMaker context.

Along the way we played with the JS by seeing what happens when we press keys.

Here’s an example. when i press the key ‘l’ I see the following.

Finally at the end we asked Github Copilot to create a nice app that shows keyboard shortcuts in action. This is what it produced.

Finally, we asked the AI to help us learn something, and it produced a mini-course with concepts and practice exercises.

I guess the moral of this post is that we can learn something every week about using JS in FM. Every week humans get together with their fallible minds and explore something together. #Office Hours is the best part of my week.

I encourage you to attend office hours and be part of the learning. Even if you don’t use JS every day, there’s enough here for you to learn and come back to later.


To that last point, I’m making materials available.

  1. I’ll post the video of this section of Office Hours on the YouTube channel.

  2. For those that attended I’ll give this repo to them so they can take it and expand off it.

  3. If you couldn’t attend but would like the repository, reach out. I’ll make it available for a small fee.

I hope to see you at Office Hours. We are a great community made up of members that help push each other forward in their skill set.