User Tools

Site Tools


characterresources

This is an old revision of the document!


Character Resources

When you press a key on the Twiddler, or any physical USB keyboard for that matter, it doesn't send the letter “A” or a Unicode character directly to the computer. Instead, it initiates a two-part translation process.

The fundamental difference lies in where the data is handled and what that data represents: USB HID Scan Codes are hardware-level, layout-agnostic position indicators sent by the keyboard, while Host-Side Character Encoding is software-level interpretation that turns those positions into meaningful text.

USB HID Keyboard Scan Codes (The Twiddler4 Level)

A USB HID (Human Interface Device) Scan Code is a raw, numerical value that the Twiddler sends to the host computer to report the physical press or release of a key.

  • Location: Generated on the Twiddler's internal microcontroller and transmitted over the USB bus.
  • Nature: It is entirely layout-agnostic and represents physical location rather than a specific character.
  • How it works: Under the USB HID standard, every key on a standard keyboard matrix is assigned a fixed hex value. For example, the physical key located to the right of the Caps Lock key always sends the scan code 0x04.
  • The catch: The keyboard hardware has absolutely no idea whether you are typing in English, French, or Japanese. It simply reports: “The key at position 0x04 has been pressed.”

Host-Side Character Encoding (The Operating System Level)

Host-Side Character Encoding is the final step in the software chain where numerical values are translated into specific visual characters (like “A”, “\n”, or “€”) based on digital standards like ASCII, UTF-8, or UTF-16.

  • Location: Handled entirely by the Host Operating System (Windows, macOS, Linux) and the active application.
  • Nature: It is context-dependent and relies heavily on the operating system's active Keyboard Layout (e.g., QWERTY, AZERTY, Dvorak) and the application's encoding configuration.
  • How it works: The OS receives the raw scan code, checks the active language layout, maps it to a virtual key, and then converts it into a character code (such as Unicode U+0061 for a lowercase “a”).

Extended Characters

Typing extended characters (like accented letters, currency symbols, or em dashes) on a Twiddler depends entirely on the operating system you are plugging it into. Because standard keyboards only have about 104 keys, operating systems use different software tricks to map the rest of the world's characters.

Here is how to type extended characters across the major platforms.

Windows: "Alt-Keypad"

Windows gives you two primary ways to type extended characters: using numeric codes or switching your keyboard layout.

Alt Codes (Requires the <keypad> Tag)

Windows uses the Windows-1252 character set. You can use Alt codes with the Twiddler.

  1. Check out https://www.gaijin.at/en/infos/ascii-ansi-character-table. Find the extended character you want to type in the 1st column.
  2. Note its decimal number in the 2nd column.
  3. In Twiddler Tuner add the opening Left Alt <lAlt>, 4 x Keypad <KPx>, and closing Left Alt </LAlt> tags.
¢ (Cent sign)

Decimal 162 = <LAlt><KP0><KP1><KP6><KP2></LAlt>

° (Degree symbol)

Decimal 176 = <LAlt><KP0><KP1><KP7><KP6></LAlt>

é (e with acute accent)

Decimal 233 = <LAlt><KP0><KP2><KP3><KP3></LAlt>

— (Em dash)

Decimal 151 = <LAlt><KP0><KP1><KP5><KP1></LAlt>

macOS: Intuitive Accent Menus and Modifiers

Mac makes typing extended characters incredibly seamless, regardless of the physical keyboard layout. Just enable the Unicode Hex Input layout on your Mac.

Option Key Shortcuts

Instead of using Left Shift like in Windows, the Option key is your primary modifier.

¢ (Cent sign)

Unicode 00A2 = <LOption>00a2</LOption>

° (Degree symbol)

Unicode 176 = <LOption>00b0</LOption>

é (e with acute accent)

Unicode 00E9= <LOption>00e9</LOption>

— (Em dash)

Unicode 2014 = <LOption>2014</LOption>

characterresources.1780347750.txt.gz · Last modified: by tony