Skip to content

About

Keyboard OSD is a lightweight Windows utility that displays keyboard input and shortcut combinations on screen in real time.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keyboard OSD

AutoHotkey Platform License Version

GitHub stars GitHub forks GitHub issues Downloads

Keyboard OSD is a lightweight Windows utility that shows keyboard input and shortcut combinations on screen in real time. It's made for presentations, tutorials, screen recordings, and live demos where visible keystrokes help the viewer follow along.

Keyboard OSD demo

Keyboard OSD demo video: https://youtu.be/UvLldgMmC-Q

Features

  • Shows your typed text and shortcut combinations on screen in real time.
  • Shortcuts and modifier keys (like Ctrl+C or Shift) show up as badges, clearly separated from regular typed text.
  • Repeated key presses are grouped with a counter instead of piling up on screen.
  • Multiple shortcuts pressed back to back can combine into a single row (e.g. Ctrl then PgDn), instead of each one taking its own line.
  • Keeps a short history of recent keys, with each line fading out on its own timer.
  • Optional word wrap for longer typed text, and natural backspace handling while typing.
  • Pressing Enter while typing sends the line to history right away, instead of waiting for it to time out.
  • Works with common modifiers: Ctrl, Shift, Alt, Win, and AltGr.
  • Click-through overlay - it never gets in the way of the window you're working in.
  • Automatically follows the active window to the correct monitor.
  • Fully customizable from a settings window: colors, fonts, size, transparency, position, margins, padding, and timing, all with a live preview.
  • Smooth fade-out animations and rounded corners on every row.
  • History lines use the same font as the active line, at their own size, with their own colors and transparency.
  • Pause and resume anytime with a hotkey you set yourself, or from the tray menu.
  • Filter unwanted key categories or individual key combinations from the OSD.
  • Configure the pause and hide-OSD hotkeys from the settings window, with quick capture and a clear button.
  • Rename special keys and modifiers with custom labels, including when a renamed key is pressed with modifiers.
  • Save your settings as a named profile and load a different one later, or reset everything back to defaults.
  • Can be hidden by another script or application, without simulating a keypress, handy for screen recording setups.
  • Compiled version is a single portable .exe, no separate icon files or installation needed.

Requirements

  • Windows
  • For the compiled release: no AutoHotkey installation is required.
  • For running from source: AutoHotkey v2 is required.

Files

File Description
keyboard-osd.ahk Main script - handles the tray menu and displays your keystrokes on screen
render.ahk Drawing code: turns each row into an image and puts it on screen
keyfilter.ahk Decides which key presses count as typing and which ones get filtered out
gdip.ahk Small drawing helper library used by render.ahk
settings-gui.ahk The settings window, with live preview
commonDialog.ahk Windows font and color picker windows
GroupBox.ahk Group box control used by the settings window
hotkeyplus.ahk Hotkey capture control used on the Hotkeys and Filters settings pages
settings.ini Your saved settings (created automatically the first time you save)
app_icon.ico Tray icon shown while the OSD is active (source version only)
app_icon_pause.ico Tray icon shown while the OSD is paused (source version only)

Usage

Download the compiled version

  1. Open the Releases page.
  2. Download the latest .exe file.
  3. Run the executable.
  4. Press keys or shortcuts to see them on screen.

Note: The compiled executable has all required icons built in. You can move it anywhere without worrying about missing icon files.

Run from source

  1. Install AutoHotkey v2.
  2. Download or clone this repository.
  3. Run keyboard-osd.ahk.
  4. Press keys or shortcuts to see them on screen.

The application runs in the system tray. Right-click the tray icon to open:

  • About - show application and author information
  • GitHub Repository - open the project page
  • Settings - edit the OSD appearance and behavior
  • Reload - reload the script
  • Pause OSD - pause or resume the OSD
  • Hide OSD - hide all visible OSD rows
  • Exit - close the application

Double-clicking the tray icon opens Settings directly.

You can also toggle pause or hide the OSD with the hotkeys you set on the Hotkeys settings page.

Settings

All options can be changed from the settings window, organized into categories in the sidebar. Changes are saved to settings.ini and applied after you restart the script.

Layout

  • Auto width or fixed maximum width
  • Word wrap for typed text
  • Maximum visible lines
  • Line gap between rows
  • OSD position: TopLeft, TopCenter, TopRight, BottomLeft, BottomCenter, BottomRight, Center
  • Margin X / Margin Y from the screen edge

Appearance

  • Text and background colors (Windows color picker)
  • Background transparency (alpha)
  • Font family, bold, italic (Windows font picker), with a separate font size box
  • Horizontal and vertical padding

History

  • History line font size (uses the same font family and weight as Appearance), with the same size box as the other pages
  • History text and background colors
  • History background transparency

Special

Controls the appearance of shortcut and modifier key badges (e.g. Ctrl+C, Shift, Escape, Tab):

  • Font family, bold, italic (Windows font picker), with a separate font size box
  • Border color, fill color, text color
  • Badge transparency (alpha)
  • Border width
  • Text padding inside the badge
  • Text Y nudge (fine-tune vertical text position)
  • Combine multiple shortcuts pressed in a row into one badge group, with adjustable gap between them

Key Names

  • Give a special key or modifier a custom display label (for example, show Escape as Esc or Ctrl as Control).
  • A key's custom label also appears when that key is pressed with modifiers, such as Ctrl+Esc.
  • Enable or disable custom labels, and add, remove, or clear labels from the list.
  • Labels can be assigned to one special key or one modifier at a time. Typing keys and key combinations cannot be renamed.
  • Key Names settings are saved with the rest of your settings and included in profiles.

Timing

  • Display duration (ms) - how long the active line stays on screen
  • Dismiss delay (ms) - how long each history line stays before fading out
  • Modifier delay (ms) - how long to wait before showing a lone modifier key press

Filters

  • Function keys (F1-F24), Numpad, English letters, digits, arrow keys, and navigation keys
  • Other letters, by entering the characters to exclude
  • Modifiers alone or as part of a combination
  • Custom key combinations, managed with an add/remove list

Hotkeys

  • Set the hotkey for pausing or resuming the OSD
  • Set the hotkey for hiding all visible OSD rows
  • Click into the box and press a key combination to capture it directly - only keyboard keys are accepted, mouse buttons are not
  • Clear a hotkey to disable it - it stays disabled after saving, instead of falling back to its old value

Profiles

  • Save your current settings as a named profile file
  • Load a previously saved profile back into the form
  • Reset the form to the built-in defaults

None of these apply until you click OK, so you can try a profile or reset the form and back out without losing your current setup.

Hiding the OSD from another application

If you record your screen with a separate tool, you may want that tool to hide the OSD on its own, for example right before it starts or stops recording, without sending a fake keypress to your system.

Keyboard OSD listens for a Windows message for this. Any other script or application can send message 0x5555 to the Keyboard OSD window to hide all visible rows instantly:

PostMessage(0x5555, 0, 0, , "Keyboard OSD")

This hides the OSD directly at the window level, so it works even while the OSD window is click-through and out of focus.

Notes

  • Running from source requires AutoHotkey v2; it will not work with the older AutoHotkey v1.
  • The OSD automatically appears on whichever monitor your active window is on, and stays clear of the taskbar.
  • Row height adjusts automatically to your chosen font, so text is never cropped or oddly spaced.
  • Saving settings asks if you want to restart right away. If you choose not to, Keyboard OSD reminds you the next time you open Settings, so your saved changes are never silently left unapplied.
  • Some very old or bitmap-style fonts (for example Fixedsys) cannot be drawn by this app. Settings will warn you if the font you picked can't be used.
  • Keystroke display may vary slightly depending on your active keyboard layout.
  • The compiled .exe has all icons built in, so it works standalone. When running from source, keep app_icon.ico and app_icon_pause.ico in the same folder as the script.

Known Issues

  • Very brief key presses can be missed. Keyboard OSD checks key state every 16 ms, so a press and release that happen between checks may not be detected, especially when the same key is pressed rapidly several times.
  • Some AltGr combinations may be displayed unexpectedly. Windows reports AltGr as left Ctrl plus right Alt, which can be indistinguishable from pressing Ctrl and Alt separately. In some cases, combinations such as AltGr with Win may appear as typed text instead of a shortcut badge.
  • Some custom label characters may appear as empty boxes. The selected font may not contain a glyph for every Unicode character. Choose a font that supports the character; common arrows such as → and ← work with Segoe UI.
  • Row spacing can vary with font and padding settings. A small active badge may leave extra space before the history rows, and text and badge history rows can have different heights.
  • When running from source, some windows may show the default AutoHotkey icon. The compiled executable is not affected.

History

Version 1.9 (2026-09-29)

  • Added Key Names, letting you assign custom display labels to special keys and modifiers. A renamed key keeps its label in shortcuts, and the settings are saved in profiles.
  • Added a font size box next to the font picker on the Appearance and Special pages, so you no longer need to open the Windows font dialog just to change the size. The History page now uses the same box.
  • Double-clicking the tray icon now opens Settings directly.
  • Clearing a hotkey and saving now actually disables it, instead of quietly bringing back the old value.
  • Shortcut and modifier badges now keep their own size and padding instead of stretching to match the active text line, so small badge settings no longer get inflated to the plain-text row height.

Fixes:

  • Fixed AltGr combinations dropping Shift or Win from the badge - AltGr+Shift+key and AltGr+Win+key now show the full combination.
  • Fixed history badges sometimes appearing larger than the active badge when History and Special used very different font sizes.
  • Fixed the active row occasionally jumping upward after pressing Enter and then holding a modifier key.
  • Fixed a small gap on the right side of typed text that didn't match the gap on the left.
  • Fixed the OSD appearing in the wrong spot on setups where a second monitor sits to the left of or above the main one.

Version 1.8 (2026-09-13)

  • Rows are now drawn as images instead of native text controls, removing the small flicker that could happen while typing quickly.
  • Multiple shortcuts pressed one after another can combine into a single badge row (e.g. Ctrl then PgDn shown together), with an option to turn this off and a gap size you can adjust.
  • Pressing Enter while typing now sends the line to history immediately, instead of waiting for the display timer to run out.
  • Added Save Profile and Load Profile to the settings window, so you can keep more than one setup and switch between them.
  • Added Reset to Defaults, which resets the settings form without touching your saved file until you click OK.
  • Saving settings now asks whether to restart immediately or later; if you pick later, Keyboard OSD reminds you the next time Settings is opened.
  • History lines now always follow the Appearance font family and weight, only the size is set separately. This removes a font mismatch that could happen when only one of the two was changed.
  • Removed the rounded-corners on/off setting - every row now always has rounded corners.
  • Removed the Text Y Nudge option from Appearance and History; padding alone now positions the text correctly. It's still available under Special for fine-tuning shortcut badges.
  • Default pause and hide hotkeys changed to Ctrl+Shift+F12 and Ctrl+Shift+F9.
  • Settings window warns you up front if a chosen font can't be drawn, instead of showing blank text later.

Fixes:

  • Fixed a saved setting occasionally resetting the OSD position back to its default after reopening the app.
  • Fixed a modifier key badge (e.g. Ctrl) sometimes staying on screen longer than it should when typing started right after it.

Version 1.7 (2026-09-04)

  • Hotkeys and custom key combinations are now captured with a dedicated control instead of the built-in Windows hotkey box, with a clearer display and a button to clear the current value.
  • Only keyboard keys can be assigned as hotkeys or exclusion combinations - mouse buttons are no longer accepted, to keep behavior focused on keyboard input.

Version 1.6 (2026-08-26)

  • Added a Filters settings page for excluding key categories, individual characters, modifiers, and custom key combinations.
  • Added a Hotkeys settings page for configuring the pause/resume and hide-OSD shortcuts.
  • Added a Hide OSD tray command and hotkey to instantly hide all visible rows.
  • Added an option to keep shortcut and modifier badge styling when lines move into history.
  • Settings window navigation redesigned: a category list on the left replaces the old tabs.

Fixes:

  • Fixed occasional flickering while typing.

Version 1.5 (2026-07-15)

  • The Windows (Win) key can now be shown on its own as a badge, just like Ctrl, Shift, and Alt.
  • Improved AltGr and Shift handling: when a key combination produces a character, that character now appears in the typed text as expected. When it doesn't produce a character, the badge shows the key combination itself (e.g. AltGr + K).
  • Holding down multiple modifier keys in sequence now updates the badge smoothly to show the full combination, instead of showing a separate badge for each stage.

Fixes:

  • A lone modifier badge (e.g. just Shift) no longer lingers on screen after you start typing.

Version 1.4 (2026-07-11)

  • Shortcut and modifier key presses now appear as styled badges with a rounded border, fill color, and their own transparency, making them instantly stand out from regular typed text.
  • Added a new Special tab in the settings window to customize badge colors, border, padding, and text position, with a live preview.
  • Smoother performance when pressing shortcuts frequently.

Version 1.3 (2026-07-02)

  • Active line and history lines now disappear independently, each on its own timer, for more natural timing.
  • Row fade-outs are smoother and no longer interrupt typing while they play.
  • Typed text is now automatically finalized after a short pause, instead of waiting indefinitely.
  • Row height is now calculated automatically from your chosen font, so text always fits cleanly.
  • Added a pause/resume keyboard shortcut: Ctrl+Shift+F8.
  • Settings window redesigned with a cleaner tabbed layout.
  • Added fine-grained padding controls for each row (left/right, top, bottom).

Fixes:

  • Fade animations no longer cause typing to lag or stutter.

Version 1.2 (2026-06-28)

  • OSD windows now fade out smoothly when dismissed instead of disappearing instantly.

Version 1.1 (2026-06-26)

  • Icons are now embedded directly into the compiled executable.
  • Improved portability - the .exe file now works standalone without requiring external icon files.

Fixes:

  • Fixed tray icon not displaying correctly in compiled executable.
  • Fixed pause icon switching when script is paused.

Version 1.0 (2026-06-24)

  • Initial release.
  • Real-time keyboard input display.
  • Support for shortcuts and modifier keys.
  • Customizable appearance and behavior.
  • Settings window with live preview.

License

This project is licensed under the GPL 3.0 License. For more information, see the LICENSE file.

Contributing

Contributions are welcome! If you'd like to add features, fix bugs, or improve the code, feel free to open a pull request.

Credits

Keyboard OSD builds on a few other open-source projects:

  • CommonDialog by Mesut Akcan - wraps the Windows font and color picker dialogs used in the settings window.
  • GroupBox by Mesut Akcan - the container control used to group settings on each page.
  • HotkeyPlus by Mesut Akcan - the hotkey capture control used on the Hotkeys and Filters pages.
  • AHKv2-Gdip by buliasz - gdip.ahk is a trimmed-down copy of this library, keeping only the drawing functions Keyboard OSD needs.

Contact

Author: Mesut Akcan
Email: makcan@gmail.com
Blog: mesutakcan.blogspot.com
YouTube: youtube.com/mesutakcan
GitHub: mesutakcan

About

Keyboard OSD is a lightweight Windows utility that displays keyboard input and shortcut combinations on screen in real time.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages