How can I type ASCII characters like Alt + numpad in Windows?

111,002

Solution 1

When you type Alt + numbers in Windows, you are actually typing Alt + character's ASCII code.

To achieve the same in Ubuntu, you must type Ctrl + Shift + U, and then type character in Unicode hexadecimal value.

If this shurtcut doesn't work check if your input method is iBus.

Example 1

  • Alt + 255 on Windows creates a non-breaking space (ASCII 255)
  • This character in Unicode is U+00A0
  • On Ubuntu, type it as Ctrl + Shift + U then A0, then Enter

Example 2

  • Alt + 173 on Windows creates an inverted exclamation mark (ASCII 173, "¡")
  • This character in Unicode is U+00A1
  • On Ubuntu, type it as Ctrl + Shift + U then A1, then Enter

The Unicode four-digit hexadecimal number can be found via the Character Map (gucharmap). For just ASCII table type man ascii on a terminal.

screenshot

Solution 2

Another way — «Compose key»

A compose key, available on some computer keyboards, is a special kind of modifier key designated to signal the software to interpret the following (usually two) keystrokes as a combination in order to produce a character not found directly on the keyboard. For example, striking Compose followed by O and then C can produce the symbol ©, the copyright symbol). wikipedia.org

  • ENABLE [Ubuntu 13.04]: System settings... → Keyboard → Layout settings → Options → «Compose key position» and set it, for example, on «Menu» (key between right ALT and CTRL).

  • DO: Hold key «Menu» and push «Space» 2 times. Should get 1 non-breaking space: « ».

Here more Linux compose key sequences: hermit.org

Share:
111,002

Related videos on Youtube

user3821205
Author by

user3821205

Updated on September 18, 2022

Comments

  • user3821205
    user3821205 almost 2 years

    On Windows, the key combination Alt + 2+ 5+ 5 creates a blank space. How can I achieve this on Ubuntu?

    • mjumbewu
      mjumbewu almost 8 years
      @empedokles I always use unicode-table.com, but the Character Map application also shows the unicode value of the selected character in the status bar.
  • user3821205
    user3821205 over 12 years
    I also would like to know the unicode code for windows alt+173 in ubuntu.
  • enzotib
    enzotib over 12 years
    You don't need to hold Ctrl-Shift for the whole number, you can release them after the "u", and add a space at end of code.
  • Michael Martin-Smucker
    Michael Martin-Smucker over 12 years
    @Valladao, I updated my answer to better explain how to type these characters in general, and I included both 173 and 255 as examples.
  • Michael Martin-Smucker
    Michael Martin-Smucker over 12 years
    @enzotib nice to know I can let go of those keys and actually type with my left hand. :)
  • Philipe
    Philipe over 9 years
    FWIW, in 14.04 the compose setting is under System settings -> keyboard -> shortcuts -> typing -> compose key
  • John
    John over 8 years
    Compose key is neat! I now found a good replacement for the CapsLock key and am able to easily insert the various symbols that I used to struggle with earlier.
  • Khurshid Alam
    Khurshid Alam over 8 years
    ctrl+shift+u does not work on my laptop after 13.10. Why?
  • Smylic
    Smylic over 7 years
    Alt + 010003 gives ✓ sign. And the same for any unicode symbol. Unicode does not mean hexadecimal.
  • iiic
    iiic almost 7 years
    Sadly you can't bind compose cay anyway (Win key), but place it on Caps lock is maybe even better! I hate accidentally caps lock key pressing :)
  • Elijah Lynn
    Elijah Lynn almost 7 years
    It wasn't working for me on Ubuntu 14.04 so I followed askubuntu.com/a/854465/11929 to change keyboard input method from none to ibus under Language Support, logged out/in and it works now.
  • ryanjdillon
    ryanjdillon almost 7 years
    also to note, letters capitalized in the code can be entered as lowercase.
  • Michael Martin-Smucker
    Michael Martin-Smucker almost 7 years
    Recent downvoter, care to share a reason?
  • Simon Forsberg
    Simon Forsberg over 6 years
    @MichaelMartin-Smucker Just a guess for downvote: As others have said, this doesn't seem to work. I'm trying it in 14.04 and it doesn't work.
  • Andrew Krizhanovsky
    Andrew Krizhanovsky about 5 years
    See answer for Ubuntu 18.04 and later: askubuntu.com/a/1028964/493153