wrong key names in list returned by keysdown()

7 views
Skip to first unread message

Jonathan Lettvin

unread,
Oct 12, 2025, 10:33:35 AM (12 days ago) Oct 12
to VPython-users
#!/usr/bin/env python3
from vpython import *
from vpython.no_notebook import (stop_server)

active = True
box()

while active:
    rate(20)
    keys = keysdown()
    if keys != []: print(keys)
    active = 'q' not in keys
stop_server()

up arrow key prints "['up']" but
shift up arrow key prints "['shift', '&']" should be "['shift', 'up']".

shift ampersand gives the same result as shift up arrow.

Similar problems for up, down, left, right, pageup, pagedown.

Michael Burns-Kaurin

unread,
Oct 12, 2025, 2:51:01 PM (12 days ago) Oct 12
to vpytho...@googlegroups.com
glowscript does the same

--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vpython-users/4762b0a6-5d45-4c58-b332-e479e64a0dadn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages