Keyboard: VIA / VIAL support?

I bet it is numlock, I bet I pressed it on accident, and the next layer doesn’t have it so you can’t switch back. I’ll look!!
I can change layers, but I can’t get to layer 0 no matter what I do. TO(0) does nothing, >TO(2) works fine.

Yes KP-LSOP is the space cadet l-shift ( combo.

It was the numlock, I pressed it, to get to layer1 didn’t realize it, bound that key over to move to layer 3 or whatever, then was super confused why I couldn’t get back to layer 0.

As far as tapdance and the like, That is a real shame, tap dance is a great way to get to layers while over loading a normal key. I’ll play with it more, see what I can dig up.

If you want to set up tapdance directly in qmk, here is a little guide on building for the Framework keyboards.
Custom QMK firmware? - #14 by MJ1

1 Like

I was able to clone * vial-qmk

git clone --recurse-submodules https://github.com/vial-kb/vial-qmk

Then remote attach * qmk_framework

git remote add qmk-framework https://github.com/FrameworkComputer/qmk_firmware.git

Then create a branch vial-framework

git branch vial-framework
git checkout vial-framework

Fetch the framework changes, so they can be merged onto vial…

git fetch qmk-framework

Then merge the correct framework branch on top of vial.

git merge qmk-framework/fl16-v0.2.8-prep 

Surprisingly the ONLY conflicts where some github action yaml files!!!

I assume I just need to now add the correct json, and do the proper port process to the keyboard file in framework/macropad???

2 Likes

Framework’s changes aren’t in the main branch.
You’ll want to use the latest release instead. It’s currently v0.2.9. Custom QMK firmware? - #14 by MJ1

fl16-v0.2.8-prep 

That is why I used the branch that the 0.29 tag points to.

I’m not sure what changes there has been since fl16-v0.2.8-prep, but I’d assume it’s not exactly the same as the v0.2.9 release.

Here is v0.2.9 github.com/FrameworkComputer/qmk_firmware/tree/v0.2.9

I guess there might not be any changes between fl16-v0.2.8-prep and v0.2.9?

I’ll
double check, but 9388622 seems to be in the commit history

I think you’re right. Sorry. They do seem identical.

I banged out a macropad .json. This is for Build support 1 - Create JSON - Vial

/keyboards/framework/macropad/keymaps/vial/vial.json

{
  "name": "Framework Laptop 16 RGB Macropad",
  "vendorId": "0x32AC",
  "productId": "0x0013",
  "lighting": "vialrgb",
  "matrix": {
    "rows": 4,
    "cols": 8
  },
  "layouts": {
    "keymap": [
  [
    {
      "h": 0.75
    },
    "2,1",
    {
      "x": 0.25,
      "h": 0.75
    },
    "2,2",
    {
      "x": 0.25,
      "h": 0.75
    },
    "3,4",
    {
      "x": 0.25,
      "h": 0.75
    },
    "2,4"
  ],
  [
    {
      "h": 1.25
    },
    "0,0",
    {
      "x": 0.25,
      "h": 1.25
    },
    "0,4",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,1",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,6"
  ],
  [
    {
      "y": 0.5,
      "h": 1.25
    },
    "0,1",
    {
      "x": 0.25,
      "h": 1.25
    },
    "0,5",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,2",
    {
      "x": 0.25,
      "h": 1.25
    },
    "2,5"
  ],
  [
    {
      "y": 0.5,
      "h": 1.25
    },
    "0,2",
    {
      "x": 0.25,
      "h": 1.25
    },
    "0,6",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,3",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,7"
  ],
  [
    {
      "y": 0.5,
      "h": 1.25
    },
    "0,3",
    {
      "x": 0.25,
      "h": 1.25
    },
    "0,7",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,4",
    {
      "x": 0.25,
      "h": 1.25
    },
    "2,6"
  ],
  [
    {
      "y": 0.5,
      "h": 1.25
    },
    "1,0",
    {
      "x": 0.25,
      "h": 1.25
    },
    "2,7",
    {
      "x": 0.25,
      "h": 1.25
    },
    "1,5",
    {
      "x": 0.25,
      "h": 1.25
    },
    "2,0"
  ]
]
  }
}

Here it is tested with File > Load dummy JSON...

Here is a macropad Vial config.h (untested).

/keyboards/framework/macropad/keymaps/vial/config.h

/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

#define VIAL_KEYBOARD_UID {0xD8, 0xE7, 0xC9, 0x76, 0x08, 0x89, 0x28, 0x14}

/* Set Vial unlock key combo */
// top left key: 3,2, plus top right key: 3,5
#define VIAL_UNLOCK_COMBO_ROWS { 3, 3 }
#define VIAL_UNLOCK_COMBO_COLS { 2, 5 }

/* Increase layer & macro counts for Vial */
#define DYNAMIC_KEYMAP_LAYER_COUNT 8   // default is 4
#define DYNAMIC_KEYMAP_MACRO_COUNT 32  // default is 16?

And here is a macropad Vial rules.mk (untested).
I am not sure if RGB_MATRIX_DRIVER needs to be defined here.

/keyboards/framework/macropad/keymaps/vial/rules.mk

# MCU name #
MCU = RP2040
BOOTLOADER = rp2040

# Vial options #
VIA_ENABLE = yes          # needed for Vial
VIAL_ENABLE = yes
#VIAL_INSECURE = yes      # Disable Vial's secure unlock combo. Locked options: changing macros, reboot to bootloader menu option, Assigning RESET keycode

# RGB matrix #
RGB_MATRIX_ENABLE = yes
VIALRGB_ENABLE = yes

For the vial keymap, just copy over the default macropad one, as they say get.vial.today/docs/porting-to-vial.html#2-create-a-new-vial-keymap

And I think that should be it.

I suspect you’re going to have some issues compiling, as I think (at the least) there were some significant changes to naming for the RGB controllers. Hope you can work through them, though – an up-to-date version of the code base would be helpful for other reasons as well!

They just made the drivers lowercase, just swapping it out to lowercase fixed that issue.
I just need to figure out the quantum.c issues now.

Well, it compiled… Checking if it works…

Uhhh, actually what happens if I bork this? What is the recovery method???

Well it flashed, and I made sure to have a reset key on the default map.

I was able to confirm the keys worked, but I wasn’t able to configure it with vial.rocks more testing…

What OS and browser?
Did keyboard.frame.work previously work?
I had to click the button to the left of the url and click “request permissions” for https://vial.rocks/ to work

Yeah, it did. I was able to flash, and put a reset key on the default layer, no issues, all compiled no issues, worked thru all the errors, and merges, fixed my merge errors, etc.

I’m going to walk back thru the guide one more time, ensure I did everything correct.

It does compile, and it’s larger than the default, and it does work on VIA still, and with the vial application with the VIA sideload.

So, I didn’t ‘break it’, but vial didn’t work. (I know the make flags are working because I have some bad code if you don’t compile with the VIAL_ENABLE, so easy to break right now.

What does the Vial app say for About > About [device]?

Depends on how bad you bork it.
There is a reset function in qmk bootmagic

Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard

There are also a few other ways to get into bootloader mode, most rely on the firmware to be somewhat working.

The last resort is the RP2040 BOOTSEL pin. But you’ll need a way to connect the module while pressing or shorting BOOTSEL. Input Module Developer Program
Now, I don’t actually know if Framework broke the BOOTSEL pin out, either to a small button or a pad. I don’t have a macropad and the image on framework’s site doesn’t show. It could be hidden under the stickers. Maybe you could check and let us know?


I want to say that Framework must have broke it out to a pad at least. But if they somehow failed to do so, the real last resort is using a needle to short the BOOTSEL pin on the chip itself.

With the firmware I flashed…
keyboard.frame.work
20:59:16.104

  • Fetching v2 definition failed

  • Device: Laptop 16 RGB Macropad

  • Vid: 0x32AC

  • Pid: 0x0013

With the vial side load…
Manufacturer: Framework

Product: Laptop 16 RGB Macropad

VID: 32AC

PID: 0013

Device: b’\\?\hid#vid_32ac&pid_0013&mi_01#9&262db93d&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}’

Sideloaded JSON, Vial functionality is disabled

VIA protocol: 9

Vial protocol: -1

Vial keyboard ID: -0000001

Macro entries: 16

Macro memory: 14707 bytes

Macro delays: unsupported - sideloaded keyboard

Complex (2-byte) macro keycodes: unsupported - sideloaded keyboard

Tap Dance entries: unsupported - sideloaded keyboard

Combo entries: unsupported - sideloaded keyboard

Key Override entries: unsupported - sideloaded keyboard

QMK Settings: unsupported - sideloaded keyboard

Do you have your code on a github repository?

1 Like