Release 940405
[wine/gsoc-2012-control.git] / misc / keyboard.c
blob178a74fbc6cb6a026ea910f7fd1e75def71fd0ee
1 static char RCSId[] = "$Id: keyboard.c,v 1.2 1993/09/13 18:52:02 scott Exp $";
2 static char Copyright[] = "Copyright Scott A. Laird, 1993";
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include "prototypes.h"
7 #include "windows.h"
9 int ToAscii(WORD wVirtKey, WORD wScanCode, LPSTR lpKeyState,
10 LPVOID lpChar, WORD wFlags)
12 printf("ToAscii (%d,%d)\n",wVirtKey, wScanCode);
13 return -1;
16 #ifdef BOGUS_ANSI_OEM
18 int AnsiToOem(LPSTR lpAnsiStr, LPSTR lpOemStr)
20 printf("AnsiToOem (%s)\n",lpAnsiStr);
21 strcpy(lpOemStr,lpAnsiStr); /* Probably not the right thing to do, but... */
22 return -1;
25 BOOL OemToAnsi(LPSTR lpOemStr, LPSTR lpAnsiStr)
27 printf("OemToAnsi (%s)\n",lpOemStr);
28 strcpy(lpAnsiStr,lpOemStr); /* Probably not the right thing to do, but... */
29 return -1;
32 #endif
34 DWORD OemKeyScan(WORD wOemChar)
36 printf("*OemKeyScan (%d)\n",wOemChar);
37 return 0;
40 /* VkKeyScan translates an ANSI character to a virtual-key and shift code
41 * for the current keyboard. For now we return -1, which is fail. */
43 WORD VkKeyScan(WORD cChar)
45 printf("VkKeyScan (%d)\n",cChar);
46 return -1;
49 int GetKeyboardType(int nTypeFlag)
51 printf("GetKeyboardType(%d)\n",nTypeFlag);
52 switch(nTypeFlag)
54 case 0: /* Keyboard type */
55 return 4; /* AT-101 */
56 break;
57 case 1: /* Keyboard Subtype */
58 return 0; /* There are no defined subtypes */
59 break;
60 case 2: /* Number of F-keys */
61 return 12; /* We're doing an 101 for now, so return 12 F-keys */
62 break;
63 default:
64 printf(" Unknown type on GetKeyboardType\n");
65 return 0; /* The book says 0 here, so 0 */
69 /* MapVirtualKey translates keycodes from one format to another. This
70 * is a total punt. */
72 WORD MapVirtualKey(WORD wCode, WORD wMapType)
74 printf("*MapVirtualKey(%d,%d)\n",wCode,wMapType);
75 return 0;
78 int GetKbCodePage(void)
80 printf("GetKbCodePage()\n");
81 return 437; /* US -- probably should be 850 from time to time */
84 /* This should distinguish key names. Maybe later */
86 int GetKeyNameText(LONG lParam, LPSTR lpBuffer, int nSize)
88 printf("GetKeyNameText(%d,<ptr>, %d)\n",lParam,nSize);
89 lpBuffer[0]=0; /* This key has no name */
90 return 0;
93 #ifdef BOGUS_ANSI_OEM
95 void AnsiToOemBuff(LPSTR lpAnsiStr, LPSTR lpOemStr, int nLength)
97 printf("AnsiToOemBuff(%s,<ptr>,%d)\n",lpAnsiStr,nLength);
98 strncpy(lpOemStr,lpAnsiStr,nLength); /* should translate... */
101 void OemToAnsiBuff(LPSTR lpOemStr, LPSTR lpAnsiStr, int nLength)
103 printf("OemToAnsiBuff(%s,<ptr>,%d)\n",lpOemStr,nLength);
104 strncpy(lpAnsiStr,lpOemStr,nLength); /* should translate... */
107 #endif