sextile.viewdata.compass

The four keys that move about a page, drawn as a compass.

W A S D are the framework’s keys, not any one service’s, so the picture of them belongs here rather than in a service: one copy, and it stays right if the keys change.

The arrows are mosaics because the character set has only three of them. The G0 set has , and at 0x5B, 0x5D and 0x5E, and no down arrow at all – so one of the four would have had to be drawn whatever happened, and three drawn letters beside one drawn picture look like a mistake. All four are drawn, on the block grid, which is 2x3 to a cell and so has the resolution for a head and a shaft:

   page up
      W
     ###
A <-  #  -> D
     ###
      S
  page down

You can also use the arrow keys

# moves to the next frame as well, and is not here: it belongs in a list of things a reader keys, whereas this is about which way is which.

sextile.viewdata.compass.ROWS: Final = 12

How many rows the whole thing takes. It is a word, a key, two of arrow, the middle row and its labels, two more of arrow, a key, a word, and the line about the cursor keys. Every arrow is three cells across and two rows down, whichever way it points.

The down arrow starts on the row the “item” labels are on, as the up arrow ends on the row above the middle one: that is what puts the two of them the same distance from the horizontal pair. They do not collide – the labels are at the ends of the row and the arrow is in the middle of it.

sextile.viewdata.compass.compass(composition, row, *, items=True, colour=Colour.CYAN, key=Colour.YELLOW, word=Colour.WHITE)[source]

Draw the compass onto a composition, its top row at row, taking ROWS.

Parameters:
  • composition (Composition) – The composition to add the compass to.

  • row (int) – The top row it occupies.

  • items (bool) – Whether to draw the sideways A/D arm. False leaves it off, for a service that does not wire those keys to request.neighbours and so must not draw two keys that do nothing. The up-and-down arm is always drawn, being frames, which every page has.

  • colour (Colour) – The arrows’ colour.

  • key (Colour) – The colour of the key letters.

  • word (Colour) – The colour of the words.

Return type:

Composition

Returns:

The composition, for chaining.