Index: matplotlibrc.template
===================================================================
--- matplotlibrc.template	(revision 8105)
+++ matplotlibrc.template	(working copy)
@@ -360,3 +360,20 @@
 #   from matplotlib import verbose.
 #verbose.level  : silent      # one of silent, helpful, debug, debug-annoying
 #verbose.fileo  : sys.stdout  # a log filename, sys.stdout or sys.stderr
+
+# Event keys to interact with figures/plots via keyboard.
+# Customize these settings according to your needs. 
+# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '') 
+
+#fullscreen : f   
+#home : h, r, home        
+#back : left, c, backspace       
+#forward : right, v   
+#pan : p       
+#zoom : o     
+#save : s
+#grid : g
+#yscale : l
+#xscale : k
+#all_axes : a
+
Index: lib/matplotlib/backend_bases.py
===================================================================
--- lib/matplotlib/backend_bases.py	(revision 8105)
+++ lib/matplotlib/backend_bases.py	(working copy)
@@ -1858,34 +1858,47 @@
         #    self.destroy() # how cruel to have to destroy oneself!
         #    return
 
-        if event.key == 'f':
+        # Load key-mappings from your matplotlibrc file.
+        f = rcParams['fullscreen']
+        h0, h1, h2 = rcParams['home']
+        b0, b1, b2 = rcParams['back']
+        f0, f1 = rcParams['forward']
+        p = rcParams['pan']
+        z = rcParams['zoom']
+        s = rcParams['save']
+        g = rcParams['grid']
+        l = rcParams['yscale']
+        k = rcParams['xscale']
+        all = rcParams['all_axes']
+
+        if event.key == f:
             self.full_screen_toggle()
 
         # *h*ome or *r*eset mnemonic
-        elif event.key == 'h' or event.key == 'r' or event.key == "home":
+        elif event.key == h0 or event.key == h1 or event.key == h2:
             self.canvas.toolbar.home()
         # c and v to enable left handed quick navigation
-        elif event.key == 'left' or event.key == 'c' or event.key == 'backspace':
+        elif event.key == b0 or event.key == b1 or event.key == b2:
             self.canvas.toolbar.back()
-        elif event.key == 'right' or event.key == 'v':
+        elif event.key == f0 or event.key == f1:
             self.canvas.toolbar.forward()
         # *p*an mnemonic
-        elif event.key == 'p':
+        elif event.key == p:
             self.canvas.toolbar.pan()
         # z*o*om mnemonic
-        elif event.key == 'o':
+        elif event.key == z:
             self.canvas.toolbar.zoom()
-        elif event.key == 's':
+        elif event.key == s:
             self.canvas.toolbar.save_figure(self.canvas.toolbar)
 
         if event.inaxes is None:
             return
 
         # the mouse has to be over an axes to trigger these
-        if event.key == 'g':
+        if event.key == g:
             event.inaxes.grid()
             self.canvas.draw()
-        elif event.key == 'l':
+        elif event.key == l:
             ax = event.inaxes
             scale = ax.get_yscale()
             if scale=='log':
@@ -1894,14 +1907,24 @@
             elif scale=='linear':
                 ax.set_yscale('log')
                 ax.figure.canvas.draw()
+        elif event.key == k:
+            ax = event.inaxes
+            scalex = ax.get_xscale()
+            if scalex=='log':
+                ax.set_xscale('linear')
+                ax.figure.canvas.draw()
+            elif scalex=='linear':
+                ax.set_xscale('log')
+                ax.figure.canvas.draw()
 
-        elif event.key is not None and (event.key.isdigit() and event.key!='0') or event.key=='a':
+        elif event.key is not None and (event.key.isdigit() and event.key!='0')\
+        or event.key == all:
             # 'a' enables all axes
-            if event.key!='a':
-                n=int(event.key)-1
+            if event.key != all:
+                n = int(event.key)-1
             for i, a in enumerate(self.canvas.figure.get_axes()):
                 if event.x is not None and event.y is not None and a.in_axes(event):
-                    if event.key=='a':
+                    if event.key == all:
                         a.set_navigate(True)
                     else:
                         a.set_navigate(i==n)
Index: lib/matplotlib/rcsetup.py
===================================================================
--- lib/matplotlib/rcsetup.py	(revision 8105)
+++ lib/matplotlib/rcsetup.py	(working copy)
@@ -546,9 +546,22 @@
 
     'path.simplify' : [True, validate_bool],
     'path.simplify_threshold' : [1.0 / 9.0, ValidateInterval(0.0, 1.0)],
-    'agg.path.chunksize' : [0, validate_int]       # 0 to disable chunking;
-                                                   # recommend about 20000 to
-                                                   # enable. Experimental.
+    'agg.path.chunksize' : [0, validate_int],       # 0 to disable chunking;
+                                                    # recommend about 20000 to
+                                                    # enable. Experimental.
+    # key-mappings
+    'fullscreen' : ['f', str],   
+    'home' : [['h', 'r', 'home'], validate_stringlist],
+    'back' : [['left', 'c', 'backspace'], validate_stringlist],
+    'forward' : [['right', 'v'], validate_stringlist],
+    'pan' : ['p', str],
+    'zoom' : ['o', str],     
+    'save' : ['s', str],
+    'grid' : ['g', str],
+    'yscale' : ['l', str],
+    'xscale' : ['k', str],
+    'all_axes' : ['a', str]
+                                               
 }
 
 if __name__ == '__main__':
