---
# looking to make changes? 
# drop me in ~/.config/wayvr/keyboard.yaml

# This file contains all data needed to generate the keyboard.
# You can create any layout, as long as:
# - All keys are rectangular with 1 unit of height.
# This means:
# - We're limited to the flat & boring ANSI enter key.
# - Numpad + and Enter might not look so great.

# *** Important ***
# The keyboard layout uses virtual key codes, so they are layout-independent.
# For example, Q on a French layout actually results in A.
# If you're using a non-english layout, chances are you only need to edit the label section below.

# How many units of key size in each row? 1 = standard letter key size
row_size: 23

# Specifies the size of each key. The sum of any given row must equal RowSize
key_sizes:
    - [1.5,0.5, 1, 1, 1, 1,0.5,1, 1, 1, 1,0.5,1, 1, 1, 1, 0.5, 1, 1, 1, 0.5, 1, 1, 1, 1]
    - [1,   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,     0.5, 1, 1, 1, 0.5,    1, 1, 1, 1]
    - [1.5,  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.5,  0.5, 1, 1, 1, 0.5,    1, 1, 1, 1]
    - [1.75,  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.25,   4,                    1, 1, 1, 1]
    - [1.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.75,    1.5,    1, 1.5,       1, 1, 1, 1]
    - [1.25, 1.25, 1.25, 6.25, 1.25, 1.25, 1.25, 1.25, 0.5, 1, 1, 1, 0.5,    2,    1, 1]

# The main (blue) layout of the keyboard.
# Accepted are:
# - virtual keys. For a full list, look at enum VirtualKey in https://github.com/galister/wlx-overlay-s/blob/main/src/hid.rs
# - exec_commands (defined below)
# - macros (defined below)
# - ~ (null) will leave an empty space with the corresponding size from key_sizes
main_layout:
    - ["Escape", ~, "F1", "F2", "F3", "F4", ~, "F5", "F6", "F7", "F8", ~, "F9", "F10", "F11", "F12", ~, "Print", "Scroll", "Pause", ~, "COPY", "PASTE", ~, "KILL"]
    - ["Oem3", "N1", "N2", "N3", "N4", "N5", "N6", "N7", "N8", "N9", "N0", "Minus", "Plus", "BackSpace", ~, "Insert", "Home", "Prior", ~, "NumLock", "KP_Divide", "KP_Multiply", "KP_Subtract"]
    - ["Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Oem4", "Oem6", "Oem5", ~, "Delete", "End", "Next", ~, "KP_7", "KP_8", "KP_9", "KP_Add"]
    - ["XF86Favorites", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Oem1", "Oem7", "Return", ~, "KP_4", "KP_5", "KP_6", ~]
    - ["LShift", "Oem102", "Z", "X", "C", "V", "B", "N", "M", "Comma", "Period", "Oem2", "RShift", ~, "Up", ~, "KP_1", "KP_2", "KP_3", "KP_Enter"]
    - ["LCtrl", "LSuper", "LAlt", "Space", "Meta", "RSuper", "Menu", "RCtrl", ~, "Left", "Down", "Right", ~, "KP_0", "KP_Decimal", ~]

# Shell commands to be used in a layout.
# Value is an array of string arguments.
exec_commands:
    STT: [ "whisper_stt", "--lang", "en" ]

# Series of keypresses to be used in a layout.
# Format: keyName [DOWN|UP]
# keyName must be a valid virtual key from the VirtualKey enum (see above)
# DOWN|UP: can be omitted for an implicit "keyName DOWN, keyName UP"
macros:
    KILL: [ "LSuper DOWN", "LCtrl DOWN", "Escape", "LCtrl UP", "LSuper UP" ]
    COPY: [ "LCtrl DOWN", "C", "LCtrl UP" ]
    PASTE: [ "LCtrl DOWN", "V", "LCtrl UP" ]

# Custom labels to use.
# Key: element of main_layout
# Value: Array of strings. 0th element is the upper row, 1st element is lower row.
# For empty labels, use [] (do not use ~)
labels:
    "Escape":         ["Esc"]
    "Prior":          ["PgUp"]
    "Next":           ["PgDn"]
    "NumLock":        ["Num"]
    "Space":          []
    "LAlt":           ["Alt"]
    "LCtrl":          ["Ctrl"]
    "RCtrl":          ["Ctrl"]
    "LSuper":         ["Super"]
    "RSuper":         ["Super"]
    "LShift":         ["Shift"]
    "RShift":         ["Shift"]
    "Insert":         ["Ins"]
    "Delete":         ["Del"]
    "BackSpace":      ["<<"]
    "KP_Divide":      [" /"]
    "KP_Add":         [" +"]
    "KP_Multiply":    [" *"]
    "KP_Decimal":     [" ."]
    "KP_Subtract":    [" -"]
    "KP_Enter":       ["Ent"]
    "Print":          ["Prn"]
    "Scroll":         ["Scr"]
    "Pause":          ["Brk"]
    "XF86Favorites":  ["Menu"] # fallback labels below
    "N1":             ["1", "!"]
    "N2":             ["2", "@"]
    "N3":             ["3", "#"]
    "N4":             ["4", "$"]
    "N5":             ["5", "%"]
    "N6":             ["6", "^"]
    "N7":             ["7", "&"]
    "N8":             ["8", "*"]
    "N9":             ["9", "("]
    "N0":             ["0", ")"]
    "Minus":          ["-", "_"]
    "Plus":           ["=", "+"]
    "Comma":          [" ,",  "<"]
    "Period":         [" .",  ">"]
    "Oem1":           [" ;",  ":"]
    "Oem2":           [" /",  "?"]
    "Oem3":           ["`", "~"]
    "Oem4":           [" [",  "{"]
    "Oem5":           [" \\", "|"]
    "Oem6":           [" ]",  "}"]
    "Oem7":           [" '",  "\""]
    "Oem102":         [" \\", "|"] 

