71 if (((VirtualKey >=
'A') && (VirtualKey <=
'Z')) ||
72 ((VirtualKey >=
'0') && (VirtualKey <=
'9')))
95 for (
i = 0;
i < 36;
i++)
98 if (
VKName[
i].VirtualKey == VirtualKey)
126 if ((*
p >=
'0') && (*
p <=
'9'))
return *
p;
132 if ((*
p >=
'A') && (*
p <=
'Z'))
return *
p;
139 for (
i = 0;
i < 36;
i++)
146 if ((*
p ==
'0') && ((*(
p + 1) ==
'x') || (*(
p + 1) ==
'X')))
150 if (
sscanf(
p,
"0x%x", &KeyNumber) == 1)
return KeyNumber;
175 if (StateChar ==
'@')
180 else if (StateChar ==
'%')
199 printf(
"Ligatured character entries not yet supported!\n");
208 if (EntryChar) *EntryChar = CharCode;
214 if (EntryChar) *EntryChar = 0;
222 if (EntryChar) *EntryChar = *
State;
246 while ((*
p) && ((*
p ==
' ') || (*
p ==
'\t')))
p++;
249 if (*
p ==
';')
continue;
256 if (pp ==
p)
continue;
278 CHAR KeyWordChars[32];
310 printf(
"Unable to read keyboard name or description.\n");
326 printf(
"Unable to read keyboard version information.\n");
344 printf(
"Unable to read the specified COPYRIGHT string.\n");
362 printf(
"Unable to read the specified COMPANY name.\n");
380 printf(
"Unable to read the specified COPYRIGHT string.\n");
398 *DescriptionData = 0;
407 if (*
Token ==
';')
continue;
417 printf(
"An invalid LANGID was specified.\n");
425 printf(
"A language description is missing.\n");
442 printf(
"Unable to allocate the KEYNAME struct (out of memory?).\n");
482 if (*
Token ==
';')
continue;
492 printf(
"An invalid LANGID was specified.\n");
500 printf(
"A language name is missing\n");
517 printf(
"Unable to allocate the KEYNAME struct (out of memory?).\n");
522 Language->
Code = LanguageCode;
530 *LanguageData = Language;
531 LanguageData = &Language->
Next;
557 if (*
Token ==
';')
continue;
567 printf(
"An invalid character code was specified.\n");
575 printf(
"A key name is missing\n");
592 printf(
"Unable to allocate the KEYNAME struct (out of memory?).\n");
623 for (
i = 0;
i < 8;
i++) ShiftStates[
i] = -1;
642 if (
Verbose)
printf(
"An invalid shift state '%s' was found (use 0, 1, 2, 3, 6, or 7.)\n",
Token);
650 for (
i = 0;
i < *StateCount;
i++)
653 if ((ShiftStates[
i] == ShiftState) && (
Verbose))
656 printf(
"The state '%d' was duplicated for this Virtual Key.\n", ShiftStates[
i]);
665 ShiftStates[(*StateCount)++] = ShiftState;
670 if (
Verbose)
printf(
"There were too many states (you defined %d).\n", *StateCount);
675 DPRINT1(
"Found %d Shift States: [", *StateCount);
676 for (
i = 0;
i < *StateCount;
i++)
DPRINT1(
"%d ", ShiftStates[
i]);
686 printf(
"LIGATURE support is not yet implemented. Please bug Arch to fix it\n");
693 printf(
"ATTRIBUTES support is not yet implemented. Please bug Arch to fix it\n");
700 printf(
"MODIFIERS support is not yet implemented. Please bug Arch to fix it\n");
707 printf(
"DEADKEY support is not yet implemented. Please bug Arch to fix it\n");
727 ULONG ScanCodeCount = -1;
743 if (*
Token ==
';')
continue;
756 else if (TokenCount != 2)
759 printf(
"There are not enough columns in the layout list.\n");
771 if (++ScanCodeCount >= 110)
774 printf(
"ScanCode %02x - too many scancodes here to parse.\n",
ScanCode);
783 for (
i = 0;
i < 110;
i++)
787 if (CurrentCode == 0xFFFF)
799 if (
ScVk[
i].Processed)
807 if (
ScVk[
i].VirtualKey == 0xFFFF)
810 printf(
"The Scancode you tried to use (%X) is reserved.\n",
ScanCode);
827 Entry->VirtualKey = VirtualKey;
828 DPRINT1(
"ENTRY: [%x %x %x %s] with ",
832 if (VirtualKey == 0xFFFF)
843 if (!
strcmp(Cap,
"SGCAP")) *Cap =
'2';
849 printf(
"invalid Cap specified (%s). Must be 0, 1, or 2.\n", Cap);
856 " %*s %*s %*s %s %s %s %s %s %s %s %s",
869 if ((
Count < 2) && (FullEntry))
872 printf(
"You must have at least 2 characters.\n");
895 Entry->DeadCharData[
i] = 1;
900 Entry->OtherCharData[
i] = 1;
909 printf(
"Sanity checks not yet handled!\n");
917 printf(
"SGCAP state not yet handled!\n");
924 if (ScanCodeCount == -1)
926 printf(
"No ScanCode found!\n");
932 for (
i = 0;
i < 110;
i++)
936 if (CurrentCode == 0xFFFF)
break;
939 if (
ScVk[
i].Processed)
947 if (++ScanCodeCount >= 110)
950 printf(
"ScanCode %02x - too many scancodes here to parse.\n", CurrentCode);
956 Entry->ScanCode = CurrentCode;
961 Entry->LineCount = 0;
962 DPRINT1(
"AUTOMATIC ENTRY: [%x %x %s]\n",
977 ULONG ShiftStates[8];
994 memset(KeyWords, 0,
sizeof(KeyWords));
1001 if ((KeyWord != 9) && (KeyWords[KeyWord] > 1) && (
Verbose))
1004 printf(
"The '%s' keyword appeared multiple times.\n",
1014 DPRINT1(
"Found KBD section\n");
1021 DPRINT1(
"Found VERSION section\n");
1028 DPRINT1(
"Found COPYRIGHT section\n");
1035 DPRINT1(
"Found COMPANY section\n");
1042 DPRINT1(
"Found LOCALENAME section\n");
1049 DPRINT1(
"Found MODIFIERS section\n");
1056 DPRINT1(
"Found SHIFTSTATE section\n");
1070 DPRINT1(
"Found ATTRIBUTES section\n");
1077 DPRINT1(
"Found LAYOUT section\n");
1087 DPRINT1(
"Found DEADKEY section\n");
1094 DPRINT1(
"Found LIGATURE section\n");
1101 DPRINT1(
"Found KEYNAME section\n");
1108 DPRINT1(
"Found KEYNAME_EXT section\n");
1115 DPRINT1(
"Found KEYNAME_DEAD section\n");
1122 DPRINT1(
"Found DESCRIPTIONS section\n");
1129 DPRINT1(
"Found LANGUAGENAMES section\n");
1136 DPRINT1(
"Found ENDKBD section\n");
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
static const WCHAR Description[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
base of all file and directory entries
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_In_ __drv_aliasesMem PSTRING Prefix