jacobpalm/costa

Keyboard support in icon editor

jacobpalm opened this issue · 2 comments

The icon editor currently does not have keyboard support - this should be implemented.

Desired behavior:

  • Arrow keys used to switch between pixels in the editor, visualize selected pixel. Draw with inverse color, maybe 2-3 pixel border outside the pixel?
  • When mouse is clicked in paint field, hide the border drawn when using arrow keys, but remember which pixel.
  • Space or Enter used to paint selected pixel - draw immediately if border is currently shown, if it isn't then show border and draw next time one of the keys is pressed
  • C used to change color from the palette - increment color on each press, loop to value 0 once 15 is passed - add active color field to show which color is active (will also help mouse users see what color they are currently using)
  • T used to change tool - pencil or flood fill - add buttons to also allow mouse access (current behavior with right-click for flood fill suffers from poor discoverability) - buttons should be drawn pressed when selected, raised when unselected

Initial support added with 4cbc42b.
Now supports keyboard selection of color. Also highlights currently selected color, regardless of whether keyboard or mouse was used to select it, for greater visibility.
Buttons added to switch tool between pencil or paint bucket, rather than using left and right click, also to improve visibility, and to better support keyboard drawing.

Drawing using keyboard remains to be implemented.

Fully implemented in 9cf802d