pixeltris/GK6X

Using the AUR package and general instructions

Opened this issue · 0 comments

I've written down some usage instructions, perhaps someone can use it / expand on it / give it a home in the docs.

Introduction

This page explains how to use the GK6X tooling to program the epomaker s64 on Arch linux.
These instructions should be general enough to be useful for other supported keyboards.

Installation

First install yay, if you haven't yet. This can be done via your package manager of choice. Then run:

yay -S gk6x-bin

The yay installation installs the package in /opt/gk6x/. We need to edit a file in /opt/gk6x/UserData/ to be able to configure our keyboard.
To avoid having to use sudo all the time, let's first change the permissions of this folder. This is an optional step, you can also just use sudo -i to edit the config file if you want to.

# First, get the original permissions of the folders/files
ls -la /opt/gk6x/

# Change group ownership of files in UserData to our user
sudo chgrp -R <your-username> /opt/gk6x/UserData/

# Add permissions for group members to r/w/e
sudo chmod -R 775 /opt/gk6x/UserData/

# Now you should be able to open this file as your normal user
# Try changing something and saving and see if you're allowed to.
vim /opt/gk6x/UserData/Sample.txt
# type: O :wq

Similarly, you could change permissions on the other files, but I don't know why you need sudo to execute gk6x, so it's safer to leave it as is for now.

Configuration

Get config file

First we need to start up the program, this will generate a file for us that we need later.

sudo gk6x

This will print the following output when succesful: Connected to device 'SK64 RGB' model:656801886 fw:v1.37 (model number may vary).
Press ctrl+c to exit

Now a file should exist in /opt/gk6x/UserData/, for example /opt/gk6x/UserData/656801886.txt.
We're going to use this later.

Configure basic layout

Go to https://ukeloop.github.io/gk6x_gui/

There you can configure your layout. Notice that macros are not supported in the webgui, but we'll get to that later.

First, select your keyboard in the dropdown at the top of the page. Then configure your layout the way you want. Keep it simple for the first go, because malformed input will cause the update to fail, but as
of the time of writing, gk6x will not give us any error when it can't write the config, so some troubleshooting will be needed when that happens.

Once done, copy the code in the bottom panel, and paste it in the file we found before, e.g. /opt/gk6x/UserData/656801886.txt.

Apply changes

Warning: This step will erase any settings currently on your board and replace them with whatever you configure. If you misconfigure, either nothing will change, or you will reset the board to factory defaults.

Run the following to write the config from the UserData file to your keyboard:

sudo gk6x /map

Now try out your settings. Note: often it is necessary to move to the layer of choice, the updating step might put you back into the basic layer.

Key combos

I always have some issues with the shift being cancelled when you press a layer-change-key, thus I like to set keys on layer 2 to just be a complete action, like LCtrl+Insert for terminal copying.

This can be done by editing the config file manually. To set RShift to terminal copy, and Delete to terminal paste, on layer 2, you can do the following:

[Layer2]
# Terminal copy / paste
Left:LCtrl+Insert
Right:LShift+Insert

Macros

I haven't gotten around to this yet, but you can find some documentation here:

# Creating / mapping macros