The effects of endogenously attended and non-attended stimulus onsets on spatial stimulus encoding of a target were explored in a Simon task. In each experiment participants made speeded left or right key-press responses to the colour of a target that followed a cueing display consisting of several shapes. The target appeared within some shapes and not others. The target's spatial code as measured by a Simon task was its location relative to possible target positions and relative to the centre of the display. Target location was not coded relative to the positions of onset shapes that could not contain a target. These spatial coding effects were found at cue–target intervals of 50, 300, and 1000 ms. The data indicate that target location is defined relative to the distribution of endogenous attention and reference frames aligned with the centre of the display and that the spatial code assigned to a target is not affected when attention is shifted in the target's direction.