IMDTouchKnowledge BaseShop main store

How-to

Building a complete on-screen keyboard from bitmap HMI assets

HMI and touchscreens Published 6 min read

Short answer

Start from the terminal vendor's most complete keyboard demo, not a blank bitmap: the demo already carries the key-state and editing logic, so you extend its key map, replace the artwork, and adjust its macros to a written character specification. Then verify three things separately: the characters shown, the character each touch delivers, and the value the receiving application accepts.

On this page
  1. Why the host software will not draw the keyboard
  2. Write the character specification first
  3. Trace the chain from touch to accepted value
  4. Inspect the demo before changing anything
  5. Adapt the artwork and the macros as one change set
  6. Size touch regions larger than the drawn glyphs
  7. Prove the keyboard with the acceptance test
  8. Punctuation acceptance beyond the keyboard
  9. Questions asked

A bitmap-only touch terminal cannot display a keyboard control that lives in your PC development software, so a complete keyboard has to be built as panel graphics plus touch logic. The fastest route is the terminal vendor's own most complete keyboard demo: it already implements layout state and text editing, and what it usually lacks is your exact character set, clean artwork, and application-specific macro behavior. This how-to walks the full chain — write a character specification, adapt the demo's bitmaps and macros, then prove every key from the touch to the value the receiving application accepts.

Why the host software will not draw the keyboard #

These terminals render only bitmap images uploaded over a serial link or from an SD card. A keyboard component dropped onto a PC screen never reaches the panel; there is no channel that draws it there. The keyboard therefore has three deliverables that no host control covers: artwork the panel can display, touch regions mapped to actions, and logic that maintains the text being edited.

Changing the host environment is a separate decision. One project drove this class of panel from a Python application on a Linux single-board computer instead of a graphical PC package, and the keyboard still had to be built in full. Pick the host for your communications and application architecture, never as a shortcut around keyboard development — the panel draws only what you upload to it.

Write the character specification first #

"Complete keyboard" is not a specification; the fields the panel edits are. List every character and editing action each field must accept, including punctuation and case, because that list sets the key map, the artwork, and the test load.

Example: a recipe-name field accepts up to 12 characters — letters, digits, period, hyphen, underscore, and space, case-insensitive.

  • Character keys: 26 letters + 10 digits + 4 punctuation and space characters = 40
  • Editing keys: backspace, enter = 2
  • Total keys: 40 + 2 = 42

The test load follows directly: 40 character keys × 2 press positions (center and edge) = 80 presses, plus 2 editing keys × 3 field states (empty, part-filled, at the length limit) = 6 checks, for 86 press tests before acceptance. If the specification later needs a second case, add Shift and the character tests double: 40 × 2 layouts × 2 positions = 160.

Trace the chain from touch to accepted value #

A visible label, the character a touch delivers, and the value the application accepts are three different things. Correct artwork can hide an incorrect mapping; correct mapping can sit under damaged artwork. Know which stage failed before editing anything.

Stage Where it lives Symptom when wrong
Key label uploaded keyboard bitmap missing punctuation, illegible or damaged artwork
Key action touch-region assignment and macro a touch enters the neighboring character or fires the wrong action
Keyboard state macro logic for the active layout displayed layout and generated characters disagree
Edited text input buffer and editing logic characters vanish, deletion misbehaves, stale text remains
Accepted value receiving field and its validation the field shows the text but the application rejects or changes it

During every test, read the text the application actually received — from a host-side record or the application's own diagnostics — because appearance alone cannot identify the failing stage.

Inspect the demo before changing anything #

The vendor's demo library for these panels ships a more complete keyboard demo, named ikb, alongside the letter-only and number-only examples. In reported use it already provides most of the needed functionality, with two recurring shortcomings: visual artifacts in some bitmap images, and macros that need application-specific changes.

  • Get the demo and its documentation through the vendor's official channels, and keep an unchanged working copy.
  • Exercise every key and record three things per key: the displayed label, the character or action delivered, and any visual defect.
  • Classify each fault before fixing it: a visual artifact is a bitmap-asset problem; a wrong character is a macro or touch-region problem. Rewriting macros to compensate for damaged artwork mixes the two classes and makes maintenance harder.
  • Read the demo's macros to learn which ones own character entry, editing, and layout switching; do not guess from the artwork.
  • Read the panel model and software revision from the actual equipment before choosing assets or following transfer instructions, because no one instruction set covers every terminal generation.

Adapt the artwork and the macros as one change set #

Artwork and macros must land together: a new label whose region still fires the old character is worse than either fault alone. Work the change as one set:

  1. Back up the running panel's assets, macros, and host application so today's behavior can be restored.
  2. Build the key map: each displayed key paired with its character or editing action, including state-dependent behavior such as a shifted layout.
  3. Correct the affected bitmap artwork to the image requirements documented for your panel, keeping every label inside its touch cell.
  4. Modify the demo macros to match the key map, keeping character generation separate from application validation.
  5. Transfer the update by the panel's documented serial or SD-card workflow, then confirm the running panel holds the intended revision of both graphics and logic.
  6. Test each changed key immediately, then whole entry sequences through the receiving application.

Size touch regions larger than the drawn glyphs #

A touch controller reports where contact began and where it ended, and a fingertip drifts a few pixels between press and release. A region sized to the glyph drops those presses: on one embedded touch GUI, keys that lit their highlight image but updated nothing were fixed by enlarging the hit area so the contact stayed inside the key until lift. For a bitmap keyboard, extend each key's active region to the full cell boundary and take in the visual gap between keys — that gap is dead space, and a drifting contact lands in it.

Verify with the boundary test: press exactly between two keys and confirm the press belongs to the key you intended. For dimensions and spacing in a dense layout, see how to size HMI touch buttons in a dense button matrix. For presses that land near the frame edge, see why capacitive touch buttons miss presses near screen edges. Give every key a pressed-state bitmap so the operator sees registration before expecting a character; styling a pressed button state on a touch HMI covers building that state.

Prove the keyboard with the acceptance test #

A successful transfer proves only that files reached the panel. Acceptance is the full path from touch to the value the receiving application commits:

  • Enter every character from the specification individually and compare the value the field received against the intended one.
  • Test every boundary between adjacent keys.
  • Exercise each editing key in three field states: empty, part-filled, and at the 12-character limit of the example field, where further character presses must be ignored and backspace must still delete.
  • Run complete entry sequences: a real identifier, an identifier at full length, and an entry cancelled mid-text.

One rule belongs here for safety: when the edited field writes a machine setpoint, the range and format check lives in the controller — the keyboard's character set is an input method, never the limit.

Punctuation acceptance beyond the keyboard #

A key can display a character perfectly while the receiving software treats it specially: a period, hyphen, or space can be a delimiter in a command string or a file-name format. Changing the key label changes nothing about parsing. Decide the allowed characters with whoever owns the receiving format, put exactly those characters in the key map, and handle escaping or rejection in the application interface — the panel's job ends at delivering the character.

Questions asked

The key lights up when I press it, but no character appears. Which layer is broken?

The pressed-state highlight proves the touch region and the press artwork are correct, so the fault is downstream: the macro that should append the character, or the input buffer it writes. A press with no highlight at all is the opposite case, pointing at the touch region or its alignment. Fix the highlight-less press by enlarging or repositioning the region; fix the highlighted-but-silent press in the macro or buffer logic.

Can I skip the demo and draw the whole keyboard from scratch?

Only if your character set does not fit the demo's layout. The demo's value is not the artwork, which you will replace anyway, but the already-working state and editing logic: layout switching, deletion, and the input buffer. Rebuilding those repeats work the vendor already tested. Draw from scratch when the key map needs a different grid, for instance a full punctuation row the demo layout cannot hold.

How do I add punctuation the demo does not have?

Add the character to the key map first, then place it in an unused or shared cell, then extend the macro that generates characters. After that, check the receiving side: a period, hyphen, or space can be a delimiter in the host command or file format, and the keyboard cannot change how that format is parsed. The application interface must accept or escape the character; the key label only draws it.

Would moving the host software to another platform remove the bitmap work?

No. As covered above, even a text-based host still had to upload artwork, map touch regions, and write entry logic, because the panel renders only what you upload to it. What the host change buys is freedom in communications and host-side logging, never artwork you can skip. Choose the host for your application architecture, not as a shortcut around keyboard development.

How many test presses prove the keyboard is finished?

Count from your own specification the same way: 40 character keys at two press positions each is 80 presses, plus 2 editing keys in 3 field states is 6 more, 86 total for the example in this article. Add shift states and punctuation as your spec grows, and always include the at-limit case where further characters must be ignored and backspace must still delete.

Keep reading

  • Selection guide

    Designing a touch HMI screen around real operator conditions

    Choose the touch technology for the input method and environment first: resistive when any glove or stylus must work, capacitive only with verified glove and stylus support on that model, infrared only with a clear optical path. Then build each screen so a tap, a displayed value and a completed machine action are three separately verified events, with command buttons sized at 7.0 mm bare-finger minimum (ISO 9241-910) and 12 mm with gloves.

    HMI and touchscreens

  • How-to

    How to find the runtime file an HMI terminal actually loads

    The startup configuration, not the file list, selects the loaded .MER. Cycle power and press the white box in the lower-left corner (touch, firmware 5.0 or later) or hold F1 on a directly connected USB keyboard to reach the configuration screen and read the loaded runtime name. Copy every stored runtime off before deleting anything in File Management.

    HMI and touchscreens

  • Selection guide

    Do You Need SCADA Software for a Modbus HMI Project

    No. Modbus only proves a possible data link, so pick the runtime target first: a touch panel programmed by its own editor for machine-side parameter control, or a licensed PC SCADA runtime when the screens must run on a computer. The documented demonstration mode of a Vijeo Citect-class runtime stops after about 15 minutes with live devices, which settles a bench test but not continuous operation.

    HMI and touchscreens