Keyascii
From Wikipedia, the free encyclopedia
| This article or section needs to be wikified to meet Wikipedia's quality standards. Please help improve this article with relevant internal links. (August 2007) |
KEYASCII is a term used to identify a key that is pressed on a computer keyboard. The term comes from the combining of KEY + ASCII. ASCII is an industry standarad method of identifying keys. IBM has its own method.
When you are programming an application, it is possible to tell the computer to ignore a key that has been pressed. You do this by scanning for a keycode and then processing the information, only if it appropriate.
Click here to visit a page that explains KEYASCII and other keycode scan values well:
Here is an example of a procedure written in VB6.0.
Private Sub txtBox_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 45, 46, 47, 48 To 57, 65 To 90, 97 To 122 'Acceptable keystrokes (ASCII char numbers)
Case Else
KeyAscii = 0 'Any other key press should be ignored (changed to NULL)
End Select
End Sub
| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (August 2007) |

