Keyboard library

I think it would be fun to have keyboard controlled virtual robot. Would it be possible to incude keyboard or pynput library to code space environment?

from keyboard import *

from pynput import *

We don’t have full keyboard input available… BUT the virtual CodeBot has buttons 0 and 1. And in addition to clicking them with the mouse you CAN use keyboard buttons 0 and 1 to press those buttons. So driving with the keyboard using buttons 0 and 1 is indeed possible :slight_smile:

Hi,

I experimented with the buttons, but unfortunately I get the buttons.is_pressed True only when I click with the mouse on them. Do you have any suggestions how to bind keyboard to the buttons?

P.S. I play with virtual robot in codeSpace.

Are you in the Haunted Code Chronicles?

For that one, the keyboard navigation is disabled.

The reason is, that mission pack is used for contests where fully autonomous control from your python code is required. Or some people theorize that the evil spirits sever the astral connection that enables keyboard control…

1 Like