filmov
tv
python tkinter - detecting arrow keys when an alternate key is pressed

Показать описание
Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!python tkinter - detecting arrow keys when an alternate key is pressed
I am using python and tkinter, and wish to capture if an arrow key is pressed, when one of the alternate keys is down.
I have the following working, for detecting shift, or control, but I can't figure out what the the mask needs to be for detecting if an alternate key is down when an arrow key is pressed.
print("space bar")
print("shift and down arrow")
print("shift and up arrow")
print("shift and left arrow")
print("shift and right arrow")
print("control and down arrow")
print("control and up arrow")
print("control and left arrow")
print("control and right arrow")
print("alternate and down arrow")
print("alternate and up arrow")
print("alternate and left arrow")
print("alternate and right arrow")
print("space bar")
print("shift and down arrow")
print("shift and up arrow")
print("shift and left arrow")
print("shift and right arrow")
print("control and down arrow")
print("control and up arrow")
print("control and left arrow")
print("control and right arrow")
print("alternate and down arrow")
print("alternate and up arrow")
print("alternate and left arrow")
print("alternate and right arrow")
Tags: python,tkinterSource of the question:
Question and source license information: