Chapter 2. Input, Motion, and Touch

In this chapter, we will cover:

  • Using the mouse
  • Evolving to the touchscreen
  • Working with the accelerometer
  • Using the gyroscope
  • The Differences between the touch and motion events
  • Recognizing touch shapes
  • Detecting multitapping
  • Grabbing touch events
  • Recording gestures

Introduction

The Kivy framework is able to handle most common types of input and actions such as mouse, touchscreen, accelerometer, and gyroscope that will be reviewed in this chapter. It handles the native multitouch protocols on the following platforms: Tuio, WM_Touch, MacMultitouchSupport, MT Protocol A/B, and Android.

The class of all input events is motion event. It generates two kinds of events; one of them is touch events—a motion event that contains ...

Get Kivy Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.