title: Kivy Toggle buttons erratic behavior
body: <p>Trying to translate a checklist (actually represented in xml) from tkinter to kivy. I gave up doing it with CheckBox and switched to ToggleButtons. This worked -- after a fashion. Unfortunately the toggles come unchecked or checked seemingly at random. I'm sure that I've made a basic error, but I can't see it.</p>
  <pre><code>    import kivy
      from kivy.app import App
      from kivy.uix.widget import Widget
      from kivy.uix.button import Button
      from kivy.uix.label import Label
      from kivy.uix.togglebutton import ToggleButton
      from kivy.uix.gridlayout import GridLayout
  
      class ButtonList(GridLayout):
          def __init__(self, **kwargs):
              super(ButtonList, self).__init__(**kwargs)
  
              listRoot = [
                  &quot;Controls&quot;,
                  &quot;Ballast&quot;,
                  &quot;Straps&quot;,
                  &quot;Instruments&quot;,
                  &quot;Trim&quot;,
                  &quot;Canopy&quot;,
                  &quot;Brake&quot;
              ]
  
              self.buttons = []
              for child in listRoot:
                  b = ToggleButton(text=child, state=&quot;normal&quot;)
                  self.buttons.append(b)
                  self.add_widget(b)
  
              submit = Button(text=&quot;Submit&quot;, on_press=self.on_submit)
              self.add_widget(submit)
  
              self.output = Label(text=&quot;Output&quot;)
              self.add_widget(self.output)
  
          def on_submit(self, instance):
              out = &quot;Selection: &quot;
              for i in self.buttons:
                   if i.state == &quot;down&quot;:
                      out += i.text + &quot; &quot;
              self.output.text = out
  
  
      class ButtonListApp(App):
          def build(self):
              return ButtonList()
  
  
      if __name__ == &quot;__main__&quot;:
          ButtonListApp().run()
  </code></pre>
  <p>and the  .kv</p>
  <pre><code>    &lt;ButtonList&gt;:
          cols: 1
  </code></pre>
  <p>My intention is to put the layout for the meat of my program into the kv file with two checklists (togglebutton lists) created by this python function. But first it needs to stop checking and unchecking values on its own.</p>
  <pre><code>    [INFO   ] [MTD         ] &lt;/dev/input/event4&gt; range touch major is 0 - 0
      [INFO   ] [MTD         ] &lt;/dev/input/event10&gt; range touch major is 0 - 0
      [INFO   ] [MTD         ] &lt;/dev/input/event4&gt; range touch minor is 0 - 0
      [INFO   ] [MTD         ] &lt;/dev/input/event10&gt; range touch minor is 0 - 0
  </code></pre>
  <p>Since it worked for watney, and I didn't think &quot;range touch major 0 - 0&quot; looked valid, I tried a different mousepad. Problem went away. I guess Kivy or Ubuntu doesn't like my mouse. Any suggestion as to fixes would be helpful.</p>