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 »
25 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 »
11,243 Comments

@Roger,

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


Jun 7, 2010 at 10:12 AM // reply »
31 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 »
11,243 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 »
70 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 »
11,243 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 »
11,243 Comments

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


Mar 13, 2012 at 11:24 AM // reply »
1 Comments

Awesome , thanks for the share, I keep reading your posts



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
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
May 22, 2013 at 4:43 AM
How Do You Use The ColdFusion CFParam Tag?
'<cfparam>' or 'isDefined()and <cfset>' performs the same task.Is there any difference? ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools