QMK: stuff

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2021-11-05 00:07:56 +01:00
parent 4763b3f892
commit cccd769980
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
4 changed files with 15 additions and 3 deletions

2
nix/extra/qmk/config.h Normal file
View file

@ -0,0 +1,2 @@
#define RAW_USAGE_PAGE 0xFF60
#define RAW_USAGE_ID 0x61

View file

@ -15,6 +15,8 @@
*/
#include QMK_KEYBOARD_H
#include "raw_hid.h"
#include "string.h"
enum layer_names {
BASE
@ -59,6 +61,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case CS_SWP_SWTCH:
{
raw_hid_send((uint8_t*)"swp", strlen("swp"));
}
if (record->event.pressed)
{
if (cs_swapped)
@ -81,6 +86,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void raw_hid_receive(uint8_t* data, uint8_t length) {
raw_hid_send(data, length);
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base ,-----------------------------------------. ,-----------------------------------------------------.

View file

@ -7,9 +7,11 @@ BOOTLOADER = bootloadhid
# Build Options
# change yes to no to disable
#
RAW_ENABLE = yes
#VIRTSER_ENABLE = yes # Virtual Serial Port
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
EXTRAKEY_ENABLE = no # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality

View file

@ -100,10 +100,10 @@ rec {
mkdir -p keyboards/wheatfield/split75/keymaps/custom
cp ${./keymap.c} keyboards/wheatfield/split75/keymaps/custom/keymap.c
cp ${./rules.mk} keyboards/wheatfield/split75/rules.mk
cp ${./config.h} keyboards/wheatfield/split75/keymaps/custom/config.h
'';
buildPhase = ''
ls keyboards/wheatfield/split75/keymaps/custom
make wheatfield/split75:custom
'';
@ -126,7 +126,6 @@ rec {
'';
installPhase = ''
ls
cp wheatfield_split75_custom.hex $out
'';
};