xev 上的特殊字符键没有名称,而是字母

xev 上的特殊字符键没有名称,而是字母
KeyRelease event, serial 37, synthetic NO, window 0x2600001,
    root 0x269, subw 0x0, time 25839746, (517,242), root:(622,350),
    state 0x0, keycode 254 (keysym 0x11f, (no name)), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x2600001,
    root 0x269, subw 0x0, time 25840405, (517,242), root:(622,350),
    state 0x0, keycode 255 (keysym 0x15f, (no name)), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2600001,
    root 0x269, subw 0x0, time 25840514, (517,242), root:(622,350),
    state 0x0, keycode 255 (keysym 0x15f, (no name)), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

我在 dex 上使用 Linux。Ubuntu 16.0.4.5 LTS。我只需要一些特殊字符,如 şğİı。我在网上做了一些研究(2 天),对 Linux 一无所知,但我的最后一站是这里。问题是当我打开时/usr/share/x11/xkb/symbols/tr——这是我系统上的当前键盘布局——我可以看到 gbreve(ğ)、scedilla(ş) 等。此外,我尝试了 ibus 首选项,看看我的键是否被系统识别,它显示 0x11f。gbreve(ğ) 的表示为:UTF-16:0x11fUTF-8:当我按下它时,结果是 0xC4, 0x9F。当我输入时,我得到了这个:

$ locale -a 
C
C.UTF-8
en_US.utf8
POSIX
tr_CY.utf8
tr_TR.utf8

所以.. 我看到 utf8 和 utf-16 不同,但我该怎么做才能输入这些字母呢?我只需要它用于 LibreOffice。

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

$ sudo dpkg-reconfigure keyboard-configuration
[sudo] password for dextop: 
grep: /proc/bus/input/devices: Permission denied
grep: /proc/bus/input/devices: Permission denied
Your console font configuration will be updated the next time your system
boots. If you want to update it now, run 'setupcon' from a virtual console.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: warning: script 'int_container.sh' missing LSB tags and overrides
insserv: warning: script 'vnc.sh' missing LSB tags and overrides
insserv: warning: script 'init_container.sh' missing LSB tags and overrides

当我输入该命令时,没有像你这样的界面

在此处输入图片描述

我选择通用 105 int 并在那里选择语言布局。正如您提到的那样,没有死键,我将 compose 设置为 alt gr,但这没有帮助。

我修复了之前 Ubuntu img 设置中的 LSB 标签问题。所以问题不在于此。另外,我听说有些错误是由 python 错误引起的。例如,我可以调出语言选择菜单,但当我在系统设置中单击它时,什么都没有出现。我还尝试更改语言环境 tr,但没有输出任何内容。我知道 Linux on dex 的设置并不可靠,但我的目的只是通过编辑 xkb x11 符号文件等来生成几个字母。

好的,我开始明白真正的问题是什么了。

  1. grep: /proc/bus/input/devices: Permission denied此错误暗示了一些事情。需要权限。另外我无法以任何方式更改布局。即使我选择英语键盘,它也会给我这个错误。所以我无法改变任何东西。因此,由于它仍然是默认的英语键盘,它在 xev 输出中显示无名称。因为它在 EN 布局中不存在。

  2. 我搜索了为什么会出现这个错误。首先我看到 proc 文件夹被注册为 nobody 组。因此,它是只读的。

首先我以 root 用户身份运行相同的 dkpg 命令。No protocol specified Cannot open display ":1"update-initramfs: deferring update (trigger activated)这次又出现了 3 个错误。

然后尝试sudo adduser dextop /proc/bus/input/devices并得到 adduser: The group/proc/bus/input/devices' 不存在'

然后尝试了chown -R dextop /proc/bus/input/devices这次chown: changing ownership of '/proc/bus/input/devices': Permission denied

此时,根据此https://serverfault.com/questions/60711/chown-operation-not-permitted-for-root 我使用的是 FAT 文件系统,也许是我在 Linux dex 上使用的 Linux 映像。它不会也永远不会让我更改键盘布局。这很有趣。但感谢您的努力。

最后编辑:问题是 Linux 中内置的 Vnc 查看器(dex 应用程序)而不是 img 本身。因为当我在终端模式下打开 Ubuntu 并连接到另一个 vnc 服务器时,我可以生成我想要的所有字符。(顺便说一句,连接到它没用。当您全屏显示该 vnc 查看器应用程序时,连接会暂停)但我想我找到了一种使用母语使用 LibreOffice 的方法。我在 reddit 中解释过,如下:

https://www.reddit.com/r/LinuxonDex/comments/fuycwj/the_reason_of_why_i_cant_type_special_characters/

答案1

首先将键盘布局设置为美国,无死键

sudo dpkg-reconfigure keyboard-configuration

将撰写键设置为您最喜欢的键(在图片上,Alt_R)

GUI 键盘快捷键

现在使用组合键 + 组合键输入字符

Compose+ c g= “ǧ”
Compose+ , s= “ş”
Compose+ . I= “İ”
Compose+ i .= “ı”

其他角色请见https://help.ubuntu.com/community/GtkComposeTablehttps://fsymbols.com/keyboard/linux/compose/

您还可以通过Control++Shift十六U进制代码输入Unicode字符Space

相关内容