Subversion Repositories HelenOS

Rev

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_qwerty_op = {
-
 
42
    layout_parse_ev
-
 
43
};
-
 
44
 
39
static wchar_t map_lcase[] = {
45
static wchar_t map_lcase[] = {
40
    [KC_Q] = 'q',
46
    [KC_Q] = 'q',
41
    [KC_W] = 'w',
47
    [KC_W] = 'w',
42
    [KC_E] = 'e',
48
    [KC_E] = 'e',
43
    [KC_R] = 'r',
49
    [KC_R] = 'r',
Line 189... Line 195...
189
    if (key >= map_length)
195
    if (key >= map_length)
190
        return 0;
196
        return 0;
191
    return map[key];
197
    return map[key];
192
}
198
}
193
 
199
 
194
wchar_t layout_parse_ev(kbd_event_t *ev)
200
static wchar_t layout_parse_ev(kbd_event_t *ev)
195
{
201
{
196
    wchar_t c;
202
    wchar_t c;
197
 
203
 
198
    /* Produce no characters when Ctrl or Alt is pressed. */
204
    /* Produce no characters when Ctrl or Alt is pressed. */
199
    if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)
205
    if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)