Rev 4236 | Rev 4285 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4236 | Rev 4240 | ||
|---|---|---|---|
| Line 34... | Line 34... | ||
| 34 | #include <kbd.h> |
34 | #include <kbd.h> |
| 35 | #include <kbd/kbd.h> |
35 | #include <kbd/kbd.h> |
| 36 | #include <kbd/keycode.h> |
36 | #include <kbd/keycode.h> |
| 37 | #include <layout.h> |
37 | #include <layout.h> |
| 38 | 38 | ||
| - | 39 | static wchar_t layout_parse_ev(kbd_event_t *ev); |
|
| - | 40 | ||
| - | 41 | layout_op_t us_dvorak_op = { |
|
| - | 42 | layout_parse_ev |
|
| - | 43 | }; |
|
| - | 44 | ||
| 39 | static wchar_t map_lcase[] = { |
45 | static wchar_t map_lcase[] = { |
| 40 | [KC_R] = 'p', |
46 | [KC_R] = 'p', |
| 41 | [KC_T] = 'y', |
47 | [KC_T] = 'y', |
| 42 | [KC_Y] = 'f', |
48 | [KC_Y] = 'f', |
| 43 | [KC_U] = 'g', |
49 | [KC_U] = 'g', |
| Line 195... | Line 201... | ||
| 195 | if (key >= map_length) |
201 | if (key >= map_length) |
| 196 | return 0; |
202 | return 0; |
| 197 | return map[key]; |
203 | return map[key]; |
| 198 | } |
204 | } |
| 199 | 205 | ||
| 200 | wchar_t layout_parse_ev(kbd_event_t *ev) |
206 | static wchar_t layout_parse_ev(kbd_event_t *ev) |
| 201 | { |
207 | { |
| 202 | wchar_t c; |
208 | wchar_t c; |
| 203 | 209 | ||
| 204 | /* Produce no characters when Ctrl or Alt is pressed. */ |
210 | /* Produce no characters when Ctrl or Alt is pressed. */ |
| 205 | if ((ev->mods & (KM_CTRL | KM_ALT)) != 0) |
211 | if ((ev->mods & (KM_CTRL | KM_ALT)) != 0) |