Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/kmcaster.git
# Introduction

Java-based on-screen display (OSD) for keyboard and mouse events.

This program displays keyboard and mouse events for the purpose of screencasting. While such software already exists, none meet all the following criteria:

* custom display size;
* easily positioned;
* show single events;
* show all mouse clicks;
* show scrolling;
* configurable translucent background colour;
* configurable gaps between keys;
* accurate modifier key states; and
* works with emulation software (e.g., [Sikuli](http://sikulix.com/)).

## Alternatives

* [QKeysOnScreen](https://github.com/ctrlcctrlv/QKeysOnScreen)
* [screenkey](https://www.thregr.org/~wavexx/software/screenkey)

# User interface

See:

* [Video comparison](kmcaster.git/blob/HEAD/images/kmcaster-01.gif) of KmCaster and [key-mon](https://github.com/critiqjo/key-mon)
* [Screenshot](kmcaster.git/blob/HEAD/images/kmcaster-02.png)

# Requirements

[OpenJDK](https://bell-sw.com/pages/downloads/#/java-19-current) version 19.0.1 or newer.

## Linux Java Version

Depending on the Linux distribution, Java 19+ can be installed by issuing one of the following commands in a terminal:

```bash
sudo apt install openjdk-19-jdk
sudo pacman -S jdk-openjdk
```

Switching from earlier versions of Java can be accomplished by issuing one of the following commands in a terminal:

```
sudo update-alternatives --config java
sudo archlinux-java set java-19-openjdk
```

Note: on some Linux operating systems you may need to add a repository.
On Ubuntu 18.04 run the following commands before trying to install Java 19, for example ([source](http://ubuntuhandbook.org/index.php/2020/03/install-oracle-java-14-ubuntu-18-04-20-04/)):

```
sudo add-apt-repository ppa:linuxuprising/java
sudo apt install openjdk-19-jdk
```

# Running

After installing Java, run the program as follows:

``` bash
java -jar kmcaster.jar
```

To see the configuration options, run the program as follows:

``` bash
java -jar kmcaster.jar -h
```

To quit the application:

1. Click the application to give it focus.
1. Press `Alt+F4` to exit.

## Error Messages

Earlier versions of Java will display the following message:

> Error: A JNI error has occurred, please check your installation and try again.