使用Eclipse时,我使用键盘箭头浏览包浏览器树。
在Windows中,我可以通过按→键展开折叠的节点。 在Linux中,我需要按Shift + → 。 有没有办法重新configuration,以便Shift不是必需的?
无法在Gnome中禁用PrintScreen键
使用键盘快捷方式启动powershell脚本
如何创build通用键盘快捷键?
如何在C#中重新分配Windows快捷键?
使Mac快捷方式(例如Cmd-C)在Linux上工作
把这个放到你的~/.gtkrc-2.0 ,你应该很好走。 左边和右边的线做出了所要求的改变,其余的只是我个人的补充,使树视图行为更像vim。 希望有所帮助!
binding "gtk-binding-tree-view" { bind "j" { "move-cursor" (display-lines,1) } bind "k" { "move-cursor" (display-lines,-1) } bind "h" { "expand-collapse-cursor-row" (1,0) } bind "l" { "expand-collapse-cursor-row" (1,1,0) } bind "o" { "move-cursor" (pages,1) } bind "u" { "move-cursor" (pages,-1) } bind "g" { "move-cursor" (buffer-ends,-1) } bind "y" { "move-cursor" (buffer-ends,1) } bind "p" { "select-cursor-parent" () } bind "Left" { "expand-collapse-cursor-row" (0,0) } bind "Right" { "expand-collapse-cursor-row" (0,0) } bind "semicolon" { "expand-collapse-cursor-row" (0,1) } bind "slash" { "start-interactive-search" () } } class "GtkTreeView" binding "gtk-binding-tree-view"
然后重新启动Eclipse以应用新的绑定
如果有人想知道如何使用GTK3来做到这一点 – 只需打开~/.config/gtk-3.0/gtk.css并添加以下内容:
@binding-set MyTreeViewBinding { bind "Left" { "expand-collapse-cursor-row" (0,0) }; bind "Right" { "expand-collapse-cursor-row" (0,0) }; } GtkTreeView { gtk-key-bindings: MyTreeViewBinding; }
我的GTK3版本的行为更自然。 将以下内容添加到〜/ .config / gtk-3.0 / gtk.css中:
@binding-set MyTreeViewBinding { bind "Left" { "select-cursor-parent" () "expand-collapse-cursor-row" (0,0) }; } GtkTreeView { gtk-key-bindings: MyTreeViewBinding; }
Andrew提供的答案是正确的。 请注意,在较新版本的Ubuntu中没有〜/ .gtkrc-2.0文件,所以您可以创建它,或者您可以编辑当前主题的gtkrc,它存储在
/usr/share/themes/your_theme/gtk-2.0/gtkrc
Tree小部件的导航由小部件工具箱(GTK)控制。 SWT / Eclipse无法控制它。 如果需要更改快捷方式的配置,则必须由GTK方面进行。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。