Name: Kaleidoscope-Controller-Linux
Owner: Keyboardio
Description: Application-based layer switching for Kaleidoscope-based keyboards, under Linux
Created: 2017-03-16 20:54:17.0
Updated: 2018-03-29 03:12:09.0
Pushed: 2017-03-16 20:54:36.0
Homepage: null
Size: 14
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A simple tool written in Python to track the active application under Linux, and switch layers based on this information. In other words, this application will switch the layer on the keyboard, based on which application is currently active.
On the firmware side, this requires the Focus plugin to be installed and active, and a Focus command enabling layer changes. Such a hook is found herein, in the hooks/kaleidoscope-layer-switch.h
file. You can copy that to your sketch verbatim, and use it like any other Focus hook.
On the host side, we need pygtk, python-wnck, and python-serial.
To change which layer each recognised application should switch to, simply edit the src/kaleidoscope-app-tracker.conf.json
file. It's a map (or dictionary, if so you prefer) of application names and layer pairs. Each key is the name of an application, and the value is the number of the layer the keyboard should switch to, if that application is active. Once an application becomes inactive, the layer gets switched off, and we return to the previous state.
The code is released under the terms of the GNU GPL, version 3 or later. See the COPYING file for details.