-1
You can use this key with the Event.key method?
What is the key call?
I am developing a simple and accurate Synth of sounds of as many input keys as possible.
import pygame
if event.key == K_v:
print("You pressed the key 'v'")
if event.key == ???
print("You pressed the key 'ç'")
trial
K_QUOTE | K_c
. Add a [mcve] to the question so people can replicate your problem and experience your difficulty. Also see How we should format questions and answers?– Augusto Vasques
Thanks for the posting tips. Didn’t roll with K_QUOTE | K_c.
– Luiz Antonio Negrinho
pq vc does not print key code?
– iuridiniz
prints the key pressed and uses her code
if event.type == pygame.KEYDOWN: print(event)
orif event.type == pygame.KEYDOWN: print(event.key)
, after knowing the number, just use (do not use keyboard abnt2 to tell you the code).if event.key == 97: something()
97 is key 'A'– iuridiniz
@iuridiniz de facto. And then itself can create a K_CCEDIL constant (or something like that) with the value found to be readable in the code.
– Bacco