- Timestamp:
- 2009-04-05T16:20:02Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 482c86f
- Parents:
- 56fa418
- Location:
- uspace/srv
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/console/console.c
r56fa418 r0175246 437 437 438 438 if ((ev.key >= KC_F1) && (ev.key < KC_F1 + 439 CONSOLE_COUNT) ) {439 CONSOLE_COUNT) && ((ev.mods & KM_CTRL) == 0)) { 440 440 if (ev.key == KC_F12) 441 441 change_console(KERNEL_CONSOLE); -
uspace/srv/kbd/Makefile
r56fa418 r0175246 50 50 51 51 ARCH_SOURCES = 52 GENARCH_SOURCES = 53 54 ifeq ($(KBD_LAYOUT), cz) 55 GENARCH_SOURCES += layout/cz.c 56 endif 57 ifeq ($(KBD_LAYOUT), us_qwerty) 58 GENARCH_SOURCES += layout/us_qwerty.c 59 endif 60 ifeq ($(KBD_LAYOUT), us_dvorak) 61 GENARCH_SOURCES += layout/us_dvorak.c 62 endif 52 GENARCH_SOURCES = \ 53 layout/cz.c \ 54 layout/us_qwerty.c \ 55 layout/us_dvorak.c 63 56 64 57 ifeq ($(UARCH), amd64) -
uspace/srv/kbd/generic/kbd.c
r56fa418 r0175246 71 71 int cir_phone = -1; 72 72 73 #define NUM_LAYOUTS 3 74 75 static layout_op_t *layout[NUM_LAYOUTS] = { 76 &us_qwerty_op, 77 &us_dvorak_op, 78 &cz_op 79 }; 80 81 static int active_layout = 0; 82 73 83 void kbd_push_scancode(int scancode) 74 84 { … … 124 134 printf("keycode: %u\n", key); 125 135 */ 136 if (type == KE_PRESS && (mods & KM_LCTRL) && 137 key == KC_F1) { 138 active_layout = 0; 139 return; 140 } 141 142 if (type == KE_PRESS && (mods & KM_LCTRL) && 143 key == KC_F2) { 144 active_layout = 1; 145 return; 146 } 147 148 if (type == KE_PRESS && (mods & KM_LCTRL) && 149 key == KC_F3) { 150 active_layout = 2; 151 return; 152 } 153 126 154 ev.type = type; 127 155 ev.key = key; 128 156 ev.mods = mods; 129 157 130 ev.c = layout _parse_ev(&ev);158 ev.c = layout[active_layout]->parse_ev(&ev); 131 159 132 160 async_msg_4(phone2cons, KBD_EVENT, ev.type, ev.key, ev.mods, ev.c); -
uspace/srv/kbd/include/layout.h
r56fa418 r0175246 41 41 #include <sys/types.h> 42 42 43 extern wchar_t layout_parse_ev(kbd_event_t *); 43 typedef struct { 44 wchar_t (*parse_ev)(kbd_event_t *); 45 } layout_op_t; 46 47 extern layout_op_t us_qwerty_op; 48 extern layout_op_t us_dvorak_op; 49 extern layout_op_t cz_op; 44 50 45 51 #endif -
uspace/srv/kbd/layout/cz.c
r56fa418 r0175246 37 37 #include <layout.h> 38 38 39 static wchar_t layout_parse_ev(kbd_event_t *ev); 40 41 layout_op_t cz_op = { 42 layout_parse_ev 43 }; 44 39 45 static wchar_t map_lcase[] = { 40 46 [KC_2] = L'ě', … … 202 208 } 203 209 204 wchar_t layout_parse_ev(kbd_event_t *ev)210 static wchar_t layout_parse_ev(kbd_event_t *ev) 205 211 { 206 212 wchar_t c; -
uspace/srv/kbd/layout/us_dvorak.c
r56fa418 r0175246 37 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 45 static wchar_t map_lcase[] = { 40 46 [KC_R] = 'p', … … 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 208 wchar_t c; -
uspace/srv/kbd/layout/us_qwerty.c
r56fa418 r0175246 37 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 45 static wchar_t map_lcase[] = { 40 46 [KC_Q] = 'q', … … 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 202 wchar_t c;
Note:
See TracChangeset
for help on using the changeset viewer.