Saturday, June 14, 2014

Use j,k keys to navigate clipboard history in parcellite or all gtk applications

I'm a parcellite clipboard manager fan. It's clean, it's simple and it's lightweight. I use it all the time to search my clipboard history and select past clipboard entries.


But, I always used to get annoyed by having to use "Up", "Down" arrow keys to navigate the GtkMenuShell. A simple "j", "k" will be so much better. To do that, simply add the below snippet in ~/.gtkrc-2.0:
binding "gtk-binding-menu" {
    bind "j" { "move-current" (next) }
    bind "k" { "move-current" (prev) }
    bind "h" { "move-current" (parent) }
    bind "l" { "move-current" (child) }
}
class "GtkMenuShell" binding "gtk-binding-menu"
This lets you use "vim-like" keys in all gtk programs (for menus) including parcellite :)

1 comment: