For example, the pygame key for the letter “A” is “K_a” then we will compare event.Key with K a and if it comes to be same that means the key “A” was pressed. To know which key was pressed, we have to check the event.key variable corresponds to which pygame keys.
0 Comments
Leave a Reply. |