Author Topic: kbfirmware to direct code edit  (Read 1978 times)

0 Members and 1 Guest are viewing this topic.

Offline emenelopee

  • Thread Starter
  • Posts: 398
  • *klomp klomp klomp* I step on your house 🦖
kbfirmware to direct code edit
« on: Wed, 31 January 2018, 21:10:05 »
I've been using kbfirmware to generate my teensy firmware - looking for advice on how to get into direct editing of the code so I can mess with the guts a little more: What's the goto for step-by-step instructions to edit the code directly?

EDIT: follow-up question: what are the benefits of getting into the weeds of QMK that kbfirmware doesn't cover?
« Last Edit: Wed, 31 January 2018, 21:21:24 by emenelopee »

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: kbfirmware to direct code edit
« Reply #1 on: Thu, 01 February 2018, 03:13:58 »
What's the goto for step-by-step instructions to edit the code directly?
Assuming that you have already downloaded the source, the files you might wanna look into are config.h, your header file (kb.h when downloading from kbfirmware.com) and the keymaps.
The real deal is in the header file as you can add multiple layout supports which are then implemented by the keymap files.
A straightforward example of that is the code for the XMMX and the Toad which share the same matrix and therefore use the same firmware. You can find more info about those in my signature.

what are the benefits of getting into the weeds of QMK that kbfirmware doesn't cover?
Basically implementing other features. For example, if you have shift registers in your keyboard, you need a custom matrix.c file as in the Pegasus Hoof.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline emenelopee

  • Thread Starter
  • Posts: 398
  • *klomp klomp klomp* I step on your house 🦖
Re: kbfirmware to direct code edit
« Reply #2 on: Thu, 01 February 2018, 13:26:05 »
Looking at your Toad code and my kbfirmware generated one I don't see much of a difference other than a bunch of redundant layer code kbfirmware generates (KC_TRNS on about a thousand or so placeholder layers I haven't programmed).

I'm not clued up on what shift registers are - I guess the question is: what are the limitations of kbfirmware that I, for a fairly standard keyboard with only one FN layer and no programmable lighting, would want to edit and compile the code manually?

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: kbfirmware to direct code edit
« Reply #3 on: Thu, 01 February 2018, 14:01:34 »
Looking at your Toad code and my kbfirmware generated one I don't see much of a difference other than a bunch of redundant layer code kbfirmware generates (KC_TRNS on about a thousand or so placeholder layers I haven't programmed).
The only difference is that you would need a different config file (json) for each layout with the kbfirmware tool, while a manually edited source wouldn't.

what are the limitations of kbfirmware?
Implementing your own code, for whatever reason, might be harder without direct access to the code.

for a fairly standard keyboard with only one FN layer and no programmable lighting, would want to edit and compile the code manually?
Not really. That online tool has everything you need for that.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline emenelopee

  • Thread Starter
  • Posts: 398
  • *klomp klomp klomp* I step on your house 🦖
Re: kbfirmware to direct code edit
« Reply #4 on: Thu, 01 February 2018, 16:44:25 »
Great, thanks, that's exactly what I needed. One layout, nothing fancy, I'll stick with kbfirmware. Kudos to the developer - what a timesaver and democratizer of this whole custom kb scene!