我最近在我的笔记本电脑上切换到 Ubuntu,几乎让我切换回 Windows 的一件事是我无法让Ctrl+Alt像 Alt gr 一样行事。
我已经编程了几年,例如我习惯于通过按ctrl+ alt+来制作符号“$” 4。在 Ubuntu 中,我必须使用“Alt gr + 4”女巫几乎让我发疯......
有没有办法解决这个问题?
小智 7
您可以添加全局快捷方式来编写特殊字符。我经常将它用于 Ubuntu 的德语键盘布局(在 Windows 上,这是开箱即用的)。
我添加了以下快捷方式:
Shift+ Enter+7写的信{
Shift+ Enter+0写的信}
Shift+ Enter+8写的信[
Shift+ Enter+9写的信]
要添加这些快捷方式,您需要xbindkeys
和xvkbd
:
sudo apt-get install xbindkeys xvkbd
Run Code Online (Sandbox Code Playgroud)
然后编辑配置文件:
vim ~/.xbindkeysrc
Run Code Online (Sandbox Code Playgroud)
并添加以下行(根据您的喜好编辑它们):
"xvkbd -xsendevent -text '{'"
m:0xc + c:16
Control+Alt + 7
"xvkbd -xsendevent -text '['"
m:0xc + c:17
Control+Alt + 8
"xvkbd -xsendevent -text ']'"
m:0xc + c:18
Control+Alt + 9
"xvkbd -xsendevent -text '}'"
m:0xc + c:19
Control+Alt + 0
"xvkbd -xsendevent -text '\[backslash]'"
m:0xc + c:20
Control+Alt + ssharp
"xvkbd -xsendevent -text '\[asciitilde]'"
m:0xc + c:35
Control+Alt + plus
Run Code Online (Sandbox Code Playgroud)
然后重新加载 xbindkeys:
xbindkeys -f ~/.xbindkeysrc
Run Code Online (Sandbox Code Playgroud)
感谢 whiz 分享这个(http://forum.ubuntuusers.de/topic/strg-%2B-alt-alt-gr-wie-in-windows/)。
我只在编写代码时使用特殊符号,所以我设法通过 Sublime Text 解决这个问题。
\n\n在首选项 -> 键绑定 - 用户
\n\n插入以下内容:
\n\n[\n{ "keys": ["ctrl+alt+2"], "command": "insert", "args": {"characters": "@"} },\n{ "keys": ["ctrl+alt+3"], "command": "insert", "args": {"characters": "\xc2\xa3"} },\n{ "keys": ["ctrl+alt+4"], "command": "insert", "args": {"characters": "$"} },\n{ "keys": ["ctrl+alt+5"], "command": "insert", "args": {"characters": "\xe2\x82\xac"} },\n{ "keys": ["ctrl+alt+7"], "command": "insert", "args": {"characters": "{"} },\n{ "keys": ["ctrl+alt+8"], "command": "insert", "args": {"characters": "["} },\n{ "keys": ["ctrl+alt+9"], "command": "insert", "args": {"characters": "]"} },\n{ "keys": ["ctrl+alt+0"], "command": "insert", "args": {"characters": "}"} },\n{ "keys": ["ctrl+alt++"], "command": "insert", "args": {"characters": "\\\\"} },\n{ "keys": ["ctrl+alt+<"], "command": "insert", "args": {"characters": "|"} }\n
Run Code Online (Sandbox Code Playgroud)\n\n]
\n 归档时间: |
|
查看次数: |
18904 次 |
最近记录: |