我就有这样的烦恼。
我想创建一个新的自定义布局,因为我想在意大利键盘上使用西里尔字母,并尽可能少地更改按键。
我在 /usr/share/X11/xkb/symbols 目录中创建了文件,并在 /usr/share/X11/xkb/rules 中更改了 evdev.xml 和 evdev.lst 文件。打开首选项键盘设置窗口,我可以找到我的新布局,但当我选择它时,系统会通知我一个错误:
Errore nell'attivare la configurazione XKB.
Le cause di ciò potrebbero essere diverse.
Per segnalare questa situazione come bug, includere i risultati dei comandi:
• xprop -root | grep XKB
• gsettings get org.gnome.libgnomekbd.keyboard model
• gsettings get org.gnome.libgnomekbd.keyboard layouts
• gsettings get org.gnome.libgnomekbd.keyboard options
执行命令后我得到:
xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "it", "", ""
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "it,ru", ",", "grp:shifts_toggle"
gsettings get org.gnome.libgnomekbd.keyboard model
''
gsettings get org.gnome.libgnomekbd.keyboard layouts
['it', 'ru', ' ru_it ']
gsettings get org.gnome.libgnomekbd.keyboard options
['grp\tgrp:shifts_toggle']
我的布局文件是这样的:
partial alphanumeric_keys
xkb_symbols "ru_it" {
include "latin(type4)"
name[Group1]= “Russian (on Italian keyboard)”; !!!!!TROUBLE IS HERE!!!!!!!!!
key <AB01> { [ Cyrillic_ya, Cyrillic_YA, z, Z ] }; // я Я z Z
key <AB02> { [ Cyrillic_che, Cyrillic_CHE, x, X ] }; // ч Ч x X
key <AB03> { [ Cyrillic_es, Cyrillic_ES, c, C ] }; // с С c C
key <AB04> { [ Cyrillic_em, Cyrillic_EM, v, V ] }; // м М v V
key <AB05> { [ Cyrillic_i, Cyrillic_I, b, B ] }; // и И b B
key <AB06> { [ Cyrillic_te, Cyrillic_TE, n, N ] }; // т Т n N
key <AB07> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, m, M ] }; // ь Ь m M
key <AB08> { [ Cyrillic_be, Cyrillic_BE, comma, semicolon ] }; // б Б , ;
key <AB09> { [ Cyrillic_yu, Cyrillic_YU, period, colon ] }; // ю Ю . :
key <AB10> { [ minus, underscore, dead_doubleacute, dead_doubleacute ] }; // - _
key <AC01> { [ Cyrillic_ef, Cyrillic_EF, a, A ] }; // ф Ф a A
key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU, s, S ] }; // ы Ы s S
key <AC03> { [ Cyrillic_ve, Cyrillic_VE, d, D ] }; // в В d D
key <AC04> { [ Cyrillic_a, Cyrillic_A, f, F ] }; // а А f F
key <AC05> { [ Cyrillic_pe, Cyrillic_PE, g, G ] }; // п П g G
key <AC06> { [ Cyrillic_er, Cyrillic_ER, h, H ] }; // р Р h H
key <AC07> { [ Cyrillic_o, Cyrillic_O, j, J ] }; // о О j J
key <AC08> { [ Cyrillic_el, Cyrillic_EL, k, K ] }; // л Л k K
key <AC09> { [ Cyrillic_de, Cyrillic_DE, l, L ] }; // д Д l L
key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, at, EuroSign ] }; // ж Ж @ €
key <AC11> { [ Cyrillic_e, Cyrillic_E, numbersign, degree ] }; // э Э # °
key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, q, Q ] }; // й Й q Q
key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, w, W ] }; // ц Ц w W
key <AD03> { [ Cyrillic_u, Cyrillic_U, e, E ] }; // у У e E
key <AD04> { [ Cyrillic_ka, Cyrillic_KA, r, R ] }; // к К r R
key <AD05> { [ Cyrillic_ie, Cyrillic_IE, t, T ] }; // е Е t T
key <AD06> { [ Cyrillic_en, Cyrillic_EN, y, Y ] }; // н Н y Y
key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, u, U ] }; // г Г u U
key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, i, I ] }; // ш Ш i I
key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA, o, O ] }; // щ Щ o O
key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, p, P ] }; // з З p P
key <AD11> { [ Cyrillic_ha, Cyrillic_HA, bracketleft, bracketright ] }; // х Х [ ]
key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, plus, asterisk ] }; // ъ Ъ + *
key <AE01> { [ 1, exclam, dead_doubleacute, dead_doubleacute ] }; // 1 !
key <AE02> { [ 2, quotedbl, dead_doubleacute, dead_doubleacute ] }; // 2 quotedbl
key <AE03> { [ 3, sterling, dead_doubleacute, dead_doubleacute ] }; // 3 £
key <AE04> { [ 4, dollar, dead_doubleacute, dead_doubleacute ] }; // 4 $
key <AE05> { [ 5, percent, dead_doubleacute, dead_doubleacute ] }; // 5 %
key <AE06> { [ 6, ampersand, dead_doubleacute, dead_doubleacute ] }; // 6 &
key <AE07> { [ 7, slash, dead_doubleacute, dead_doubleacute ] }; // 7 /
key <AE08> { [ 8, parenleft, dead_doubleacute, dead_doubleacute ] }; // 8 (
key <AE09> { [ 9, parenright, dead_doubleacute, dead_doubleacute ] }; // 9 )
key <AE10> { [ 0, equal, dead_doubleacute, dead_doubleacute ] }; // 0 =
key <AE11> { [ apostrophe, question, dead_doubleacute, dead_doubleacute ] }; // ' ?
key <AE12> { [ igrave, asciicircum, dead_doubleacute, dead_doubleacute ] }; // ì ^
key <BKSL> { [ Cyrillic_io, Cyrillic_IO, braceleft, braceright ] }; // ё Ё { }
key <LSGT> { [ less, greater, dead_doubleacute, dead_doubleacute ] }; // < >
key <TLDE> { [ backslash, bar, dead_doubleacute, dead_doubleacute ] }; // \ |
include "level3(ralt_switch)"
};
evdev.xml 文件中的行如下:
<layout>
<configItem>
<name> ru_it </name>
<shortDescription> ruit </shortDescription>
<description> "Russian (on Italian keyboard)" </description>
<languagelist>
<iso639Id> rus </iso639Id>
</languagelist>
</configItem>
</layout>
有人可以帮助我了解如何解决这个问题吗?
答案1
您的布局有
name[Group1]= “Russian (on Italian keyboard)”; !!!!!TROUBLE IS HERE!!!!!!!!!
其中包括 Unicode 引号,而不是标准 ASCII 引号“”。
答案2
虽然我不能提供太多帮助,但我刚刚发现了这个简洁的教程:
http://people.uleth.ca/~daniel.odonnell/Blog/custom-keyboard-in-linuxx11
也许它能有帮助。