2
# This script configures XFree86 (woody version 4.2.x)
7
# We use preseed() helper subroutine so we have to include
9
require '/usr/lib/localization-config/common/preseed.pl';
11
# Define the package name
12
my $package = "xserver-xfree86";
14
# If no locale is given as argument, quit
15
my $lang = $ARGV[0] or die "No language given";
17
# We define an associative arrays with the debconf keys
18
# These will be used in combination with the values in the
20
my %keynames = ( LAYOUT => 'xserver-xfree86/config/inputdevice/keyboard/layout',
21
XKBOPTIONS => 'xserver-xfree86/config/inputdevice/keyboard/options',
22
XKBMODEL => 'xserver-xfree86/config/inputdevice/keyboard/model',
23
XKBVARIANT => 'xserver-xfree86/config/inputdevice/keyboard/variant'
26
# keyboard layout name
27
# one of: am, az, be, bg, br, ca, cs, de, dk, dvorak, ee, el, es, fi,
28
# fr, gb, hu, il, is, it, la, lt, mk, no, pl, pt, ro, ru, se, si, sr,
30
# The XKBOPTIONS holds the value of the corresponding XkbOptions found
31
# in the XF86Config-4 file. For example to enable keymap switching for
32
# the Greek keyboard, one possible option is 'grp:ctrl_shift_toggle'.
35
# entries sorted alphabetically
36
'bs_BA.ISO8859-2' => { LAYOUT => 'bs', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
37
'bg_BG' => { LAYOUT => 'bg', XKBVARIANT => ',bds', XKBOPTIONS => 'grp:alt_shift_toggle,grp_led:scroll' },
38
'ca_ES@euro' => { LAYOUT => 'es', XKBOPTIONS => '', XKBMODEL => 'pc105' },
39
'cs_CZ' => { LAYOUT => 'cz_qwerty', XKBOPTIONS => 'grp:shift_toggle,grp_led:scroll' },
40
'da_DK' => { LAYOUT => 'dk', XKBOPTIONS => '', XKBMODEL => 'pc105' },
41
'de_BE@euro' => { LAYOUT => 'de', XKBOPTIONS => '', XKBMODEL => 'pc105' },
42
'de_CH' => { LAYOUT => 'de_CH', XKBOPTIONS => '', XKBMODEL => 'pc105' },
43
'de_DE@euro' => { LAYOUT => 'de', XKBOPTIONS => 'nodeadkeys', XKBMODEL => 'pc105' },
44
'el_GR.UTF-8' => { LAYOUT => 'el', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
45
'en_AU' => { LAYOUT => 'us', XKBOPTIONS => '' },
46
'en_CA' => { LAYOUT => 'us', XKBOPTIONS => '' },
47
'en_IE@euro' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
48
'ga_IE@euro' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
49
'en_GB' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
50
'gd_GB' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
51
'gv_GB' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
52
'kw_GB' => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
53
'en_US' => { LAYOUT => 'us', XKBOPTIONS => '' },
54
'es_AR' => { LAYOUT => 'es', XKBOPTIONS => '' },
55
'es_ES@euro' => { LAYOUT => 'es', XKBOPTIONS => '', XKBMODEL => 'pc105' },
56
'es_MX' => { LAYOUT => 'la', XKBOPTIONS => '' },
57
'es_PE' => { LAYOUT => 'es_la', XKBOPTIONS => '' },
58
'fa_IR.UTF-8' => { LAYOUT => 'us,fa', XKBOPTIONS => 'grp:ctrl_shift_toggle,grp_led:scroll', XKBMODEL => 'pc105' },
59
'fi_FI' => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
60
'fi_FI@euro' => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
61
'fr_BE' => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
62
'fr_BE@euro' => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
63
'fr_CA' => { LAYOUT => 'us', XKBOPTIONS => '' },
64
'fr_CH' => { LAYOUT => 'fr_CH', XKBOPTIONS => '', XKBMODEL => 'pc105' },
65
'fr_FR@euro' => { LAYOUT => 'fr', XKBOPTIONS => '', XKBMODEL => 'pc105' },
66
'he_IL' => { LAYOUT => 'il', XKBOPTIONS => 'grp:alt_shift_toggle' },
67
'it_IT@euro' => { LAYOUT => 'it', XKBOPTIONS => '', XKBMODEL => 'pc105' },
68
'ja_JP.EUC-JP' => { LAYOUT => 'jp', XKBOPTIONS => '', XKBMODEL => 'jp106' },
69
'ko_KR' => { LAYOUT => 'us', XKBOPTIONS => '' },
70
'lv_LV' => { LAYOUT => 'lv', XKBOPTIONS => '' },
71
'lt_LT' => { LAYOUT => 'lt', XKBOPTIONS => 'grp:ctrl_shift_toggle', XKBMODEL => 'pc105' },
72
'nb_NO' => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' }, # Same as no_NO
73
'nds_DE' => { LAYOUT => 'de', XKBOPTIONS => '' },
74
'nl_BE@euro' => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
75
'nl_NL@euro' => { LAYOUT => 'us', XKBOPTIONS => '', XKBMODEL => 'pc105' },
76
'nn_NO' => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' },
77
'no_NO' => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' }, # Same as nb_NO
78
'pl_PL' => { LAYOUT => 'pl', XKBOPTIONS => '', XKBMODEL => 'pc105' },
79
'pt_BR' => { LAYOUT => 'br', XKBOPTIONS => '', XKBMODEL => 'abnt2', XKBVARIANT => 'abnt2' },
80
'ru_RU' => { LAYOUT => 'ru', XKBOPTIONS => 'grp:ctrl_shift_toggle,grp_led:scroll', XKBMODEL => 'pc105' },
81
'se_NO' => { LAYOUT => 'sapmi', XKBOPTIONS => '' },
82
'sk_SK' => { LAYOUT => 'sk_qwerty', XKBOPTIONS => 'grp:shift_toggle,grp_led:scroll' },
83
'sl_SI' => { LAYOUT => 'si', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
84
'sv_SE' => { LAYOUT => 'se', XKBOPTIONS => '', XKBMODEL => 'pc105' },
85
'sv_FI' => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
86
'sv_FI@euro' => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
87
'tr_TR' => { LAYOUT => 'tr', XKBOPTIONS => 'caps:shift', XKBMODEL => 'pc105' },
88
'uk_UA' => { LAYOUT => 'ua', XKBOPTIONS => 'grp_led:caps,grp:ctrl_shift_toggle', XKBMODEL => 'pc105'},
95
# Print the supported locale entries.
96
if ("supported" eq $lang) {
97
for $lang (sort keys %lang_map) {
103
# Call the preseed() subroutine to set the package debconf values.
104
preseed($package, $lang, \%lang_map, \%keynames);