Typing High Ascii Values On A Standard Keyboard

Posted June 7, 2010 at 9:14 AM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML, HTML / CSS, Work

Most applications have some way for you to enter high ASCII characters that are not immediately represented on the keyboard. Homesite, for example, has its Extended Character panel and Fireworks has its Special Characters panel. As it turns out, however, there is a way, at least on Windows, to enter high ASCII characters using just the keyboard and the ASCII number. If you hold down the ALT key, use the number pad to type in the ASCII value, and then release the ALT key, the computer will enter the corresponding ASCII value in whatever application you are using.

 
 
 
 
 
 
 
 
 
 

For some reason, it has to be the number pad; you can't use the numbers along the top of the keyboard. So, if you don't have an extended keyboard, you'll probably have to rely on Function keys to mimic the number pad. Also, there seems to be a difference between standard ASCII values and Windows encoded values. For a list of those characters, check out this page which explores this topic in much more depth.

Now, it might seem crazy to start memorizing ASCII values for characters; but, there are certainly a few characters that I use often enough that knowing the ASCII value will end up saving me time. Probably, the most useful one is the Right-Angle-Quote:

ALT+175

Also, the Bell (like a large mid-dot) is great for creating mockups of unordered lists:

ALT+7

Anyway, I just discovered this the other day and thought it was cool enough to pass on. I've actually been using the ALT+7 approach for years thanks to David Stamm; but, I never really knew what it was doing.



Reader Comments

Jun 7, 2010 at 9:40 AM // reply »
24 Comments

AutoHotKey or something like it may be a solution for commonly used extended characters. I wouldn't want to do without AHK now that I am used to using it. Thanks to TheCrumb and his TACFUG presentation for that.


Jun 7, 2010 at 9:42 AM // reply »
10,638 Comments

@Roger,

I am not familiar with that; I'll have to check it out.


Jun 7, 2010 at 10:12 AM // reply »
28 Comments

At some points I've actually included some of those characters in my passwords. My theory is that it makes them a lot more secure, since most brute force attacks on passwords probably focus on easily accessible keyboard characters.

Although it took some effort to remember them when logging in ;)


Jun 7, 2010 at 10:15 AM // reply »
10,638 Comments

@David,

In the article I link to, that is actually what he recommends. He said no one will brute force it and often times, key capture programs won't capture it.


JC
Jun 7, 2010 at 10:54 AM // reply »
16 Comments

yeah... my password used to include © and Þ ... but knowing how to type those can cause problems sometimes. Some browsers seem to puke on those if you don't make them © or whatever


JC
Jun 7, 2010 at 10:54 AM // reply »
16 Comments

err &_copy_;


Jun 7, 2010 at 12:32 PM // reply »
69 Comments

On-screen character maps don't require remembering ASCII or Unicode numeric values. They exist for every OS, as far as I know. And they allow you pick out the character you want by how it looks, not by memorization.

Unfortunately, the Windows accessory to do this typically loads the character onto the clipboard with style information, and styled text is used in preference to plain text. As a result, the character usually pastes in a different font from the one you're using. So you have to pay the price of restyling after you paste. Generally I'd rather do that than remember numeric values of characters.

If you really like to use numeric values, and you're coding for a web page (not entering a password), you can also use "numeric entity encoding" (ampersand, poundsign, unicodevalue, semicolon). There are numeric entity encoding formats for both decimal and hexadecimal, and even octal, I think.

Numeric entity encoding also works in XML. In ColdFusion, the default output character set is UTF-8, so we don't have to do that. But if you accept XML from others, and those others are clueless about how to UTF-8 encode their text, you can advise them about how to do numeric entity encoding instead. (It's generally a much easier explanation.)


Jun 7, 2010 at 1:25 PM // reply »
2 Comments

Eeek, this takes me back to doing very strange ASCII graphics for bulletin board headers in the 80s...

/goes off for some Oveltine and to find my slippers...


Jun 7, 2010 at 5:47 PM // reply »
3 Comments

I remember someone using Þ in emoticons on ICQ a long time ago. :Þ (0222)


Jun 7, 2010 at 6:05 PM // reply »
1 Comments

Hey Ben,
I don't know if this was mentioned, but you have to use the number pad for the numbers. I don't know how to make it work with the top row of numbers on a standard keyboard.


Jun 7, 2010 at 9:11 PM // reply »
10,638 Comments

@Steve,

I've definitely used the #-encoding in HTML pages before. That said, I was pretty surprised that Homesite actually encoded my right-angle-quote as » - that it was smart enough to know it had a different encoding for it.

@Garry,

Ha ha ha.

@Travis,

Now that's what I call leveraging technology ;)

@Andrew,

Yeah, I don't know why that is. I theorized that people without a number pad can use the FN-style number pad, but not tested that.


Jun 7, 2010 at 11:49 PM // reply »
9 Comments

I worked on a site for an event in Cancún (alt+0250) with other verbiage en español (alt+0241). It's amazing all the high-ASCII codes you wind up memorizing if you type them enough times.

(I'd use the easy-to-remember HTML entities, ú and ñ, but my CMS encodes what I type.)


Jun 7, 2010 at 11:55 PM // reply »
1 Comments

While I'm all for strong passwords, I like the ability to know I can log into any web-based accounts from any connected computer... not just Windows.

I was very sad to see these don't work in Linux. I used to use 171, 172 etc all the time for fractions, but can't now that I'm mostly Linux based.


Jun 8, 2010 at 2:35 AM // reply »
7 Comments

This is so useful, how did you come across it?

Thanks Ben!


Jun 8, 2010 at 3:34 AM // reply »
12 Comments

Yea, these keycodes are very useful. My favs are 3-6 ;)

@MSDN they have a nice point on this:

Alt+Numpad: A method of entering characters by typing in the character's decimal code with the Numeric Pad keys (Num Lock turned on). In Windows:

Alt+<xxx>, where xxx is the decimal value of a code point, generates an OEM-encoded character.
Alt+<0xxx>, where xxx is the decimal value of a code point, generates a Windows-encoded character.
Alt+<+>+<xxxx>, where xxxx is the hexadecimal Unicode code point, generates a Unicode-encoded (UTF-16) character.

(from http://msdn.microsoft.com/en-us/goglobal/bb964658.aspx)

Therefore, there should be a possibility to do at least the OEM or the UTF-16 chars on Linux, too.
On Linux there are some similar possibilities, for example 'Compose Keys' or the KDE keyboard functions.

And normally, the ALT Keycodes also work with notebook layouts with 'FN'-Notepads.


Jun 8, 2010 at 9:32 AM // reply »
10,638 Comments

I am already making immediate use of this in graphic programs where I need to mock up a UI. It is sweeeet.



Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
InVision App - Prototyping Made Beautiful With Prototyping Tools Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Feb 3, 2012 at 10:49 PM
How I Got Node.js Running On A Linux Micro Instance Using Amazon EC2
Wow this was really helpful! Only thing I would add is you need to update your .bash_profile after you edit the secure_path. This is what I did: $ . ~/.bash_profile Otherwise, NPM won't be found. ... read »
Feb 3, 2012 at 10:14 PM
Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion
@Ben, Just wanted to let you know that pusher are soon to start limiting sizes on messages. This was the detail that came through in the Feb dispatch: "However, we will soon be limiting the s ... read »
Feb 3, 2012 at 5:05 PM
Regular Expressions Make CSV Parsing In ColdFusion So Much Easier (And Faster)
I tried using your RegEx in my C# program, but it was matching an extra empty-string at the end and so I would end up with an extra field that doesn't exist, so I changed it to this: (^|,)("(?: ... read »
Feb 3, 2012 at 3:47 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
Josh Cyr posted this on Twitter just a little bit ago. Thought it was appropriate. http://stackoverflow.com/questions/1619152/how-to-create-rest-urls-without-verbs/1619677#1619677 ... read »
Feb 3, 2012 at 2:28 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
@Michael, You definitely make a good point (and extra points for quoting movies - I love movies). When you use a return() statement to define the object's public API, it does provide a consistent a ... read »
Feb 3, 2012 at 2:04 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
To quote Jurassic Park: "Just because you can doesn't mean you should". I completely, utterly disagree with the thought that this is more readable. Consider the current module pattern: if ... read »
Feb 3, 2012 at 1:10 PM
REST API Design Rulebook By Mark Masse
@Jordan, Yeah, WRML was created by Mark Masse (author of the book). I also found it to be a bit convoluted. I suppose it is intended to allow the Client to be able to programmaticaly respond to cha ... read »
Feb 3, 2012 at 1:08 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
@Jason, To be honest, I don't have good answers for that kinds of stuff. And, to the point, that is specifically why I *really* liked the REST API Design Rulebook by Mark Masse - he just cuts throu ... read »