DeltaPaint
This is a fork of KDP, the keyboard driven pixel art editor. The goal of this fork is to continue development and steer it in the direction of accessibility.
Why?
As a bit of an experiment. When I'm coding, I use vscode with a vim emulator extension, or occasionally just vim. So my programming workflow is almost entirely keyboard driven. I was curious if such an approach might work for pixel art. Curiously there's not a whole lot of keyboard driven pixel art editors out there so i had to make my own.
This was the original author's intent, but I ran into KDP at a time in my life when I was unable to draw due to wrist health issues. I realized that as backwards as it sounds to an artist, a fully keyboard-driven art tool would be perfect for "painting by voice". The goal of this fork is to try and further unlock that potential for the sake of any artists suffering as I have.
How does it work?
DeltaPaint is operated similarly to vim. This implies a learning curve, but allows the user to dictate actions in a way that mimics regular (English) grammar.
Motions and Targets
Moving the cursor in DeltaPaint is performed by inputting targets. Targets used both for movement and a number of actions, allowing a single command to operate at a specific location or within a specific area.
Some targets also accept a magnitude. When entering a target starting with Δ, you can optionally input any number to adjust the magnitude of the target. If you don't, the magnitude is 1.
By default, the following targets are available:
,- The cursor's location. Useless for moving, but allows commands that expect a target to execute at the cursor's location. (eg.d ,translates to "draw under the cursor")Δ <arrow keys>- Δ pixels away from the cursor in the specified directionΔ <shift> <arrow keys>- Δ ×ばつ jump length pixels away from the cursor in the specified direction. By default, the jump length is 10, but you can adjust with with thesettings.jump_lengthsettingΔ <numpad +> <numpad +>- Δ pixels down-right from the cursorΔ <numpad -> <numpad ->- Δ pixels up-left from the cursorΔ <numpad -> <numpad +>- Δ pixels down-left from the cursorΔ <numpad +> <numpad ->- Δ pixels up-right from the cursorΔ <shift> <numpad +> <numpad +>- Δ ×ばつ jump length pixels down-right from the cursorΔ <shift> <numpad -> <numpad ->- Δ ×ばつ jump length pixels up-left from the cursorΔ <shift> <numpad -> <numpad +>- Δ ×ばつ jump length pixels down-left from the cursorΔ <shift> <numpad +> <numpad ->- Δ ×ばつ jump length pixels up-right from the cursorΔ i <column> <row>- Targets a location relative to the cursor on a grid, using character inputs similar to chess notation. Pressingiwill display the grid and letters along the rows and columns. By inputting a pair of letters, you can target arbitrary positions near the cursor. Δ adjusts the resolution of the grid (eg. 1 means rows/columns are adjacent pixels, 2 is every other pixel, 3 every 3rd, etc), allowing you to target more distant locations at the cost of precision
Currently, new targets cannot be created and existing ones can't be rebound. This is planned for future development.
Actions
Editor commands can be bound to a particular sequence of keys, which we refer to as actions. Some of these actions are available at all times, while others are mode-specific. This means that key inputs can call different actions in different modes as needed. In this section, actions that take target inputs represent the target as ⊙.
You can repeat any action input by typing the number of times to repeat it first. For instance, 5 d ↑ calls d ↑ 5 times in a row. In some cases (such as the one that was just given), the actual result may be identical to the equivalent target magnitude. 5 d ↑ and d 5 ↑ are generally going to have the same result. On the other hand, 5 t ↑ does not produce the same result as t 5 ↑
By default, the following keybound actions are available in at all times:
f1- Toggles the pixel gridf2- Toggles fullscreen modez ↑- Zooms the view in one levelz ↓- Zooms the view out one level<ctrl> ⊙- Move the color selection in the palette to⊙uUndo the last changeyRedo the last undone changebDiscard colors from the brush's copied content, turning it into a shape that can be drawn in any color<ctrl> bReset the brush shape to default
By default, the following keybound actions are available in draw mode:
d ⊙- Draw a line from the cursor position to⊙, moving the cursor to⊙as well. This line includes the current cursor positionx ⊙- Erase all pixels in a line from the cursor position to⊙, moving the cursor to⊙as well. This line includes the current cursor positiont ⊙- Change the selected palette color to the color at⊙f- Fill all connected pixels of the same color, starting from the cursorr- Replace all pixels matching the color beneath the cursors- Switch to select mode. Select mode selects a rectangular region between the cursor and the location the selection started in
By default, the following keybound actions are available in select mode:
d- Draw the outline of the selected region (specifically the pixels inside the region that are next to its edge)f- Fill all pixels within the selected region with the current colorescape- Switch back to draw modeg- Copy the selection to the brush<ctrl> g- Cut the selection to the brush
Commands
More actions are performed using the built-in command prompt, which can be opened/closed with tab. Here are the commands available by default:
new [width] [height]- Creates a new image with the specified dimensions. If onlywidthis provided, it will be used for height as well. If neither are provided, DeltaPaint will use the default width & height settings.new- Creates a new imagenew 16- Creates a new 16x16 imagenew 16 32- Creates a new 16x32 image
resize [width] [height]- Resizes the current canvas, without scaling the current image and cropping if necessary. If onlywidthis provided, it will be used for height as well.resize 16- Resizes the canvas to 16x16resize 16 32- Resizes the canvas to 16x32
save [filename]- Saves your image to the given file. If filename is not specified and you previously save or loaded this image, it will save to the same file. This command will always prompt you before overwriting an existing image.save brick- Saves to "brick.png" in the default save foldersave brick with spaces- Saves to "brick with spaces.png" in the default save foldersave /home/myUsername/Pictures/brick.png- Saves to the exact file specified
load [filename]- Loads an image, replacing your current canvas (be careful, you can't undo this).load brick- Loads "brick.png" from the default save folderload /home/myUsername/Pictures/brick.png- Loads the exact file specified
loadpalette [filename]- Loads a new palette, replacing the current palette (but not the colors in the image).loadPalette myColors- Loads "myColors.png" as a palette from the default palettes folder.loadPalette /home/myUsername/Pictures/palettes/myColors.png- Loads the exact file specified as a palette
selectpaletteindex [color]- Selects the specified color index in the current paletteselectPaletteindex 1- Selects the 1st colorselectPaletteindex 24- Selects the 24th color
grayscale- Desaturates your canvas, replacing all colors with corresponding shades of grey- `opendatadir - Opens DeltaPaint's data directory in the file browser.
Configuration
DeltaPaint is designed to be highly customizable from the ground up. You can change any of the UI colors, keyboard shortcuts & other settings in the config.lua file which is generated on first run. Please note that at the moment the config file is a disorganized mess. That's because internally, the contents of the config file are stored in a key-value pair table, and lua doesn't iterate over them in any particular order when writing to a file.
Color palettes
DeltaPaint can load and use color palettes from images as long as they're at an 1x scale, such as any palettes on lospec.
To load a palette from DeltaPaint's palettes folder, use the loadPalette your_palette command. You can also change the default palette using the palette.default setting in config.lua.