Change the Width and height of a rectangle

Good Morning/Evening :slight_smile:

I have a question, if I want to change the width of a rectangle by using keyboard keys,

for example , if i pressed the left arrow key, then the rectangle width increased to the left side, and if i do the same for right arrow key,

then the rectangle width increased to the right side

and so on for up and down keys…

I need your help plz

Thanks

I’m not sure if this is the “correct” way but to do what you want you could create the rectangle using variables as the specifications for the vertices and then use the keys to change the values of these variables.

I Know what you say! but I want the code :frowning:

If you know how to do it, then you should do it yourself. You will learn better and most people won’t take the time to go and type out the code for you