# Show keystrokes on a website with the \<show-keystrokes\> custom element

DevFeed: [Show keystrokes on a website with the \<show-keystrokes\> custom element](<https://devfeed.tech/articles/show-keystrokes-on-a-website-with-the-show-keystrokes-custom-element-58540.md>)

Original publisher: [Read original article](<https://www.bram.us/2026/09/23/show-keystrokes/>)

Author: Bramus!

Published: 2026-09-23T08:32:27Z

Content type: tutorial

Language: en

Sources: [Bram.us](<https://devfeed.tech/sources/bram-us.md>)

Topics: [Web](<https://devfeed.tech/topics/web.md>), [Website](<https://devfeed.tech/topics/website.md>), [web-standards](<https://devfeed.tech/topics/web-standards.md>), [keyboard](<https://devfeed.tech/topics/keyboard.md>), [CSS](<https://devfeed.tech/topics/css.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [css](<https://devfeed.tech/tags/css.md>), [custom-elements](<https://devfeed.tech/tags/custom-elements.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [keypress](<https://devfeed.tech/tags/keypress.md>), [macos](<https://devfeed.tech/tags/macos.md>), [original-content](<https://devfeed.tech/tags/original-content.md>), [recording](<https://devfeed.tech/tags/recording.md>), [screen-sharing](<https://devfeed.tech/tags/screen-sharing.md>), [shortcuts](<https://devfeed.tech/tags/shortcuts.md>), [website](<https://devfeed.tech/tags/website.md>)

## AI overview

This tutorial presents a web-native custom element for displaying keyboard shortcuts and keystrokes during screen recordings, live demos, and window or tab screen sharing. It explains npm or CDN embedding, platform-aware labels, themes, styling, positioning, and the use of the Popover API and CSS Anchor Positioning.

## Source excerpt

When recording screen casts or doing live demos, I typically rely on a native macOS app to visualize my keystrokes on screen. Recently, however, that app got blocked on my work machine by a corporate security policy. Additionally, the keystrokes visualized through that app don't show up when screen sharing a specific window or tab. Because I needed to demo a website that relies heavily on keyboard navigation -- and thus really needed those keystrokes to be visible to the audience -- I found myself in a bit of a pickle. So with the help of Gemini, I decided to build a web-native solution to fill that gap: <show-keystrokes>