Do OS's other than Windows support Alt-codes? If I put in Alt+1 for ☺, would I be able to put the same code in on MacOS and Linux and get the same output?
Asked
Active
Viewed 408 times
1 Answers
4
Alt-code is Windows specific. Other OSes have various ways to input Unicode characters.
On macOS 8.5 and later you hold ⌥ Option then type the 4-digit hex value. Characters outside the BMP can be input via Character Viewer
On Linux there are 2 common methods:
- Hold Ctrl+⇧ Shift and type u followed by the hex digits.
- Enter Ctrl+⇧ Shift+u, release, then type the hex digits, and press ↵ Enter (or Space or press and release ⇧ Shift or Ctrl)
There are other ways that you can find here
There are also other cross-platform methods to type any Unicode characters
Open the rich text editor on your platform like MS Word, Libre Office or Wordpad, enter the hex code point value (like 1F3BB) with an optional
U+prefix and press Alt+XOpen the console in your browser and run the below commands. It works in most modern browsers like Firefox, Chrome/Chromium (including Chromium Edge)
copy("\u25A0") // only applicable for characters in the BMP (⩽ U+FFFF) copy("\u{1F3BB}") // applicable for all characters (U+0000 to U+10FFFF) copy(String.fromCodePoint(0x1F3BB))Use PowerShell to copy the desired character to clipboard
scb "`u{1F3BB}" # or Set-Clipboard "`u{1F3BB}" # or [char]::ConvertFromUtf32(0x1F3BB) | Set-Clipboard # or [char]::ConvertFromUtf32(0x1F3BB) | scb # or [char]0x1F3BB | Set-Clipboard
phuclv
- 30,396
- 15
- 136
- 260