Kivy Tutorial #7 - Touch Input/Mouse Input

preview_player
Показать описание
In this kivy tutorial 2019 I talk about getting user input such as touch input and input from the mouse. This way of getting input will work on all devices (phone, computer etc.).

**************************************************************

Use the Code "SAVE6144" For 50% Off!

**************************************************************

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
- Tech With Tim
- Kivy tutorial
- Input kivy
- Python kivy tutorial
- kivy input
- Python Tutorials
Рекомендации по теме
Комментарии
Автор

Hello Tim, great video.
Just wanted to add.
When you override the on touch method, you should add the super().on_touch_down(touch).
So it will add all the implementations of touching that the kivy use anyway.
If you add the button opacity it does not really click it, and won't call the command of the button(on_press).
And with what you do, it will "click" the button any time the on_touch_down() method, no matter where on the screen.

almog
Автор

These tutorials keep getting better and better, thank you.

ComicRage
Автор

Thank You Tim for your
I love your tutorials being so straight to the point and so promising to the
And I love the idea of that full GUI application

सुरेलसंवादिनी
Автор

Thanks for this one Tim! Just got the homescreen layout of my first app done, looking forward to seeing how to make multiple pages link together!

maxharlan
Автор

yeah, i really like your tutorials!!! I second your idea of doing a full GUI application!!

xskodemedia
Автор

Thx for your time and effort bro
Your really making life easier for alot of people!!

DOTAFRICA
Автор

Thanks for this bro, really Helpful stuff

davidjohnmorandarte
Автор

5:50
add in the end of function

return super().on_touch_down(touch)

DavlatDavlat-zg
Автор

To deal with the opacity change, I found adding this to the .kv file code works.... (But instead of opacity I played with colours, but I think to do the opacity, you would just use btn.opacity=0.4, etc... - Happy to answer any qu's!)
Button:
text: "Goodbye world"
size_hint: .2, .2
pos_hint: {"x": 0.4, "top": 0.4}
background_normal: ""
background_color: .3, 1, -.7, 1
id: btn2

on_press:
print("Pressed button 2")
btn2.background_color = RGB = 1, -1, -.7, 1

on_release:
print("Released button 2")
btn2.background_color = RGB = .3, 1, -.7, 1

jamesberesford
Автор

Looking for ideas? I've got one. Lets make a temperature controller GUI to turn a relay on and off based on setpoint and current temprerature

commonsence
Автор

Why does the button get pressed if you press anywhere on the screen (i.e. outside of the button too)?

TheJoshuatuqvq
Автор

These are very promising tutorials in that you give us, the viewer, a really good idea of where we can go with kivy! Thx. With regard to ideas, how about a tutorial where you create a simple text messaging / chat mobile app with a login and deployment to the Play Store?

tomasgonzalez
Автор

Thank you for the video bro! Can you explain about long press, single tap, double tap and triple tap in kivy with example related to android touch events?

srinivassagit
Автор

When I click anywhere else from the button (so in the black portion of the kivy app window, I also get the mouse events triggering and the print statements in the console. How do we prevent that?

jesseliverless
Автор

Awesome and really needed bro thanks. But 1 doubt bro, I want to block the all the touch functions temporarily when some content is loading like, I have added an MDSpinner when its fetching some details from database and at that time, I don't want my users to type in the text fields or click the buttons on the screen. So, how can we do that?

lakshmivallabh
Автор

The further these series are going, the less there are viewers and likes of the videos :(

rimantasri
Автор

I dont know why i could spot red dots and move them, not the coordinates thing

juanluisruizbrox
Автор

Can you please make a tutorial on adding plots to a kivy app?

adhikarlasridhar
Автор

I tried using the function "on_touch_down" under Gridlayout and it still works although I haven't imported the Widget class. Can anyone help me understand what I got wrong here?

nitishkhanna
Автор

Whenever I am using the ontouch move function then the button is not pressable so how can I solve this

gopalmondal