title: Python/Kivy : How to call function on ctrl+a keyboard events
body: <p>I am using <code>python-2.7</code> and <code>kivy-1.9.0</code>.When i run test.py then shows <code>Menu1</code>,<code>Menu2</code> Menu.<br/>
  When i click on <code>Menu1</code> Then shows <code>+Add Menu1</code> Text . When i click on <code>+Add Menu1</code> then call function <code>root.add_menu1()</code> . How to make it using <code>ctrl+a</code> keyboard key event instead of mouse click ?<br/>
  Same if i click on <code>Menu2</code> then shows <code>+Add Menu2</code> Text.After that i press <code>ctrl+a</code> key then should be call <code>root.add_menu2()</code>function .</p>
  
  <h1>test.py</h1>
  
  <pre><code>import kivy
  
  kivy.require('1.9.0')
  from kivy.app import App
  from kivy.uix.boxlayout import BoxLayout
  from kivy.properties import BooleanProperty, ListProperty, ObjectProperty,NumericProperty
  from kivy.uix.dropdown import DropDown
  from kivy.core.window import Window
  Window.maximize()
  
  
  class MENU1(BoxLayout):
  
      def add_menu1(self):
          pass
  
  
  class MENU2(BoxLayout):
  
      def add_menu2(self):
          pass
  
  class MainMenu(BoxLayout):
      test1_or_test2 = ObjectProperty()
      def display_menu1(self):
          self.remove_widgets()
          self.menu1 = MENU1()
          self.test1_or_test2.add_widget(self.menu1)
  
      def display_menu2(self):
          self.remove_widgets()
          self.menu2 = MENU2()
          self.test1_or_test2.add_widget(self.menu2)
  
      def remove_widgets(self):
          self.test1_or_test2.clear_widgets()
  
  class Test(App):
      title = "test"
  
      def build(self):
          return MainMenu()
  
  
  
  if __name__ == '__main__':
      Test().run()
  </code></pre>
  
  <h1>test.kv</h1>
  
  <pre><code>&lt;MENU1&gt;:
      BoxLayout:
          orientation: "vertical"
  
          Button:
              size_hint: .06, .03
              text: "+Add Menu1"
              on_press: root.add_menu1()
  
  
          GridLayout:
              size_hint: 1, None
              size_hint_y:None
              height: 25
              cols: 5
  
          BoxLayout:
              Label:
                  text:""
  
  &lt;MENU2&gt;:
      BoxLayout:
          orientation: "vertical"
  
          Button:
              size_hint: .06, .03
              text: "+Add Menu2"
              on_press: root.add_menu2()
  
  
          GridLayout:
              size_hint: 1, None
              size_hint_y:None
              height: 25
              cols: 5
  
          BoxLayout:
              Label:
                  text:""
  
  &lt;MenuButton@Button&gt;:
      text_size: self.size
      valign: "middle"
      padding_x: 5
      size : (80,30)
      size_hint : (None, None)
      background_color: 90 , 90, 90, 90
      background_normal: ''
      color: 0, 0.517, 0.705, 1
      border: (0, 10, 0, 0)
  
  
  &lt;MainMenu&gt;:
      test1_or_test2: test1_or_test2
  
      BoxLayout:
          orientation: 'vertical'
  
          BoxLayout:
              canvas.before:
                  Rectangle:
                      pos: self.pos
                      size: self.size
  
              size_hint_y: 1
  
              MenuButton:
                  id: btn
                  text: 'Menu1'
                  size : (60,30)
                  on_release: root.display_menu1()
  
              MenuButton:
                  id: btn
                  text: 'Menu2'
                  size : (60,30)
                  on_release: root.display_menu2()
  
  
  
          BoxLayout:
              canvas.before:
                  Rectangle:
                      pos: self.pos
                      size: self.size
  
                  Color:
                      rgb: (1,1,1)
  
              Label:
                  size_hint_x: 45
  
          BoxLayout:
              id: test1_or_test2
              size_hint_y: 10
  
          Label:
              size_hint_y: 1
  </code></pre>