Contents of /mcore-src/trunk/mcore-tools/daemon/client/include/input.client.class
Parent Directory | Revision Log
Revision 1248 -
(show annotations)
(download)
Wed Feb 2 20:20:24 2011 UTC (13 years, 7 months ago) by niro
File size: 659 byte(s)
Wed Feb 2 20:20:24 2011 UTC (13 years, 7 months ago) by niro
File size: 659 byte(s)
-initial version
1 | # $Id$ |
2 | |
3 | provide basic-input |
4 | |
5 | help_input_keymap() |
6 | { |
7 | mecho "set input.keymap [keymap]" |
8 | mecho " de, us, en, gr, etc" |
9 | } |
10 | |
11 | # set_input_mouse |
12 | set_input_mouse() |
13 | { |
14 | return 0 |
15 | } |
16 | |
17 | # set_input_keyboard |
18 | set_input_keyboard() |
19 | { |
20 | return 0 |
21 | } |
22 | |
23 | # set_input_keyboard |
24 | set_input_keymap() |
25 | { |
26 | local value="$1" |
27 | local CONFIG="/etc/X11/xorg.conf.d/25-layout.conf" |
28 | |
29 | [[ -z ${value} ]] && help_input_keymap && return 1 |
30 | |
31 | clearconfig |
32 | |
33 | addconfig 'Section "InputClass"' |
34 | addconfig ' Identifier "keyboard layout"' |
35 | addconfig ' MatchIsKeyboard "on"' |
36 | addconfig " Option \"XkbLayout\" \"${value}\"" |
37 | addconfig 'EndSection' |
38 | |
39 | if pidof X |
40 | then |
41 | x11runas "DISPLAY=:0 setxkbmap ${value}" |
42 | fi |
43 | } |