How to move two multiple shapes as one with keys

Reddit.com/r/processing/comments/bshqa8/how_would_i_make_a_keypressed_function_support/eor5epo/