Annotation of /mcore-src/trunk/mcore-tools/src/modules/basic-input/input.client.class.in
Parent Directory | Revision Log
Revision 1645 -
(hide annotations)
(download)
Thu Mar 10 18:14:34 2011 UTC (13 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/daemon/client/include/input.client.class
File size: 625 byte(s)
Thu Mar 10 18:14:34 2011 UTC (13 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/daemon/client/include/input.client.class
File size: 625 byte(s)
-x11runas checks for X, removed unnecessary checks
1 | niro | 1248 | # $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 | niro | 1645 | x11runas "setxkbmap ${value}" |
40 | niro | 1248 | } |