我使用 i3wm 作为图形界面,并且我使用例如 $mod+KP_1 来更改为工作区 1,但是当我升级到 Xubuntu 18.04 时,此绑定不再起作用。我无法将任何 KP_x 绑定到任何命令。我尝试使用 bindsym 和 bindcode,问题相同。
答案1
我最近换了 i3,也遇到了同样的问题。不知道具体原因是什么,但这是这github 问题在这里。它已经关闭,但问题仍然存在。不过,问题线程底部的建议对我有用。以下是我的配置中的相关行:
# Switch with numpad
bindsym $mod+Mod2+KP_1 workspace $ws1
bindsym $mod+Mod2+KP_2 workspace $ws2
bindsym $mod+Mod2+KP_3 workspace $ws3
bindsym $mod+Mod2+KP_4 workspace $ws4
bindsym $mod+Mod2+KP_5 workspace $ws5
bindsym $mod+Mod2+KP_6 workspace $ws6
bindsym $mod+Mod2+KP_7 workspace $ws7
bindsym $mod+Mod2+KP_8 workspace $ws8
bindsym $mod+Mod2+KP_9 workspace $ws9
bindsym $mod+Mod2+KP_0 workspace $ws10
# move with numpad
bindsym $mod+Mod2+Shift+KP_End move container to workspace $ws1
bindsym $mod+Mod2+Shift+KP_Down move container to workspace $ws2
bindsym $mod+Mod2+Shift+KP_Next move container to workspace $ws3
bindsym $mod+Mod2+Shift+KP_Left move container to workspace $ws4
bindsym $mod+Mod2+Shift+KP_Begin move container to workspace $ws5
bindsym $mod+Mod2+Shift+KP_Right move container to workspace $ws6
bindsym $mod+Mod2+Shift+KP_Home move container to workspace $ws7
bindsym $mod+Mod2+Shift+KP_Up move container to workspace $ws8
bindsym $mod+Mod2+Shift+KP_Prior move container to workspace $ws9
bindsym $mod+Mod2+Shift+KP_Insert move container to workspace $ws10