Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/daemon/client/include/input.client.class

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1259 - (show annotations) (download)
Fri Feb 4 19:59:17 2011 UTC (13 years, 2 months ago) by niro
File size: 648 byte(s)
-x11runas selects the used Xorg display itself via MCORE_XORG_DISPLAY variable
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 "setxkbmap ${value}"
42 fi
43 }