QMK keyboard config attachment
Last update
2025-08-12
2025
08-12
«x-bows nature»

1. set En-US keyboard layout

See: debian wiki, raspi howto.

1
2
3
4
5
dpkg-reconfigure keyboard-configuration
  # Generic 105-key PC (intl.)
  # English (US) - English (intl., with AltGr dead keys)
  # Right Alt (AltGr)
  # No compose key

Italian accented letters:

  • AltGr+[aeiou] | AltGr+', [aeiou] = [áéíóú]
  • AltGr+`, [aeiou] = àèìòù
  • AltGr+; = ¶
  • AltGr+: = °

2a. create layout & download its firmware

  1. Open the layout maker (docs, keys)
  2. Load a previous .json layout file (see attachment)
  3. Preferences: settings > dark mode ON, colorway GMK 9009
  4. Push DL KEYMAP.JSON to save current layout
  5. Push COMPILE button and wait
  6. Push DL FIRMWARE to save the custom firmware

Note: X-Bows Nature supports up to 16 layers.

2b. compile customized firmware via docker

  1. Push DL FULL SOURCE to get the building sources
  2. Extract sources, cd into them, and copy layout.json here
  3. convert layout.json to keyboard.c:

    1
    2
    mkdir -p keyboards/xbows/nature/keymaps/custom
    ./util/docker_cmd.sh bash -c 'qmk json2c layout.json > keyboards/xbows/nature/keymaps/custom/keymap.c'
    
  4. append to keyboards/xbows/nature/config.h:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    #define MK_3_SPEED                // Enable mouse constant speed mode
    
    #define MK_C_OFFSET_0        2    // Cursor offset per movement (MS_ACL0)
    #define MK_C_OFFSET_1        4    // Cursor offset per movement (MS_ACL1)
    #define MK_C_OFFSET_2        6    // Cursor offset per movement (MS_ACL2)
    
    #define MK_C_INTERVAL_0      20   // Time between cursor movements (MS_ACL0)
    #define MK_C_INTERVAL_1      16   // Time between cursor movements (MS_ACL1)
    #define MK_C_INTERVAL_2      12   // Time between cursor movements (MS_ACL2)
    
    #define MK_W_OFFSET_0        2    // ScrollScroll steps per scroll action (MS_ACL0)
    #define MK_W_OFFSET_1        4    // ScrollScrollScroll steps per scroll action (MS_ACL1)
    #define MK_W_OFFSET_2        6    // Scroll steps per scroll action (MS_ACL2)
    
    #define MK_W_INTERVAL_0      120  // Time between scroll steps (MS_ACL0)
    #define MK_W_INTERVAL_1      120  // Time between scroll steps (MS_ACL1)
    #define MK_W_INTERVAL_2      120  // Time between scroll steps (MS_ACL2)
    
  5. configure keyboards/xbows/nature/keyboard.json (get more free memory excluding unused animations, docs):

    1
    2
    3
    4
    5
    6
    7
    "rgb_matrix": {
        "animations": {
            "solid_reactive": true,
        },
        "default": {
            "animation": "solid_reactive"
        },
    
  6. compile custom firmware:

    1
    2
    3
    4
    5
    6
    7
    8
    ./util/docker_build.sh xbows/nature:custom
    
    # copia scarica files
    tar -czvf files.tgz \
      keyboards/xbows/nature/config.h \
      keyboards/xbows/nature/keyboard.json \
      keyboards/xbows/nature/keymaps/custom/keymap.c \
      layout.json xbows_nature_custom.hex
    

3. flash the firmware

  1. Download dfu-programmer (hp) and compile it:

    1
    2
    3
    4
    ./bootstrap.sh
    ./configure
    make
    ls -l src/dfu-programmer
    
  2. Press Fn+Esc to switch keyboard in DFU mode (reset)

  3. Flash firmware (from qmk_toolbox sources):

    1
    2
    3
    4
    5
    6
    7
    8
    # dfu-programmer v 1.1.0
    sudo ./dfu-programmer atmega32u4 flash --force --erase-first layout.hex
    sudo ./dfu-programmer atmega32u4 launch
    
    # dfu-programmer v 0.7.1
    sudo ./dfu-programmer atmega32u4 erase --force ; sleep 5
    sudo ./dfu-programmer atmega32u4 flash --force layout.hex ; sleep 5
    sudo ./dfu-programmer atmega32u4 reset
    

Refs: X-Bows, Noobs guide, info.json, RGB effects, Mouse constant mode