Changeset 0175246 in mainline
- 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
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r56fa418 r0175246 457 457 % External ramdisk 458 458 ! [PLATFORM=sparc64] CONFIG_RD_EXTERNAL (y/n) 459 460 % Keyboard layout461 @ "cz" Czech462 @ "us_qwerty" US QWERTY463 @ "us_dvorak" US Dvorak464 ! KBD_LAYOUT (choice) -
defaults/amd64/Makefile.config
r56fa418 r0175246 58 58 # Default framebuffer depth 59 59 CONFIG_VESA_BPP = 16 60 61 # Keyboard layout62 KBD_LAYOUT = us_qwerty -
defaults/arm32/Makefile.config
r56fa418 r0175246 31 31 # What is your output device? 32 32 CONFIG_HID_OUT = generic 33 34 # Keyboard layout35 KBD_LAYOUT = us_qwerty -
defaults/ia32/Makefile.config
r56fa418 r0175246 64 64 # Default framebuffer depth 65 65 CONFIG_VESA_BPP = 16 66 67 # Keyboard layout68 KBD_LAYOUT = us_qwerty -
defaults/ia64/Makefile.config
r56fa418 r0175246 43 43 # Output device class 44 44 CONFIG_HID_OUT = generic 45 46 # Keyboard layout47 KBD_LAYOUT = us_qwerty -
defaults/mips32/Makefile.config
r56fa418 r0175246 37 37 # Output device class 38 38 CONFIG_HID_OUT = generic 39 40 # Keyboard layout41 KBD_LAYOUT = us_qwerty -
defaults/ppc32/Makefile.config
r56fa418 r0175246 34 34 # Use Block Address Translation by the loader 35 35 CONFIG_BAT = y 36 37 # Keyboard layout38 KBD_LAYOUT = us_qwerty -
defaults/sparc64/Makefile.config
r56fa418 r0175246 55 55 # External ramdisk 56 56 CONFIG_RD_EXTERNAL = y 57 58 # Keyboard layout59 KBD_LAYOUT = us_qwerty -
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.