.xmodmap映射Esc与Caps Lock不灵光
Tofloor
poster avatar
aurthur
deepin
2016-09-14 20:15
Author
本帖最后由 aurthur 于 2016-9-14 12:42 编辑

我有个问题请教诸位大神。我重新映射了Caps Lock与Esc键,我在$HOME目录下新建.Xmodmap文件,内容是
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

然后在.bashrc中加入 xmodmap ~/.Xmodmap
最后的体验却是时灵时不灵,而且在打开终端时会提示


xmodmap:  please release the following keys within 2 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    slash (keysym 0x2f, keycode 61)

为什么会这样呢?有时能映射有时又没有

Reply Favorite View the author
All Replies
avatar
HualetWang
deepin
2016-09-14 20:44
#1
Reply View the author
avatar
yanbowen
deepin
Community Developer
2016-09-14 22:00
#2
先执行下 gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'  然后注销后再试试
Reply View the author
avatar
aurthur
deepin
2016-09-15 02:57
#3
https://bbs.deepin.org/post/43371
先执行下 gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'  然后注销后再试试 ...

还是会有那几行的提示信息,映射也时灵时不灵。无解
Reply View the author
avatar
yanbowen
deepin
Community Developer
2016-09-17 01:44
#4
本帖最后由 yanbowen 于 2016-9-16 17:46 编辑
  1. gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'
  2. gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]'
Copy the Code


这两条命令一起执行,执行完后注销,应该会把 capslock 和 escape 交换,把你的 .Xmodmap 脚本去掉。
如果无效,请把下面命令的结果贴下:
  1. gsettings get com.deepin.dde.keybinding.mediakey capslock
  2. gsettings get com.deepin.dde.keyboard  layout-options
Copy the Code
Reply View the author
avatar
aurthur
deepin
2016-09-19 17:24
#5
https://bbs.deepin.org/post/43371
这两条命令一起执行,执行完后注销,应该会把 capslock 和 escape 交换,把你的 .Xmodmap 脚本去掉。
如 ...

真的有效,谢谢
Reply View the author
avatar
smartguo
deepin
2017-01-17 04:56
#6
  1. gsettings get com.deepin.dde.keybinding.mediakey capslock
  2. GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
  3. GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Copy the Code

不管用啊,包括
  1. gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'
  2. gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]'
Copy the Code

每次都提醒
  1. GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Copy the Code

重启也没效果,15.3的系统,为何楼上成功了。。
Reply View the author
avatar
aurthur
deepin
2017-01-18 02:01
#7
https://bbs.deepin.org/post/43371
不管用啊,包括
每次都提醒
重启也没效果,15.3的系统,为何楼上成功了。。 ...

不会啊,我一直都是用这两句代码进行映射的
Reply View the author