Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Vocabulary
MWForum
Site Map
Search
Our Team
How do I find ASCII numbers?
When we teach the computer to respond to keyboard keys, we need to refer to certain keys by their ASCII numbers. ("ASCII" stands for American Standard Code for Information Interchange.) We use ASCII numbers to refer to the arrow keys, space bar, tab, backspace, and enter keys. To find the ASCII numbers for these keys, use or recreate this little project.

Vocabulary: ascii, readchar

Create a textbox and write a procedure:

to ascii_number
forever [settext1 ascii readchar]
end

Place a button on the page for activating the procedure.

Right-click HERE to Download
Click the button, then press keys to see their ASCII numbers in the textbox.

Notes:  

  • PCs and Macs use different ASCII numbers for the arrow keys. If you are posting a project on the web, be sure your project is compatible with both operating systems. See How do I steer the turtle with keyboard keys?
  • There is no need to learn the ASCII number for characters such as letters or numbers.
  • Whenever a textbox is created, the corresponding command combining set and the name of the textbox is added to MicroWorlds’ vocabulary. In the sample project above, the textbox is named text1. Settext1 [some text] clears the contents of the textbox and inserts whatever follows the settext1 command. It is the same as writing:

    text1, ct insert [some text]

« Previous
Menu
Next »


© copyright 2001 - 2012  OpenWorld Learning.   All rights reserved.