Skip to content

Repository files navigation

KeysCheck

KeysCheck is a CardputerZero utility that shows every key currently held down, using labels a person can read such as A, SHIFT, SPACE, FN, and SYM.

It is intentionally a viewer. The input layer keeps Linux's raw EV_KEY.code values; only the screen translates each code into a label. KeysCheck does not turn key combinations into characters, shortcuts, or Fn/Sym layer results.

Behavior and privacy

  • EV_KEY.value=1 presses a code and value=0 releases it.
  • Repeat events (value=2) do not change the pressed-key set.
  • Keys that were already held when the app starts are included.
  • After Linux reports dropped events, the complete pressed-key state is read again.
  • Multiple input sources are tracked independently, so releasing one does not clear a matching key still held on another.
  • KeysCheck has no network feature, analytics, account, or persistent key log. State exists only in memory while the app runs.

On CardputerZero, automatic discovery accepts the confirmed built-in keyboard device named tca8418c. This excludes HDMI and infrared input devices that also advertise keyboard keys. A specific device may be selected at configure time with -DAPP_KEY_INPUT_DEVICE=/dev/input/eventN.

The label table is CardputerZero-specific. Unknown Linux key codes remain visible as KEY N instead of being discarded.

Font

No font file is stored in this repository or package. KeysCheck loads JetBrains Mono Regular from the operating system with FreeType. CardputerZero uses:

/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMono-Regular.ttf

The Debian package depends on fonts-jetbrains-mono. For development, set KEYSCHECK_FONT_FILE=/absolute/path/JetBrainsMono-Regular.ttf at runtime or -DAPP_SYSTEM_FONT_FILE=... at configure time. If the font is absent, the app logs a warning and uses LVGL's built-in fallback.

Desktop build

Requirements are CMake 3.25 or newer, Ninja, a C++17 compiler, SDL2, libpng, FreeType, and zlib. A first configure also needs internet access to fetch the pinned LVGL and fmt sources.

On macOS with Apple Silicon:

brew install cmake ninja sdl2 libpng freetype
cmake --preset darwin-arm64
cmake --build --preset darwin-arm64-dbg
./build/darwin-arm64/Debug/keyscheck

On Ubuntu or Debian:

sudo apt install cmake ninja-build g++ libsdl2-dev libpng-dev libfreetype6-dev zlib1g-dev
cmake --preset linux-x86-64
cmake --build --preset linux-x86-64-dbg
./build/linux-x86-64/Debug/keyscheck

The desktop simulator accepts the computer keyboard and mouse clicks on its CardputerZero keypad. Losing window focus releases simulator-held state to prevent stuck keys.

Tests

After configuring a desktop preset:

ctest --test-dir build/darwin-arm64 -C Debug --output-on-failure

Replace the build directory with build/linux-x86-64 on Linux.

CardputerZero package

The cross build requires CMake 3.25 or newer, Ninja, and an AArch64 GNU cross compiler (aarch64-linux-gnu-gcc and aarch64-linux-gnu-g++). Run:

cmake --workflow --preset cp0-cross-package

The first build downloads the CardputerZero BSP v0.0.4 and verifies its SHA-256 before extraction. LVGL and fmt are fetched at pinned commits. The resulting package is written to dist/.

Install over an existing ADB connection:

adb push dist/KeysCheck_0.2.0_harrison1_arm64.deb /tmp/KeysCheck.deb
adb shell sudo dpkg -i /tmp/KeysCheck.deb

Uninstall with:

adb shell sudo apt remove keyscheck

Installing or removing a Debian package requires administrative package-manager permission, but the installed application itself runs as the normal APPLaunch user. It installs no root systemd service. That user must have read access to the selected /dev/input/event* node and access to the framebuffer (or configured DRM device).

Project layout

  • src/platform/: raw input state and Linux evdev adapter
  • src/view/: human-readable labels and the 320×170 screen
  • src/app/: application lifecycle, font discovery, and desktop simulator
  • tests/: input-state and label tests
  • cmake/: CardputerZero toolchain and Debian packaging
  • assets/images/: desktop shell artwork and the single 256×256 launcher icon

Open-source information

KeysCheck is licensed under the MIT License. It was derived from the CardputerZero Template at commit d28fb262685a, whose notice is preserved. LVGL and {fmt} are pinned build dependencies. JetBrains Mono is a system dependency and is not redistributed. See third-party notices for details.

Contributions are welcome under the contribution guide. Report security issues using the private process in the security policy. Release changes are recorded in the changelog.

About

Raw pressed-key viewer for CardputerZero

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages