You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to put a combo into the firmware so it doesn't have to be added via the GUI every time a new version of the firmware is installed.
Use case: I've built a custom keyboard with a built-in trackball. The trackball has no middle mouse button. I'd like this built in combo to press KC_MS_BTN3 when KC_MS_BTN1 and CK_MS_BTN2 are pressed.
This works fine if I build the combo in the GUI.
When I try to build the combo into the firmware using the instructions on QMK for building a combo and compile I get the following error:
Compiling: quantum/keymap_introspection.c [OK]
Compiling: quantum/via.c [OK]
Linking: .build/keyball_vial.elf [ERRORS]
|
| /bin/../lib/gcc/avr/8.3.0/../../../../avr/bin/ld: .build/obj_keyball_vial/quantum/vial.o:/home/qmk/vial-qmk/quantum/vial.c:509: multiple definition of 'key_combos'; .build/obj_keyball_vial/quantum/keymap_introspection.o:/home/qmk/vial-qmk/./keyboards/keyball/keymaps/vial/keymap.c:20: first defined here
| collect2: error: ld returned 1 exit status
|
gmake: *** [builddefs/common_rules.mk:283: .build/keyball_vial.elf] Error 1
Compiling: quantum/keymap_introspection.c In file included from quantum/keymap_introspection.c:5:
./keyboards/keyball/keymaps/vial/keymap.c:20:1: error: data definition has no type or storage class [-Werror]
key_combos[]={
^~~~~~~~~~
./keyboards/keyball/keymaps/vial/keymap.c:20:1: error: type defaults to 'int' in declaration of 'key_combos' [-Werror=implicit-int]
./keyboards/keyball/keymaps/vial/keymap.c:21:2: error: braces around scalar initializer [-Werror]
COMBO(middle_button, KC_MS_BTN3)
^~~~~
Is there a way to include a combo in the firmware with Vial, and if so, how?
Thanks
The text was updated successfully, but these errors were encountered:
This is a little annoying but Vial currently does not support Combos in keymap definitions when compiling.
You indeed need to remove them and define them in the GUI.
But I would suggest that you make use of the Vial settings save feature in order to distribute a complementary Vial settings stock file (.vil file extension) with your keyboard. This is the way Vial expects you to handle your settings including Combos. I believe keymap settings should be kept at a minimum. QMK main repo admins also require default keymap to be super minimal when submitting a PR, and I tend to believe it is about the same philosophy with Vial except that you have a super GUI to manipulate them!
Hello,
I would like to put a combo into the firmware so it doesn't have to be added via the GUI every time a new version of the firmware is installed.
Use case: I've built a custom keyboard with a built-in trackball. The trackball has no middle mouse button. I'd like this built in combo to press KC_MS_BTN3 when KC_MS_BTN1 and CK_MS_BTN2 are pressed.
This works fine if I build the combo in the GUI.
When I try to build the combo into the firmware using the instructions on QMK for building a combo and compile I get the following error:
My code for the combo is as follows:
The error says that key_combos is already defined, so I thought I'd remove the combo_t definition and just go with
but that gave me an error that said
Is there a way to include a combo in the firmware with Vial, and if so, how?
Thanks
The text was updated successfully, but these errors were encountered: