@@ -71,6 +71,9 @@ def __init__(self):
7171 # create a notebook 'n' inside the right 'Queries' Frame
7272 self .n = NotebookForQueries (self .tk_win , f_queries , [])
7373
74+ # Bind keyboard shortcuts
75+ self .tk_win .bind ('<F9>' , self .run_tab )
76+
7477 def create_menu (self ):
7578 """create the menu of the application"""
7679 menubar = Menu (self .tk_win )
@@ -290,7 +293,7 @@ def quit_db(self):
290293 icon = 'question' , title = 'Quiting' ):
291294 self .tk_win .destroy ()
292295
293- def run_tab (self ):
296+ def run_tab (self , event = None ):
294297 """clear previous results and run current script of a tab"""
295298 active_tab_id = self .n .notebook .select ()
296299 if active_tab_id != '' :
@@ -1231,7 +1234,7 @@ def import_csvtb_ok(thetop, entries, actions):
12311234 conn .insert_reader (reading , table_name , sql ,
12321235 create_table = d ['Create table' ],
12331236 replace = d ['Replace existing data' ])
1234- # refresh
1237+ # refresh
12351238 actualize_db ()
12361239
12371240
@@ -1478,7 +1481,7 @@ def get_sqlsplit(self, sql, remove_comments=False):
14781481 yield "" .join (mysql )
14791482 mysql = []
14801483 elif (token == 'TK_SHELL' ):
1481- # end of a shell order
1484+ # end of a shell order
14821485 yield ("" + tokv )
14831486 mysql = []
14841487 if mysql != []:
0 commit comments