入力方式

16進数入力

16進数値を入力してUnicodeコードポイントを直接入力する方法。Mac:Option+16進数+離す。Windows:Word/WordPadで16進数入力後にAlt+X。

· Updated

What is Hex Input?

Hex input refers to methods for entering a Unicode character by typing its hexadecimal code point value directly. Instead of navigating a character picker or memorizing keyboard shortcuts, you type the four- or five-character hex representation of a character's Unicode value and invoke a conversion command. This gives technically proficient users direct, precise access to any of the 1,114,112 possible Unicode code points.

Hex Input Methods by Platform

macOS: Unicode Hex Input Keyboard

macOS provides a built-in "Unicode Hex Input" keyboard layout that maps Option + hex digits to the corresponding Unicode character:

  1. Go to System Settings → Keyboard → Input Sources → Add… → Other → Unicode Hex Input
  2. Switch to this input method (via menu bar or keyboard shortcut)
  3. Hold Option and type the 4-hex-digit code point: Option + 0 0 E 9 → é

For code points beyond U+FFFF (5 hex digits), type a leading zero to pad to 8 digits, or the system accepts 5-digit entries directly.

Windows: Alt+X in Microsoft Applications

In Microsoft Word, WordPad, and some other Windows apps: 1. Type the hex code point: 2014 2. Press Alt+X 3. The code is converted to the character: —

This works bidirectionally — place the cursor after a special character and press Alt+X to see its hex code point.

Linux: GTK Ctrl+Shift+U

In GTK applications (including most GNOME apps, gedit, Firefox on Linux): 1. Press Ctrl + Shift + U 2. Type the hex code point (an underlined u appears as a prompt) 3. Press Enter or Space 4. The character is inserted

Ctrl+Shift+U → type "2026" → Enter → …
Ctrl+Shift+U → type "1F600" → Enter → 😀

Terminal and Programming

In terminal emulators and programming contexts, Unicode characters are entered via escape sequences:

# Bash: $'...' ANSI-C quoting
echo $'\u00e9'      # é
echo $'\U0001F600'  # 😀 (capital U for > U+FFFF)

# Python
print("\u00e9")     # é
print("\U0001F600") # 😀

# JavaScript
"\u00e9"            // é
"\u{1F600}"         // 😀 (ES6 syntax for > U+FFFF)

# CSS
content: "\00e9";   /* é */
content: "\1F600";  /* 😀 */

Hex vs. Decimal Code Points

Unicode code points are conventionally written in hexadecimal, prefixed with U+. The decimal equivalent is rarely used in Unicode contexts (unlike the old Windows Alt codes which used decimal).

Hex (U+) Decimal Character
U+00E9 233 é
U+2026 8230
U+2014 8212
U+1F600 128512 😀

Finding a Character's Hex Value

  • macOS Character Viewer: shows Unicode code point in the detail panel
  • Windows Character Map: shows code point in status bar
  • Python: hex(ord('é'))'0xe9'
  • JavaScript: 'é'.codePointAt(0).toString(16)'e9'
  • UnicodeFYI.com: search by character, name, or description

Quick Facts

Property Value
Unicode hex prefix U+ (e.g., U+2026)
macOS hex input method "Unicode Hex Input" keyboard + Option + hex digits
Windows hex input Type hex + Alt+X (Microsoft apps)
Linux GTK hex input Ctrl + Shift + U, then hex digits, then Enter
Python escape \uXXXX (BMP) or \UXXXXXXXX (full range)
JavaScript escape \uXXXX or \u{XXXXX} (ES6)
CSS escape \XXXXXX (hex, with trailing space if needed)

関連用語

入力方式 のその他の用語

Alt コード

Alt+テンキーの数字でコードページ番号により文字を入力するWindows入力方法(Alt+0169 → ©、Alt+0176 → °)。コードページ1252の文字に制限されます。

Character Palette

A system-level tool for browsing and inserting Unicode characters. macOS Character Viewer …

Unicode 入力方法

Unicodeコードポイントで文字を入力する任意の方法:16進数入力(Mac)・Ctrl+Shift+UによるU+XXXX入力(Linux)・Alt+X(Windowsアプリケーション)。

インプットメソッドエディタ (IME)

音声または構造的マッチングにより入力キーシーケンスを文字に変換し、標準キーボードで複雑な文字(CJK・韓国語など)を入力できるようにするソフトウェアコンポーネント。

コンポーズキー

複数キーの合成シーケンスを開始するキー(通常は右Alt またはカスタムマップ)。Linux/Unix機能:Compose + a + e → æ。XComposeで設定可能です。

デッドキー

すぐに出力せず次のキー入力を修飾するキー。発音区別符号の入力に使われます:`を押してeを押すとèになります。欧州のキーボードレイアウトで一般的です。

文字ピッカー

文字を視覚的に閲覧・選択するUIコンポーネント(ネイティブまたはWebベース)。モバイルの絵文字ピッカーが最も一般的な例です。

文字マップ

Unicode文字を閲覧・挿入するGUIユーティリティ。Windows:charmap.exe。Mac:文字ビューア(Control+Command+Space)。Linux:gucharmap。