如果我在 Windows 10 PC 上通过 ssh 隧道(X11 转发)向 Xming 显示终端,则键盘设置是错误的。在 Ubuntu 机器上,键盘设置是正确的。令我困惑的是:如果我使用 Xming 上显示的该终端上的常用命令检查键盘设置,一切看起来也都正常。只是按键与配置的语言不匹配。
相反,实际的键盘映射似乎是“我们”!!
Ubuntu 18.04.2 LTS,瑞士德语区域设置。
我被难住了。你能指点一下吗?
ssh 到 Ubuntu:/etc/default/keyboard
XKBMODEL="logicd"
XKBLAYOUT="ch"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
localectl 状态
System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd
然后打开terminator或者xterm,在PC上通过Xming显示如下窗口:
localectl 状态
System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd
setxkbmap-查询
rules: xorg
model: pc105
layout: de_CH
setxkbmap -query | awk -F"(,|[ ]+)" '/layout:/ { 打印 $2 }'
de_CH
gsettings 获取 org.gnome.desktop.input-sources 源 | grep -Po "'[[:alpha:]]+')" | sed -ne "s/['|)]//g;$(($current_layout+1))p"
ch
设置xkbmap-打印-详细 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules: xorg
model: pc105
layout: de_CH
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc+de_CH+inet(pc105)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de_CH+inet(pc105)" };
xkb_geometry { include "pc(pc105)" };
.. 等等.. 所有命令都要求我拥有频道映射处于活动状态。
但我肯定有我们映射处于活动状态。
例子:
- on keyboard produces in xterm /
? on keyboard produces in xterm _
! on keyboard produces in xterm }
& on keyboard produces in xterm ^
有人知道我该如何设置正确的键盘映射吗?正如我之前提到的,键盘映射在任何其他情况下都是正确的。
谢谢丹