scancode.h

Go to the documentation of this file.
00001 /*
00002  * WinDom: a high level GEM library
00003  * Copyright (c) 1997-2006 windom authors (see AUTHORS file)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00018  *
00019  * $Source: /cvsroot/windom/htdocs/doc/html/scancode_8h-source.html,v $
00020  *
00021  * CVS info:
00022  *   $Author: bercegeay $
00023  *   $Date: 2006/06/22 11:58:29 $
00024  *   $Revision: 1.5 $
00025  */
00026 
00027 
00028 #ifndef __SCANCODE__
00029 #define __SCANCODE__
00030 
00031 /* Main keyboard */
00032 #define SC_ESC      0x01
00033 #define SC_BACK     0x0E
00034 #define SC_TAB      0x0F
00035 #define SC_RETURN   0x1C
00036 #define SC_DEL      0x53
00037 #define SC_SPACE    0x39
00038 
00039 /* Move keyboard */
00040 #define SC_HELP     0x62
00041 #define SC_UNDO     0x61
00042 #define SC_INSERT   0x52
00043 #define SC_HOME     0x47
00044 #define SC_UPARW    0x48
00045 #define SC_LFARW    0x4B
00046 #define SC_DNARW    0x50
00047 #define SC_DWARW SC_DNARW
00048 #define SC_RTARW    0x4D
00049 
00050 /* Numeric keyboard */
00051 #define SC_LFPAR    0x63    
00052 #define SC_RTPAR    0x64
00053 #define SC_SLASH    0x65
00054 #define SC_STAR     0x66
00055 #define SC_SEVEN    0x67
00056 #define SC_EIGHT    0x68
00057 #define SC_NINE     0x69
00058 #define SC_MINUS    0x4A
00059 #define SC_FOUR     0x6A
00060 #define SC_FIVE     0x6B
00061 #define SC_SIX      0x6C
00062 #define SC_PLUS     0x4E
00063 #define SC_ONE      0x6D
00064 #define SC_TWO      0x6E
00065 #define SC_THREE    0x6F
00066 #define SC_ENTER    0x72
00067 #define SC_ZERO     0x70
00068 #define SC_POINT    0x71
00069 
00070 /* Available with MagiC Mac and Magic PC */
00071 #define SC_PGUP     0x49
00072 #define SC_PGDN     0x51
00073 
00074 /* Function keys */
00075 #define SC_F1       0x3B
00076 #define SC_F2       0x3C
00077 #define SC_F3       0x3D
00078 #define SC_F4       0x3E
00079 #define SC_F5       0x3F
00080 #define SC_F6       0x40
00081 #define SC_F7       0x41
00082 #define SC_F8       0x42
00083 #define SC_F9       0x43
00084 #define SC_F10      0x44
00085 #define SC_F11      0x54
00086 #define SC_F12      0x55
00087 #define SC_F13      0x56
00088 #define SC_F14      0x57
00089 #define SC_F15      0x58
00090 #define SC_F16      0x59
00091 #define SC_F17      0x5A
00092 #define SC_F18      0x5B
00093 #define SC_F19      0x5C
00094 #define SC_F20      0x5D
00095 
00096 /* 
00097  * The previous definitions address the non ASCII
00098  * keys of the Atari keyboard. We use only the first
00099  * byte of scancodes (containing 2 bytes) because the
00100  * the second one is always 0 (non ASCII keys).
00101  * 
00102  * Other keys have a different scancode depending on
00103  * the keyboard (country) type because a scancode identify
00104  * a key location on a keyboard and not an ASCII value.
00105  * For example, the key 'a' have as scancode 0x1E61 on
00106  * english keyboard and 0x1061 on french keyboard
00107  * ('a' is 0x61 in ASCII code).
00108  *
00109  * WinDom provides a function, keybd2ascii(), which can
00110  * identify ascii value of a scancode (occuring with a
00111  * keyboard event for example) even the control and
00112  * alternate keys are depressed. It is very usefull to
00113  * shortcut keys working on any type of keyboard.
00114  */
00115 
00116 #endif

Generated on Thu Jun 22 11:45:27 2006 for WinDom by  doxygen 1.4.6