Thumbhelix is the thumb extension for Helix keyboard.
About Thumbhelix device, please see the following.
- Clone qmk_firmware.
$ git clone https://github.com/qmk/qmk_firmware.git
- Clone thumbhelix as submodule. Please replace [KEYMAP] with your keymap name.
$ cd qmk_firmware
$ git submodule add https://github.com/yskoht/thumbhelix.git users/[KEYMAP]/thumbhelix
- Add the following lines in your
config.h
andrules.mk
to build thumbhelix.
qmk_firmware/users/[KEYMAP]/config.h
#ifdef USE_THUMBHELIX
#include "thumbhelix/config.h"
#endif
qmk_firmware/users/[KEYMAP]/rules.mk
include $(USER_PATH)/thumbhelix/rules.mk
- Modify keymap.c .
qmk_firmware/keyboards/helix/rev2/keymaps/[KEYMAP]/keymap.c
#ifdef USE_THUMBHELIX
#include "thumbhelix.h"
#endif
#ifdef USE_THUMBHELIX
void pointing_device_init(void)
{
#ifndef SSD1306OLED
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
#endif
}
void pointing_device_task(void)
{
thumbhelix();
}
#endif
If you want to use BTN1 or BTN2, add custom_keycodes
and switch statement in process_record_user()
.
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
BTN1, // Left button
BTN2, // Right button. Assign to keymaps
RGBRST
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
...
case BTN1:
#ifdef USE_THUMBHELIX
if (record->event.pressed) {
th_pressed(TH_BTN1);
}
else {
th_released(TH_BTN1);
}
#endif
return false;
break;
case BTN2:
#ifdef USE_THUMBHELIX
if (record->event.pressed) {
th_pressed(TH_BTN2);
}
else {
th_released(TH_BTN2);
}
#endif
return false;
break;
...
- If you put Thumbhelix on the right side, you have to set the right side to master, and vice versa.
qmk_firmware/keyboards/helix/rev2/keymaps/[KEYMAP]/config.c
// #define MASTER_LEFT
#define MASTER_RIGHT
- Build and upload.
$ make helix:[KEYMAP]
$ sudo make helix:[KEYMAP]:avrdude
If build script shows warning for checking file size, you have to delete some code.
thumbhelix/config.h has some configurable parameters. Please check the file.
This software is released under the MIT License, see LICENSE.