惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
IT之家
IT之家
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
J
Java Code Geeks
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
NISL@THU
NISL@THU
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
L
LINUX DO - 热门话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Fortinet All Blogs
博客园 - Franky
L
Lohrmann on Cybersecurity
S
Secure Thoughts
量子位
V
Vulnerabilities – Threatpost
Last Week in AI
Last Week in AI
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LINUX DO - 最新话题
I
InfoQ
C
CERT Recently Published Vulnerability Notes
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Proofpoint News Feed
G
GRAHAM CLULEY
Cisco Talos Blog
Cisco Talos Blog

See you soon

试试将文章版本化管理吧 | See you soon 使用 Quadlet 将 Podman 中的 Postgres 当作 systemd 服务运行 | See you soon 大他者,那个无时无刻都在盯着你的东西 | See you soon Laws of Software Engineering,软件工程定律 | See you soon 浅记多因素身份认证 | See you soon Linux 内核中的度量单位 | See you soon 重置 GPG 智能密钥 | See you soon 向 NAS 引入 samba | See you soon ZFS 降级事故 | See you soon 记被 XanMod Kernel 和 AppArmor 联合坑的一次踩坑 | See you soon agent 的 skill 与 toolcall | See you soon 记一次服务器被挂恶意挖矿二进制 | See you soon 活着的 Arc | See you soon 令 acme.sh 使用 Cloudflare 的 DNS API 签发与续签证书 | See you soon 于 Tokio 中卸载 CPU Bound 任务 | See you soon 如我所见,梦破碎的时候 | See you soon 74LS 家族手册 | See you soon JDK Projects 备忘录 | See you soon 关于历史 | See you soon 用 curl 下载 OnePlus 的 ROM | See you soon 实用命令切片 | See you soon 再见,Oh My Zsh。 | See you soon 你不应该复用 strings.Builder | See you soon 博客的明日 | See you soon 被 AppArmor 击杀的 Dockge | See you soon AI 时代的自我 | See you soon 支持删除的布隆过滤器 | See you soon 基于栈的虚拟机与基于寄存器的虚拟机 | See you soon RVA23 包含了什么 | See you soon Rust 的边界检查是否已经有很大的进步 | See you soon 使用 Rust 编写操作系统:Barebones | See you soon 使用 Rust 编写操作系统:引言 | See you soon 编译器笔记:rope | See you soon 编译器笔记:CST | See you soon Paradoxical 札记 | See you soon 简单的相似去重算法(基于向量) | See you soon 更加现代的 PaperMC Minecraft 插件设计指南 | See you soon 简单的 CFG 语法分析方法 | See you soon 简单地使用 Caddy 实现 CORS 配置 | See you soon 让 OpenCV 可以被静态链接 | See you soon 图片搜索笔笺 | See you soon 电路板设计笔记-保护 | See you soon 使用 Rust 实现 SnowflakeId | See you soon 农夫乐事 FaQ 启示 | See you soon 使用 Rust 实现拓展系统札记 | See you soon 遗传学定律的代码实现 | See you soon EN:The Journey of Rust and Procps | See you soon ZH:Rust 与 Procps 之旅 | See you soon 使用 debootstrap 与 schroot 构建一个纯净环境 | See you soon GPG添加新的用户信息 | See you soon GSoC2024 笔记:使用 Rust 重新实现 procps | See you soon JWT 小册 | See you soon 使用密钥登录 SSH | See you soon Guava:Cache | See you soon 编译器笔记:增量编译 | See you soon Gradle秘境:添加一个类似modCompileOnly的依赖块 | See you soon Minecraft:原始经济系统设计简述 | See you soon TinyRemapper笔记 | See you soon MicroOS:进阶 | See you soon MicroOS:起步 | See you soon Swapfile 指北 | See you soon GPG 物理密钥的安装与密钥的迁移 | See you soon 用GPG签名告诉大家这就是我的提交 | See you soon DFS:深度优先搜索 | See you soon 文章翻译:从init.vim到init.lua | See you soon 目录遍历攻击 | See you soon 如何挂载.img文件,以及如何使用QEMU模拟arm64环境 | See you soon 在树莓派上编译 OpenCV | See you soon 关于卸载BlueStacks后遇到的问题 | See you soon
无法重复键入的 Fcitx5 | See you soon
Krysztal Huang · 2026-03-30 · via See you soon

fcitx5 会在所有除了 Konsole 之外的终端卡死,何意味。

具体表现为输入文字长按是不会触发重复输入,请看 VCR:

实机演示

而作为一个 Vim 用户,个人非常依赖这个功能——使用 hjkl 如果能高速触发的话用起来比 <C-d> 更舒服且精准。

这一切到底是为什么呢。。。

Ghostty?

NOTE

Ghostty 不允许直接创建 issues,因此需要在 discussion 中创建

Ghostty 的 Discussion 中已经有不少的议题来研究这个问题,其中最相关的 discussion 是

看起来完全不像是 Ghostty 的问题,更像是输入法的问题,因此我把目光转向了输入法上。

Fcitx5?

在 Fcitx5 的 issues 区域直接搜索 repeat 就找到了最相关的议题:

根据作者的说法,Fcitx5 生成重复按键序列这件事并不完全可靠,只能说堪堪够用。

但是该 issues 止步于此,在最后一次更新后没有了回应。

于是我补充了一下行为验证和 fcitx5-diagnose 信息,并且接着寻找相关 issues:类似的问题并不少,主要来源于 Wayland 的出现打破了原有的输入法模型:

This is quite silly since whether an key event is filtered by input method or not should be fully controlled by input method, and the wayland’s input method keyboard grab model totally break the point of this..

在维护者 WengXuetian 的博客中亦然披露了这一点:

Here is where it becomes problematic when Wayland decides to use keyboard grab for input method, and client side key repetition.

In X11, key repetition is done on the X Server side, client doesn’t need to worry about the key repetition generation. Client will just receive multiple key press events (release is optional, depending on a “detectable key repetition” option) until the key is physically released.

In Wayland, the key repetition is done on the application(client) side, the common logic is to implement this feature is that, when client gets a wl_keyboard.key press, it will start a timer and generate new key event on its own.

当 Wayland 决定对输入法使用键盘抓取,并在客户端进行按键重复处理时,问题就出现了。

在 X11 系统中,按键重复功能由 X 服务器端实现,客户端无需处理按键重复的生成逻辑。客户端只需持续接收多次按键按下事件(按键释放事件是可选的,取决于“可检测按键重复”选项的设置),直到物理按键被释放为止。

而在 Wayland 系统中,按键重复功能需由应用程序(客户端)自行实现。常见的实现逻辑是:当客户端接收到 wl_keyboard.key 按下事件时,会启动计时器并自主生成新的按键事件。

而维护者所给出的解决方案是模拟一套之前在 X Server 所使用的协议模型。倒是暂时解决了这个问题(吗?)

GTK4 的问题?

很明显这个问题并没有解决,而且也没搞清楚为什么。

在继续翻阅相关 issues 的时候我找到了这个 discussion:

于是我突发奇想,要是设置环境变量 $GTK_IM_MODULEfcitx5 的话会发生什么?

于是我使用了如下命令来启动一个 Ghostty: GTK_IM_MODULE

GTK_IM_MODULE=fcitx5 ghostty

然后启动的终端居然就没有这个问题了。

持久化配置

既然找到临时的解决方法了还是打算做一下持久化配置,总是使用命令行来启动 Ghostty 是十分不舒服的。

搜寻了一下桌面环境自己的环境配置方式,KDE 的 Wiki 里有相关的记载:使用会话环境变量即可:

To add paths to your PATH, simply create a file named $HOME/.config/plasma-workspace/env/path.sh with a contents similar to this:

export PATH=$HOME/.local/bin:$PATH

尾声

这件事暂时告一段落了,Fcitx 的维护者 WengXuetian 向 KDE 上游提交了 MergeRequest 来尝试解决这个问题:尽可能想办法让 KDE 的输入模型能像是之前的 X Server 模型一样,更方便输入法来处理。

可以追踪:Split updateKey & notifyKeyboardKey to two different function.