我尝试在Ubuntu 18.04.1 LTS中设置自定义键盘布局,以便能够出于科学目的编写阿拉伯语音译(请参阅:https ://en.wikipedia.org/wiki/Romanization_of_Arabic ;https://en.wikipedia.org / wiki / DIN_31635)因此,我需要能够键入特殊字符。
我或多或少遵循了以下指示:
我做了什么:
当我说德语时,我使用gedit和root权限在/ usr / share / X11 / xkb / symbols /中打开了“ de”。
在此文件中,我在末尾插入了以下内容并进行了保存(之前是原始文件的备份):
// Deutsch mit orientalistischer Umschrift
partial alphanumeric_keys
xkb_symbols "german_orient" {
include "de(basic)"
name[Group1]="Deutsch (Orientalistische Umschrift)";
key <BKSL> { [numbersign, apostrophe, U+02BE, dead_breve ] };
key <AE12> { [dead_acute, dead_grave, U+02BF, dead_ogonek ] };
key <AC11> { [adiaeresis, Adiaeresis, U+0304, dead_caron ] };
key <AB10> { [minus, underscore, U+0331, emdash ] };
key <AC10> { [odiaeresis, Odiaeresis, U+0307, dead_belowdot ] };
key <AB09> { [period, colon, U+0323, division ] };
key <AB08> { [comma, semicolon, U+030C, multiply ] };
key <AC06> { [h, H, U+032E, NoSymbol ] };
};
与此处列出的每个键的德语标准键盘布局相比,根据我的需要更改了第三项(=与AltGr一起按下键)。顺便说一句,我通过在互联网上查找特殊字符得到了Unicode代码。
然后我打开evdev.xml
在/usr/share/X11/xkb/rules/
以同样的方式
在此文件中,我搜索了德语(de)布局条目,并在其末尾(意味着之前</layout>
)插入了以下内容并保存了该文件:
<variant>
<configItem>
<name>german_orient</name>
<description>Deutsch (Orientalistische Umschrift)</description>
</configItem>
</variant>
然后,我在终端中键入以下命令,然后按Enter键,sudo dpkg-reconfigure xkb-data
因为在许多有关该主题的教程中都建议这样做
然后我重新启动。
然后,我在Ubuntu首选项中添加了新的键盘布局“ Deutsch(Orientalistische Umschrift)”(意思是:德语(东方音译))
结果不是我所希望的:
我不仅不能用分配的键来写特殊字符。我想我以某种方式“破坏”了“ de”键盘布局,因为无论我激活标准的德国布局还是通过super + space激活“ Deutsch(Orientalistische Umschrift)”布局,该系统似乎都已退回到默认的英语键盘布局。因此,即使激活了其中一种德语版式,我写的字母还是根据英语版式(例如,字母“ z”和“ y”已切换)。
因此,最后,我使用已经制作的两个文件的备份取消了更改,现在一切恢复正常。
但是由于我需要能够出于专业目的快速编写阿拉伯语音译,并且至少就我所知,没有可用于此目的的键盘布局可供下载(因为使用Linux的该领域的学者数量很少)我需要这里有人的帮助,告诉我要进行哪些更改才能使自定义键盘布局起作用。
我在Linux上仍然是菜鸟,如果错过了明显的事情,对不起。无论如何,在此先感谢您的帮助!
我自己找到了一个解决方案,因此我会将其发布在这里,因为其他人可能会从中受益
我从https://github.com/simos/keyboardlayouteditor下载并安装了KeyboardLayoutEditor
运行KeyboardLayoutEditor并加载合适的语言布局文件(以我为例)
然后单击“开始Charakter Map”按钮,它将加载Gucharmap(我必须首先通过Ubuntu软件中心安装它才能正常工作)
现在,选择要添加到某个键的字符(您也可以通过输入Unicode代码在Gucharmap中搜索符号)
并将其拖放到KeyboardLayoutEditor中适当键的4个位置之一(有关最终代码,请参见下文)
插入所有字符后,您可以保存文件
然后我sudo dpkg-reconfigure xkb-data
在控制台中使用了命令
终于我重新启动了
结果:Ethingthin现在就像魅力一样发挥作用!:)
我不知道为什么这次通过使用KeyboardLayoutEditor起作用。
我的第一个猜测是,它起作用是因为我没有尝试向键盘布局文件(de)添加新的变体,而是编辑了现有的变体,从而避免了在编辑de-file和evdev-xml时可能出现的错误。
我的第二个猜测是它起作用,因为KeyboardLayout编辑器编写的Unicode代码与我第一次手动编辑去文件时的代码不同。
(这是最终版本,其中我已经手动纠正了应用程序所犯的错误)
////////////////////////////////////////////////////////////////////////////// ///
//
// Generated keyboard layout file with the Keyboard Layout Editor.
// For more about the software, see http://code.google.com /p/keyboardlayouteditor
//
xkb_symbols "basic"
{
name[Group1] = "German";
include "latin(type4)"
include "level3(ralt_switch)"
include "kpdl(comma)"
key <AB01> { [ y, Y, guillemotright, U203A ] }; // y Y » ›
key <AB02> { [ x, X, guillemotleft, U2039 ] }; // x X « ‹
key <AB04> { [ v, V, doublelowquotemark, singlelowquotemark ] }; // v V „ ‚
key <AB05> { [ b, B, leftdoublequotemark, leftsinglequotemark ] }; // b B “ ‘
key <AB06> { [ n, N, rightdoublequotemark, rightsinglequotemark ] }; // n N ” ’
key <AB08> { [ comma, semicolon, U030C, multiply ] }; // , ; Dˇ ×
key <AB09> { [ period, colon, U0323, division ] }; // . : D? ÷
key <AB10> { [ minus, underscore, U0331, emdash ] }; // - _ ̱ —
key <AC02> { [ s, S, U017F, U1E9E ] }; // s S ſ ẞ
key <AC06> { [ h, H, U032E ] }; // ̮
key <AC07> { [ j, J, dead_belowdot, dead_abovedot ] }; // j J D? D˙
key <AC10> { [ odiaeresis, Odiaeresis, U0307, dead_belowdot ] }; // ö Ö D˙ D?
key <AC11> { [ adiaeresis, Adiaeresis, U0304, dead_caron ] }; // ä Ä Dˉ Dˇ
key <AD03> { [ e, E, EuroSign, EuroSign ] }; // e E € €
key <AD06> { [ z, Z, leftarrow, yen ] }; // z Z ← ¥
key <AD11> { [ udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] }; // ü D¨ D˚
key <AD12> { [ plus, asterisk, asciitilde, macron ] }; // + * ~ ¯
key <AE02> { [ KP_2, quotedbl, twosuperior, oneeighth ] }; // 2 " ² ⅛
key <AE03> { [ KP_3, section, threesuperior, sterling ] }; // 3 § ³ £
key <AE04> { [ KP_4, dollar, onequarter, currency ] }; // 4 $ ¼ ¤
key <AE11> { [ ssharp, question, backslash, questiondown ] }; // ß ? \ ¿
key <AE12> { [ dead_acute, dead_grave, U02BF, dead_ogonek ] }; // D´ D` ʿ D˛
key <BKSL> { [ numbersign, apostrophe, U02BE, dead_breve ] }; // # ' ʾ D˘
key <LSGT> { [ less, greater, bar, dead_belowmacron ] }; // < > | Dˍ
key <TLDE> { [ dead_circumflex, degree, U2032, U2033 ] }; // D^ ° ′ ″
};
我自己找到了一个解决方案,因此我会将其发布在这里,因为其他人可能会从中受益
我从https://github.com/simos/keyboardlayouteditor下载并安装了KeyboardLayoutEditor
运行KeyboardLayoutEditor并加载合适的语言布局文件(以我为例)
然后单击“开始Charakter Map”按钮,它将加载Gucharmap(我必须首先通过Ubuntu软件中心安装它才能正常工作)
现在,选择要添加到某个键的字符(您也可以通过输入Unicode代码在Gucharmap中搜索符号)
并将其拖放到KeyboardLayoutEditor中适当键的4个位置之一(有关最终代码,请参见下文)
插入所有字符后,您可以保存文件
然后我sudo dpkg-reconfigure xkb-data
在控制台中使用了命令
终于我重新启动了
结果:Ethingthin现在就像魅力一样发挥作用!:)
我不知道为什么这次通过使用KeyboardLayoutEditor起作用。
我的第一个猜测是,它起作用是因为我没有尝试向键盘布局文件(de)添加新的变体,而是编辑了现有的变体,从而避免了在编辑de-file和evdev-xml时可能出现的错误。
我的第二个猜测是它起作用,因为KeyboardLayout编辑器编写的Unicode代码与我第一次手动编辑去文件时的代码不同。
更新:根据古纳尔·贾马尔森(Gunnar Hjalmarsson)的说法,我的第二个猜测可能是正确的问题,即+号
(这是最终版本,其中我已经手动纠正了应用程序所犯的错误)
////////////////////////////////////////////////////////////////////////////// ///
//
// Generated keyboard layout file with the Keyboard Layout Editor.
// For more about the software, see http://code.google.com /p/keyboardlayouteditor
//
xkb_symbols "basic"
{
name[Group1] = "German";
include "latin(type4)"
include "level3(ralt_switch)"
include "kpdl(comma)"
key <AB01> { [ y, Y, guillemotright, U203A ] }; // y Y » ›
key <AB02> { [ x, X, guillemotleft, U2039 ] }; // x X « ‹
key <AB04> { [ v, V, doublelowquotemark, singlelowquotemark ] }; // v V „ ‚
key <AB05> { [ b, B, leftdoublequotemark, leftsinglequotemark ] }; // b B “ ‘
key <AB06> { [ n, N, rightdoublequotemark, rightsinglequotemark ] }; // n N ” ’
key <AB08> { [ comma, semicolon, U030C, multiply ] }; // , ; Dˇ ×
key <AB09> { [ period, colon, U0323, division ] }; // . : D? ÷
key <AB10> { [ minus, underscore, U0331, emdash ] }; // - _ ̱ —
key <AC02> { [ s, S, U017F, U1E9E ] }; // s S ſ ẞ
key <AC06> { [ h, H, U032E ] }; // ̮
key <AC07> { [ j, J, dead_belowdot, dead_abovedot ] }; // j J D? D˙
key <AC10> { [ odiaeresis, Odiaeresis, U0307, dead_belowdot ] }; // ö Ö D˙ D?
key <AC11> { [ adiaeresis, Adiaeresis, U0304, dead_caron ] }; // ä Ä Dˉ Dˇ
key <AD03> { [ e, E, EuroSign, EuroSign ] }; // e E € €
key <AD06> { [ z, Z, leftarrow, yen ] }; // z Z ← ¥
key <AD11> { [ udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] }; // ü D¨ D˚
key <AD12> { [ plus, asterisk, asciitilde, macron ] }; // + * ~ ¯
key <AE02> { [ KP_2, quotedbl, twosuperior, oneeighth ] }; // 2 " ² ⅛
key <AE03> { [ KP_3, section, threesuperior, sterling ] }; // 3 § ³ £
key <AE04> { [ KP_4, dollar, onequarter, currency ] }; // 4 $ ¼ ¤
key <AE11> { [ ssharp, question, backslash, questiondown ] }; // ß ? \ ¿
key <AE12> { [ dead_acute, dead_grave, U02BF, dead_ogonek ] }; // D´ D` ʿ D˛
key <BKSL> { [ numbersign, apostrophe, U02BE, dead_breve ] }; // # ' ʾ D˘
key <LSGT> { [ less, greater, bar, dead_belowmacron ] }; // < > | Dˍ
key <TLDE> { [ dead_circumflex, degree, U2032, U2033 ] }; // D^ ° ′ ″
};
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句