Skip to content

Commit

Permalink
Added a "F" keyboard shortcut to reach easily the search box.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt4 authored and jrfonseca committed May 12, 2013
1 parent 2882947 commit a88b4ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xdot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,12 @@ def on_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.r:
self.reload()
return True
if event.keyval == gtk.keysyms.f:
win = widget.get_toplevel()
find_toolitem = win.uimanager.get_widget('/ToolBar/Find')
textentry = find_toolitem.get_children()
win.set_focus(textentry[0])
return True
if event.keyval == gtk.keysyms.q:
gtk.main_quit()
return True
Expand Down

0 comments on commit a88b4ff

Please sign in to comment.