ch57x-keyboard-tool 1.6.2

Command-line tool for programming ch57x keyboard
# See 'doc/actions.md' for description of available actions which
# may be assigned to keys. Comments here describe only configuration
# file format itself.

# Normal keyboard orientation is when
# buttons are on the left side and knobs are on the right.
# However, you may want to use the keyboard in another orientation.
# To avoid remapping button positions in your head, just set it here.
# Possible values are:
#   (horizontal)
#   - 'normal': buttons on the left, knobs on the right
#   - 'upsidedown': buttons on the right, knobs on the left
#   (vertical)
#   - 'clockwise': buttons on the top, knobs on the bottom
#   - 'counterclockwise': buttons on the bottom, knobs on the top
orientation: normal

# Different keyboard models have different numbers of buttons and knobs.
# Set it here for proper handling.
# Count rows and columns with the keyboard in normal orientation (knobs on the right)
rows: 3
columns: 4
knobs: 2

# Layers are sets of alternative key mappings.
# The current layer is changed using a button on the side of the keyboard
# and displayed with LEDs on top (only for the moment of changing).
# All keyboards I saw had three layers, but I suppose other variants exist.
layers:
  - buttons:
      # Array of buttons.
      # In horizontal orientations it's `rows` rows `columns` buttons each.
      # In vertical: `columns` rows `rows` buttons each.
      - ["a", "ctrl-a", "alt-shift", "alt-ctrl,ctrl-b"]
      - ["e", "f", "g", "h"]
      - ["<100>", "j", "k", "l"]
    knobs:
      # Knobs are listed from left to right if horizontal.
      # Knobs are listed from top to bottom if vertical.
      # Knobs can be rotated counter-clockwise (ccw) or clockwise (cw)
      # and pressed down.
      - ccw: "wheelup"
        press: "click"
        cw: "wheeldown"
      - ccw: "shift-wheelup"
        press: "shift-click"
        cw: "shift-wheeldown"

  - buttons:
      # Mouse events
      - ["click", "click(middle)", "click+rclick", "ctrl-mclick"]
      - ["move(0,10)", "alt-drag(right,10,0)", "ctrl-move(5,5)", "ctrl-wheelup"]
      - ["alt-wheel(1)", "ctrl-click", "wheelup", "wheelup"]
    knobs:
      - ccw: "left"
        press: "enter"
        cw: "right"
      - ccw: "ctrl-left"
        press: "ctrl-enter"
        cw: "ctrl-right"

  - buttons:
      # Multimedia commands are supported but
      # cannot be mixed with normal keys and modifiers.
      - ["play", "prev", "next", "mute"]
      - ["2", "3", "4", "5"]
      - ["6", "7", "8", "9"]
    knobs:
      - ccw: "volumedown"
        press: "mute"
        cw: "volumeup"
      - ccw: "d"
        press: "e"
        cw: "f"