Skip to content

Instantly share code, notes, and snippets.

@ovidiucs
Last active February 5, 2024 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovidiucs/8c4c64aeb8134943fb6a41f3e27e4f7d to your computer and use it in GitHub Desktop.
Save ovidiucs/8c4c64aeb8134943fb6a41f3e27e4f7d to your computer and use it in GitHub Desktop.
TVPaint HWDB
Map scancodes to keycodes
--------
/etc/udev/rules.d/20-zero2.rules
KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{uniq}=="e4:17:d8:40:0d:08", SYMLINK+="8BitDo-Zero-2-Yellow"
--------
Custom hwdb run systemd-hwdb update after file is created and udevadm triggert to reload udev rules.
/etc/udev/hwdb.d/80-8bitdo.hwdb
evdev:input:b0005v2DC8p3230*
# Buttons: 12 - 2 used by CTRL and ALT; 10keys + 10keys using CTRL+key
# Mappings
# Left Front Button (most accesible)
# Default: k
# Space: Sketching
# Set to: LeftCTRL
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_7000e=leftctrl
# ==========================
# Right Front Button
# Default: m
# Space: Sketching
# Set to: f Flip horizontally - default [
# Set to: CTRL+f Flip vertically - default ]
# Space: Line - keep
# Space: Color - fill / picker
# Space: Shadows
KEYBOARD_KEY_70010=f
# ==========================
# Up Arrow (most innacesible)
# Default: c
# Space: Sketching
# Set to: b-Blue Pencil - Shadows
# Set to: CTRL+b Red Pencil - Lights
# Space: Line
# Set to: Mode Fade / Constant for Size - For 3 point splines
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70006=b
# ==========================
# Left Arrow
# Default: e
# Space: Sketching
# Set g to swap color A with color B
# Set CTRL+g to increase brush size
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70008=g
# ==========================
# Right Arrow
# Default: f
# Space: Sketching
# Set key to: y for yellow pencil
# Set key to: remove yellow pencil via keyer
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70009=y
# ==========================
# Down Arrow
# Default: d Default TVP: Shape: Stroke
# Space: Sketching
# Set w to: Manual flip
# Set CTRL+w to: new instance
# Space: Line
# Set w to: Manual flip
# Set CTRL+w to:
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70007=w
# ==========================
# Select Button
# Default: n
# Space: Sketching
# Set r to: Red Pencil
# Set CTRL+r to: Red Pencil remove
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70011=r
# ==========================
# Start Button
# Default: o
# Set e to erase
# Set ctr+e to zomm rotation reset + 100%
# Space: Sketching
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_70012=e
# ==========================
# X Button
# Default: h
# Set u to: undo
# Set CTRL+u to clear layer
# Space: Sketching
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_7000b=u
# ==========================
# Y Button
# Default: l
# Space: Sketching
# Set key j to: Green Pencil
# Set keu CTRL+j to: Erase green pencil
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_7000c=l
# ==========================
# A button
# Default: g
# Space: Sketching
# Set key j to: Black Pencil
# Set keu CTRL+j to: Erase black pencil
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_7000a=j
# ==========================
# B button
# Default: j
# Set LeftAlt
# Space: Sketching
# Space: Line
# Space: Color
# Space: Shadows
KEYBOARD_KEY_7000d=leftalt
# ==========================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment