问题描述
在使用 Eclipse 时,我经常使用键盘箭头浏览包资源管理器树.
When using Eclipse I browse through the package explorer tree using the keyboard arrows a lot.
在 Windows 中,我可以通过按 → 键来展开折叠的节点.在 Linux 中,我需要按 Shift + →.有没有办法重新配置它以便不需要 Shift?
In Windows I can expand a collapsed node by pressing the → key. In Linux I need to press Shift + →. Is there a way to reconfigure this so that Shift is not required?
推荐答案
我的 GTK3 版本表现得更自然.将以下内容添加到 ~/.config/gtk-3.0/gtk.css:
My version for GTK3 that behaves in more natural way. Add the following to ~/.config/gtk-3.0/gtk.css:
@binding-set MyTreeViewBinding { bind "Left" { "select-cursor-parent" () "expand-collapse-cursor-row" (0,0,0) }; bind "Right" { "expand-collapse-cursor-row" (0,1,0) }; } GtkTreeView { gtk-key-bindings: MyTreeViewBinding; }