I'm coding a game using python. I've used tkinter
library. I want to bind w
and a
keys together how do I do this? I've tried using <w,a>
, <w-a>
, <w+a>
and <KeyPress-w - KeyPress-a>
but it just did not work. Any ideas?
My error:
Traceback (most recent call last):
File "C:\Users\DEVDHRITI\Desktop\Files&Folders\HMMMMM\Zombie Surge\zombie surge.pyw", line 63, in <module>
frame.bind('<w , a>',wa)
File "C:\Users\DEVDHRITI\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1392, in bind
return self._bind(('bind', self._w), sequence, func, add)
File "C:\Users\DEVDHRITI\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1346, in _bind
self.tk.call(what + (sequence, cmd))
_tkinter.TclError: extra characters after detail in binding