21{
24
25 if (InputBufferSize == 0)
27
29 {
30 case 0x1b: MakeCode = 0x01; NormalKey =
TRUE;
break;
31
32 case '1': MakeCode = 0x02; NormalKey =
TRUE;
break;
33 case '2': MakeCode = 0x03; NormalKey =
TRUE;
break;
34 case '3': MakeCode = 0x04; NormalKey =
TRUE;
break;
35 case '4': MakeCode = 0x05; NormalKey =
TRUE;
break;
36 case '5': MakeCode = 0x06; NormalKey =
TRUE;
break;
37 case '6': MakeCode = 0x07; NormalKey =
TRUE;
break;
38 case '7': MakeCode = 0x08; NormalKey =
TRUE;
break;
39 case '8': MakeCode = 0x09; NormalKey =
TRUE;
break;
40 case '9': MakeCode = 0x0a; NormalKey =
TRUE;
break;
41 case '0': MakeCode = 0x0b; NormalKey =
TRUE;
break;
42 case '-': MakeCode = 0x0c; NormalKey =
TRUE;
break;
43 case '=': MakeCode = 0x0d; NormalKey =
TRUE;
break;
44 case '\b': MakeCode = 0x0e; NormalKey =
TRUE;
break;
45
46 case '\t': MakeCode = 0x0f; NormalKey =
TRUE;
break;
47 case 'q': MakeCode = 0x10; NormalKey =
TRUE;
break;
48 case 'w': MakeCode = 0x11; NormalKey =
TRUE;
break;
49 case 'e': MakeCode = 0x12; NormalKey =
TRUE;
break;
50 case 'r': MakeCode = 0x13; NormalKey =
TRUE;
break;
51 case 't': MakeCode = 0x14; NormalKey =
TRUE;
break;
52 case 'y': MakeCode = 0x15; NormalKey =
TRUE;
break;
53 case 'u': MakeCode = 0x16; NormalKey =
TRUE;
break;
54 case 'i': MakeCode = 0x17; NormalKey =
TRUE;
break;
55 case 'o': MakeCode = 0x18; NormalKey =
TRUE;
break;
56 case 'p': MakeCode = 0x19; NormalKey =
TRUE;
break;
57 case '[': MakeCode = 0x1a; NormalKey =
TRUE;
break;
58 case ']': MakeCode = 0x1b; NormalKey =
TRUE;
break;
59
60 case '\r': MakeCode = 0x1c; NormalKey =
TRUE;
break;
61
62 case 'a': MakeCode = 0x1e; NormalKey =
TRUE;
break;
63 case 's': MakeCode = 0x1f; NormalKey =
TRUE;
break;
64 case 'd': MakeCode = 0x20; NormalKey =
TRUE;
break;
65 case 'f': MakeCode = 0x21; NormalKey =
TRUE;
break;
66 case 'g': MakeCode = 0x22; NormalKey =
TRUE;
break;
67 case 'h': MakeCode = 0x23; NormalKey =
TRUE;
break;
68 case 'j': MakeCode = 0x24; NormalKey =
TRUE;
break;
69 case 'k': MakeCode = 0x25; NormalKey =
TRUE;
break;
70 case 'l': MakeCode = 0x26; NormalKey =
TRUE;
break;
71 case ';': MakeCode = 0x27; NormalKey =
TRUE;
break;
72 case '\'': MakeCode = 0x28; NormalKey =
TRUE;
break;
73
74 case '`': MakeCode = 0x29; NormalKey =
TRUE;
break;
75
76 case '\\': MakeCode = 0x2b; NormalKey =
TRUE;
break;
77
78 case 'z': MakeCode = 0x2c; NormalKey =
TRUE;
break;
79 case 'x': MakeCode = 0x2d; NormalKey =
TRUE;
break;
80 case 'c': MakeCode = 0x2e; NormalKey =
TRUE;
break;
81 case 'v': MakeCode = 0x2f; NormalKey =
TRUE;
break;
82 case 'b': MakeCode = 0x30; NormalKey =
TRUE;
break;
83 case 'n': MakeCode = 0x31; NormalKey =
TRUE;
break;
84 case 'm': MakeCode = 0x32; NormalKey =
TRUE;
break;
85 case ',': MakeCode = 0x33; NormalKey =
TRUE;
break;
86 case '.': MakeCode = 0x34; NormalKey =
TRUE;
break;
87 case '/': MakeCode = 0x35; NormalKey =
TRUE;
break;
88
89 case ' ': MakeCode = 0x39; NormalKey =
TRUE;
break;
90 }
91 if (NormalKey && *OutputBufferSize >= 2)
92 {
97 *BytesConsumed = 2;
99 }
100
101
102 DPRINT1(
"Strange byte received 0x%02x ('%c')\n",
104 *BytesConsumed = 1;
106}
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer