Skip to content

maatthc/miryoku_qmk_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Keyboard Layers App companion

A simple python script to display the selected layer layout on screen.

At the moment it only supports the default layouts of Miryoku QMK

Demonstration video: Demonstration

Layouts

The current layouts are:

  • Base: QWERY
  • Nav: Vi
  • Mouse: Vi
  • Media/ Num/ Syn/ Fun

The following alternative Layouts are available:

  • Base: Colemak-DH / Inverted Colemak-DH
  • Nav: Default
  • Mouse: Default

To use any of the alternative layouts, rename the corresponding image file in the folder assets to the default name.

Internals

It works by sending different Function keys (F13 to F19) to the host when switching between layers

It requires the following changes to your miryoku_qmk firmware:

File: keyboards/<your_keyboard>/keymaps/manna-harbour_miryoku/keymap.c

// Notifies the host of the layer change
// Layers reference: users/manna-harbour_miryoku/miryoku_babel/miryoku_layer_list.h
layer_state_t layer_state_set_user(layer_state_t state) {
    switch (get_highest_layer(state)) {
        case 0:
            // send f13
            SEND_STRING(SS_TAP(X_F13));
            break;
        case 4:
            SEND_STRING(SS_TAP(X_F14));
            break;
        case 5:
            SEND_STRING(SS_TAP(X_F15));
            break;
        case 6:
            SEND_STRING(SS_TAP(X_F16));
            break;
        case 7:
            SEND_STRING(SS_TAP(X_F17));
            break;
        case 8:
            SEND_STRING(SS_TAP(X_F18));
            break;
        case 9:
            SEND_STRING(SS_TAP(X_F19));
            break;
        default:
            uprintf("Layer not mapped: %d\n", get_highest_layer(state));
            break;
    }
    return state;
}

Requirements

  • Python 3
  • Kivy
  • Keyboard

Installation

Linux

***** Note for Gnome users

If the Settings app is showing up when you press the function keys, you can disable the shortcuts by running the following command:

gsettings set org.gnome.settings-daemon.plugins.media-keys control-center-static "['']"

Install Dependencies

sudo pip install kivy keyboard

Run the script as root

sudo python keyboard_layers.py

About

Keyboard Layers App companion for Miryoku QMK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages