Rev 4285 | Rev 4462 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4285 | Rev 4298 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | layout_reset, |
52 | layout_reset, |
53 | layout_parse_ev |
53 | layout_parse_ev |
54 | }; |
54 | }; |
55 | 55 | ||
56 | static wchar_t map_lcase[] = { |
56 | static wchar_t map_lcase[] = { |
57 | [KC_2] = L'ě', |
- | |
58 | [KC_3] = L'š', |
- | |
59 | [KC_4] = L'č', |
- | |
60 | [KC_5] = L'ř', |
- | |
61 | [KC_6] = L'ž', |
- | |
62 | [KC_7] = L'ý', |
- | |
63 | [KC_8] = L'á', |
- | |
64 | [KC_9] = L'í', |
- | |
65 | [KC_0] = L'é', |
- | |
66 | - | ||
67 | [KC_LBRACKET] = L'ú', |
- | |
68 | [KC_SEMICOLON] = L'ů', |
- | |
69 | - | ||
70 | [KC_Q] = 'q', |
57 | [KC_Q] = 'q', |
71 | [KC_W] = 'w', |
58 | [KC_W] = 'w', |
72 | [KC_E] = 'e', |
59 | [KC_E] = 'e', |
73 | [KC_R] = 'r', |
60 | [KC_R] = 'r', |
74 | [KC_T] = 't', |
61 | [KC_T] = 't', |
Line 96... | Line 83... | ||
96 | [KC_N] = 'n', |
83 | [KC_N] = 'n', |
97 | [KC_M] = 'm', |
84 | [KC_M] = 'm', |
98 | }; |
85 | }; |
99 | 86 | ||
100 | static wchar_t map_ucase[] = { |
87 | static wchar_t map_ucase[] = { |
101 | [KC_2] = L'Ě', |
- | |
102 | [KC_3] = L'Š', |
- | |
103 | [KC_4] = L'Č', |
- | |
104 | [KC_5] = L'Ř', |
- | |
105 | [KC_6] = L'Ž', |
- | |
106 | [KC_7] = L'Ý', |
- | |
107 | [KC_8] = L'Á', |
- | |
108 | [KC_9] = L'Í', |
- | |
109 | [KC_0] = L'É', |
- | |
110 | - | ||
111 | [KC_LBRACKET] = L'Ú', |
- | |
112 | [KC_SEMICOLON] = L'Ů', |
- | |
113 | - | ||
114 | [KC_Q] = 'Q', |
88 | [KC_Q] = 'Q', |
115 | [KC_W] = 'W', |
89 | [KC_W] = 'W', |
116 | [KC_E] = 'E', |
90 | [KC_E] = 'E', |
117 | [KC_R] = 'R', |
91 | [KC_R] = 'R', |
118 | [KC_T] = 'T', |
92 | [KC_T] = 'T', |
Line 181... | Line 155... | ||
181 | [KC_COMMA] = '?', |
155 | [KC_COMMA] = '?', |
182 | [KC_PERIOD] = ':', |
156 | [KC_PERIOD] = ':', |
183 | [KC_SLASH] = '_', |
157 | [KC_SLASH] = '_', |
184 | }; |
158 | }; |
185 | 159 | ||
- | 160 | static wchar_t map_ns_nocaps[] = { |
|
- | 161 | [KC_2] = L'ě', |
|
- | 162 | [KC_3] = L'š', |
|
- | 163 | [KC_4] = L'č', |
|
- | 164 | [KC_5] = L'ř', |
|
- | 165 | [KC_6] = L'ž', |
|
- | 166 | [KC_7] = L'ý', |
|
- | 167 | [KC_8] = L'á', |
|
- | 168 | [KC_9] = L'í', |
|
- | 169 | [KC_0] = L'é', |
|
- | 170 | ||
- | 171 | [KC_LBRACKET] = L'ú', |
|
- | 172 | [KC_SEMICOLON] = L'ů' |
|
- | 173 | }; |
|
- | 174 | ||
- | 175 | static wchar_t map_ns_caps[] = { |
|
- | 176 | [KC_2] = L'Ě', |
|
- | 177 | [KC_3] = L'Š', |
|
- | 178 | [KC_4] = L'Č', |
|
- | 179 | [KC_5] = L'Ř', |
|
- | 180 | [KC_6] = L'Ž', |
|
- | 181 | [KC_7] = L'Ý', |
|
- | 182 | [KC_8] = L'Á', |
|
- | 183 | [KC_9] = L'Í', |
|
- | 184 | [KC_0] = L'É', |
|
- | 185 | ||
- | 186 | [KC_LBRACKET] = L'Ú', |
|
- | 187 | [KC_SEMICOLON] = L'Ů' |
|
- | 188 | }; |
|
- | 189 | ||
186 | static wchar_t map_neutral[] = { |
190 | static wchar_t map_neutral[] = { |
187 | [KC_BACKSPACE] = '\b', |
191 | [KC_BACKSPACE] = '\b', |
188 | [KC_TAB] = '\t', |
192 | [KC_TAB] = '\t', |
189 | [KC_ENTER] = '\n', |
193 | [KC_ENTER] = '\n', |
190 | [KC_SPACE] = ' ', |
194 | [KC_SPACE] = ' ', |
Line 323... | Line 327... | ||
323 | 327 | ||
324 | c = translate(ev->key, map_neutral, sizeof(map_neutral) / sizeof(wchar_t)); |
328 | c = translate(ev->key, map_neutral, sizeof(map_neutral) / sizeof(wchar_t)); |
325 | if (c != 0) |
329 | if (c != 0) |
326 | return c; |
330 | return c; |
327 | 331 | ||
- | 332 | if ((ev->mods & KM_SHIFT) == 0) { |
|
- | 333 | if ((ev->mods & KM_CAPS_LOCK) != 0) |
|
- | 334 | c = translate(ev->key, map_ns_caps, sizeof(map_ns_caps) / sizeof(wchar_t)); |
|
- | 335 | else |
|
- | 336 | c = translate(ev->key, map_ns_nocaps, sizeof(map_ns_nocaps) / sizeof(wchar_t)); |
|
- | 337 | ||
- | 338 | if (c != 0) |
|
- | 339 | return c; |
|
- | 340 | } |
|
- | 341 | ||
328 | if (((ev->mods & KM_SHIFT) != 0) ^ ((ev->mods & KM_CAPS_LOCK) != 0)) |
342 | if (((ev->mods & KM_SHIFT) != 0) ^ ((ev->mods & KM_CAPS_LOCK) != 0)) |
329 | c = translate(ev->key, map_ucase, sizeof(map_ucase) / sizeof(wchar_t)); |
343 | c = translate(ev->key, map_ucase, sizeof(map_ucase) / sizeof(wchar_t)); |
330 | else |
344 | else |
331 | c = translate(ev->key, map_lcase, sizeof(map_lcase) / sizeof(wchar_t)); |
345 | c = translate(ev->key, map_lcase, sizeof(map_lcase) / sizeof(wchar_t)); |
332 | 346 |