Free Online Utility • ASCII Studio • 7-Bit / 8-Bit Engine

Convert ASCII to Scan Codes

Convert ASCII keystrokes into authentic IBM PC XT / PS/2 Set 1 Make and Break keyboard hardware scan codes.

Reference & Encoding Spec ASCII Engine
PS/2 Set 1: Make = code (0x01–0x58) | Break = Make | 0x80
L-Shift Make = 0x2A, Break = 0xAA | Enter = 0x1C | Space = 0x39
A (Press/Rel)0x1E / 0x9E
Space0x39 / 0xB9
Enter0x1C / 0x9C
IBM PC PS/2 SET 1
Hardware Keyboard Scan Codes

        
100% client-side ASCII Engine Instant

Session Calculation Log

No entries recorded in this session yet.

How Convert ASCII to Scan Codes Works

Convert ASCII to Scan Codes maps keyboard characters into IBM PC XT / PS/2 Set 1 Make (key-down) and Break (key-up = Make | 0x80) hardware scan codes, optionally wrapping uppercase characters with Left-Shift (0x2A / 0xAA).

Standard 7-bit ASCII (ANSI X3.4 / ISO 646) maps 128 foundational characters — 33 non-printable control codes (0x00–0x1F and 0x7F) plus 95 printable glyphs (0x20–0x7E) — forming the universal bedrock of UTF-8, HTTP, email, source code, and terminal interfaces. Every transformation in this tool executes locally inside your browser with zero server round-trips, guaranteeing immediate responsiveness and complete data privacy.

PS/2 Scan Code Set 1 Make & Break

Make Code  = physical key matrix code (0x01..0x58)
Break Code = Make Code | 0x80  (bit 7 set on release)

Hardware keyboards report physical switch positions (scan codes) rather than ASCII; the OS kernel keyboard driver combines Left-Shift (0x2A) with key 0x1E to produce uppercase "A".

Worked Reference Examples

InputOutputTechnical Note
a (Make)0x1EPhysical A key press
a (Make+Break)0x1E 0x9E0x1E | 0x80 = 0x9E release
A (with Shift)0x2A 0x1E 0xAAL-Shift down, A, L-Shift up

Practical Developer & Engineering Workflows

OS Kernel & Emulator Dev

Verify PS/2 IRQ1 keyboard handlers in QEMU, Bochs, and hobby operating systems.

BIOS & VM Key Injection

Generate exact hex scan-code sequences for VBoxManage `keyboardputscancode`.

Compatibility, Edge Cases & Best Practices

Matches US QWERTY physical layout under IBM PC Set 1.

All outputs copy cleanly to the clipboard or export directly as files so you can drop verified ASCII payloads straight into terminals, source repositories, unit test suites, and hardware emulators.

Frequently Asked Questions

How is a PS/2 Set 1 Break (release) code computed?
Bitwise OR the Make code with 0x80 (add 128). For example, Space press is 0x39 and Space release is 0xB9.
Why do scan codes differ from ASCII codes?
Scan codes identify physical key locations on the keyboard grid (e.g. Q=0x10, W=0x11, E=0x12 across the top row) rather than alphabetical ASCII order.
Can I use these codes with VirtualBox keyboardputscancode?
Yes — VirtualBox and QEMU accept PS/2 Set 1 hex Make/Break scan codes directly.