Quantcast
Channel: More professional engineering
Viewing all articles
Browse latest Browse all 10

Via (a configuration tool for mechanical keyboards with QMK) works just fine ***without*** Google Chrome!

$
0
0

The Via tool does not need Google Chrome. There are standalone executables (though they do need an Internet connection to work), but this is not advertised at all at the Via web site. It appears as if the only way is essentially to have to install Google Chrome (a kind of spyware you can never get rid of, because the background updater still runs in the background). But that is not the case. The error message is:

“USB Detection Error. Looks [sic] like there was a problem getting USB detection working. Right now, we only support browsers that have WebHID enabled, so make sure yours is compatible before trying again.”

While this is technically not a lie, they completely fail to inform that there is an alternative: Executables for Linux, Windows, and Mac (based on Electron, like Visual Studio Code)

What is “Via”?

Via can change the behaviour (configure) a QMK-based keyboard without having to reflash the QMK firmware. Key mappings can be changed, macros recorded, macro timings changed, and macros assigned to keys. Changes take place immediately and thus the turnaround time is very low compared to the normal edit, compile, flash, and test cycle for QMK. There are also drawbacks and limitations (for example, only 16 macros can be defined), but it enables a very quick turnaround in quickly trying out new things in QMK.

Example: Assigning a key on the numeric keypad as mouse right click. In this example, Num Lock is assigned (this may seem to cripple the number functionality, but that is not the case if an extra keyboard with Num Lock is also attached, say a wireless (Bluetooth) separate external numeric keypad).

Hidden page with executables for Linux, Windows, and Mac

The existence of the executables is very well hidden. The first hint I got was on this external page:

“desktop app … a wrapper for the web app”

Though it is also misleading as it seems to suggest Google Chrome is still needed. But that is not the case.

Another page on that external site has the essential information (and the link to the download page for the standalone versions):

“The VIA app now comes in two flavors: Desktop application … Web application”

The link is “VIA Releases” (is on GitHub).

Background information

The information used and changed by Via is stored in EEPROM memory (either actual physical EEPROM memory or “virtual” EEPROM memory).

Note: An example of “virtual” EEPROM memory is on the Keychron V5 (and probably many other ARM microcontroller-based keyboards), EEPROM is set up to be emulated by using the free flash memory (the remaining not used by the firmware). This is a general feature of the QMK software. The default on the Keychron V5 is 2 KB “virtual” EEPROM memory, but it can be increased to overcome the macro size limit of about 150 key actions total in Via by changing the line

#define WEAR_LEVELING_LOGICAL_SIZE 2048

to, for example,

#define WEAR_LEVELING_LOGICAL_SIZE 20480

in file config.h. For this value, this will enable about 2,300 key actions in total.

Thus it may be cleared (Via configuration wiped out) when the keyboard gets its firmware updated. But it can be saved in Via to a file before the flashing of the firmware and be loaded after the flashing to restore the configuration.

Via communicates with the keyboard over USB using a particular protocol in order to read and write Via configuration settings. For this to work, the QMK firmware must have enabled Via support at compile time, for instance, in file rules.mk (at the “/keymaps” level, a specific key map), “VIA_ENABLE = yes“.

References

  • Using and Building QMK and VIA, VIA part (2020-10-01). Most descriptions of Via are way too terse (incl. the official documentation), but this one is very thorough. It describes Via in detail and how to use it, incl. screenshots.


Viewing all articles
Browse latest Browse all 10

Trending Articles