[GH-ISSUE #2065] Ubuntu18.04 替换caps_lock 和 esc键的时候, vim 和 shell的vim模式没有被替换 #1263

Open
opened 2026-02-27 00:02:52 +03:00 by kerem · 0 comments
Owner

Originally created by @androidfans on GitHub (Feb 22, 2021).
Original GitHub issue: https://github.com/electerm/electerm/issues/2065

Please check known issues first

https://github.com/electerm/electerm/wiki/Know-issues

Electerm version:

1.11.6

Operating system(linux, macos, or windows7/8/10?):

ubuntu18.04

Expected Behavior

capslock 和 esc 正确替换

Can you reproduce the same behavior in other terminal:

不能

Current Behavior

按esc键的时候同时出现切换大小写和esc的效果

Possible Solution

可能是electerm在ubuntu上没有读取gsettings的按键配置

Steps to Reproduce

在ubuntu上, 用这条命令交换capslock 和 esc

gsettings set org.gnome.desktop.input-sources xkb-options "['caps:swapescape']"

然后 set -o vi 把shell设置为vim模式
或者 vim 进入vim
按下capslock和esc 看效果

Detailed Description

感觉是shell里面读取了被系统转换后的按键码, 然后electerm读取了原始的按键码
导致替换映射按键后, 按一个键出现两个键的效果

Suggestions?

建议follow 系统的按键映射

Originally created by @androidfans on GitHub (Feb 22, 2021). Original GitHub issue: https://github.com/electerm/electerm/issues/2065 ## Please check known issues first https://github.com/electerm/electerm/wiki/Know-issues <!--- Provide some basic info --> ## Electerm version: 1.11.6 ## Operating system(linux, macos, or windows7/8/10?): ubuntu18.04 ## Expected Behavior <!--- Tell me what should happen --> capslock 和 esc 正确替换 ## Can you reproduce the same behavior in other terminal: <!--- If same bahavior happens in other terminal, maybe it is supposed to be like this or not a problem of terminal app --> 不能 ## Current Behavior <!--- Tell me what happens instead of the expected behavior --> 按esc键的时候同时出现切换大小写和esc的效果 ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> 可能是electerm在ubuntu上没有读取gsettings的按键配置 ## Steps to Reproduce 在ubuntu上, 用这条命令交换capslock 和 esc ```bash gsettings set org.gnome.desktop.input-sources xkb-options "['caps:swapescape']" ``` 然后 `set -o vi` 把shell设置为vim模式 或者 `vim` 进入vim 按下capslock和esc 看效果 ## Detailed Description 感觉是shell里面读取了被系统转换后的按键码, 然后electerm读取了原始的按键码 导致替换映射按键后, 按一个键出现两个键的效果 ## Suggestions? 建议follow 系统的按键映射
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#1263
No description provided.