Nel*_*ira 23 hardware keyboard-layout
在 ubuntu 安装期间用于检测键盘布局的程序的名称是什么?是否有其他工具可以在安装后运行以发现我购买的键盘的正确布局?
Ben*_*ird 15
此工具将以图形方式显示您当前的布局:
gkbd-keyboard-display -g 1
Run Code Online (Sandbox Code Playgroud)
这是在设置期间用于选择键盘布局的命令:
dpkg-reconfigure keyboard-configuration
Run Code Online (Sandbox Code Playgroud)
但是要使其自动检测键盘,您需要更改dpkg-reconfigure keyboard-configuration. 不过我不确定是什么设置。
要更改设置,echo <packagename> <setting> <type> <value> | debconf-set-selections. 例如:
echo "keyboard-configuration console-setup/ask_detect boolean true" | debconf-set-selections
Run Code Online (Sandbox Code Playgroud)
希望这对你有帮助。
用于在 Ubuntu 安装期间检测键盘布局的程序是 ubuntu 安装程序的一部分,称为“Ubiquity”。
您可以在Launchpad 项目页面上找到源代码,或者使用以下命令下载您的 Ubuntu 版本中使用的版本:
apt-get source ubiquity
Run Code Online (Sandbox Code Playgroud)
您可以在此处的代码中导航: https://git.launchpad.net/ubuntu/+source/ubiquity/tree/ ?h=ubuntu/bionic-devel
带有“检测键盘布局”按钮的 GTK GUI 定义位于:https: //git.launchpad.net/ubuntu/+source/ubiquity/tree/gui/gtk/stepKeyboardConf.ui 搜索“检测键盘布局”,您可以会找到“deruce_layout”
我不是 100% 确定,但我认为进行键盘检测的代码在这里: https ://git.launchpad.net/ubuntu/+source/ubiquity/tree/ubiquity/plugins/ubi-console-setup.py 搜索“deduce_layout”,您会找到“calculate_keymap_button”(calculate_clicked)等。
在这里: https: //git.launchpad.net/ubuntu/+source/ubiquity/tree/ubiquity/frontend/gtk_components/keyboard_query.py 搜索“ubiquity/text/keyboard_query_title”。
另请参阅此网页以便在代码中更轻松地导航: http://nullege.com/codes/search/ubiquity.keyboard_detector.KeyboardDetector
我希望它有帮助。
小智 0
安装console-data软件包。
sudo apt-get install console-data
然后在终端上运行此命令:
sudo dpkg-reconfigure console-data
然后它将允许您更改键盘布局。