Display Keystrokes And Mouse Clicks In Screencasts Using KmCaster

KmCaster

KmCaster is a Java tool for showing the keyboard and mouse events on the screen, useful for teaching / screencasts.

Using it, every keystroke and mouse click is shown on the screen, so you don't have to mention what you're typing when creating a screencast or when teaching students.

For now, the application only works on X11. Getting it to work on Wayland depends on the JNativeKeyHook library, which is used by KmCaster, getting Wayland support. You can track this here. If you're looking for an application that shows your keystrokes on the screen which works with Wayland, check out Show Me The Key.

KmCaster comes with a user interface similar to Key-mon, which hasn't been updated since 2015. The GUI doesn't have any options - you just run KmCaster, and you can start using it to show what keyboard keys and mouse buttons you're pressing. There are various command line options available though (details further down this article).

There are also plans to add a configuration file, from where you'll be able to specify the font face and color, on-screen location, and more.

KmCaster features:

  • custom display size
  • easily positioned - drag any part of the window to reposition it
  • show single events
  • show all mouse clicks
  • show scrolling
  • accurate modifier key states
  • works with emulation software

From the command line you can set the following options:

  • Regular key release delay (-a, --delay-alphanum=ms)
  • Mouse button release delay (-b, --delay-button=ms)
  • Count repeated key presses (-c, --key-counter=number)
  • Application height (-d, --dimension=pixels)
  • Modifier key release delay (-m, --delay-modifier=ms)
  • Mouse scroll release delay (-s, --delay-scroll=ms)

It's also important to note that KmCaster requires Java 14 or newer.

This is a short demo video of KmCaster running on my Ubuntu 21.04 desktop:


Related: Display Pressed Keys In Screencasts With Screenkey (Now With Python 3 And GTK 3 Support)


Download KmCaster



KmCaster requires Java 14 (OpenJDK, etc.) or newer, so make sure you have it installed before trying to run KmCaster. Java is not required if you install KmCaster from Flathub.

From the application's releases page you can download the binary kmcaster.jar file. If you make it executable and have OpenJDK installed, you can double-click the .jar file to launch it. Or you can run it from the command line (which allows specifying various options, as stated above; run this command in the folder where the kmcaster.jar file is located):

java -jar kmcaster.jar

To show all the available options, use:

java -jar kmcaster.jar -h

KmCaster can also be installed from Flathub:

flatpak install flathub com.whitemagicsoftware.kmcaster

When installed from Flathub, see all the available command line options using:

flatpak run com.whitemagicsoftware.kmcaster -h

You might also like: 5 Tools To Record Your Linux Desktop (Screencast) In 2021