Yep, here is my ansi vial .json
/keyboards/framework/ansi/keymaps/vial/vial.json
{
"name": "Framework Laptop 16 Keyboard - ANSI",
"vendorId": "0x32AC",
"productId": "0x0012",
"customKeycodes": [
{"name": "FN_LOCK",
"title": "Toggles Fn Lock. FN_LOCK",
"shortName": "fn lock"
},
{"name": "KC_SCRN",
"title": "Simulates WIN+P, which toggles video source. KC_SCRN",
"shortName": "Display"
},
{"name": "KC_AIRP",
"title": "Toggles Airplane Mode. KC_AIRP",
"shortName": "Airp"
}
],
"lighting": "vialrgb",
"matrix": {
"rows": 8,
"cols": 16
},
"layouts": {
"keymap": [
[
{
"w": 1.25,
"h": 0.5
},
"7,5",
{
"x": 0.25,
"h": 0.5
},
"3,5",
{
"x": 0.25,
"h": 0.5
},
"2,5",
{
"x": 0.25,
"h": 0.5
},
"6,4",
{
"x": 0.25,
"h": 0.5
},
"3,4",
{
"x": 0.25,
"h": 0.5
},
"4,10",
{
"x": 0.25,
"h": 0.5
},
"3,10",
{
"x": 0.25,
"h": 0.5
},
"2,10",
{
"x": 0.25,
"h": 0.5
},
"1,15",
{
"x": 0.25,
"h": 0.5
},
"3,11",
{
"x": 0.25,
"h": 0.5
},
"4,8",
{
"x": 0.25,
"h": 0.5
},
"6,8",
{
"x": 0.25,
"h": 0.5
},
"3,15",
{
"x": 0.25,
"w": 1.75,
"h": 0.5
},
"0,1"
],
[
{
"y": -0.25
},
"4,2",
{
"x": 0.25
},
"5,2",
{
"x": 0.25
},
"5,5",
{
"x": 0.25
},
"5,4",
{
"x": 0.25
},
"5,6",
{
"x": 0.25
},
"4,6",
{
"x": 0.25
},
"4,7",
{
"x": 0.25
},
"5,7",
{
"x": 0.25
},
"5,10",
{
"x": 0.25
},
"5,8",
{
"x": 0.25
},
"4,13",
{
"x": 0.25
},
"2,13",
{
"x": 0.25
},
"4,14",
{
"x": 0.25,
"w": 2
},
"5,14"
],
[
{
"y": 0.25,
"w": 1.5
},
"3,2",
{
"x": 0.25
},
"0,2",
{
"x": 0.25
},
"6,5",
{
"x": 0.25
},
"2,4",
{
"x": 0.25
},
"6,6",
{
"x": 0.25
},
"3,6",
{
"x": 0.25
},
"3,7",
{
"x": 0.25
},
"6,7",
{
"x": 0.25
},
"6,10",
{
"x": 0.25
},
"3,8",
{
"x": 0.25
},
"5,13",
{
"x": 0.25
},
"6,13",
{
"x": 0.25
},
"6,14",
{
"x": 0.25,
"w": 1.5
},
"2,8"
],
[
{
"y": 0.25,
"w": 1.75
},
"4,4",
{
"x": 0.25
},
"7,2",
{
"x": 0.25
},
"4,5",
{
"x": 0.25
},
"7,14",
{
"x": 0.25
},
"7,6",
{
"x": 0.25
},
"2,6",
{
"x": 0.25
},
"2,7",
{
"x": 0.25
},
"7,7",
{
"x": 0.25
},
"7,10",
{
"x": 0.25
},
"7,8",
{
"x": 0.25
},
"7,13",
{
"x": 0.25
},
"0,14",
{
"x": 0.25,
"w": 2.5
},
"1,14"
],
[
{
"y": 0.25,
"w": 2.5
},
"1,9",
{
"x": 0.25
},
"1,5",
{
"x": 0.25
},
"0,5",
{
"x": 0.25
},
"0,0",
{
"x": 0.25
},
"0,6",
{
"x": 0.25
},
"1,6",
{
"x": 0.25
},
"1,7",
{
"x": 0.25
},
"0,7",
{
"x": 0.25
},
"0,10",
{
"x": 0.25
},
"0,8",
{
"x": 0.25
},
"0,13",
{
"x": 0.25,
"w": 3
},
"0,9"
],
[
{
"y": 0.25,
"w": 1.25
},
"1,12",
{
"x": 0.25
},
"2,2",
{
"x": 0.25
},
"3,1",
{
"x": 0.25
},
"1,3",
{
"x": 0.25,
"w": 6
},
"1,4",
{
"x": 0.25
},
"0,3",
{
"x": 0.25
},
"0,12",
{
"x": 0.25,
"w": 1.25
},
"6,11",
{
"x": 0.25,
"w": 1.25,
"h": 0.5
},
"1,13",
{
"x": 0.25,
"w": 1.25
},
"2,15"
],
[
{
"y": -0.5,
"x": 15.5,
"w": 1.25,
"h": 0.5
},
"1,8"
]
]
}
}
For the customKeycodes to work in Vial, it would need them defined in the keymap the way Vial requires. I could do that in a little bit.
~edit~
Opps, I replied before reading your whole post. Guess you donβt need the vial .json? Did you get customKeycodes to work and display their names properly in Vial?
Anyway, here is a ansi keymap with Vial custom keycodes the way it wants them.
/keyboards/framework/ansi/keymaps/vial/keymap.c
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#include "framework.h"
enum custom_keycodes {
FN_LOCK = QK_KB_0,
KC_SCRN,
KC_AIRP,
};
enum _layers {
_BASE,
_FN,
_FN_LOCK,
_FM
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* βββββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬βββββ
* 14 keys βESC βMutβvDnβvUpβPrvβPlyβNxtβbDnβbUpβScnβAirβPrtβAppβDel β
* βββββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄βββββ€
* 14 keys β ` β 1 β 2 β 3 β 4 β 5 β 6 β 7 β 8 β 9 β 0 β - β = βBackspβ
* βββββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬βββββ€
* 14 keys β Tab β Q β W β E β R β T β Y β U β I β O β P β [ β ] β \ β
* βββββββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄βββββ€
* 13 keys β Caps β A β S β D β F β G β H β J β K β L β ; β ' β Enter β
* ββββββββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββββββββ€
* 12 keys β Shift β Z β X β C β V β B β N β M β , β . β / β Shift β
* ββββββ¬ββββΌββββΌββββΌββββ΄ββββ΄ββββ΄ββββ΄ββββΌββββΌββββΌββββ΄β¬ββββ¬βββββ€
* β β β β β β β β ββ β β
* 11 keys βCtrlβFN βGUIβAltβ βAltβCtlβ β βββββ€ β β
* β β β β β β β β β ββ β
* ββββββ΄ββββ΄ββββ΄ββββ΄ββββββββββββββββββββ΄ββββ΄ββββ΄βββββ΄ββββ΄βββββ
* 78 total
*/
[_BASE] = LAYOUT(
KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, KC_AIRP, KC_PSCR, KC_MSEL, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
),
/*
* Function layer
* βββββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬βββββ
* 14 keys βFN lkβF1 βF2 βF3 βF4 βF5 βF6 βF7 βF8 βF9 βF10βF11βF12βIns β
* βββββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄βββββ€
* 14 keys β β β β β β β β β β β β β β β
* βββββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬βββββ€
* 14 keys β β βRGBβNxtβHueβSatβSpdβBrtβ β βPauβ β β β
* βββββββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄β¬βββ΄βββββ€
* 13 keys β β βSRqβPrvβHueβSatβSpdβBrtβScLβ β β β β
* ββββββββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββ¬ββ΄ββββββββ€
* 12 keys β β β β β β βBrkβ β β β β β
* ββββββ¬ββββΌββββΌββββΌββββ΄ββββ΄ββββ΄ββββ΄ββββΌββββΌββββΌββββ΄β¬ββββ¬βββββ€
* β β β β β β β β βPgUβ β
* 11 keys β β β β β Toggle Backlight β β βHomeβββββ€End β
* β β β β β β β β βPgDβ β
* ββββββ΄ββββ΄ββββ΄ββββ΄ββββββββββββββββββββ΄ββββ΄ββββ΄βββββ΄ββββ΄βββββ
* 78 total
*/
[_FN] = LAYOUT(
FN_LOCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______,
_______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______,
_______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END
),
// Function lock layer
// Everything on F-row locked to function layer, except ESC and DEL
[_FN_LOCK] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// Locked+temporary FN (back to base plus extra keys)
[_FM] = LAYOUT(
FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, KC_AIRP, KC_PSCR, KC_MSEL, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______,
_______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______,
_______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END
),
};
// Custom keycode handling
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// Make sure to keep FN Lock even after reset
case FN_LOCK:
if (record->event.pressed) {
if (layer_state_is(_FN)) {
set_single_persistent_default_layer(_FN_LOCK);
}
if (layer_state_is(_FM)) {
set_single_persistent_default_layer(_BASE);
}
}
return false;
break;
default:
break;
}
return true;
}
Just saw that you have ansi on your github. I didnβt have lighting defined in the ansi .json which I posted in the other thread. But itβs set in the ansi .json above.