# com.lvl99.paintcanvas.settings

> A user's PaintCanvas app settings. Settings that aren't set use PaintCanvas's defaults.

- Kind: record
- Record key: literal:self
- Authority: paintcanvas.lvl99.com
- Lexicon: 1
- Published by [livecanvas.lvl99.com](https://lexicon.garden/identity/did:plc:pnraiwv3cf2ue5qdfsrze63z), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:pnraiwv3cf2ue5qdfsrze63z/com.lvl99.paintcanvas.settings)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:pnraiwv3cf2ue5qdfsrze63z/com.lvl99.paintcanvas.settings/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:pnraiwv3cf2ue5qdfsrze63z/com.lvl99.paintcanvas.settings/analytics)

## Record (`com.lvl99.paintcanvas.settings`)

Type: record · key literal:self

### Properties

- `colours` (ref)
  - Reference: `#colours`
- `input` (ref)
  - Reference: `#inputSettings`
- `shortcuts` (array): Keyboard shortcuts the user changed from PaintCanvas's defaults.
  - Constraints: maxLength: 200
  - `items` (ref)
    - Reference: `#shortcut`
- `ui` (ref)
  - Reference: `#uiSettings`
- `updatedAt` (string · datetime): When the settings were last changed.

## #colours (`com.lvl99.paintcanvas.settings#colours`)

Type: object

The colours being drawn with, as "#rrggbb".

### Properties

- `background` (string, required)
  - Constraints: maxLength: 7
- `foreground` (string, required)
  - Constraints: maxLength: 7

## #gesture (`com.lvl99.paintcanvas.settings#gesture`)

Type: object

### Properties

- `action` (string, required): What it does, e.g. "undo".
  - Constraints: maxLength: 50
- `gesture` (string, required): The gesture, e.g. "twoFingerTap".
  - Constraints: maxLength: 50

## #inputSettings (`com.lvl99.paintcanvas.settings#inputSettings`)

Type: object

How the user moves around the canvas and draws.

### Properties

- `focusPen` (boolean): Only a pen draws; fingers move the canvas.
- `gestures` (array): What each touch gesture does.
  - Constraints: maxLength: 20
  - `items` (ref)
    - Reference: `#gesture`
- `modifierScrollZoom` (boolean): Scrolling with a modifier key held zooms the canvas.
- `penPressure` (boolean): A pen's pressure varies the brush, for every brush preset (on when not set).
- `penTilt` (boolean): A pen's tilt varies the brush, for every brush preset (off when not set).
- `pinchZoom` (boolean): Pinching zooms the canvas.
- `scrollPan` (boolean): Scrolling pans the canvas.

## #shortcut (`com.lvl99.paintcanvas.settings#shortcut`)

Type: object

A keyboard shortcut. Without a key, the action has no shortcut.

### Properties

- `action` (string, required): The action, e.g. "undo".
  - Constraints: maxLength: 64
- `alt` (boolean): Alt (Option on macOS) is held.
- `cmd` (boolean): Command (macOS) or Control (Windows, Linux) is held.
- `ctrl` (boolean): Control is held.
- `key` (string): The key, e.g. "z".
  - Constraints: maxLength: 32
- `shift` (boolean): Shift is held.

## #uiSettings (`com.lvl99.paintcanvas.settings#uiSettings`)

Type: object

### Properties

- `locale` (string · language): Language of the interface.
- `rendering` (string): Whether drawing uses the GPU.
  - Constraints: maxLength: 20, knownValues: cpu | gpu
- `theme` (string): Colour theme; "system" follows the device.
  - Constraints: maxLength: 20, knownValues: light | dark | system

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "colours": {
      "description": "The colours being drawn with, as \"#rrggbb\".",
      "properties": {
        "background": {
          "maxLength": 7,
          "type": "string"
        },
        "foreground": {
          "maxLength": 7,
          "type": "string"
        }
      },
      "required": [
        "foreground",
        "background"
      ],
      "type": "object"
    },
    "gesture": {
      "properties": {
        "action": {
          "description": "What it does, e.g. \"undo\".",
          "maxLength": 50,
          "type": "string"
        },
        "gesture": {
          "description": "The gesture, e.g. \"twoFingerTap\".",
          "maxLength": 50,
          "type": "string"
        }
      },
      "required": [
        "gesture",
        "action"
      ],
      "type": "object"
    },
    "inputSettings": {
      "description": "How the user moves around the canvas and draws.",
      "properties": {
        "focusPen": {
          "description": "Only a pen draws; fingers move the canvas.",
          "type": "boolean"
        },
        "gestures": {
          "description": "What each touch gesture does.",
          "items": {
            "ref": "#gesture",
            "type": "ref"
          },
          "maxLength": 20,
          "type": "array"
        },
        "modifierScrollZoom": {
          "description": "Scrolling with a modifier key held zooms the canvas.",
          "type": "boolean"
        },
        "penPressure": {
          "description": "A pen's pressure varies the brush, for every brush preset (on when not set).",
          "type": "boolean"
        },
        "penTilt": {
          "description": "A pen's tilt varies the brush, for every brush preset (off when not set).",
          "type": "boolean"
        },
        "pinchZoom": {
          "description": "Pinching zooms the canvas.",
          "type": "boolean"
        },
        "scrollPan": {
          "description": "Scrolling pans the canvas.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "A user's PaintCanvas app settings. Settings that aren't set use PaintCanvas's defaults.",
      "key": "literal:self",
      "record": {
        "properties": {
          "colours": {
            "ref": "#colours",
            "type": "ref"
          },
          "input": {
            "ref": "#inputSettings",
            "type": "ref"
          },
          "shortcuts": {
            "description": "Keyboard shortcuts the user changed from PaintCanvas's defaults.",
            "items": {
              "ref": "#shortcut",
              "type": "ref"
            },
            "maxLength": 200,
            "type": "array"
          },
          "ui": {
            "ref": "#uiSettings",
            "type": "ref"
          },
          "updatedAt": {
            "description": "When the settings were last changed.",
            "format": "datetime",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "record"
    },
    "shortcut": {
      "description": "A keyboard shortcut. Without a key, the action has no shortcut.",
      "properties": {
        "action": {
          "description": "The action, e.g. \"undo\".",
          "maxLength": 64,
          "type": "string"
        },
        "alt": {
          "description": "Alt (Option on macOS) is held.",
          "type": "boolean"
        },
        "cmd": {
          "description": "Command (macOS) or Control (Windows, Linux) is held.",
          "type": "boolean"
        },
        "ctrl": {
          "description": "Control is held.",
          "type": "boolean"
        },
        "key": {
          "description": "The key, e.g. \"z\".",
          "maxLength": 32,
          "type": "string"
        },
        "shift": {
          "description": "Shift is held.",
          "type": "boolean"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    "uiSettings": {
      "properties": {
        "locale": {
          "description": "Language of the interface.",
          "format": "language",
          "type": "string"
        },
        "rendering": {
          "description": "Whether drawing uses the GPU.",
          "knownValues": [
            "cpu",
            "gpu"
          ],
          "maxLength": 20,
          "type": "string"
        },
        "theme": {
          "description": "Colour theme; \"system\" follows the device.",
          "knownValues": [
            "light",
            "dark",
            "system"
          ],
          "maxLength": 20,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "A user's PaintCanvas app settings. Settings that aren't set use PaintCanvas's defaults.",
  "id": "com.lvl99.paintcanvas.settings",
  "lexicon": 1
}
```
