BrachioGraph icon indicating copy to clipboard operation
BrachioGraph copied to clipboard

getkey and explicit new xy

Open jkrauska opened this issue 6 years ago • 2 comments

  • Uses getkey instead of getchar to allow for arrow keys
  • sends new x and y coords to xy function to use steps (using self was calculating length 0)

jkrauska avatar Dec 01 '19 23:12 jkrauska

@evildmp Any interest in this?

jkrauska avatar Dec 09 '19 19:12 jkrauska

I like the idea, but is there a way to prevent this from happening when a key is held down?

>>> bg.drive_xy()
X:-10.0, Y:7.0
PW1:1999, PW2:1393
^[[D^[[BX:-11.0, Y:7.0
^[[CPW1:1986, PW2:1293
^[[C^[[C^[[C^[[CX:-10.0, Y:7.0

It happens already with the a/s/k/l controls, but it's more obtrusive as above.

Also, the drive methods should be documented in /docs/reference/brachiograph.rst.

evildmp avatar Dec 14 '19 00:12 evildmp